/* ============================================================
   OwnAsset design system
   ============================================================ */
:root {
  --navy-950: #061827;
  --navy-900: #0a2234;
  --navy-800: #0f3047;
  --navy-700: #17425c;
  --teal-300: #5eead4;
  --teal-400: #2dd4bf;
  --teal-500: #14b8a6;
  --teal-600: #0d9488;
  --teal-700: #0f766e;
  --blue-500: #3b82f6;
  --amber-500: #f59e0b;
  --red-500: #ef4444;
  --ink: #152534;
  --ink-soft: #34495c;
  --muted: #6b7c8f;
  --muted-2: #94a3b3;
  --line: #e2e9ef;
  --line-2: #eef3f6;
  --bg: #f2f6f8;
  --card: #ffffff;
  --soft: #f7fafb;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(11, 38, 56, 0.05);
  --shadow-md: 0 12px 30px rgba(11, 38, 56, 0.09);
  --shadow-lg: 0 28px 70px rgba(5, 24, 39, 0.22);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --sidebar-w: 268px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
body.sidebar-open { overflow: hidden; }
a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: none; }
h1, h2, h3, h4 { margin: 0; line-height: 1.22; color: var(--ink); letter-spacing: -0.02em; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0; }
small { font-size: 12px; }
img { max-width: 100%; }
button, input, select, textarea { font-family: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 2px; }
::selection { background: rgba(20, 184, 166, 0.25); }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.strong { font-weight: 700; }
.right { text-align: right; }
.nowrap { white-space: nowrap; }
.text-amber { color: #b45309 !important; }
.text-teal { color: var(--teal-700) !important; }
.w-100 { width: 100%; }
.mt-0 { margin-top: 0; } .mt-1 { margin-top: 6px; } .mt-2 { margin-top: 12px; } .mt-3 { margin-top: 18px; }
.mb-0 { margin-bottom: 0; } .mb-2 { margin-bottom: 12px; }
.stack { display: grid; gap: 10px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid-2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.split { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }

/* ---------- icons ---------- */
.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: none;
}
.nav-icon { width: 18px; height: 18px; }
.icon { width: 18px; height: 18px; }

/* ---------- shell ---------- */
.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-w);
  z-index: 40;
  display: flex;
  flex-direction: column;
  color: #bdcedb;
  background:
    radial-gradient(120% 70% at 0% 0%, rgba(20, 184, 166, 0.16), transparent 55%),
    linear-gradient(180deg, var(--navy-950) 0%, var(--navy-900) 48%, #0a2b3d 100%);
  border-right: 1px solid rgba(255, 255, 255, 0.05);
  overflow: hidden;
}
.sidebar::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: radial-gradient(rgba(255,255,255,0.055) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.5;
}
.brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 22px 18px 18px;
  color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.brand-logo { width: 42px; height: 42px; filter: drop-shadow(0 8px 16px rgba(20, 184, 166, 0.28)); }
