:root {
  color-scheme: dark;
  --bg: #09111f;
  --bg-soft: #0e192b;
  --panel: rgba(17, 29, 48, .86);
  --panel-border: rgba(164, 188, 220, .12);
  --text: #f4f7fb;
  --muted: #8f9caf;
  --muted-strong: #b4bfce;
  --mint: #67e8c4;
  --mint-deep: #30c6a0;
  --purple: #a78bfa;
  --orange: #ffb56b;
  --sidebar-width: 252px;
  font-family: "DM Sans", sans-serif;
  background: var(--bg);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, a { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
.is-hidden { display: none !important; }
.muted { color: var(--muted); line-height: 1.6; }
.eyebrow { margin: 0 0 9px; color: var(--mint); font-size: 10px; font-weight: 700; letter-spacing: .15em; }
.ambient { position: fixed; z-index: 0; width: 520px; height: 520px; border-radius: 50%; filter: blur(100px); opacity: .08; pointer-events: none; }
.ambient-one { top: -220px; right: 4%; background: var(--mint); }
.ambient-two { bottom: -280px; left: 20%; background: #7654e8; }

.access-state { position: relative; z-index: 2; display: grid; min-height: 100vh; place-items: center; padding: 24px; background: radial-gradient(circle at 50% 25%, rgba(62, 115, 135, .16), transparent 46%); }
.access-card { width: min(100%, 430px); padding: 48px 40px; border: 1px solid var(--panel-border); border-radius: 24px; background: rgba(14, 25, 43, .88); box-shadow: 0 28px 80px rgba(0,0,0,.3); text-align: center; }
.brand-mark { display: grid; width: 34px; height: 34px; place-items: center; border-radius: 10px; background: var(--mint); color: #08201b; font: 700 13px "Space Grotesk", sans-serif; letter-spacing: -.08em; }
.brand-mark-large { width: 52px; height: 52px; margin: 0 auto 30px; border-radius: 15px; font-size: 18px; }
.access-card h1 { margin: 0; font: 600 clamp(26px, 5vw, 34px)/1.1 "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.access-card .muted { margin: 15px 0 26px; font-size: 14px; }
.loader { width: 24px; height: 24px; margin: 0 auto; border: 2px solid rgba(103, 232, 196, .2); border-top-color: var(--mint); border-radius: 50%; animation: spin .8s linear infinite; }
.access-card .button { margin-top: 8px; }
@keyframes spin { to { transform: rotate(360deg); } }

.app-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }
.sidebar { position: fixed; top: 0; bottom: 0; left: 0; z-index: 5; display: flex; width: var(--sidebar-width); flex-direction: column; justify-content: space-between; padding: 30px 18px 24px; border-right: 1px solid var(--panel-border); background: rgba(9, 17, 31, .75); backdrop-filter: blur(22px); }
.brand { display: flex; align-items: center; gap: 11px; padding: 0 12px; }
.brand strong { display: block; font: 600 14px "Space Grotesk", sans-serif; letter-spacing: -.02em; }
.brand small { display: block; margin-top: 3px; color: var(--muted); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; }
.main-nav { display: grid; gap: 6px; margin-top: 62px; }
.nav-item { display: flex; align-items: center; gap: 14px; padding: 13px 14px; border: 1px solid transparent; border-radius: 11px; color: var(--muted); font-size: 13px; transition: .2s ease; }
.nav-item:hover, .nav-item.is-active { border-color: rgba(103, 232, 196, .1); background: rgba(103, 232, 196, .1); color: var(--text); }
.nav-item.is-active { color: var(--mint); }
.nav-icon { display: grid; width: 18px; place-items: center; color: currentColor; font-size: 18px; }
.sidebar-bottom { display: grid; gap: 22px; }
.security-note { display: flex; align-items: flex-start; gap: 10px; padding: 14px 13px; border: 1px solid rgba(103, 232, 196, .12); border-radius: 12px; background: rgba(103, 232, 196, .045); }
.security-note strong, .security-note small { display: block; }
.security-note strong { margin-bottom: 4px; font-size: 11px; }
.security-note small { color: var(--muted); font-size: 10px; line-height: 1.4; }
.status-dot { display: inline-block; width: 7px; height: 7px; margin-top: 4px; flex: 0 0 auto; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 4px rgba(103, 232, 196, .1); }
.logout-button { display: flex; align-items: center; gap: 12px; padding: 0 13px; border: 0; background: transparent; color: var(--muted); font-size: 12px; text-align: left; }
.logout-button:hover { color: var(--text); }
.logout-button span { font-size: 19px; }

.main-content { width: calc(100% - var(--sidebar-width)); margin-left: var(--sidebar-width); }
.topbar { display: flex; height: 86px; align-items: center; justify-content: space-between; padding: 0 46px; border-bottom: 1px solid var(--panel-border); }
.breadcrumb { display: flex; gap: 10px; color: var(--muted); font-size: 12px; }
.breadcrumb strong { color: var(--text); font-weight: 500; }
.breadcrumb-separator { color: #506078; }
.topbar-actions { display: flex; align-items: center; gap: 22px; }
.icon-button { position: relative; display: grid; width: 32px; height: 32px; place-items: center; border: 0; border-radius: 9px; background: transparent; color: var(--muted); }
.icon-button:hover { background: rgba(255,255,255,.06); color: var(--text); }
.bell-icon { font-size: 24px; line-height: .7; transform: rotate(-25deg); }
.icon-button i { position: absolute; top: 7px; right: 7px; width: 5px; height: 5px; border: 1px solid var(--bg); border-radius: 50%; background: var(--mint); }
.user-chip { display: flex; align-items: center; gap: 9px; }
.avatar { display: grid; width: 32px; height: 32px; place-items: center; border-radius: 10px; background: linear-gradient(135deg, #c4b5fd, #7c3aed); color: white; font-size: 11px; font-weight: 700; }
.user-chip-copy strong, .user-chip-copy span { display: block; }
.user-chip-copy strong { font-size: 11px; font-weight: 600; }
.user-chip-copy span { margin-top: 2px; color: var(--muted); font-size: 9px; }
.chevron { margin-left: 4px; color: var(--muted); }
.menu-button { display: none; }
.content-wrap { max-width: 1520px; margin: 0 auto; padding: 50px 46px 24px; }
.welcome-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 38px; }
.welcome-row h1 { margin: 0; font: 600 clamp(27px, 3vw, 38px)/1.1 "Space Grotesk", sans-serif; letter-spacing: -.055em; }
.welcome-row h1 span { color: var(--mint); }
.welcome-row .muted { margin: 11px 0 0; font-size: 13px; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 17px; border: 0; border-radius: 10px; font-size: 12px; font-weight: 600; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.button:hover { transform: translateY(-2px); }
.button-primary { background: var(--mint); color: #06271f; box-shadow: 0 8px 24px rgba(103,232,196,.15); }
.button-primary:hover { background: #8af0d4; box-shadow: 0 10px 30px rgba(103,232,196,.25); }
.button-plus { font-size: 19px; font-weight: 400; line-height: 0; }
.stats-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.stat-card { min-height: 152px; padding: 20px; border: 1px solid var(--panel-border); border-radius: 14px; background: var(--panel); box-shadow: 0 15px 35px rgba(0,0,0,.08); }
.stat-card-highlight { border-color: rgba(103,232,196,.27); background: linear-gradient(145deg, rgba(47,127,111,.37), rgba(17,29,48,.9) 72%); }
.stat-card-top { display: flex; align-items: center; justify-content: space-between; color: var(--muted-strong); font-size: 11px; }
.stat-icon { display: grid; width: 24px; height: 24px; place-items: center; border-radius: 7px; background: rgba(255,255,255,.06); color: var(--mint); font-size: 14px; }
.stat-card > strong { display: block; margin: 21px 0 12px; font: 600 27px/1 "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.stat-foot { display: flex; gap: 7px; color: var(--muted); font-size: 9px; }
.trend-up { color: var(--mint); }
.trend-neutral { color: var(--orange); }
.system-status { display: flex !important; align-items: center; gap: 8px; font-size: 21px !important; }
.system-status i { width: 8px; height: 8px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 0 5px rgba(103,232,196,.12); }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(290px, .9fr); gap: 14px; margin-top: 14px; }
.panel { min-width: 0; padding: 24px; border: 1px solid var(--panel-border); border-radius: 14px; background: var(--panel); }
.activity-panel { min-height: 354px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.panel-heading h2 { margin: 0; font: 600 18px "Space Grotesk", sans-serif; letter-spacing: -.04em; }
.text-button, .full-width-button { border: 0; background: transparent; color: var(--mint); font-size: 11px; }
.text-button span, .full-width-button span { margin-left: 6px; font-size: 16px; }
.round-button { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid rgba(103,232,196,.3); border-radius: 8px; background: rgba(103,232,196,.07); color: var(--mint); font-size: 18px; }
.chart-wrap { margin-top: 26px; }
.chart-legend { display: flex; align-items: center; gap: 16px; color: var(--muted); font-size: 10px; }
.legend-dot { display: inline-block; width: 7px; height: 7px; margin-right: 5px; border-radius: 50%; }
.legend-main { background: var(--mint); }.legend-secondary { background: var(--purple); }
.chart-period { margin-left: auto; padding: 7px 9px; border: 1px solid var(--panel-border); border-radius: 7px; color: var(--muted-strong); }
.chart-period span { margin-left: 8px; }
.chart { display: flex; height: 205px; margin-top: 17px; }
.chart-y { display: flex; width: 30px; flex-direction: column; justify-content: space-between; padding: 1px 0 20px; color: #67758a; font-size: 9px; }
.chart-area { position: relative; width: calc(100% - 30px); }
.grid-lines { position: absolute; inset: 0 0 20px; display: flex; flex-direction: column; justify-content: space-between; }
.grid-lines i { display: block; border-top: 1px dashed rgba(154, 177, 203, .1); }
.chart svg { position: absolute; top: 0; right: 0; left: 0; width: 100%; height: calc(100% - 20px); overflow: visible; }
.area-path { fill: url(#chartFill); }.line-path { fill: none; stroke: var(--mint); stroke-width: 2.5; vector-effect: non-scaling-stroke; }.chart-point { fill: var(--mint); stroke: var(--bg-soft); stroke-width: 3; }.chart-point-halo { fill: rgba(103,232,196,.16); }
.chart-x { position: absolute; right: 0; bottom: 0; left: 0; display: flex; justify-content: space-between; color: #67758a; font-size: 9px; }
.projects-panel { min-height: 354px; }
.project-list { display: grid; gap: 4px; margin: 23px 0 20px; }
.project-item { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.project-symbol { display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; font-size: 15px; }
.symbol-violet { background: rgba(167,139,250,.14); color: var(--purple); }.symbol-blue { background: rgba(96,165,250,.14); color: #60a5fa; }.symbol-orange { background: rgba(255,181,107,.14); color: var(--orange); }
.project-copy { min-width: 0; flex: 1; }.project-copy strong, .project-copy span { display: block; }.project-copy strong { font-size: 11px; font-weight: 600; }.project-copy span { margin-top: 3px; color: var(--muted); font-size: 10px; }
.project-status { padding: 4px 7px; border-radius: 5px; font-size: 9px; }.status-live { background: rgba(103,232,196,.1); color: var(--mint); }.status-draft { background: rgba(255,181,107,.1); color: var(--orange); }
.full-width-button { width: 100%; padding-top: 15px; border-top: 1px solid var(--panel-border); text-align: left; }
.quick-panel { grid-column: 1 / -1; }.quick-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }.quick-actions button { display: flex; align-items: center; gap: 12px; min-width: 0; padding: 13px; border: 1px solid var(--panel-border); border-radius: 10px; background: rgba(255,255,255,.025); color: var(--text); text-align: left; transition: .2s ease; }.quick-actions button:hover { border-color: rgba(103,232,196,.32); background: rgba(103,232,196,.06); transform: translateY(-2px); }.quick-actions strong, .quick-actions small { display: block; }.quick-actions strong { font-size: 11px; }.quick-actions small { margin-top: 4px; color: var(--muted); font-size: 9px; }.quick-actions b { margin-left: auto; color: var(--muted); font-size: 16px; font-weight: 400; }.quick-icon { display: grid; width: 30px; height: 30px; place-items: center; flex: 0 0 auto; border-radius: 8px; font-size: 15px; }.quick-purple { background: rgba(167,139,250,.13); color: var(--purple); }.quick-green { background: rgba(103,232,196,.13); color: var(--mint); }.quick-yellow { background: rgba(255,181,107,.13); color: var(--orange); }
.footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding: 0 3px; color: #647188; font-size: 9px; }.footer span:nth-child(2) { color: var(--muted); }.footer .status-dot { width: 5px; height: 5px; margin: 0 5px 1px 0; box-shadow: none; }
.toast { position: fixed; right: 24px; bottom: 24px; z-index: 10; max-width: min(360px, calc(100% - 48px)); padding: 13px 16px; border: 1px solid rgba(103,232,196,.25); border-radius: 10px; background: #14243a; box-shadow: 0 12px 35px rgba(0,0,0,.25); color: var(--text); font-size: 12px; opacity: 0; transform: translateY(12px); pointer-events: none; transition: .25s ease; }.toast.is-visible { opacity: 1; transform: translateY(0); }

@media (max-width: 1050px) { .stats-grid { grid-template-columns: repeat(2, 1fr); }.dashboard-grid { grid-template-columns: 1fr; }.quick-panel { grid-column: auto; }.content-wrap { padding-right: 30px; padding-left: 30px; }.topbar { padding: 0 30px; } }
@media (max-width: 720px) { :root { --sidebar-width: 0px; }.sidebar { width: 268px; transform: translateX(-105%); transition: transform .25s ease; box-shadow: 20px 0 55px rgba(0,0,0,.3); }.sidebar.is-open { transform: translateX(0); }.main-content { width: 100%; margin-left: 0; }.topbar { height: 70px; padding: 0 18px; }.menu-button { display: flex; flex-direction: column; gap: 4px; justify-content: center; }.menu-button span { display: block; width: 16px; height: 1px; background: currentColor; }.breadcrumb { margin-right: auto; margin-left: 11px; }.topbar-actions { gap: 8px; }.topbar-actions > .icon-button { display: none; }.user-chip-copy, .chevron { display: none; }.content-wrap { padding: 32px 18px 22px; }.welcome-row { display: block; margin-bottom: 28px; }.welcome-row .button { width: 100%; margin-top: 22px; }.stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }.stat-card { min-height: 138px; padding: 15px; }.stat-card-top { font-size: 10px; }.stat-card > strong { margin: 17px 0 10px; font-size: 23px; }.stat-foot { display: block; line-height: 1.5; }.stat-foot span { display: block; }.panel { padding: 18px; }.quick-actions { grid-template-columns: 1fr; }.footer { display: grid; gap: 8px; margin-top: 22px; }.chart-legend { flex-wrap: wrap; }.chart-period { order: 3; width: 100%; margin: 2px 0 0; }.access-card { padding: 38px 24px; } }
@media (max-width: 380px) { .stats-grid { grid-template-columns: 1fr; }.stat-card { min-height: auto; }.stat-foot { display: flex; }.stat-foot span { display: inline; } }
