:root {
  --orange-primary: #f28a43;
  --orange-hot: #ffa35f;
  --orange-deep: #d96a22;
  --orange-soft: #fff6ef;
  --electric-blue: #287cff;
  --fresh-mint: #16b895;
  --v2-accent: var(--orange-primary);
  --v2-accent-dark: var(--orange-deep);
  --blue: var(--orange-primary);
  --cyan: var(--fresh-mint);
  --bg: #f6f8fb;
  --panel: #ffffff;
  --line: #e8edf3;
  --muted: #74818e;
  --text: #202a36;
}

* { scrollbar-color: #ffc396 #f1f4f7; }
body {
  color: var(--text);
  background:
    radial-gradient(circle at 77% -8%, rgba(40,124,255,.09), transparent 30%),
    radial-gradient(circle at 30% 0%, rgba(255,107,0,.08), transparent 26%),
    #f6f8fb;
}

.app { grid-template-columns: 88px minmax(0, 1fr); }
.sidebar {
  width: 88px;
  padding: 12px 8px;
  color: #455261;
  background: rgba(255,255,255,.94);
  border-right: 1px solid #e7ebf0;
  box-shadow: 8px 0 28px rgba(28,44,64,.04);
  backdrop-filter: blur(18px);
}
.brand { justify-content: center; padding: 2px 0 12px; border-bottom: 1px solid #eef1f5; }
.brand > div:last-child { display: none; }
.brand-mark {
  width: 46px; height: 46px; border-radius: 15px;
  background: linear-gradient(145deg, #ffb071, #f1843d);
  box-shadow: 0 9px 22px rgba(242,138,67,.22);
}
.nav-title { display: none; }
.nav { gap: 5px; margin-top: 10px; }
.nav button {
  min-height: 54px; padding: 7px 3px; gap: 3px;
  flex-direction: column; justify-content: center;
  color: #647180; font-size: 11px; line-height: 1.15; text-align: center;
  border: 1px solid transparent; border-radius: 13px;
}
.nav button:hover { color: var(--orange-deep); background: #fff7f0; transform: translateY(-1px); }
.nav button.active {
  color: var(--orange-deep); background: linear-gradient(145deg, #fff1e4, #fff8f2);
  border-color: #ffd3b2; box-shadow: 0 7px 18px rgba(255,107,0,.11);
}
.nav .ico { width: auto; font-size: 18px; line-height: 1; }
.side-footer { padding: 9px 4px; font-size: 9px; text-align: center; background: #f8fafc; border-color: #eef1f4; }
.side-footer div:last-child { display: none; }

.main { grid-column: 2; min-width: 0; }
.topbar {
  height: 60px; padding: 0 20px;
  background: rgba(255,255,255,.82); border-bottom-color: #e9edf2;
  backdrop-filter: blur(16px);
}
.topbar h1 { font-size: 19px; letter-spacing: -.3px; }
.topbar p { font-size: 10px; }
.search { max-width: 620px; height: 39px; background: #f8fafc; border-color: #e2e7ed; }
.search:focus-within { border-color: #ffad70; box-shadow: 0 0 0 3px rgba(255,107,0,.09); }
.role-pill { color: #d75b05; background: #fff2e6; border-color: #ffd7ba; }
.avatar { background: linear-gradient(145deg, #ff9824, #ff6400); }

.content { max-width: none; padding: 15px 20px 30px; }
.combined-hero, .hero {
  margin: 0 0 12px; padding: 13px 18px; min-height: 0;
  color: #202a36; border: 1px solid #f0e5da; border-radius: 16px;
  background:
    linear-gradient(110deg, rgba(255,244,232,.96), rgba(255,255,255,.93) 48%, rgba(232,242,255,.92)),
    #fff;
  box-shadow: 0 8px 24px rgba(37,54,75,.05);
}
.combined-hero::after, .hero::after { opacity: .12; }
.combined-hero .eyebrow, .hero .eyebrow { color: var(--orange-deep); }
.combined-hero h2, .hero h2 { margin: 2px 0; font-size: 23px; color: #202a36; }
.combined-hero p, .hero p { margin: 3px 0 0; color: #70808d; font-size: 12px; }

.center-tabs {
  position: sticky; top: 60px; z-index: 18;
  display: flex; flex-wrap: nowrap; gap: 7px; margin: 0 0 12px; padding: 7px;
  overflow-x: auto; background: rgba(255,255,255,.9); border: 1px solid #e8edf2;
  border-radius: 15px; box-shadow: 0 8px 24px rgba(31,47,66,.05); backdrop-filter: blur(14px);
}
.center-tabs button { min-width: max-content; flex: 1 0 auto; padding: 10px 14px; border-radius: 10px; }
.center-tabs button:hover { color: var(--orange-deep); border-color: #ffd0ac; background: #fff7f0; }
.center-tabs button.active { color: #fff; border-color: var(--orange-primary); background: linear-gradient(135deg, #ffa15e, #ed7d35); box-shadow: 0 7px 16px rgba(242,138,67,.2); }

.panel, .card, .v2-panel { border-color: #e7ecf1; border-radius: 15px; box-shadow: 0 7px 24px rgba(34,49,67,.045); }
.panel, .v2-panel { padding: 14px; }
.section-head { margin: 12px 0 10px; }
.section-head h2, .panel h2 { font-size: 18px; }
.toolbar, .v2-search { gap: 8px; margin: 9px 0; }
button, input, select, textarea { border-radius: 9px; }
.primary, .btn-primary, .v2-search button, button.primary {
  border-color: var(--orange-primary) !important;
  background: linear-gradient(135deg, #ffa15e, #ed7d35) !important;
  box-shadow: 0 6px 15px rgba(242,138,67,.16);
}
.primary:hover, .btn-primary:hover, .v2-search button:hover, button.primary:hover { filter: brightness(.97); transform: translateY(-1px); }
.secondary:hover, .ghost:hover { color: var(--orange-deep); border-color: #ffbd8c; background: #fff8f2; }
input:focus, select:focus, textarea:focus { border-color: #ffae73 !important; box-shadow: 0 0 0 3px rgba(255,107,0,.09) !important; outline: none; }

.table-wrap { border-color: #e8edf1; border-radius: 13px; }
table th { padding: 10px 11px; color: #53606d; background: #f7f9fb; border-bottom-color: #e5eaf0; }
table td { padding: 10px 11px; border-bottom-color: #eef1f4; }
table tbody tr:hover td { background: #fff9f4; }
.chip, .tag { border-radius: 999px; }

.floating-tool-rail { right: 10px; width: 60px; gap: 7px; }
.floating-tool-rail button {
  min-height: 61px; padding: 7px 3px; border-radius: 15px; color: #485463;
  background: rgba(255,255,255,.94); border: 1px solid #e4e9ee;
  box-shadow: 0 9px 23px rgba(26,44,65,.11); backdrop-filter: blur(12px);
}
.floating-tool-rail button:nth-child(1) { color: #087c69; background: linear-gradient(145deg,#e9fff9,#fff); border-color: #bcecdf; }
.floating-tool-rail button:nth-child(2) { color: #1768d5; background: linear-gradient(145deg,#edf5ff,#fff); border-color: #c6ddff; }
.floating-tool-rail button:nth-child(3) { color: #dd5900; background: linear-gradient(145deg,#fff1e4,#fff); border-color: #ffd0aa; }
.floating-tool-rail button:hover { transform: translateX(-3px); }

.stat-card, .metric-card { border-top: 3px solid #ff9a42; }
.stat-card:nth-child(3n+2), .metric-card:nth-child(3n+2) { border-top-color: var(--electric-blue); }
.stat-card:nth-child(3n), .metric-card:nth-child(3n) { border-top-color: var(--fresh-mint); }

.login-screen { background: radial-gradient(circle at 65% 22%, rgba(40,124,255,.14), transparent 34%), linear-gradient(135deg,#fff8f1,#f5f9ff); }
.login-card { border: 1px solid #f0e4d9; box-shadow: 0 24px 70px rgba(36,49,65,.13); }
.login-card .brand-mark { margin: 0 auto 10px; }

@media (max-width: 760px) {
  .app { display: block; }
  .sidebar { position: static; width: 100%; height: auto; padding: 8px; }
  .brand { justify-content: flex-start; border-bottom: 0; }
  .brand > div:last-child { display: block; }
  .nav { grid-template-columns: repeat(4, minmax(68px, 1fr)); overflow-x: auto; }
  .nav button { min-height: 50px; }
  .side-footer { display: none; }
  .main { grid-column: auto; }
  .topbar { height: 56px; padding: 0 12px; }
  .content { padding: 10px 10px 24px; }
  .center-tabs { top: 56px; }
  .combined-hero, .hero { padding: 11px 13px; }
  .combined-hero h2, .hero h2 { font-size: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