.brand-text { display: grid; min-width: 0; }
.brand-word { font-size: 18px; font-weight: 800; letter-spacing: -0.035em; line-height: 1.15; color: #fff; }
.brand-word span { color: var(--teal-300); }
.brand-text small {
  margin-top: 2px;
  color: #89a5b9;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav { position: relative; z-index: 1; flex: 1; overflow-y: auto; padding: 10px 12px 20px; scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.16) transparent; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 99px; }
.nav-section { margin-top: 16px; }
.nav-section:first-child { margin-top: 4px; }
.nav-title {
  display: block;
  padding: 0 12px 7px;
  color: #6d8ca4;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 37px;
  padding: 8px 11px;
  margin: 1px 0;
  border-radius: 9px;
  color: #b9cbd9;
  font-size: 12.8px;
  font-weight: 550;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, 0.06); color: #fff; }
.nav-item .nav-icon { color: #7f9fb7; transition: color 0.15s ease; }
.nav-item:hover .nav-icon { color: #a9c4d6; }
.nav-item.active {
  background: linear-gradient(90deg, rgba(20, 184, 166, 0.2), rgba(20, 184, 166, 0.07));
  color: #fff;
  box-shadow: inset 3px 0 0 var(--teal-300);
}
.nav-item.active .nav-icon { color: var(--teal-300); }
.nav-badge {
  margin-left: auto;
  min-width: 19px;
  padding: 1px 6px;
  border-radius: 99px;
  background: #f97316;
  color: #fff;
  font-size: 9.5px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 3px 8px rgba(249, 115, 22, 0.3);
}
.sidebar-footer {
  position: relative;
  z-index: 1;
  padding: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(4, 20, 32, 0.35);
}
.user-chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px;
  border-radius: 10px;
  color: #fff;
  transition: background 0.15s ease;
}
.user-chip:hover { background: rgba(255, 255, 255, 0.06); }
.user-meta { display: grid; min-width: 0; flex: 1; }
.user-meta strong { color: #fff; font-size: 12px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-meta small { color: #8da8bc; font-size: 10.5px; }
.user-chevron { width: 14px; height: 14px; color: #7895aa; }
.avatar {
  display: grid;
  place-items: center;
  width: 33px;
  height: 33px;
  flex: 0 0 33px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.28), rgba(20, 184, 166, 0.12));
  border: 1px solid rgba(94, 234, 212, 0.22);
  color: var(--teal-300);
  font-size: 12px;
  font-weight: 800;
}
.avatar-sm { width: 30px; height: 30px; flex-basis: 30px; font-size: 11px; background: #eff8f7; color: var(--teal-700); border-color: #d5ece8; }
.sidebar-signout {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  margin-top: 4px;
  padding: 7px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #89a5b9;
  font-size: 11.5px;
  font-weight: 600;
  text-align: left;
}
.sidebar-signout:hover { background: rgba(255,255,255,0.05); color: #fff; }
.sidebar-signout svg { width: 15px; height: 15px; }

.main { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 76px;
  padding: 12px 30px;
  background: rgba(255, 255, 255, 0.9);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { min-width: 0; flex: 1; }
.topbar-eyebrow {
  display: block;
  margin-bottom: 1px;
  color: var(--teal-700);
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.topbar-title h1 { font-size: 21px; letter-spacing: -0.03em; }
.topbar-title p { margin-top: 2px; color: var(--muted); font-size: 12px; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.topbar-search {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 38px;
  width: 300px;
  padding: 0 9px 0 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f6f9fa;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.topbar-search:focus-within { border-color: var(--teal-500); background: #fff; box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12); }
.topbar-search .search-icon { width: 16px; height: 16px; color: var(--muted-2); }
.topbar-search input { min-width: 0; flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12.5px; }
.topbar-search input::placeholder { color: var(--muted-2); }
.topbar-search button { display: grid; place-items: center; width: 26px; height: 26px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.topbar-search button:hover { background: #e9f1f3; color: var(--teal-700); }
.topbar-search button svg { width: 15px; height: 15px; }
.icon-button {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fff;
  color: var(--ink-soft);
  transition: background 0.15s ease, border-color 0.15s ease;
}
.icon-button:hover { background: var(--soft); border-color: #d4e0e7; }
.icon-button svg { width: 18px; height: 18px; }
.menu-toggle { display: none; }
.bell { position: relative; }
.bell-dot {
  position: absolute;
  top: -4px;
  right: -4px;
  min-width: 17px;
  padding: 1px 5px;
  border: 2px solid #fff;
  border-radius: 99px;
  background: var(--red-500);
  color: #fff;
  font-size: 8.5px;
  font-weight: 800;
  text-align: center;
}
.topbar-user {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 4px 10px 4px 5px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: #fff;
  color: var(--ink);
  font-size: 12px;
  font-weight: 650;
}
.topbar-user:hover { background: var(--soft); }
.topbar-user-name { max-width: 150px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-user .user-chevron { width: 13px; height: 13px; color: var(--muted-2); }
.content { padding: 26px 30px 50px; }
.content-inner { width: 100%; max-width: 1560px; margin: 0 auto; }

/* ---------- messages ---------- */
.messages { display: grid; gap: 8px; padding: 14px 30px 0; }
.message {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  padding: 11px 13px;
  border: 1px solid #bfe3dc;
  border-radius: 11px;
  background: #eefaf7;
  color: #0d5f4d;
  font-size: 12.5px;
  box-shadow: var(--shadow-sm);
}
.message-icon { width: 17px; height: 17px; margin-top: 1px; }
.message span { flex: 1; }
.message-close { border: 0; background: transparent; color: inherit; font-size: 18px; line-height: 1; opacity: 0.6; padding: 0 2px; }
.message-close:hover { opacity: 1; }
.message.error { background: #fff3f2; border-color: #f2c6c2; color: #9b2018; }
.message.warning { background: #fffaeb; border-color: #f1dda2; color: #7c5300; }
.message.info { background: #eff6ff; border-color: #c8dbfd; color: #1e40af; }

/* ---------- buttons ---------- */
.oa-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-size: 12.5px;
  font-weight: 650;
  white-space: nowrap;
  transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.oa-btn svg { width: 15px; height: 15px; }
.oa-btn:hover { background: var(--soft); border-color: #d6e1e8; }
.oa-btn:active { transform: translateY(1px); }
.oa-btn-primary {
  border-color: var(--teal-600);
  background: linear-gradient(180deg, var(--teal-500), var(--teal-600));
  color: #fff;
  box-shadow: 0 6px 14px rgba(13, 148, 136, 0.22);
}
.oa-btn-primary:hover { background: linear-gradient(180deg, var(--teal-600), var(--teal-700)); border-color: var(--teal-700); }
.oa-btn-danger { border-color: #f1c6c2; background: #fff; color: #b42318; }
.oa-btn-danger:hover { background: #fff3f2; border-color: #e9aaa4; }
.oa-btn-sm { min-height: 30px; padding: 5px 9px; border-radius: 7px; font-size: 11.5px; }
.oa-btn-sm svg { width: 13px; height: 13px; }
.oa-btn-light { border-color: #fff; background: #fff; color: var(--navy-900); box-shadow: 0 8px 18px rgba(0,0,0,0.15); }
.oa-btn-light:hover { background: #eefaf8; border-color: #eefaf8; }
.oa-btn-ghost { border-color: rgba(255,255,255,0.26); background: rgba(255,255,255,0.04); color: #eaf6f5; }
.oa-btn-ghost:hover { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.4); }
.link-button { border: 0; background: none; padding: 0; color: var(--teal-700); font-size: 12px; font-weight: 600; }
.link-button:hover { text-decoration: underline; }
.inline-form { display: inline; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------- cards & panels ---------- */
.oa-card, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.oa-card { padding: 20px; margin-bottom: 18px; }
.panel { padding: 20px; }
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.panel-head h2 { font-size: 15.5px; }
.panel-head p { margin-top: 3px; color: var(--muted); font-size: 11.5px; }
.panel-link { display: inline-flex; align-items: center; gap: 5px; color: var(--teal-700); font-size: 11.5px; font-weight: 700; white-space: nowrap; }
.panel-link svg { width: 13px; height: 13px; transition: transform 0.15s ease; }
.panel-link:hover svg { transform: translateX(2px); }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.card-head h2 { font-size: 16px; }
.content-inner > .card-head:first-child {
  padding: 12px 15px;
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}
.content-inner > .card-head:first-child .filters { margin-bottom: 0; }
.content-inner > .card-head:first-child > p { margin: 0; }
.section-title {
  margin: 20px 0 8px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
.card-head + .section-title { margin-top: 6px; }

/* ---------- dashboard hero ---------- */
.dash-hero {
  position: relative;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 30px;
  margin-bottom: 16px;
  border-radius: 20px;
  background:
    radial-gradient(85% 130% at 100% 0%, rgba(20, 184, 166, 0.45), transparent 55%),
    radial-gradient(70% 120% at 0% 100%, rgba(14, 116, 144, 0.4), transparent 60%),
    linear-gradient(120deg, var(--navy-950) 0%, var(--navy-900) 52%, #0b3e4d 100%);
  color: #fff;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}
.dash-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.045) 1px, transparent 1px);
  background-size: 34px 34px;
  -webkit-mask-image: linear-gradient(90deg, rgba(0,0,0,0.7), transparent 72%);
  mask-image: linear-gradient(90deg, rgba(0,0,0,0.7), transparent 72%);
  pointer-events: none;
}
.hero-watermark { position: absolute; right: 24px; bottom: -36px; width: 190px; height: 190px; opacity: 0.09; filter: grayscale(1) brightness(2); pointer-events: none; z-index: 0; }
.dash-hero-copy { position: relative; z-index: 1; max-width: 720px; }
.hero-kicker {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 10px;
  color: var(--teal-300);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.pulse-dot {
  position: relative;
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--teal-300);
  box-shadow: 0 0 0 4px rgba(94, 234, 212, 0.14);
  animation: pulse 2.4s ease-out infinite;
}
.dash-hero h2 { color: #fff; font-size: clamp(24px, 2.4vw, 32px); letter-spacing: -0.04em; }
.dash-hero p { max-width: 640px; margin-top: 7px; color: #bcd5e4; font-size: 13px; }
.hero-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 20px; }
.dash-hero-side { position: relative; z-index: 1; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-end; gap: 14px; min-width: 260px; text-align: right; }
.hero-chip-row { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.hero-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 99px;
  background: rgba(255,255,255,0.07);
  color: #d9f2ef;
  font-size: 10.5px;
  font-weight: 650;
}
.hero-chip svg { width: 12px; height: 12px; color: var(--teal-300); }
.hero-chip.warn { border-color: rgba(251, 191, 36, 0.3); color: #fde68a; }
.hero-chip.warn svg { color: #fbbf24; }
.hero-metric { padding: 12px 16px; border: 1px solid rgba(255,255,255,0.12); border-radius: 13px; background: rgba(3, 22, 34, 0.28); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.hero-metric span { display: block; color: #9fc0d4; font-size: 10px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.hero-metric strong { display: block; margin: 2px 0; color: #fff; font-size: 21px; letter-spacing: -0.03em; }
.hero-metric small { color: #8fb3c8; font-size: 10.5px; }
.hero-date { color: #8fb3c8; font-size: 10px; }

/* ---------- quick actions ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; margin-bottom: 16px; }
.quick-action {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 0;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.quick-action:hover { transform: translateY(-1px); box-shadow: var(--shadow-md); border-color: #cfe0e7; }
.quick-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 11px; }
.quick-icon svg { width: 18px; height: 18px; }
.quick-icon.teal { background: #e7f8f5; color: var(--teal-700); }
.quick-icon.blue { background: #eef4ff; color: #2563eb; }
.quick-icon.amber { background: #fff7e8; color: #b45309; }
.quick-icon.violet { background: #f4efff; color: #7c3aed; }
.quick-copy { display: grid; min-width: 0; flex: 1; }
.quick-copy strong { font-size: 12.5px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.quick-copy small { color: var(--muted); font-size: 10.5px; }
.quick-arrow { width: 15px; height: 15px; color: var(--muted-2); }

/* ---------- KPI + mini strip ---------- */
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.kpi-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { color: var(--muted); font-size: 10.5px; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.kpi-icon { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; }
.kpi-icon svg { width: 16px; height: 16px; }
.kpi-icon.teal { background: #e7f8f5; color: var(--teal-700); }
.kpi-icon.blue { background: #eef4ff; color: #2563eb; }
.kpi-icon.green { background: #ecfdf3; color: #15803d; }
.kpi-icon.amber { background: #fff7e8; color: #b45309; }
.kpi-value { margin: 7px 0 1px; color: var(--ink); font-size: 25px; font-weight: 800; letter-spacing: -0.04em; }
.kpi-value.money { font-size: 18px; letter-spacing: -0.025em; }
.kpi-meta { color: var(--muted); font-size: 10.5px; }
.mini-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 20px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.mini-strip a { display: flex; align-items: center; gap: 8px; padding: 11px 14px; color: var(--ink-soft); font-size: 11.5px; border-right: 1px solid var(--line-2); }
.mini-strip a:last-child { border-right: 0; }
.mini-strip a:hover { background: var(--soft); color: var(--teal-700); }
.mini-strip svg { width: 15px; height: 15px; color: var(--muted-2); }
.mini-strip span { color: var(--muted); }
.mini-strip strong { margin-left: auto; font-size: 13px; color: var(--ink); }

/* ---------- dashboard grid ---------- */
.dash-grid { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(300px, 0.95fr); gap: 16px; align-items: start; }
.dash-main, .dash-side { display: grid; gap: 16px; min-width: 0; }
.overview-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.mini-title { margin-bottom: 10px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: 0.11em; text-transform: uppercase; }
.progress-list { display: grid; gap: 10px; }
.progress-row { display: grid; gap: 4px; }
.progress-label { display: flex; justify-content: space-between; gap: 10px; color: var(--ink-soft); font-size: 11.5px; }
.progress-label strong { color: var(--ink); font-size: 11.5px; }
.progress-track { height: 7px; border-radius: 99px; background: #edf2f5; overflow: hidden; }
.progress-fill { display: block; height: 100%; border-radius: 99px; background: var(--teal-500); }
.progress-fill.tone-in_use { background: linear-gradient(90deg, #14b8a6, #2dd4bf); }
.progress-fill.tone-in_store { background: #38bdf8; }
.progress-fill.tone-under_repair { background: #f59e0b; }
.progress-fill.tone-idle { background: #94a3b8; }
.bar-list { display: grid; gap: 10px; }
.bar-row { display: grid; gap: 3px; }
.bar-meta { display: flex; justify-content: space-between; gap: 8px; font-size: 11.5px; color: var(--ink-soft); }
.bar-meta strong { color: var(--ink); }
.bar-track { height: 6px; border-radius: 99px; background: #edf2f5; overflow: hidden; }
.bar-track span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0e7490, #2dd4bf); }
.bar-row small { color: var(--muted); font-size: 10px; }
.empty-mini { display: flex; align-items: center; gap: 13px; padding: 16px; border: 1px dashed #d7e2e8; border-radius: 12px; background: var(--soft); }
.empty-mini.compact { padding: 12px; }
.empty-mini .empty-icon { display: grid; place-items: center; width: 40px; height: 40px; flex: 0 0 40px; border-radius: 11px; background: #e7f8f5; color: var(--teal-700); }
.empty-mini .empty-icon svg { width: 18px; height: 18px; }
.empty-mini div { flex: 1; min-width: 0; }
.empty-mini strong { font-size: 12.5px; }
.empty-mini p { margin-top: 2px; color: var(--muted); font-size: 11.5px; }

/* ---------- setup / activity ---------- */
.onboarding { background: linear-gradient(180deg, #ffffff, #fbfdfd); }
.progress-ring { display: inline-grid; place-items: center; min-width: 42px; height: 26px; padding: 0 8px; border-radius: 99px; background: #e7f8f5; color: var(--teal-700); font-size: 11px; font-weight: 800; }
.setup-track { height: 6px; margin: -4px 0 14px; border-radius: 99px; background: #edf2f5; overflow: hidden; }
.setup-track span { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #0e7490, #2dd4bf); }
.setup-list { display: grid; gap: 4px; }
.setup-step { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 9px; color: var(--ink); }
.setup-step:hover { background: var(--soft); }
.setup-step.done { opacity: 0.62; }
.setup-step.done .step-icon { background: #ecfdf3; color: #15803d; }
.step-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: #f1f5f7; color: var(--muted); }
.step-icon svg { width: 14px; height: 14px; }
.step-copy { display: grid; min-width: 0; flex: 1; }
.step-copy strong { font-size: 11.5px; font-weight: 650; }
.step-copy small { color: var(--muted); font-size: 10.5px; }
.step-arrow { width: 13px; height: 13px; color: var(--muted-2); }
.mini-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.mini-metrics div { padding: 10px 12px; border: 1px solid var(--line-2); border-radius: 10px; background: var(--soft); }
.mini-metrics span { display: block; color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.mini-metrics strong { display: block; margin-top: 2px; font-size: 18px; }
.activity-list { display: grid; gap: 2px; }
.activity-list.tight { gap: 0; }
.activity-item { display: flex; align-items: center; gap: 9px; padding: 8px 4px; color: var(--ink); border-radius: 8px; }
a.activity-item:hover { background: var(--soft); }
.activity-icon { display: grid; place-items: center; width: 30px; height: 30px; flex: 0 0 30px; border-radius: 8px; background: #eef4ff; color: #2563eb; }
.activity-icon svg { width: 14px; height: 14px; }
.activity-icon.amber { background: #fff7e8; color: #b45309; }
.activity-icon.slate { background: #f1f5f7; color: #64748b; }
.activity-copy { display: grid; min-width: 0; flex: 1; }
.activity-copy strong { font-size: 11.5px; font-weight: 650; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-copy span { color: var(--muted); font-size: 10.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.activity-time { color: var(--muted-2); font-size: 10px; white-space: nowrap; }
.activity-item .badge { margin-left: auto; }

/* ---------- legacy stats (reports etc.) ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-card { position: relative; overflow: hidden; padding: 15px 16px; border: 1px solid var(--line); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.stat-card::after { content: ""; position: absolute; inset: 0 auto 0 0; width: 3px; background: var(--teal-500); }
.stat-card.green::after { background: #16a34a; }
.stat-card.amber::after { background: var(--amber-500); }
.stat-card.red::after { background: var(--red-500); }
.stat-card.slate::after { background: #64748b; }
.stat-card span { display: block; color: var(--muted); font-size: 10px; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; }
.stat-card strong { display: block; margin: 3px 0 1px; color: var(--ink); font-size: 22px; letter-spacing: -0.03em; }
.stat-card small { color: var(--muted); font-size: 10.5px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.oa-table { width: 100%; border-collapse: collapse; font-size: 12.2px; background: #fff; }
.oa-table th {
  padding: 10px 12px;
  background: #f8fafb;
  color: #5b6d7e;
  font-size: 9.8px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.oa-table td { padding: 10px 12px; border-bottom: 1px solid #eef3f5; vertical-align: middle; color: var(--ink-soft); }
.oa-table tbody tr:last-child td { border-bottom: 0; }
.oa-table tbody tr:hover { background: #fafcfd; }
.oa-table td a:not(.oa-btn) { color: var(--ink); font-weight: 650; }
.oa-table td a:not(.oa-btn):hover { color: var(--teal-700); }
.oa-table .empty { padding: 32px; text-align: center; color: var(--muted); }
.oa-table .mono { font-size: 11.2px; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 99px;
  background: #eef2f5;
  color: #526577;
  font-size: 9.8px;
  font-weight: 750;
  white-space: nowrap;
  line-height: 1.5;
}
.badge::before { content: ""; width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: 0.7; }
.badge-green { background: #e9f9f1; color: #0b6b49; }
.badge-amber { background: #fff6e5; color: #8a5a00; }
.badge-red { background: #fff0ef; color: #9b1c13; }
.badge-teal { background: #e6f7f6; color: #0a6169; }
.badge-slate { background: #eef2f5; color: #526577; }
.pagination { display: flex; align-items: center; gap: 5px; margin-top: 14px; flex-wrap: wrap; }
.pagination a, .pagination span {
  display: inline-grid;
  place-items: center;
  min-width: 30px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-size: 11.5px;
}
.pagination .current { border-color: var(--teal-600); background: var(--teal-600); color: #fff; }
.pagination a:hover { background: var(--soft); }
.pagination .disabled { color: #b3c0ca; }
.pagination .small { margin: 0 4px; }

/* ---------- forms ---------- */
.oa-input, select.oa-input, textarea.oa-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 11px;
  border: 1px solid #d5dfe6;
  border-radius: 9px;
  background: #fff;
  color: var(--ink);
  font-size: 12.8px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.oa-input::placeholder { color: var(--muted-2); }
.oa-input:focus { border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20, 184, 166, 0.12); }
.oa-select { appearance: auto; }
.oa-textarea { min-height: 82px; resize: vertical; }
.oa-check { width: 16px; height: 16px; accent-color: var(--teal-600); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-field { display: grid; gap: 5px; align-content: start; min-width: 0; }
.form-field label { color: #395064; font-size: 11.2px; font-weight: 700; }
.form-field .req { color: var(--red-500); }
.form-field .help { color: var(--muted); font-size: 10.8px; }
.form-field .errors { color: #b42318; font-size: 11px; }
.form-field.checkbox-field { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.form-field.checkbox-field label { order: 2; }
.form-field.checkbox-field input { order: 1; }
.form-field.checkbox-field .help, .form-field.checkbox-field .errors { flex-basis: 100%; }
.form-actions { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters .oa-input { width: auto; min-width: 150px; }
.filters .search-wide { flex: 1 1 260px; min-width: 220px; }
.search-wide { flex: 1 1 260px; }
.bulk-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 10px; margin-bottom: 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--soft); }
.bulk-bar .oa-input { width: auto; min-width: 155px; }
.check-col { width: 34px; text-align: center; }
.check-col input { width: 15px; height: 15px; accent-color: var(--teal-600); }

/* ---------- detail / misc ---------- */
.detail-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; }
.detail-list div { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px dashed #e8eef2; }
.detail-list dt { color: var(--muted); font-size: 11.2px; }
.detail-list dd { margin: 0; color: var(--ink); font-size: 12px; font-weight: 600; text-align: right; }
.kv { display: flex; justify-content: space-between; gap: 10px; padding: 8px 0; border-bottom: 1px solid #eff3f6; font-size: 12px; }
.kv:last-child { border-bottom: 0; }
.kv span { color: var(--muted); }
.kv strong { color: var(--ink); text-align: right; font-weight: 650; }
.empty-state { padding: 44px 20px; text-align: center; }
.empty-state .icon { display: grid; place-items: center; width: 52px; height: 52px; margin: 0 auto 10px; border-radius: 15px; background: #eef7f6; color: var(--teal-700); font-size: 22px; }
.empty-state h3 { margin-bottom: 3px; font-size: 15px; }
.empty-state p { max-width: 430px; margin: 0 auto 14px; color: var(--muted); font-size: 12px; }

/* ---------- calendar ---------- */
.calendar-wrap { padding: 0 !important; overflow-x: auto; }
.calendar-table { width: 100%; border-collapse: collapse; table-layout: fixed; background: #fff; }
.calendar-table th { padding: 9px 7px; background: #f8fafb; color: #5b6d7e; font-size: 9.8px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; text-align: left; border-bottom: 1px solid var(--line); }
.calendar-table td { height: 112px; padding: 5px; vertical-align: top; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); overflow: hidden; }
.calendar-table td:last-child { border-right: 0; }
.calendar-table tr:last-child td { border-bottom: 0; }
.calendar-table td.out { background: #fafcfd; }
.calendar-table td.out .cal-day { color: #b3c0ca; }
.calendar-table td.today { background: #f1fbf9; box-shadow: inset 0 0 0 2px var(--teal-500); }
.cal-day { margin-bottom: 4px; color: #5b6d7e; font-size: 10.5px; font-weight: 800; }
.cal-item { display: block; margin-bottom: 3px; padding: 3px 5px; border-radius: 5px; background: #eaf7f6; color: #0a6169; font-size: 10.2px; line-height: 1.3; overflow: hidden; }
.cal-item:hover { background: #d9f2ef; }
.cal-item strong { font-size: 9.8px; }
.cal-item .badge { display: inline-flex; margin-top: 1px; padding: 0 4px; font-size: 8px; }

/* ---------- login ---------- */
.login-body { background: var(--navy-950); }
.login-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(60% 80% at 12% 10%, rgba(20, 184, 166, 0.25), transparent 55%),
    radial-gradient(50% 60% at 88% 90%, rgba(14, 116, 144, 0.3), transparent 55%),
    linear-gradient(135deg, #051521 0%, #071f2e 55%, #062a36 100%);
}
.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  width: min(1180px, 100%);
  min-height: 700px;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 24px;
  background: #fff;
  box-shadow: 0 40px 100px rgba(0, 0, 0, 0.45);
  overflow: hidden;
}
.login-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 38px 40px 30px;
  overflow: hidden;
  background:
    radial-gradient(80% 70% at 100% 0%, rgba(20, 184, 166, 0.35), transparent 55%),
    linear-gradient(150deg, #071d2c 0%, #0a2d3d 60%, #0b3b46 100%);
  color: #fff;
}
.login-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px);
  background-size: 32px 32px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, rgba(0,0,0,0.75), transparent 72%);
  mask-image: radial-gradient(ellipse at 60% 40%, rgba(0,0,0,0.75), transparent 72%);
  pointer-events: none;
}
.login-visual-glow { position: absolute; width: 380px; height: 380px; right: -120px; bottom: -120px; border-radius: 50%; background: rgba(20, 184, 166, 0.22); filter: blur(80px); pointer-events: none; }
.login-watermark { position: absolute; right: -54px; bottom: -62px; width: 300px; height: 300px; opacity: 0.09; filter: grayscale(1) brightness(2); pointer-events: none; }
.login-visual-top, .login-visual-copy, .login-visual-foot { position: relative; z-index: 1; }
.login-visual-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.login-brand { display: flex; align-items: center; gap: 11px; color: #fff; }
.login-brand img { width: 44px; height: 44px; filter: drop-shadow(0 10px 20px rgba(20, 184, 166, 0.3)); }
.login-wordmark { font-size: 21px; font-weight: 800; letter-spacing: -0.04em; color: #fff; }
.login-wordmark span { color: var(--teal-300); }
.login-wordmark.dark { color: var(--ink); }
.login-wordmark.dark span { color: var(--teal-700); }
.login-pill { display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border: 1px solid rgba(255,255,255,0.16); border-radius: 99px; background: rgba(255,255,255,0.06); color: #c9e6e2; font-size: 10px; font-weight: 650; }
.login-pill .pulse-dot { width: 6px; height: 6px; }
.login-visual-copy { display: flex; flex-direction: column; justify-content: center; flex: 1; padding: 44px 0 30px; }
.login-visual-copy h1 { color: #fff; font-size: clamp(34px, 3.4vw, 48px); line-height: 1.04; letter-spacing: -0.05em; }
.login-visual-copy h1 em { color: var(--teal-300); font-style: normal; }
.login-visual-copy > p { max-width: 470px; margin-top: 14px; color: #aac9d9; font-size: 13.5px; line-height: 1.65; }
.login-features { display: grid; gap: 15px; margin: 32px 0 0; padding: 0; list-style: none; }
.login-features li { display: flex; gap: 12px; align-items: flex-start; }
.login-feature-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border: 1px solid rgba(94,234,212,0.2); border-radius: 11px; background: rgba(20,184,166,0.12); color: var(--teal-300); }
.login-feature-icon svg { width: 18px; height: 18px; }
.login-features strong { display: block; color: #eefaf8; font-size: 12.5px; font-weight: 650; }
.login-features small { display: block; margin-top: 2px; color: #8fb3c8; font-size: 11px; }
.login-visual-foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.09); }
.login-proof { display: flex; gap: 22px; }
.login-proof span { display: grid; }
.login-proof strong { color: #fff; font-size: 13px; }
.login-proof small { color: #82a4b8; font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; }
.login-copyright { color: #6f93a8; font-size: 9.5px; }
.login-form-side { display: grid; place-items: center; padding: 46px 44px; background: #fff; }
.login-card { width: 100%; max-width: 390px; }
.login-mobile-brand { display: none; align-items: center; gap: 10px; margin-bottom: 26px; }
.login-eyebrow { display: block; margin-bottom: 7px; color: var(--teal-700); font-size: 9.5px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; }
.login-card h2 { font-size: 25px; letter-spacing: -0.04em; }
.login-card .lead { margin: 7px 0 24px; color: var(--muted); font-size: 12.5px; }
.login-error { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 18px; padding: 10px 12px; border: 1px solid #f2c6c2; border-radius: 10px; background: #fff3f2; color: #9b2018; font-size: 11.5px; }
.login-error svg { width: 16px; height: 16px; margin-top: 1px; }
.login-form { display: grid; gap: 15px; }
.login-field { display: grid; gap: 5px; }
.login-field label { color: #395064; font-size: 11.2px; font-weight: 700; }
.login-label-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.login-label-hint { color: var(--muted-2); font-size: 10px; }
.input-with-icon { position: relative; display: flex; align-items: center; }
.input-with-icon > svg { position: absolute; left: 12px; width: 16px; height: 16px; color: var(--muted-2); pointer-events: none; }
.input-with-icon .oa-input { min-height: 44px; padding-left: 38px; padding-right: 40px; }
.password-toggle { position: absolute; right: 7px; display: grid; place-items: center; width: 30px; height: 30px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); }
.password-toggle:hover { background: #f0f5f6; color: var(--teal-700); }
.password-toggle svg { width: 16px; height: 16px; }
.password-toggle.is-on { color: var(--teal-700); background: #eaf7f6; }
.login-submit { width: 100%; min-height: 44px; margin-top: 4px; font-size: 13px; }
.login-submit svg { width: 16px; height: 16px; }
.login-hint { margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--line-2); color: var(--muted); font-size: 11.5px; text-align: center; }
.login-meta { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 8px; color: var(--muted-2); font-size: 9.5px; letter-spacing: 0.03em; }
.status-dot { width: 6px; height: 6px; border-radius: 50%; background: #22c55e; box-shadow: 0 0 0 3px rgba(34,197,94,0.14); }

/* ---------- animations ---------- */
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0.35); }
  70% { box-shadow: 0 0 0 8px rgba(94, 234, 212, 0); }
  100% { box-shadow: 0 0 0 0 rgba(94, 234, 212, 0); }
}
@keyframes rise {
  from { opacity: 0; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}
.dash-hero, .quick-grid, .kpi-grid, .mini-strip, .dash-grid { animation: rise 0.35s ease both; }
.quick-grid { animation-delay: 0.03s; }
.kpi-grid { animation-delay: 0.06s; }
.dash-grid { animation-delay: 0.1s; }

/* ---------- responsive ---------- */
@media (max-width: 1280px) {
  .quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-grid { grid-template-columns: minmax(0, 1.7fr) minmax(280px, 0.95fr); }
  .topbar-search { width: 240px; }
}
@media (max-width: 1100px) {
  .kpi-grid, .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mini-strip a:nth-child(2) { border-right: 0; }
  .mini-strip a:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .split { grid-template-columns: 1fr; }
  .overview-grid { gap: 18px; }
  .topbar-search { width: 210px; }
  .login-shell { grid-template-columns: minmax(0, 1fr) minmax(0, 0.95fr); min-height: 640px; }
  .login-visual { padding: 30px; }
  .login-form-side { padding: 34px; }
}
@media (max-width: 920px) {
  .sidebar { transform: translateX(-102%); transition: transform 0.22s ease; }
  .sidebar.open { transform: translateX(0); box-shadow: 30px 0 80px rgba(0,0,0,0.35); }
  .main { margin-left: 0; }
  .menu-toggle { display: inline-grid; }
  .sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 35; background: rgba(4, 20, 32, 0.55); backdrop-filter: blur(2px); }
  .sidebar-backdrop.show { display: block; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 11px 16px; }
  .topbar-title { flex: 1 1 220px; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-actions { margin-left: auto; }
  .topbar-search { order: 3; width: 100%; }
  .topbar-user-name { display: none; }
  .topbar-user { padding-right: 8px; }
  .content { padding: 18px 16px 34px; }
  .messages { padding: 10px 16px 0; }
  .dash-hero { flex-direction: column; padding: 24px; }
  .dash-hero-side { align-items: flex-start; min-width: 0; text-align: left; }
  .hero-chip-row { justify-content: flex-start; }
  .dash-grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; min-height: 0; }
  .login-visual { display: none; }
  .login-form-side { padding: 34px 24px; min-height: 100vh; }
  .login-mobile-brand { display: flex; }
}
@media (max-width: 680px) {
  .quick-grid, .kpi-grid, .stats-grid, .mini-strip { grid-template-columns: 1fr; }
  .mini-strip a { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .mini-strip a:last-child { border-bottom: 0; }
  .mini-strip a:nth-child(-n+2) { border-bottom: 1px solid var(--line-2); }
  .overview-grid { grid-template-columns: 1fr; gap: 16px; }
  .detail-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .hero-actions .oa-btn { flex: 1 1 auto; }
  .dash-hero h2 { font-size: 24px; }
  .kpi-value { font-size: 22px; }
  .calendar-table { min-width: 720px; }
  .login-page { padding: 0; }
  .login-shell { border-radius: 0; border: 0; min-height: 100vh; }
  .login-form-side { padding: 28px 20px; align-items: start; }
  .login-card { padding-top: 10px; }
  .topbar-actions .icon-button { width: 36px; height: 36px; }
  .oa-table th, .oa-table td { padding: 8px 9px; }
  .panel, .oa-card { padding: 16px; }
}
@media (max-width: 420px) {
  .topbar-search { display: none; }
  .topbar { min-height: 64px; }
  .login-card h2 { font-size: 23px; }
  .login-proof { gap: 14px; }
}

/* ---------- motion / print ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
@media print {
  .sidebar, .topbar, .messages, .quick-grid, .hero-actions { display: none !important; }
  .main { margin-left: 0; }
  .content { padding: 0; }
  .oa-card, .panel, .table-wrap { box-shadow: none; border-color: #ccc; }
}

/* ---------- organisation settings ---------- */
.brand-logo-frame {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  padding: 3px;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(20, 184, 166, 0.22);
  overflow: hidden;
}
.brand-logo-frame img { width: 100%; height: 100%; object-fit: contain; border-radius: 9px; }
.logo-upload { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.logo-preview {
  display: grid;
  place-items: center;
  width: 92px;
  height: 92px;
  flex: 0 0 92px;
  padding: 8px;
  border: 1px dashed #cfdde5;
  border-radius: 15px;
  background: #f8fbfc;
  overflow: hidden;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-copy { flex: 1 1 280px; min-width: 0; }
.org-identity { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.org-logo {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: var(--soft);
  color: var(--teal-700);
  font-size: 20px;
  font-weight: 800;
  overflow: hidden;
}
.org-logo img { width: 100%; height: 100%; object-fit: contain; }
.org-identity strong { display: block; font-size: 13.5px; }
.org-identity small { color: var(--muted); font-size: 11px; }

/* ---------- API settings ---------- */
.code-block {
  padding: 11px 13px;
  border: 1px solid #dbe5eb;
  border-radius: 9px;
  background: #f7fafb;
  color: #294154;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  line-height: 1.6;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
code {
  padding: 1px 5px;
  border-radius: 5px;
  background: #eef4f6;
  color: #0f5f68;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}
.secret-box {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #bfe3dc;
  border-radius: 11px;
  background: #eefaf7;
}
.secret-box code {
  flex: 1;
  padding: 0;
  background: transparent;
  color: #0b5f4b;
  font-size: 12px;
  word-break: break-all;
}
.method {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 5px;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.04em;
}
.method.get { background: #e9f2ff; color: #1d4ed8; }
.method.post { background: #e9f9f1; color: #0b6b49; }
.method.put { background: #fff6e5; color: #8a5a00; }
.method.del { background: #fff0ef; color: #9b1c13; }

@media (max-width: 680px) {
  .logo-upload { gap: 12px; }
  .logo-preview { width: 72px; height: 72px; flex-basis: 72px; }
}

/* ---------- two-factor authentication ---------- */
.security-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid #f1dca1;
  border-radius: 13px;
  background: linear-gradient(180deg, #fffdf6, #fffaeb);
  box-shadow: var(--shadow-sm);
}
.security-banner-icon { display: grid; place-items: center; width: 38px; height: 38px; flex: 0 0 38px; border-radius: 10px; background: #fff3cd; color: #8a5a00; }
.security-banner-icon svg { width: 18px; height: 18px; }
.security-banner div { flex: 1; min-width: 0; }
.security-banner strong { font-size: 12.5px; }
.security-banner p { margin-top: 2px; color: #7c6640; font-size: 11.5px; }
.twofa-setup { display: flex; gap: 24px; align-items: flex-start; flex-wrap: wrap; margin-top: 14px; }
.qr-frame { display: grid; place-items: center; width: 214px; height: 214px; flex: 0 0 214px; padding: 10px; border: 1px solid var(--line); border-radius: 16px; background: #fff; box-shadow: var(--shadow-sm); }
.qr-frame img { width: 100%; height: 100%; }
.twofa-setup-copy { flex: 1 1 300px; min-width: 0; }
.secret-row { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); flex-wrap: wrap; }
.secret-row code { flex: 1; min-width: 180px; word-break: break-all; background: transparent; padding: 0; color: var(--ink); font-size: 11.5px; }
.twofa-steps { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.twofa-steps li { display: flex; gap: 10px; align-items: flex-start; color: var(--ink-soft); font-size: 12px; }
.twofa-steps li span { display: grid; place-items: center; width: 24px; height: 24px; flex: 0 0 24px; border-radius: 50%; background: #e7f8f5; color: var(--teal-700); font-size: 10px; font-weight: 800; }
.twofa-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 18px; }
.twofa-code-item { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: var(--soft); }
.twofa-code-item code { flex: 1; background: transparent; padding: 0; color: var(--ink); font-size: 12px; letter-spacing: 0.04em; }
@media (max-width: 680px) {
  .qr-frame { width: 100%; height: auto; flex-basis: 100%; }
  .twofa-codes { grid-template-columns: 1fr; }
  .security-banner { align-items: flex-start; flex-wrap: wrap; }
  .security-banner .oa-btn { margin-left: 50px; }
}

/* ---------- portal / marketing additions ---------- */
body.portal-body { background: #f4f7f9; }
.portal-header {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255,255,255,.92); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.portal-header-inner { max-width: 1240px; margin: 0 auto; padding: 12px 28px; display: flex; align-items: center; gap: 24px; }
.portal-brand { display: flex; align-items: center; gap: 10px; color: var(--ink); }
.portal-brand img { width: 38px; height: 38px; }
.portal-wordmark { font-size: 19px; font-weight: 800; letter-spacing: -.04em; color: var(--navy-900); }
.portal-wordmark span { color: var(--teal-700); }
.portal-nav { display: flex; align-items: center; gap: 4px; flex: 1; }
.portal-nav a { padding: 8px 10px; border-radius: 8px; color: #4a6174; font-size: 12px; font-weight: 600; }
.portal-nav a:hover, .portal-nav a.active { background: #eef7f6; color: var(--teal-700); }
.portal-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.portal-user { display: flex; align-items: center; gap: 7px; color: var(--ink); font-size: 11.5px; font-weight: 650; }
.portal-main { max-width: 1240px; margin: 0 auto; padding: 30px 28px 60px; }
.portal-footer { border-top: 1px solid var(--line); background: #fff; }
.portal-footer-inner { max-width: 1240px; margin: 0 auto; padding: 28px; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; color: var(--muted); font-size: 11.5px; }
.portal-footer strong { color: var(--ink); }
.portal-footer-links { display: flex; gap: 18px; flex-wrap: wrap; }
.portal-footer a { color: var(--muted); }
.portal-footer a:hover { color: var(--teal-700); }
.portal-hero {
  position: relative; overflow: hidden; padding: 54px 46px;
  border-radius: 24px; color: #fff;
  background:
    radial-gradient(80% 130% at 90% 0%, rgba(20,184,166,.45), transparent 55%),
    linear-gradient(125deg, var(--navy-950), var(--navy-900) 55%, #0b3f4d);
  box-shadow: var(--shadow-lg);
}
.portal-hero::before {
  content:""; position:absolute; inset:0; pointer-events:none;
  background-image: linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 34px 34px; mask-image: linear-gradient(90deg, rgba(0,0,0,.7), transparent 72%);
}
.portal-hero-copy { position: relative; z-index: 1; max-width: 700px; }
.portal-hero h1 { color: #fff; font-size: clamp(34px, 4.2vw, 56px); line-height: 1.03; letter-spacing: -.055em; }
.portal-hero h1 em { color: var(--teal-300); font-style: normal; }
.portal-hero p { max-width: 620px; margin-top: 16px; color: #b7d2e1; font-size: 14px; line-height: 1.65; }
.portal-hero-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 26px; }
.portal-trust { display: flex; gap: 22px; flex-wrap: wrap; margin-top: 34px; color: #8fb3c8; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; }
.portal-trust span { display: flex; align-items: center; gap: 6px; }
.portal-trust svg { width: 13px; height: 13px; color: var(--teal-300); }
.section-head { max-width: 680px; margin: 52px auto 24px; text-align: center; }
.section-head .eyebrow { display: inline-block; margin-bottom: 8px; color: var(--teal-700); font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; }
.section-head h2 { font-size: clamp(24px, 2.6vw, 34px); letter-spacing: -.04em; }
.section-head p { margin-top: 8px; color: var(--muted); font-size: 13px; }
.feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.feature-card { padding: 20px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.feature-card .feature-icon { display: grid; place-items: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 10px; background: #e7f8f5; color: var(--teal-700); }
.feature-card .feature-icon svg { width: 18px; height: 18px; }
.feature-card h3 { font-size: 14px; }
.feature-card p { margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.6; }
.product-mock {
  margin-top: 42px; padding: 14px; border: 1px solid #d7e3ea; border-radius: 20px;
  background: linear-gradient(180deg,#fff,#f2f8f9); box-shadow: var(--shadow-lg);
}
.product-mock-bar { display:flex; gap:5px; padding: 2px 4px 12px; }
.product-mock-bar i { width: 8px; height: 8px; border-radius: 50%; background: #d7e3ea; }
.product-mock-body { display:grid; grid-template-columns: 150px 1fr; min-height: 330px; border:1px solid var(--line); border-radius: 13px; overflow:hidden; background:#fff; }
.product-mock-side { background: var(--navy-900); padding: 14px 10px; }
.product-mock-side span { display:block; height: 7px; margin: 0 0 9px; border-radius: 4px; background: rgba(255,255,255,.13); }
.product-mock-side span:first-child { width: 70%; background: rgba(94,234,212,.45); }
.product-mock-main { padding: 16px; }
.mock-kpis { display:grid; grid-template-columns: repeat(4,1fr); gap:8px; }
.mock-kpi { padding: 10px; border:1px solid var(--line); border-radius: 8px; }
.mock-kpi b { display:block; font-size: 14px; }
.mock-kpi small { color: var(--muted); font-size: 8px; text-transform: uppercase; letter-spacing: .05em; }
.mock-table { margin-top: 12px; border:1px solid var(--line); border-radius: 8px; overflow:hidden; }
.mock-row { display:grid; grid-template-columns: 1.2fr 1fr 1fr .7fr; gap:8px; padding: 9px 10px; border-bottom:1px solid var(--line-2); font-size: 9px; color: var(--muted); }
.mock-row:first-child { background:#f8fafb; font-size:8px; text-transform:uppercase; letter-spacing:.06em; }
.mock-row:last-child { border-bottom:0; }
.price-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.price-card { position: relative; display: flex; flex-direction: column; padding: 24px; border: 1px solid var(--line); border-radius: 17px; background: #fff; box-shadow: var(--shadow-sm); }
.price-card.featured { border-color: var(--teal-500); box-shadow: 0 20px 50px rgba(13,148,136,.14); }
.price-badge { position: absolute; top: -11px; right: 18px; padding: 3px 9px; border-radius: 99px; background: var(--teal-600); color:#fff; font-size: 9px; font-weight: 800; letter-spacing:.06em; text-transform:uppercase; }
.price-card h3 { font-size: 18px; }
.price-card .price { margin: 10px 0 3px; font-size: 34px; font-weight: 800; letter-spacing: -.05em; color: var(--navy-900); }
.price-card .price small { font-size: 11px; font-weight: 600; color: var(--muted); letter-spacing: 0; }
.price-card > p { color: var(--muted); font-size: 12px; }
.price-card ul { flex:1; display:grid; gap: 7px; margin: 16px 0 20px; padding: 0; list-style:none; }
.price-card li { display:flex; gap:7px; align-items:flex-start; color: var(--ink-soft); font-size: 11.5px; }
.price-card li svg { width: 13px; height: 13px; margin-top: 2px; color: var(--teal-600); }
.portal-card { background:#fff; border:1px solid var(--line); border-radius: 15px; padding: 20px; box-shadow: var(--shadow-sm); margin-bottom: 16px; }
.portal-card h2 { font-size: 16px; }
.portal-card h3 { font-size: 13px; }
.portal-grid-2 { display:grid; grid-template-columns: 1.5fr 1fr; gap: 16px; align-items: start; }
.portal-grid-3 { display:grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.portal-stat { padding: 16px; border:1px solid var(--line); border-radius: 12px; background:#fff; }
.portal-stat span { color: var(--muted); font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing:.06em; }
.portal-stat strong { display:block; margin-top: 3px; font-size: 23px; letter-spacing:-.03em; }
.portal-note { padding: 12px 14px; border-radius: 10px; background:#f1f8f7; border:1px solid #cfe8e3; color:#195e52; font-size:11.5px; }
.portal-note.warn { background:#fffaeb; border-color:#f1dda2; color:#7c5300; }
.portal-note.danger { background:#fff3f2; border-color:#f2c6c2; color:#9b2018; }
.code-inline { display:block; padding: 10px 12px; border:1px solid var(--line); border-radius: 8px; background: var(--soft); font-family: ui-monospace, monospace; font-size: 12px; word-break: break-all; }
.portal-table { width:100%; border-collapse:collapse; font-size:12px; }
.portal-table th { text-align:left; padding: 8px 10px; background:#f8fafb; border-bottom:1px solid var(--line); color:#5b6d7e; font-size:9.5px; text-transform:uppercase; letter-spacing:.06em; }
.portal-table td { padding: 9px 10px; border-bottom:1px solid var(--line-2); vertical-align: middle; }
.portal-table tr:last-child td { border-bottom:0; }
.portal-tabs { display:flex; gap:4px; flex-wrap:wrap; margin-bottom:16px; }
.portal-tabs a { padding: 7px 10px; border-radius: 8px; color: var(--muted); font-size:11.5px; font-weight:650; }
.portal-tabs a:hover, .portal-tabs a.active { background:#eef7f6; color:var(--teal-700); }
.step-grid { display:grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; }
.step-card { padding: 18px; border:1px solid var(--line); border-radius: 14px; background:#fff; }
.step-card span { display:grid; place-items:center; width: 28px; height:28px; margin-bottom:10px; border-radius:50%; background:#e7f8f5; color:var(--teal-700); font-size:11px; font-weight:800; }
.step-card h3 { font-size:13px; }
.step-card p { margin-top:4px; color:var(--muted); font-size:11.5px; }
@media (max-width: 1020px) {
  .feature-grid, .price-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .portal-grid-2 { grid-template-columns: 1fr; }
  .step-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 760px) {
  .portal-header-inner { padding: 10px 16px; flex-wrap: wrap; }
  .portal-nav { order: 3; width: 100%; overflow-x: auto; }
  .portal-main { padding: 20px 16px 40px; }
  .portal-hero { padding: 30px 22px; }
  .feature-grid, .price-grid, .step-grid { grid-template-columns: 1fr; }
  .portal-grid-3 { grid-template-columns: 1fr; }
  .product-mock-body { grid-template-columns: 1fr; }
  .product-mock-side { display:none; }
  .portal-footer-inner { padding: 20px 16px; }
}

/* ============================================================
   Modern responsive refinements
   ============================================================ */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  overflow-x: hidden;
  background:
    radial-gradient(70% 50% at 100% 0%, rgba(20, 184, 166, 0.06), transparent 60%),
    radial-gradient(50% 40% at 0% 100%, rgba(14, 116, 144, 0.05), transparent 60%),
    var(--bg);
}
img, svg, video, canvas { max-width: 100%; }
.mono, .code-inline, .code-block, .kv strong, td { overflow-wrap: anywhere; }
.oa-card, .panel, .portal-card, .feature-card, .price-card, .quick-action, .stat-card, .kpi-card {
  transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.oa-card:hover, .panel:hover, .portal-card:hover { border-color: #d5e3ea; }
.feature-card:hover, .price-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: thin; scrollbar-color: #c7d6df transparent; }
.table-wrap::-webkit-scrollbar, .portal-card::-webkit-scrollbar, .calendar-wrap::-webkit-scrollbar { height: 7px; }
.table-wrap::-webkit-scrollbar-thumb, .portal-card::-webkit-scrollbar-thumb, .calendar-wrap::-webkit-scrollbar-thumb { background: #c7d6df; border-radius: 99px; }
.table-wrap::-webkit-scrollbar-track, .portal-card::-webkit-scrollbar-track, .calendar-wrap::-webkit-scrollbar-track { background: transparent; }
.oa-table thead th { position: sticky; top: 0; z-index: 2; }
.oa-table td { max-width: 360px; }
.oa-btn { min-height: 40px; }
.oa-btn:active { transform: scale(.99); }
.content-inner { animation: oaFade .28s ease both; }
@keyframes oaFade { from { opacity: .6; transform: translateY(3px); } to { opacity: 1; transform: translateY(0); } }
.sidebar-close {
  display: none;
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 9px;
  background: rgba(255,255,255,.06);
  color: #d7e7ef;
  font-size: 20px;
  line-height: 1;
}
.sidebar-close:hover { background: rgba(255,255,255,.12); }
.portal-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.portal-table { min-width: 620px; }
.product-mock { overflow: hidden; }
.product-mock-main { min-width: 0; }
.mock-kpis { min-width: 0; }
.login-demo { overflow-x: auto; }
.login-demo table { min-width: 320px; }
.twofa-codes { min-width: 0; }
.twofa-code-item code { overflow-wrap: anywhere; }

@media (max-width: 1280px) {
  .content { padding: 24px 24px 44px; }
  .topbar { padding-left: 24px; padding-right: 24px; }
}

@media (max-width: 920px) {
  .sidebar { box-shadow: 24px 0 70px rgba(0,0,0,.32); }
  .sidebar-close { display: grid; place-items: center; }
  .brand { padding-right: 56px; }
  .topbar-title h1 { font-size: 19px; }
  .content { padding: 18px 16px 38px; }
  .messages { padding: 10px 16px 0; }
  .portal-header-inner { padding: 10px 16px; }
  .portal-main { padding: 22px 16px 48px; }
  .portal-hero { padding: 34px 24px; }
  .portal-hero h1 { font-size: clamp(30px, 6vw, 42px); }
  .portal-footer-inner { padding: 22px 16px; }
  .dash-hero-side { align-items: flex-start; text-align: left; }
  .hero-chip-row { justify-content: flex-start; }
}

@media (max-width: 760px) {
  .portal-header-inner { gap: 10px; }
  .portal-nav { order: 3; width: 100%; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
  .portal-nav::-webkit-scrollbar { display: none; }
  .portal-nav a { white-space: nowrap; }
  .portal-actions { margin-left: auto; }
  .portal-wordmark { font-size: 17px; }
  .portal-brand img { width: 34px; height: 34px; }
  .portal-hero { padding: 28px 20px; border-radius: 18px; }
  .portal-hero p { font-size: 13px; }
  .portal-hero-actions .oa-btn { flex: 1 1 auto; }
  .feature-grid, .price-grid, .step-grid, .portal-grid-3 { grid-template-columns: 1fr; }
  .product-mock { padding: 10px; border-radius: 16px; }
  .mock-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .mock-row { grid-template-columns: 1.2fr 1fr .8fr; }
  .mock-row > span:nth-child(3) { display: none; }
  .portal-card { padding: 16px; }
  .portal-table { min-width: 580px; }
  .portal-footer-inner { flex-direction: column; gap: 14px; }
  .portal-footer-links { gap: 12px; }
  .section-head { margin: 38px auto 18px; }
  .security-banner { align-items: flex-start; }
  .security-banner .oa-btn { margin-left: 50px; }
  .twofa-setup { gap: 16px; }
  .qr-frame { width: 100%; height: auto; flex-basis: 100%; }
  .twofa-codes { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .filters { gap: 6px; }
  .filters .oa-input, .filters .search-wide, .filters .oa-btn { width: 100%; flex: 1 1 100%; min-width: 0; }
  .bulk-bar .oa-input { flex: 1 1 100%; width: 100%; }
  .bulk-bar .oa-btn { flex: 1 1 auto; }
  .table-wrap > .oa-table { min-width: 620px; }
  .oa-table td { max-width: 260px; }
  .oa-table td:nth-child(2) { min-width: 160px; }
  .oa-table th, .oa-table td { padding: 8px 9px; }
  .quick-grid, .kpi-grid, .stats-grid, .mini-strip { grid-template-columns: 1fr; }
  .mini-strip a { border-right: 0; border-bottom: 1px solid var(--line-2); }
  .mini-strip a:last-child { border-bottom: 0; }
  .dash-hero { padding: 22px; border-radius: 17px; }
  .dash-hero h2 { font-size: 23px; }
  .hero-actions .oa-btn { flex: 1 1 auto; }
  .hero-watermark { display: none; }
  .overview-grid { grid-template-columns: 1fr; }
  .detail-list { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .form-actions { gap: 7px; }
  .form-actions .oa-btn { flex: 1 1 auto; }
  .topbar { padding: 10px 13px; gap: 9px; }
  .topbar-title { flex: 1 1 180px; }
  .topbar-title h1 { font-size: 18px; }
  .topbar-search { order: 4; width: 100%; margin-left: 0; }
  .topbar-search input { width: 100%; }
  .oa-input, select.oa-input, textarea.oa-input, .topbar-search input { font-size: 16px; }
  .topbar-user-name { display: none; }
  .topbar-user { padding-right: 7px; }
  .content { padding: 14px 13px 32px; }
  .messages { padding: 9px 13px 0; }
  .oa-card, .panel { padding: 15px; border-radius: 13px; }
  .oa-card { margin-bottom: 14px; }
  .card-head { align-items: flex-start; }
  .content-inner > .card-head:first-child { padding: 10px 12px; }
  .page-actions, .detail-actions { width: 100%; }
  .detail-actions .oa-btn { flex: 1 1 auto; }
  .pagination { gap: 4px; }
  .pagination a, .pagination span { min-width: 28px; height: 28px; }
  .login-page { padding: 12px; }
  .login-shell { border-radius: 18px; }
  .login-form-side { padding: 28px 18px; }
  .login-card { max-width: 100%; }
  .login-demo table { min-width: 300px; }
  .twofa-code-item { flex-wrap: wrap; }
  .twofa-code-item code { flex: 1 1 100%; }
}

@media (max-width: 480px) {
  .topbar { min-height: 60px; }
  .topbar-search { display: none; }
  .topbar-eyebrow { font-size: 9px; }
  .topbar-title p { display: none; }
  .menu-toggle { width: 38px; height: 38px; }
  .icon-button { width: 38px; height: 38px; }
  .kpi-value.money { font-size: 16px; }
  .hero-metric strong { font-size: 18px; }
  .hero-actions { gap: 6px; }
  .hero-actions .oa-btn { width: 100%; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .oa-btn { width: 100%; }
  .detail-actions { flex-direction: column; align-items: stretch; }
  .detail-actions .oa-btn { width: 100%; }
  .oa-input, select.oa-input, textarea.oa-input { font-size: 16px; } /* prevent iOS zoom */
  .portal-hero { padding: 24px 18px; }
  .portal-hero h1 { font-size: 28px; }
  .portal-hero-actions { flex-direction: column; }
  .portal-hero-actions .oa-btn { width: 100%; }
  .portal-main { padding: 16px 12px 40px; }
  .portal-card { padding: 14px; }
  .portal-nav { gap: 2px; }
  .portal-nav a { padding: 7px 8px; font-size: 11.5px; }
  .portal-actions .oa-btn { padding: 7px 9px; font-size: 11px; }
  .price-card { padding: 20px; }
  .login-card { padding: 22px 18px; }
  .login-card h2 { font-size: 22px; }
  .login-proof { gap: 12px; }
  .twofa-steps li { font-size: 11.5px; }
  .oa-table td, .oa-table th { font-size: 11.5px; }
}

@media (hover: none) {
  .quick-action:hover, .feature-card:hover, .price-card:hover, .oa-card:hover, .panel:hover, .portal-card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .content-inner { animation: none; }
}
