:root {
  --bg: #f4f7fb;
  --card: #ffffff;
  --text: #132033;
  --muted: #667085;
  --primary: #0f766e;
  --primary-dark: #115e59;
  --primary-soft: #ccfbf1;
  --danger: #b42318;
  --danger-soft: #fef3f2;
  --success: #166534;
  --success-soft: #ecfdf3;
  --warning: #92400e;
  --warning-soft: #fffbeb;
  --border: #d9e1ec;
  --shadow: 0 18px 45px rgba(15, 23, 42, .09);
  --shadow-soft: 0 10px 26px rgba(15, 23, 42, .07);
  --radius: 24px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; }
html { min-height: 100%; -webkit-text-size-adjust: 100%; }
body {
  min-height: 100dvh;
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(15,118,110,.14), transparent 30rem),
    radial-gradient(circle at 92% 4%, rgba(37,99,235,.10), transparent 28rem),
    linear-gradient(180deg, #f8fbff, var(--bg));
  line-height: 1.45;
}
a { color: inherit; }
img, svg, video { max-width: 100%; }
.skip-link { position: fixed; top: 10px; left: 10px; z-index: 9999; transform: translateY(-160%); background: white; padding: .7rem 1rem; border-radius: 999px; box-shadow: var(--shadow); }
.skip-link:focus { transform: translateY(0); }
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  color: white;
  background: linear-gradient(135deg, #101828, #115e59);
  box-shadow: 0 12px 32px rgba(15,23,42,.20);
  padding: .75rem max(1rem, env(safe-area-inset-left)) .8rem max(1rem, env(safe-area-inset-right));
}
.topbar-inner { max-width: 1180px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .7rem; font-weight: 900; text-decoration: none; letter-spacing: -.02em; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 15px; background: linear-gradient(135deg, #14b8a6, #2563eb); box-shadow: inset 0 0 0 1px rgba(255,255,255,.28); }
.user-pill { display: grid; justify-items: end; font-weight: 800; }
.user-pill small { opacity: .78; font-weight: 700; }
.container { width: min(1180px, calc(100% - 2rem)); margin: 1.35rem auto 5.5rem; }
.card { background: rgba(255,255,255,.93); border: 1px solid rgba(217,225,236,.85); border-radius: var(--radius); box-shadow: var(--shadow-soft); padding: clamp(1rem, 2.5vw, 1.45rem); }
.narrow { max-width: 720px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; margin-bottom: 1rem; }
h1, h2, h3 { margin: 0 0 .45rem; line-height: 1.12; letter-spacing: -.03em; }
h1 { font-size: clamp(2rem, 5vw, 3.4rem); }
h2 { font-size: clamp(1.25rem, 3vw, 1.65rem); }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.eyebrow { margin: 0 0 .35rem; color: var(--primary); text-transform: uppercase; font-size: .78rem; font-weight: 950; letter-spacing: .12em; }
.hero-actions, .section-head, .page-head.with-actions { display: flex; align-items: center; justify-content: space-between; gap: .75rem; flex-wrap: wrap; }
.page-head { margin: .3rem 0 1rem; }
.btn { min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: .45rem; border-radius: 14px; border: 1px solid var(--border); background: white; color: var(--text); padding: .7rem .95rem; text-decoration: none; font-weight: 900; cursor: pointer; box-shadow: 0 6px 14px rgba(15,23,42,.05); }
.btn.primary { background: linear-gradient(135deg, var(--primary), #14b8a6); color: white; border-color: transparent; }
.btn.small { min-height: 34px; padding: .42rem .65rem; border-radius: 11px; font-size: .88rem; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .85rem; margin: 1rem 0; }
.stat span { display: block; color: var(--muted); font-weight: 700; }
.stat strong { display: block; font-size: 2rem; letter-spacing: -.04em; }
.grid.two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.warehouse-grid, .admin-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.warehouse-card, .admin-tile { text-decoration: none; transition: transform .14s ease, box-shadow .14s ease; }
.warehouse-card:hover, .admin-tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.badge { display: inline-flex; align-items: center; width: fit-content; border-radius: 999px; background: var(--primary-soft); color: var(--primary-dark); font-weight: 900; font-size: .78rem; padding: .28rem .6rem; }
.form-grid { display: grid; gap: .85rem; }
label { display: grid; gap: .35rem; font-weight: 850; }
.field-help { color: var(--muted); font-size: .84rem; font-weight: 650; line-height: 1.35; }
input, select, textarea { width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: 14px; background: #fff; padding: .72rem .82rem; color: var(--text); font: inherit; }
textarea { resize: vertical; min-height: 96px; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(20,184,166,.25); border-color: #14b8a6; }
.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); }
table { width: 100%; border-collapse: collapse; min-width: 680px; background: white; }
th, td { padding: .85rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: #f8fafc; color: #475467; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }
.inline-correction { display: grid; grid-template-columns: 96px minmax(180px,1fr) auto; gap: .5rem; align-items: center; }
.warehouse-list, .movement-list { display: grid; gap: .65rem; }
.warehouse-item, .movement-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .8rem; border-radius: 17px; text-decoration: none; background: #f8fafc; border: 1px solid var(--border); }
.warehouse-item small, .movement-row small { display: block; color: var(--muted); }
.flash { margin: 0 0 .8rem; padding: .85rem 1rem; border-radius: 16px; border: 1px solid var(--border); font-weight: 800; background: white; }
.flash.success { background: var(--success-soft); color: var(--success); border-color: #bbf7d0; }
.flash.error { background: var(--danger-soft); color: var(--danger); border-color: #fecaca; }
.flash.info { background: #eff6ff; color: #1d4ed8; border-color: #bfdbfe; }
.warning-card { border-color: #fed7aa; background: var(--warning-soft); }
.empty { color: var(--muted); font-weight: 800; }
.search-form { display: flex; gap: .5rem; min-width: min(100%, 420px); }
.search-form input { min-width: 0; }
.login-shell { min-height: calc(100dvh - 180px); display: grid; place-items: center; }
.login-card { width: min(100%, 470px); }
.file-hint { color: var(--primary-dark); font-weight: 800; }
@media (max-width: 900px) {
  .hero, .grid.two, .warehouse-grid, .admin-grid { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .container { width: min(100% - 1rem, 1180px); margin-top: .85rem; }
  .user-pill { display: none; }
  .inline-correction { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .stats-grid { grid-template-columns: 1fr; }
  .hero-actions, .page-head.with-actions, .section-head, .search-form { align-items: stretch; flex-direction: column; }
  .btn { width: 100%; }
  .brand span:last-child { max-width: 62vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media print {
  body { background: white; }
  .container { width: 100%; margin: 0; }
  .card { box-shadow: none; border: none; }
  table { min-width: 0; }
}

/* 2026 update: polished navigation, transfer lines and admin editing */
.brand span:last-child { display: grid; line-height: 1.05; }
.brand small { opacity: .78; font-size: .74rem; font-weight: 750; letter-spacing: 0; margin-top: .15rem; }
.top-actions { display: flex; align-items: center; gap: .75rem; }
.logout-pill { min-height: 40px; display: inline-flex; align-items: center; padding: .45rem .75rem; border-radius: 999px; text-decoration: none; font-weight: 900; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); }
.nav-link span { display: inline-grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 999px; background: rgba(255,255,255,.10); margin-right: .25rem; }
.nav-link.highlight { background: linear-gradient(135deg, rgba(20,184,166,.28), rgba(59,130,246,.22)); }
.actions-row { display: flex; gap: .5rem; flex-wrap: wrap; }
.btn.secondary { background: #eef6ff; border-color: #bfdbfe; color: #1d4ed8; }
.btn.danger { background: var(--danger-soft); border-color: #fecaca; color: var(--danger); }
.btn.ghost { box-shadow: none; }
.form-note { border: 1px solid #99f6e4; background: linear-gradient(135deg, #ecfeff, #f0fdfa); color: #134e4a; border-radius: 16px; padding: .75rem .9rem; font-weight: 800; }
.compact-grid { margin: 0; }
.transfer-form .primary { justify-self: start; min-width: min(100%, 280px); }
.transfer-lines { display: grid; gap: .55rem; }
.transfer-line { display: grid; grid-template-columns: minmax(220px, 1fr) 130px auto; gap: .55rem; align-items: center; padding: .55rem; border: 1px solid var(--border); border-radius: 18px; background: #f8fafc; }
.transfer-line-head { padding: 0 .55rem; border: 0; background: transparent; color: var(--muted); font-size: .78rem; font-weight: 950; text-transform: uppercase; letter-spacing: .04em; }
.transfer-line select, .transfer-line input { background: white; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.settings-card { margin-top: 1rem; }
.settings-form { display: grid; grid-template-columns: minmax(240px, 1fr) auto; gap: .75rem; align-items: end; }
.admin-tile { position: relative; overflow: hidden; }
.tile-icon { position: absolute; right: 1rem; top: 1rem; font-size: 2rem; opacity: .16; }
.record-list { display: grid; gap: .75rem; }
.record-card { border: 1px solid var(--border); border-radius: 18px; background: #fff; padding: .85rem; }
.record-card.inactive { background: #f8fafc; opacity: .82; }
.record-summary { display: flex; justify-content: space-between; gap: .75rem; align-items: start; }
.record-summary small { display: block; color: var(--muted); margin-top: .12rem; }
.status-pill { border-radius: 999px; padding: .22rem .55rem; font-size: .78rem; font-weight: 950; }
.status-pill.ok { color: var(--success); background: var(--success-soft); }
.status-pill.off { color: var(--danger); background: var(--danger-soft); }
.edit-panel { margin-top: .65rem; }
.edit-panel summary { cursor: pointer; font-weight: 950; color: var(--primary-dark); padding: .55rem 0; }
.compact-form { margin: .5rem 0 .65rem; padding: .85rem; border-radius: 16px; background: #f8fafc; border: 1px solid var(--border); }
.check-row { display: flex; grid-template-columns: auto 1fr; align-items: center; gap: .55rem; font-weight: 900; }
.check-row input { width: 20px; min-height: 20px; }
.stock-print-card table { min-width: 620px; }
@media (max-width: 900px) {
  .top-actions .logout-pill { display: none; }
  .brand small { display: none; }
  .transfer-line, .transfer-line-head { grid-template-columns: 1fr; }
  .transfer-line-head { display: none; }
  .transfer-form .primary { width: 100%; }
  .settings-form { grid-template-columns: 1fr; }
  .actions-row { width: 100%; }
  .actions-row .btn { flex: 1 1 160px; }
}
@media print {
  .form-note, .actions-row, .print-head .btn { display: none !important; }
  .stock-print-card table { min-width: 0; }
}

/* 2026-05 top menu refresh: horizontal navigation with dropdowns */
.topbar {
  padding-block: .6rem;
}
.topbar-inner {
  max-width: 1320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .85rem;
}
.authenticated .container {
  width: min(1320px, calc(100% - 2rem));
  margin-top: 1.15rem;
  margin-bottom: 2.5rem;
}
.top-nav {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  min-width: 0;
}
.nav-link,
.nav-summary {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .42rem;
  padding: .43rem .67rem;
  border-radius: 999px;
  color: rgba(255,255,255,.88);
  text-decoration: none;
  font-weight: 900;
  line-height: 1;
  border: 1px solid transparent;
  background: rgba(255,255,255,.08);
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  box-shadow: none;
}
.nav-link:hover,
.nav-summary:hover,
.nav-link.active,
.nav-dropdown.active > .nav-summary,
.nav-dropdown[open] > .nav-summary {
  color: #fff;
  background: rgba(255,255,255,.16);
  border-color: rgba(255,255,255,.22);
}
.nav-link.highlight {
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  color: white;
  box-shadow: 0 12px 24px rgba(20,184,166,.22);
}
.nav-link.highlight:hover,
.nav-link.highlight.active {
  background: linear-gradient(135deg, #14b8a6, #2563eb);
}
.nav-link > span:not(.nav-icon),
.nav-summary > span:not(.nav-icon):not(.chevron) {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  margin-right: 0;
  place-items: initial;
}
.nav-icon {
  width: 1.45rem;
  height: 1.45rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.13);
  margin-right: 0;
  font-size: .95rem;
}
.nav-dropdown {
  position: relative;
}
.nav-dropdown summary {
  list-style: none;
}
.nav-dropdown summary::-webkit-details-marker {
  display: none;
}
.chevron {
  opacity: .78;
  font-size: .9rem;
  transform: translateY(-1px);
}
.nav-dropdown[open] .chevron {
  transform: rotate(180deg) translateY(1px);
}
.dropdown-menu {
  position: absolute;
  top: calc(100% + .65rem);
  left: 0;
  z-index: 60;
  width: min(330px, calc(100vw - 2rem));
  padding: .45rem;
  border-radius: 20px;
  border: 1px solid rgba(217,225,236,.92);
  background: rgba(255,255,255,.98);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(15,23,42,.22);
  backdrop-filter: blur(18px);
}
.dropdown-menu.admin-menu {
  width: min(370px, calc(100vw - 2rem));
}
.dropdown-link {
  display: grid;
  gap: .12rem;
  padding: .75rem .85rem;
  border-radius: 15px;
  text-decoration: none;
  border: 1px solid transparent;
}
.dropdown-link strong {
  font-size: .96rem;
}
.dropdown-link small {
  color: var(--muted);
  font-weight: 750;
}
.dropdown-link:hover,
.dropdown-link.active {
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  border-color: #bae6fd;
  color: var(--primary-dark);
}
.dropdown-link:hover small,
.dropdown-link.active small {
  color: #155e75;
}
.low-stock-alert {
  border-width: 2px;
  box-shadow: 0 18px 38px rgba(146,64,14,.13);
  margin-bottom: 1rem;
}
.low-stock-alert .eyebrow { color: var(--warning); }
.stats-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }

@media (max-width: 1180px) {
  .topbar-inner {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
  }
  .top-actions {
    justify-self: end;
  }
  .top-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
    padding-top: .15rem;
  }
}

@media (max-width: 900px) {
  .topbar { padding: .55rem max(.6rem, env(safe-area-inset-left)) .65rem max(.6rem, env(safe-area-inset-right)); }
  .topbar-inner {
    grid-template-columns: 1fr auto;
    gap: .55rem;
  }
  .brand small { display: none; }
  .top-actions .user-pill { display: none; }
  .top-actions .logout-pill { display: inline-flex; min-height: 38px; padding-inline: .65rem; }
  .top-nav {
    gap: .35rem;
    overflow: visible;
  }
  .nav-link,
  .nav-summary {
    min-height: 39px;
    padding: .38rem .58rem .38rem .42rem;
    font-size: .92rem;
  }
  .nav-icon {
    width: 1.35rem;
    height: 1.35rem;
    font-size: .88rem;
  }
  .dropdown-menu {
    top: calc(100% + .45rem);
  }
  .authenticated .container {
    width: min(100% - 1rem, 1320px);
    margin-top: .85rem;
  }
  .stats-grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .brand-mark { width: 38px; height: 38px; border-radius: 13px; }
  .brand span:last-child { max-width: 58vw; }
  .top-nav {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }
  .nav-link,
  .nav-summary {
    width: 100%;
    justify-content: flex-start;
    min-width: 0;
  }
  .nav-link > span:last-child,
  .nav-summary > span:nth-child(2) {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .nav-dropdown {
    min-width: 0;
  }
  .dropdown-menu,
  .dropdown-menu.admin-menu {
    left: 0;
    width: min(92vw, 360px);
  }
  .stats-grid.three { grid-template-columns: 1fr; }
  .low-stock-alert .section-head { align-items: stretch; }
}

@media print {
  .topbar { display: none !important; }
  .authenticated .container { width: 100%; margin: 0; }
}

/* 2026-05 compact command menu: small header + spacious flyout */
.topbar {
  padding-block: .5rem;
}
.compact-menu-shell {
  max-width: 1320px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.compact-brand {
  min-width: 0;
  flex: 0 1 auto;
}
.compact-brand .brand-copy {
  display: grid;
  min-width: 0;
  line-height: 1.04;
}
.compact-brand .brand-copy strong {
  max-width: 22rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.quick-menu {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
  min-width: 0;
}
.quick-link,
.menu-trigger {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.10);
  color: white;
  padding: .45rem .75rem;
  font-weight: 950;
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
  user-select: none;
  white-space: nowrap;
  box-shadow: none;
}
.quick-link:hover,
.quick-link.active,
.menu-trigger:hover,
.app-menu[open] .menu-trigger {
  background: rgba(255,255,255,.18);
  border-color: rgba(255,255,255,.32);
}
.quick-link.customer {
  border-color: transparent;
  background: linear-gradient(135deg, #0f766e, #14b8a6);
  box-shadow: 0 12px 24px rgba(20,184,166,.22);
}
.quick-link.customer:hover,
.quick-link.customer.active {
  background: linear-gradient(135deg, #14b8a6, #2563eb);
}
.quick-icon {
  width: 1.45rem;
  height: 1.45rem;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  flex: 0 0 auto;
}
.app-menu {
  position: relative;
}
.app-menu summary {
  list-style: none;
}
.app-menu summary::-webkit-details-marker {
  display: none;
}
.hamburger {
  width: 1.35rem;
  height: 1.1rem;
  display: grid;
  gap: .22rem;
  align-content: center;
}
.hamburger span {
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}
.app-menu-panel {
  position: absolute;
  top: calc(100% + .7rem);
  right: 0;
  z-index: 90;
  width: min(760px, calc(100vw - 2rem));
  max-height: min(78vh, 760px);
  overflow: auto;
  padding: .85rem;
  border-radius: 24px;
  border: 1px solid rgba(217,225,236,.95);
  background: rgba(255,255,255,.98);
  color: var(--text);
  box-shadow: 0 30px 80px rgba(15,23,42,.26);
  backdrop-filter: blur(18px);
}
.menu-user-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .8rem .9rem;
  border-radius: 18px;
  background: linear-gradient(135deg, #101828, #115e59);
  color: white;
  margin-bottom: .75rem;
}
.menu-user-card strong,
.menu-user-card small {
  display: block;
}
.menu-user-card small {
  opacity: .78;
  font-weight: 750;
  margin-top: .1rem;
}
.logout-mini {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .45rem .7rem;
  border-radius: 999px;
  background: rgba(255,255,255,.14);
  border: 1px solid rgba(255,255,255,.22);
  color: white;
  font-weight: 950;
  text-decoration: none;
  white-space: nowrap;
}
.menu-section {
  padding: .55rem 0 .4rem;
}
.menu-section + .menu-section {
  border-top: 1px solid var(--border);
}
.menu-section h2 {
  margin: 0 0 .55rem;
  font-size: .78rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 950;
}
.menu-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .55rem;
}
.menu-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.menu-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-areas: "icon title" "icon text";
  column-gap: .65rem;
  row-gap: .08rem;
  align-items: center;
  min-height: 74px;
  padding: .72rem;
  border-radius: 18px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 8px 18px rgba(15,23,42,.045);
}
.menu-item > span {
  grid-area: icon;
  width: 2.3rem;
  height: 2.3rem;
  display: inline-grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(135deg, #ccfbf1, #eff6ff);
  color: var(--primary-dark);
  font-weight: 950;
}
.menu-item strong {
  grid-area: title;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: .96rem;
}
.menu-item small {
  grid-area: text;
  min-width: 0;
  color: var(--muted);
  font-weight: 720;
  line-height: 1.25;
}
.menu-item:hover,
.menu-item.active {
  border-color: #99f6e4;
  background: linear-gradient(135deg, #ecfeff, #eff6ff);
  color: var(--primary-dark);
}
.menu-item:hover small,
.menu-item.active small {
  color: #155e75;
}
.admin-section .menu-item > span {
  background: linear-gradient(135deg, #fef3c7, #fffbeb);
  color: #92400e;
}
.authenticated .container {
  width: min(1320px, calc(100% - 2rem));
  margin-top: 1.05rem;
  margin-bottom: 2.5rem;
}

@media (max-width: 760px) {
  .topbar {
    padding: .48rem max(.55rem, env(safe-area-inset-left)) .55rem max(.55rem, env(safe-area-inset-right));
  }
  .compact-menu-shell {
    gap: .45rem;
  }
  .brand-mark {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }
  .compact-brand .brand-copy strong {
    max-width: 34vw;
  }
  .compact-brand .brand-copy small {
    display: none;
  }
  .quick-link,
  .menu-trigger {
    min-height: 40px;
    padding: .42rem .58rem;
  }
  .quick-label {
    display: none;
  }
  .quick-icon {
    margin: 0;
  }
  .app-menu-panel {
    position: fixed;
    top: calc(56px + env(safe-area-inset-top, 0px));
    right: .55rem;
    left: .55rem;
    width: auto;
    max-height: calc(100dvh - 72px);
    padding: .65rem;
    border-radius: 22px;
  }
  .menu-grid,
  .menu-grid.two {
    grid-template-columns: 1fr;
  }
  .menu-item {
    min-height: 66px;
  }
  .authenticated .container {
    width: min(100% - 1rem, 1320px);
    margin-top: .8rem;
  }
}

@media (max-width: 430px) {
  .compact-brand .brand-copy {
    display: none;
  }
  .quick-menu {
    flex: 1 1 auto;
  }
  .quick-link,
  .menu-trigger {
    flex: 1 1 0;
    padding-inline: .45rem;
  }
  .app-menu {
    flex: 1 1 0;
  }
  .app-menu .menu-trigger {
    width: 100%;
  }
  .menu-user-card {
    align-items: stretch;
    flex-direction: column;
  }
  .logout-mini {
    width: 100%;
  }
}

@media print {
  .topbar { display: none !important; }
  .authenticated .container { width: 100%; margin: 0; }
}
