:root {
  --bg: #eef2f7;
  --card: #ffffff;
  --ink: #152238;
  --muted: #6f7f98;
  --brand: #0f6e9c;
  --brand-dark: #094d70;
  --danger: #d62b37;
  --border: #dfe6f0;
  --shadow: 0 8px 28px rgba(17, 38, 74, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background:
    radial-gradient(1200px 700px at -20% -20%, #d8e8ff 0%, transparent 60%),
    radial-gradient(900px 600px at 120% -10%, #ffe6df 0%, transparent 55%),
    var(--bg);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, sans-serif;
}

a { color: inherit; }

.app-shell {
  display: flex;
  min-height: 100vh;
}

.app-sidebar {
  width: 320px;
  background: linear-gradient(180deg, #0b1118 0%, #101b2a 100%);
  color: #f3f7ff;
  padding: 18px 14px;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: transform .22s ease;
  box-shadow: 8px 0 30px rgba(0,0,0,.25);
}

.app-sidebar.is-closed {
  transform: translateX(-100%);
}

.sidebar-top {
  min-height: 0;
  overflow-y: auto;
}

.brand-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin: 8px 0 16px;
}

.brand-logo {
  width: 144px;
  height: auto;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform .08s ease, filter .2s ease;
}

.btn:active { transform: translateY(1px); }

.btn-create {
  width: 100%;
  background: linear-gradient(90deg, #d2161f, #f03b28);
  color: #fff;
  margin-bottom: 14px;
}

.main-nav {
  display: grid;
  gap: 8px;
  margin-bottom: 14px;
}

.nav-item {
  display: flex;
  align-items: center;
  min-height: 42px;
  border-radius: 10px;
  padding: 0 12px;
  text-decoration: none;
  background: rgba(255,255,255,.06);
  color: #dce9ff;
  font-weight: 700;
}

.nav-item:hover,
.nav-item.active {
  background: linear-gradient(90deg, #0f6e9c, #169ac9);
  color: #fff;
}

.sidebar-section-title {
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #9cb4d7;
  margin: 16px 4px 10px;
}

.accordion-list {
  display: grid;
  gap: 8px;
}

.accordion-item {
  background: rgba(255,255,255,.06);
  border-radius: 10px;
  overflow: hidden;
}

.accordion-trigger {
  width: 100%;
  border: 0;
  background: transparent;
  color: #ecf2ff;
  font-weight: 700;
  padding: 10px 10px;
  display: grid;
  grid-template-columns: 14px 1fr auto;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.accordion-trigger .dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--cat-color, #2c8db8);
}

.accordion-trigger .count,
.stage-link .count {
  color: #c7d9f5;
  font-size: 12px;
  font-weight: 800;
}

.accordion-panel {
  display: none;
  padding: 2px 8px 10px;
}

.accordion-item.open .accordion-panel {
  display: grid;
  gap: 4px;
}

.stage-link {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  border-radius: 8px;
  padding: 6px 8px;
  text-decoration: none;
  color: #d8e5ff;
}

.stage-link .dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.stage-link:hover {
  background: rgba(255,255,255,.08);
}

.sidebar-bottom {
  margin-top: 16px;
  font-size: 12px;
  color: #8fa3c1;
  text-align: center;
}

.app-main {
  flex: 1;
  margin-left: 320px;
  min-width: 0;
}

.app-shell.sidebar-closed .app-main {
  margin-left: 0;
}

.app-main.full {
  margin-left: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  min-height: 68px;
  background: rgba(255,255,255,.72);
  backdrop-filter: blur(9px);
  border-bottom: 1px solid rgba(255,255,255,.8);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px;
  overflow: visible;
}

.menu-toggle {
  border: 0;
  background: #101b2a;
  color: #fff;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  font-size: 18px;
  cursor: pointer;
}

.topbar-right {
  margin-left: auto;
  display: flex;
  gap: 10px;
  align-items: center;
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 10px;
  font-weight: 700;
}

.user-chip small {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 11px;
}

.user-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: var(--user-color, #0f6e9c);
}

.btn-logout {
  background: #111c2d;
  color: #fff;
}

.page-content {
  padding: 20px;
}

.alert {
  border-radius: 10px;
  padding: 10px 12px;
  margin-bottom: 10px;
  border: 1px solid var(--border);
  background: #fff;
  box-shadow: var(--shadow);
}

.alert-success { border-color: #8ed2a1; }
.alert-danger  { border-color: #f2a6aa; }
.alert-warning { border-color: #f0d182; }
.alert-info    { border-color: #a7cfec; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.card-body {
  padding: 16px;
}

.section-title {
  font-family: "Space Grotesk", sans-serif;
  margin: 0 0 12px;
  letter-spacing: -.02em;
}

.grid {
  display: grid;
  gap: 14px;
}

.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.settings-split {
  grid-template-columns: minmax(300px, .9fr) minmax(0, 1.5fr);
}

.kpi {
  padding: 14px;
  border-radius: 14px;
  color: #fff;
  min-height: 88px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.kpi .kpi-label { font-size: 13px; opacity: .9; }
.kpi .kpi-value { font-size: 30px; font-weight: 800; letter-spacing: -.03em; }

.kpi-link {
  text-decoration: none;
  color: #fff;
  box-shadow: var(--shadow);
  transition: transform .12s ease, filter .18s ease;
}

.kpi-link:hover {
  transform: translateY(-2px);
  filter: brightness(1.02);
}

.kpi.open   { background: linear-gradient(120deg, #0a6792, #17a0c8); }
.kpi.today  { background: linear-gradient(120deg, #8e2a8d, #c23587); }
.kpi.week   { background: linear-gradient(120deg, #df6f08, #f7961d); }
.kpi.done   { background: linear-gradient(120deg, #1f8f4d, #3cb86b); }

.columns {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
}

.stage-col {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  min-height: 240px;
  overflow: hidden;
}

.stage-head {
  padding: 10px 12px;
  color: #fff;
  font-weight: 800;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.project-list {
  padding: 10px;
  display: grid;
  gap: 8px;
}

.project-mini {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  text-decoration: none;
  color: var(--ink);
  background: #f8fbff;
}

.project-mini:hover {
  background: #edf5ff;
}

.project-mini .title {
  font-weight: 800;
  margin-bottom: 6px;
}

.project-mini .meta {
  color: var(--muted);
  font-size: 12px;
}

.form-control,
.form-select,
textarea {
  width: 100%;
  border: 1px solid #cfd9e8;
  background: #fff;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
}

textarea { min-height: 130px; resize: vertical; }

label {
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 4px;
  display: inline-block;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.creator-toggle {
  border: 1px dashed #d3dfef;
  border-radius: 12px;
  background: #f8fbff;
}

.creator-summary {
  list-style: none;
  padding: 12px 14px;
  cursor: pointer;
  font-weight: 800;
  color: #1c3554;
}

.creator-summary::-webkit-details-marker {
  display: none;
}

.creator-toggle[open] .creator-summary {
  border-bottom: 1px solid #e2ebf7;
}

.compact-create-form {
  padding: 12px;
  display: grid;
  gap: 10px;
}

.compact-create-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.compact-create-row > .form-control,
.compact-create-row > .form-select {
  width: auto;
  min-width: 140px;
  flex: 1 1 170px;
}

.compact-create-row .btn {
  flex: 0 0 auto;
}

.compact-color {
  width: 44px;
  min-width: 44px;
  height: 38px;
  padding: 4px;
}

.compact-order {
  width: 86px;
  min-width: 86px;
}

.compact-select-sm {
  width: auto;
  min-width: 160px;
  flex: 0 1 180px;
}

.compact-workflow-row .compact-color,
.compact-workflow-row .compact-order,
.compact-fields-row .compact-order {
  flex: 0 0 auto;
}

.compact-workflow-row select[name="next_stage_id"] {
  flex: 1 1 220px;
}

.compact-workflow-footer {
  justify-content: space-between;
}

.fields-options-wrap {
  width: 100%;
}

.fields-options-wrap label {
  margin-bottom: 4px;
}

.list-tools {
  margin-bottom: 10px;
}

.search-control {
  max-width: 420px;
}

.entity-list {
  display: grid;
  gap: 10px;
}

.entity-row {
  border-radius: 12px;
  box-shadow: none;
}

.entity-row .card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 12px;
}

.entity-row-body {
  width: 100%;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 10px;
}

.compact-row-form {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: end;
  flex: 1 1 auto;
  min-width: 0;
}

.compact-row-form > .form-control,
.compact-row-form > .form-select {
  width: auto;
  min-width: 130px;
  flex: 1 1 160px;
}

.compact-row-form > .tag {
  flex: 0 0 auto;
}

.compact-categories-existing,
.compact-workflow-existing,
.compact-fields-existing,
.compact-users-existing {
  gap: 12px;
}

.compact-categories-existing .field-inline {
  flex: 0 0 240px;
}

.compact-categories-existing .field-inline-sm {
  flex: 0 0 90px;
  min-width: 90px;
}

.compact-categories-existing .tag {
  flex: 0 0 110px;
}

.compact-categories-existing .inline-check {
  flex: 0 0 90px;
}

.compact-workflow-existing .tag {
  flex: 0 0 110px;
}

.compact-workflow-existing .field-inline {
  flex: 0 0 220px;
}

.compact-workflow-existing .field-inline-sm {
  flex: 0 0 90px;
  min-width: 90px;
}

.compact-workflow-existing .field-inline-lg {
  flex: 0 0 260px;
  min-width: 240px;
}

.compact-workflow-existing .inline-check {
  flex: 0 0 110px;
}

.compact-fields-existing .tag {
  flex: 0 0 110px;
}

.compact-fields-existing .field-inline {
  flex: 0 0 220px;
}

.compact-fields-existing .field-inline-sm {
  flex: 0 0 110px;
  min-width: 110px;
}

.compact-fields-existing .inline-check {
  flex: 0 0 110px;
}

.compact-users-existing .tag {
  flex: 0 0 110px;
}

.compact-users-existing .field-inline-sm {
  flex: 0 0 140px;
}

.compact-users-existing .field-inline {
  flex: 0 0 200px;
}

.compact-users-existing .field-inline:nth-of-type(3) {
  flex: 0 0 230px;
}

.compact-users-existing .inline-check {
  flex: 0 0 90px;
}

.field-inline {
  display: grid;
  gap: 4px;
  flex: 1 1 180px;
  min-width: 160px;
}

.field-inline .form-control,
.field-inline .form-select {
  width: 100%;
  min-width: 0;
}

.field-inline-sm {
  flex: 0 0 auto;
  min-width: 92px;
}

.field-inline-lg {
  flex: 1 1 260px;
}

.mini-label {
  margin: 0;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #5f7390;
  font-weight: 800;
  line-height: 1;
}

.compact-row-form .compact-color {
  width: 44px;
  min-width: 44px;
  flex: 0 0 44px;
}

.compact-row-form .compact-order {
  width: 86px;
  min-width: 86px;
  flex: 0 0 86px;
}

.field-inline-sm .compact-color {
  width: 44px;
  min-width: 44px;
}

.field-inline-sm .compact-order {
  width: 86px;
  min-width: 86px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-weight: 700;
  color: #3d5676;
  white-space: nowrap;
}

.inline-check input {
  margin: 0;
}

.compact-inline-form {
  margin-left: auto;
}

.compact-inline-form .btn {
  height: 40px;
}

.entity-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  align-self: end;
}

.entity-actions .compact-inline-form {
  margin-left: 0;
}

.compact-field-form {
  display: grid;
  gap: 10px;
  flex: 1 1 auto;
  min-width: 0;
}

.compact-fields-existing {
  width: 100%;
}

.compact-field-options {
  display: grid;
  gap: 4px;
}

.compact-field-options label {
  margin: 0;
  color: #5f7390;
  font-size: 12px;
  font-weight: 700;
}

.compact-options {
  min-height: 76px;
}

.compact-categories-existing .field-inline:first-of-type {
  min-width: 220px;
}

.compact-workflow-existing .field-inline:first-of-type {
  min-width: 190px;
}

.compact-workflow-existing .field-inline-lg {
  min-width: 260px;
}

.compact-users-create .form-control {
  flex: 1 1 170px;
}

.compact-users-create-footer {
  justify-content: space-between;
}

.compact-users-existing input[type="text"] {
  flex: 1 1 140px;
}

.compact-users-existing input[type="email"] {
  flex: 1 1 170px;
}

.compact-users-existing input[type="password"] {
  flex: 1 1 200px;
  min-width: 180px;
}

.compact-users-existing select {
  flex: 0 1 220px;
}

.compact-users-existing .field-inline {
  min-width: 170px;
}

.compact-users-existing .field-inline-sm {
  min-width: 140px;
}

.compact-users-existing .field-inline-sm .compact-color {
  width: 100%;
  min-width: 0;
}

.compact-roles-existing {
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-name {
  font-family: "Space Grotesk", sans-serif;
  font-size: 20px;
  letter-spacing: -.02em;
}

.role-perm-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.role-perm-summary > span:first-child {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
}

.role-perm-summary > span:first-child small {
  color: #6f7f98;
  font-weight: 700;
}

.role-perm-form {
  padding-top: 8px;
}

.perm-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.perm-check {
  margin: 0;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  border: 1px solid #dbe5f3;
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.perm-check input {
  margin: 2px 0 0;
}

.perm-check .perm-label {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  line-height: 1.2;
}

.perm-check .perm-label small {
  color: #6f7f98;
  font-size: 11px;
  font-weight: 700;
}

.perm-check.is-hidden {
  display: none;
}

.btn-primary {
  background: linear-gradient(90deg, var(--brand), #14a0cb);
  color: #fff;
}

.btn-secondary {
  background: #1a2740;
  color: #fff;
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.btn-danger-soft {
  background: #ffe7ea;
  color: #8b1f2a;
}

.table-wrap { overflow: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.table th, .table td {
  border-bottom: 1px solid #e6edf7;
  padding: 10px;
  text-align: left;
  vertical-align: top;
}

.table th {
  background: #f7fbff;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #5c728f;
}

.tag {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  background: #edf5ff;
  color: #31567d;
  font-size: 12px;
  font-weight: 700;
}

.notif-wrap { position: relative; }

.notif-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  position: relative;
}

.icon-bell {
  width: 18px;
  height: 18px;
  stroke: #1b2c43;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.notif-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  border-radius: 999px;
  background: #e12834;
  color: #fff;
  font-size: 11px;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 0 6px;
}

.notif-dropdown {
  position: absolute;
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  width: min(360px, calc(100vw - 24px));
  max-width: calc(100vw - 24px);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow);
  z-index: 120;
}

.notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px;
  border-bottom: 1px solid #eef3fa;
}

.link-btn {
  border: 0;
  background: transparent;
  color: #0f6e9c;
  font-weight: 700;
  cursor: pointer;
}

.notif-list {
  max-height: 340px;
  overflow: auto;
}

.notif-item {
  padding: 10px;
  border-bottom: 1px solid #eef3fa;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: start;
}

.notif-item.unread {
  background: #f5fbff;
}

.notif-link {
  text-decoration: none;
  color: var(--ink);
}

.notif-title { font-weight: 800; font-size: 13px; margin-bottom: 4px; }
.notif-body { font-size: 12px; color: #5d738e; margin-bottom: 4px; }
.notif-time { font-size: 11px; color: #8ca0bb; }

.notif-mark {
  border: 0;
  background: #e6f2ff;
  color: #1e6ca0;
  border-radius: 8px;
  width: 28px;
  height: 28px;
  cursor: pointer;
}

.notif-empty {
  padding: 16px;
  color: #6f7f98;
  font-size: 13px;
}

.login-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.login-card {
  width: min(440px, 94vw);
  border-radius: 18px;
  background: #fff;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 28px;
}

.login-logo {
  width: 180px;
  display: block;
  margin: 0 auto 14px;
}

.login-title {
  font-size: 24px;
  text-align: center;
}

.password-wrap {
  position: relative;
}

.password-wrap .form-control {
  padding-right: 44px;
}

.input-icon-btn {
  position: absolute;
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #5f728e;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.input-icon-btn:hover {
  background: #edf4fb;
}

.icon-eye {
  width: 18px;
  height: 18px;
}

.input-icon-btn .eye-slash {
  opacity: 0;
}

.input-icon-btn.is-visible .eye-slash {
  opacity: 1;
}

.remember-row {
  margin-top: -2px;
}

.remember-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #415b7c;
  font-weight: 700;
}

.upload-progress {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #e9f1fb;
  overflow: hidden;
}

.upload-progress .bar {
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, #0f6e9c, #17a0c8);
  transition: width .18s ease;
}

@media (max-width: 1200px) {
  .columns { grid-template-columns: repeat(2, minmax(220px, 1fr)); }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perm-grid { grid-template-columns: 1fr; }
}

@media (max-width: 900px) {
  .app-main { margin-left: 0; }
  .app-sidebar { transform: translateX(-100%); }
  .app-sidebar:not(.is-closed) { transform: translateX(0); }
  .form-row { grid-template-columns: 1fr; }
  .settings-split {
    grid-template-columns: 1fr;
  }
  .compact-create-row,
  .compact-row-form {
    display: grid;
    grid-template-columns: 1fr;
    align-items: stretch;
  }
  .compact-create-row > .form-control,
  .compact-create-row > .form-select,
  .compact-row-form .form-control,
  .compact-row-form .form-select,
  .compact-select-sm,
  .compact-order,
  .compact-color {
    width: 100%;
    min-width: 0;
    flex: 1 1 auto;
  }
  .field-inline {
    min-width: 0;
    width: 100%;
  }
  .compact-categories-existing .field-inline,
  .compact-categories-existing .field-inline-sm,
  .compact-categories-existing .tag,
  .compact-categories-existing .inline-check,
  .compact-workflow-existing .tag,
  .compact-workflow-existing .field-inline,
  .compact-workflow-existing .field-inline-sm,
  .compact-workflow-existing .field-inline-lg,
  .compact-workflow-existing .inline-check,
  .compact-fields-existing .tag,
  .compact-fields-existing .field-inline,
  .compact-fields-existing .field-inline-sm,
  .compact-fields-existing .inline-check,
  .compact-users-existing .tag,
  .compact-users-existing .field-inline,
  .compact-users-existing .field-inline-sm,
  .compact-users-existing .inline-check {
    flex: 1 1 auto;
    min-width: 0;
  }
  .field-inline-sm .compact-color,
  .field-inline-sm .compact-order {
    width: 100%;
    min-width: 0;
  }
  .compact-inline-form {
    margin-left: 0;
    width: auto;
  }
  .compact-inline-form .btn {
    width: auto;
  }
  .entity-row .card-body {
    align-items: stretch;
    flex-direction: column;
  }
  .entity-row-body {
    grid-template-columns: 1fr;
  }
  .entity-actions {
    justify-content: flex-start;
  }
  .compact-workflow-footer {
    justify-content: flex-start;
  }
  .search-control {
    max-width: 100%;
  }
  .role-perm-summary {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .columns { grid-template-columns: 1fr; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .page-content { padding: 14px; }
  .topbar { padding: 10px; }
  .user-chip small { display: none; }
  .topbar-right { gap: 6px; }
  .notif-dropdown {
    width: min(330px, calc(100vw - 16px));
    max-width: calc(100vw - 16px);
  }
}
