:root {
  color-scheme: dark;
  --bg-base: #070610;
  --bg-canvas: #0b0917;
  --surface-rail: rgba(14, 12, 29, 0.94);
  --surface-sidebar: rgba(18, 16, 34, 0.96);
  --surface-panel: rgba(20, 18, 38, 0.9);
  --surface-card: rgba(24, 20, 46, 0.86);
  --surface-field: rgba(8, 7, 18, 0.72);
  --surface-hover: rgba(132, 75, 241, 0.13);
  --surface-active: rgba(124, 67, 230, 0.28);
  --border-subtle: rgba(184, 159, 255, 0.12);
  --border: rgba(184, 159, 255, 0.18);
  --border-strong: rgba(151, 105, 255, 0.52);
  --text-primary: #f7f4ff;
  --text-secondary: #c3bdd4;
  --text-muted: #918aa5;
  --text-faint: #69637c;
  --accent: #8a4cf0;
  --accent-2: #b08aff;
  --success: #59daa0;
  --danger: #f0648b;
  --warning: #f2bb62;
  --blue: #629cff;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --shadow-soft: 0 14px 30px rgba(2, 1, 10, 0.42), 0 5px 14px rgba(42, 20, 91, 0.18);
  --shadow-strong: 0 28px 80px rgba(2, 1, 10, 0.58), 0 12px 36px rgba(64, 29, 138, 0.2);
  --focus-ring: 0 0 0 3px rgba(151, 105, 255, 0.32);
  --glass-blur: blur(24px) saturate(1.16);
  --rail-width: 68px;
  --shell-gap: 18px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html, body { width: 100%; min-width: 320px; height: 100%; margin: 0; }
body {
  overflow: hidden;
  color: var(--text-primary);
  background:
    radial-gradient(ellipse 48% 42% at 75% 8%, rgba(83, 42, 169, 0.2), transparent 68%),
    radial-gradient(ellipse 42% 46% at 24% 84%, rgba(58, 31, 118, 0.14), transparent 72%),
    linear-gradient(135deg, #070610 0%, #0b0918 52%, #080711 100%);
  line-height: 1.45;
}
button, input, textarea, select { color: inherit; font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .55; }
a { color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus-ring); }
::selection { color: #fff; background: rgba(138, 76, 240, .55); }
* { scrollbar-width: thin; scrollbar-color: rgba(139, 83, 238, .54) rgba(8, 7, 18, .68); }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-track { background: rgba(8, 7, 18, .68); }
*::-webkit-scrollbar-thumb { border: 2px solid rgba(8, 7, 18, .68); border-radius: 999px; background: rgba(139, 83, 238, .54); }

.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.skip-link {
  position: fixed;
  z-index: 1000;
  top: 10px;
  left: 50%;
  padding: 10px 16px;
  border-radius: 12px;
  color: #fff;
  background: #6f35db;
  transform: translate(-50%, -150%);
  transition: transform .16s ease;
}
.skip-link:focus { transform: translate(-50%, 0); }
.icon { width: 22px; height: 22px; flex: 0 0 auto; }
.app-root { position: relative; width: 100%; height: 100dvh; isolation: isolate; }
.shell-ready { display: grid; grid-template-columns: var(--rail-width) minmax(0, 1fr); gap: var(--shell-gap); padding: 18px; }
.ambient-canvas { position: fixed; z-index: -2; inset: 0; pointer-events: none; overflow: hidden; }
.ambient-canvas::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .16;
  background-image: linear-gradient(rgba(180, 150, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(180, 150, 255, .025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(circle at 60% 35%, #000, transparent 80%);
}
.ambient-cloud { position: absolute; width: 42vw; height: 42vw; border-radius: 50%; filter: blur(90px); opacity: .14; }
.ambient-cloud-one { top: -20vw; right: 5vw; background: #7034e0; animation: cloud-float 18s ease-in-out infinite alternate; }
.ambient-cloud-two { bottom: -28vw; left: 18vw; background: #315f96; animation: cloud-float 24s ease-in-out infinite alternate-reverse; }
@keyframes cloud-float { to { transform: translate3d(5vw, 4vw, 0) scale(1.08); } }

.admin-rail,
.admin-topbar,
.admin-drawer,
.glass-panel,
.metric-strip,
.metric-card,
.auth-card {
  border: 1px solid var(--border-subtle);
  background:
    radial-gradient(circle at 88% 15%, rgba(125, 65, 229, .14), transparent 34%),
    linear-gradient(145deg, rgba(29, 24, 55, .91), rgba(15, 13, 30, .94));
  box-shadow: var(--shadow-soft), inset 0 1px 0 rgba(215, 200, 255, .08);
  backdrop-filter: var(--glass-blur);
}
.admin-rail {
  z-index: 20;
  min-height: 0;
  padding: 9px;
  border-radius: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: radial-gradient(circle at 50% 13%, rgba(133, 73, 246, .18), transparent 28%), linear-gradient(180deg, rgba(24, 20, 45, .96), rgba(12, 11, 25, .96));
  box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(211, 193, 255, .08);
}
.rail-brand {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  margin-bottom: 4px;
  border: 1px solid rgba(176, 138, 255, .34);
  border-radius: 15px;
  color: #fff;
  background: linear-gradient(145deg, rgba(114, 57, 221, .8), rgba(50, 27, 100, .9));
  box-shadow: 0 9px 20px rgba(65, 30, 139, .34), inset 0 1px 0 rgba(255,255,255,.18);
  font-size: 20px;
  font-weight: 900;
}
.rail-button,
.icon-button,
.mobile-menu-button {
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  background: transparent;
  transition: color .16s ease, border-color .16s ease, background .16s ease, transform .16s ease;
}
.rail-button { width: 46px; height: 46px; border-radius: 14px; }
.rail-button:hover, .rail-button.is-active { color: #fff; border-color: rgba(165, 119, 255, .36); background: linear-gradient(135deg, rgba(112, 57, 210, .58), rgba(58, 35, 108, .58)); }
.rail-button:active { transform: translateY(1px); }
.rail-menu-button { margin-bottom: 5px; background: rgba(132, 75, 241, .1); }
.rail-navigation { display: flex; flex-direction: column; align-items: center; gap: 7px; min-height: 0; overflow-y: auto; overflow-x: hidden; }
.rail-spacer { flex: 1; }

.admin-workspace { min-width: 0; min-height: 0; display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 16px; }
.admin-topbar {
  z-index: 10;
  min-height: 68px;
  padding: 10px 14px 10px 20px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: linear-gradient(135deg, rgba(20, 17, 39, .9), rgba(12, 11, 25, .88));
}
.topbar-title-group { min-width: 0; display: flex; align-items: center; gap: 14px; }
.page-title { margin: 0; font-size: clamp(24px, 2.1vw, 34px); line-height: 1.1; letter-spacing: -.035em; }
.environment-chip {
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  background: rgba(10, 8, 22, .54);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .05em;
}
.status-dot { width: 8px; height: 8px; flex: 0 0 auto; display: inline-block; border-radius: 50%; background: currentColor; box-shadow: 0 0 12px currentColor; }
.status-violet { color: var(--accent); }
.profile-button {
  min-width: 214px;
  padding: 6px 10px 6px 7px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-primary);
  text-align: left;
  background: rgba(12, 10, 25, .5);
}
.profile-button:hover { border-color: var(--border); background: var(--surface-hover); }
.profile-copy { min-width: 0; flex: 1; display: grid; gap: 1px; }
.profile-copy strong, .profile-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy strong { font-size: 13px; }
.profile-copy small { color: var(--text-muted); font-size: 11px; }
.profile-exit { width: 18px; height: 18px; color: var(--text-muted); }
.avatar { width: 42px; height: 42px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid rgba(166, 121, 255, .35); border-radius: 13px; color: #fff; background: linear-gradient(145deg, #8a4cf0, #3f217d); font-size: 13px; font-weight: 800; }
.avatar-sm { width: 38px; height: 38px; border-radius: 11px; }
.mobile-menu-button { display: none; width: 42px; height: 42px; border-radius: 12px; }
.admin-main { min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 0 2px 18px; scroll-padding-top: 12px; }
.page-stack { display: grid; gap: 16px; }

.glass-panel { min-width: 0; border-radius: var(--radius-lg); overflow: hidden; }
.panel-heading { min-height: 68px; padding: 18px 22px 12px; display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.panel-heading h2 { margin: 0; font-size: 18px; letter-spacing: -.02em; }
.panel-heading p { margin: 3px 0 0; color: var(--text-muted); font-size: 13px; }
.panel-link { height: 38px; padding: 0 13px; border: 1px solid var(--border); border-radius: 11px; display: inline-flex; align-items: center; gap: 8px; color: var(--text-primary); text-decoration: none; background: rgba(76, 39, 145, .34); font-size: 12px; font-weight: 700; }
.panel-link .icon { width: 16px; height: 16px; }
.metric-strip { min-height: 108px; padding: 12px; border-radius: var(--radius-lg); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric-card { min-width: 0; padding: 16px 22px; border: 0; border-right: 1px solid var(--border-subtle); border-radius: 0; display: flex; align-items: center; gap: 15px; background: transparent; box-shadow: none; backdrop-filter: none; }
.metric-card:last-child { border-right: 0; }
.metric-icon { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 14px; background: color-mix(in srgb, currentColor 12%, transparent); }
.metric-icon .icon { width: 24px; height: 24px; }
.tone-violet { color: var(--accent-2); }.tone-rose { color: var(--danger); }.tone-blue { color: var(--blue); }.tone-mint { color: #52d5cd; }
.metric-copy { min-width: 0; display: grid; gap: 2px; }
.metric-copy small { overflow: hidden; color: var(--text-muted); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.metric-copy strong { overflow: hidden; font-size: clamp(20px, 2vw, 27px); letter-spacing: -.03em; text-overflow: ellipsis; white-space: nowrap; }
.metric-copy em { color: var(--success); font-size: 11px; font-style: normal; }
.compact-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.compact-metrics .metric-card { border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.18fr) minmax(380px, .82fr); gap: 16px; }
.activity-panel, .attention-panel { min-height: 430px; }
.line-chart { min-width: 0; margin: 0; padding: 0 22px 18px; }
.line-chart svg { width: 100%; height: auto; overflow: visible; }
.chart-grid-line { stroke: rgba(184, 159, 255, .11); stroke-width: 1; stroke-dasharray: 4 6; }
.chart-area { fill: rgba(138, 76, 240, .16); }
.chart-line { fill: none; stroke: #9b5cf5; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 7px rgba(155, 92, 245, .5)); }
.chart-point { fill: #b88cff; stroke: #6e36d6; stroke-width: 3; }
.chart-labels { padding: 0 12px; display: flex; justify-content: space-between; color: var(--text-faint); font-size: 11px; }
.attention-list { padding: 0 20px 18px; display: grid; }
.attention-row { min-width: 0; padding: 13px 6px; border: 0; border-bottom: 1px solid var(--border-subtle); display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: 12px; color: inherit; text-align: left; background: transparent; }
.attention-row:hover { background: linear-gradient(90deg, transparent, rgba(132, 75, 241, .08), transparent); }
.attention-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: var(--danger); background: rgba(240, 100, 139, .1); }
.attention-icon .icon { width: 19px; height: 19px; }
.attention-copy { min-width: 0; display: grid; gap: 2px; }
.attention-copy strong, .attention-copy small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attention-copy strong { font-size: 13px; }.attention-copy small { color: var(--text-muted); font-size: 11px; }
.attention-row > .icon { width: 17px; height: 17px; color: var(--text-muted); }
.services-panel .table-scroll { padding: 0 20px 14px; }

.table-scroll { min-width: 0; overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { min-width: 110px; padding: 12px 14px; border-bottom: 1px solid var(--border-subtle); color: var(--text-secondary); font-size: 12px; text-align: left; white-space: nowrap; }
.data-table th { color: var(--text-muted); font-size: 11px; font-weight: 600; }
.data-table tbody tr:hover { background: rgba(132, 75, 241, .055); }
.entity-cell { display: inline-flex; align-items: center; gap: 10px; color: var(--text-primary); }
.entity-cell > .icon { width: 20px; height: 20px; color: var(--text-secondary); }
.entity-cell > span:not(.avatar) { display: grid; }
.entity-cell small { color: var(--text-muted); }
.avatar-table { width: 34px; height: 34px; border-radius: 10px; }
.status-pill, .priority-pill { width: max-content; padding: 5px 9px; border: 1px solid currentColor; border-radius: 8px; display: inline-flex; align-items: center; gap: 7px; font-size: 11px; background: color-mix(in srgb, currentColor 8%, transparent); }
.status-pill .status-dot, .priority-pill .status-dot { width: 6px; height: 6px; }
.status-online, .status-active, .status-success, .status-resolved, .status-healthy, .status-ready { color: var(--success); }
.status-open, .status-assigned { color: var(--accent-2); }
.status-offline, .status-rejected, .status-denied, .status-unavailable, .status-not-ready { color: var(--danger); }
.status-review, .status-degraded { color: var(--warning); }
.status-unknown { color: var(--text-muted); }
.priority-high { color: #ff6f91; }.priority-medium { color: #ffbd4a; }.priority-low { color: #62aaff; }
.section-panel { min-height: 300px; }
.section-panel .table-scroll { padding: 0 20px 20px; }

.reports-layout { height: 100%; min-height: 610px; display: grid; grid-template-columns: minmax(620px, 1.55fr) minmax(360px, .85fr); gap: 14px; }
.reports-list-panel, .report-detail-panel { min-height: 0; overflow: auto; }
.reports-list-heading { position: sticky; z-index: 3; top: 0; padding: 14px 14px 0; background: linear-gradient(180deg, rgba(21, 18, 41, .98) 76%, transparent); backdrop-filter: blur(18px); }
.segmented-control { min-height: 50px; padding: 3px; border: 1px solid var(--border-subtle); border-radius: 13px; display: grid; grid-template-columns: repeat(3, 1fr); background: rgba(8, 7, 18, .42); }
.segmented-control button { min-width: 0; padding: 0 12px; border: 0; border-radius: 10px; display: flex; justify-content: center; align-items: center; gap: 8px; color: var(--text-secondary); background: transparent; font-size: 12px; font-weight: 700; }
.segmented-control button.is-active { color: #fff; background: linear-gradient(135deg, rgba(112, 57, 210, .72), rgba(58, 35, 108, .76)); box-shadow: 0 8px 20px rgba(48, 21, 108, .3), inset 0 1px 0 rgba(224, 209, 255, .1); }
.segmented-control small { min-width: 23px; padding: 2px 6px; border-radius: 999px; background: rgba(255,255,255,.09); }
.reports-toolbar { padding: 12px 0; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 9px; }
.search-field { height: 44px; padding: 0 13px; border: 1px solid var(--border-subtle); border-radius: 12px; display: flex; align-items: center; gap: 10px; background: var(--surface-field); }
.search-field .icon { width: 19px; height: 19px; color: var(--text-muted); }
.search-field input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; }
.search-field:focus-within { border-color: var(--border-strong); box-shadow: var(--focus-ring); }
.button { min-height: 42px; padding: 0 15px; border: 1px solid var(--border); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-size: 12px; font-weight: 750; transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease; }
.button:hover:not(:disabled) { transform: translateY(-1px); }
.button .icon { width: 18px; height: 18px; }
.button-primary { color: #fff; border-color: rgba(193, 164, 255, .28); background: linear-gradient(135deg, #9b5cf5 0%, #7135df 68%, #5b27c5 100%); box-shadow: 0 8px 22px rgba(112, 53, 221, .38), inset 0 1px 0 rgba(255,255,255,.22); }
.button-primary:hover:not(:disabled) { background: linear-gradient(135deg, #ad73ff, #8146ec 66%, #682ed4); box-shadow: 0 12px 30px rgba(122, 58, 235, .5), inset 0 1px 0 rgba(255,255,255,.28); }
.button-secondary { color: var(--text-secondary); background: linear-gradient(145deg, rgba(37, 30, 67, .74), rgba(14, 12, 29, .78)); box-shadow: 0 7px 18px rgba(2, 1, 10, .3), inset 0 1px 0 rgba(214, 195, 255, .07); }
.button-danger { color: #fff; border-color: rgba(240, 100, 139, .32); background: linear-gradient(135deg, #c83f69, #8e254d); }
.report-list { padding: 0 14px 14px; display: grid; }
.report-row { min-width: 0; min-height: 70px; padding: 10px 13px; border: 0; border-bottom: 1px solid var(--border-subtle); display: grid; grid-template-columns: 82px minmax(150px, 1.4fr) 100px 105px 105px 118px 18px; align-items: center; gap: 10px; color: var(--text-secondary); text-align: left; background: transparent; }
.report-row:hover { background: rgba(132, 75, 241, .07); }
.report-row.is-selected { border: 1px solid rgba(151, 105, 255, .36); border-left: 3px solid #9b5cf5; border-radius: 12px; color: var(--text-primary); background: linear-gradient(135deg, rgba(112, 57, 210, .28), rgba(58, 35, 108, .32)); box-shadow: inset 0 1px 0 rgba(224, 209, 255, .08); }
.report-id { font-size: 12px; }.report-object { min-width: 0; display: grid; gap: 2px; }.report-object strong, .report-object small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }.report-object small { color: var(--text-muted); font-size: 11px; }
.report-row time, .report-assignee { font-size: 11px; }
.report-row > .icon { width: 16px; height: 16px; }
.report-detail-content { min-height: 100%; display: flex; flex-direction: column; }
.report-detail-header { padding: 21px 21px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.report-detail-header h2 { margin: 2px 0 0; font-size: 20px; }.eyebrow { margin: 0; color: var(--accent-2); font-size: 10px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.detail-section { margin: 0 20px; padding: 19px 0; border-top: 1px solid var(--border-subtle); }
.detail-section h3 { margin: 0 0 15px; display: flex; align-items: center; gap: 9px; font-size: 13px; }.detail-section h3 .icon { width: 18px; height: 18px; color: var(--accent-2); }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.detail-field { min-width: 0; display: grid; gap: 3px; }.detail-field small { color: var(--text-muted); font-size: 10px; }.detail-field strong { overflow-wrap: anywhere; font-size: 12px; }.detail-field span { color: var(--text-muted); font-size: 10px; }
.detail-description { color: var(--text-secondary); font-size: 12px; line-height: 1.6; }
.evidence-list, .timeline, .chart-legend { margin: 13px 0 0; padding: 0; list-style: none; }
.evidence-list li { padding: 10px 12px; border: 1px solid var(--border-subtle); border-radius: 10px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; color: var(--text-secondary); font-size: 11px; background: rgba(8,7,18,.38); }.evidence-list .icon { width: 16px; height: 16px; }
.timeline { display: grid; gap: 15px; }.timeline li { position: relative; padding-left: 19px; display: grid; gap: 2px; }.timeline li::before { content: ""; position: absolute; top: 5px; left: 1px; width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); }.timeline li:not(:last-child)::after { content: ""; position: absolute; top: 14px; bottom: -15px; left: 4px; width: 1px; background: rgba(138,76,240,.38); }.timeline time, .timeline small { color: var(--text-muted); font-size: 10px; }.timeline strong { font-size: 12px; }
.muted { color: var(--text-muted); font-size: 12px; }
.report-actions { position: sticky; bottom: 0; margin-top: auto; padding: 14px 18px 18px; border-top: 1px solid var(--border-subtle); display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px; background: rgba(16, 13, 31, .94); backdrop-filter: blur(18px); }
.report-actions > :only-child { grid-column: 1 / -1; }

.analytics-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(330px, .8fr); gap: 16px; }
.donut-layout { min-height: 310px; padding: 18px 24px 28px; display: grid; grid-template-columns: 170px minmax(0, 1fr); align-items: center; gap: 28px; }
.donut-chart { width: 170px; aspect-ratio: 1; border-radius: 50%; display: grid; place-items: center; box-shadow: 0 15px 38px rgba(3,2,12,.45); }
.donut-chart svg { width: 100%; height: 100%; grid-area: 1/1; transform: rotate(-90deg); filter: drop-shadow(0 0 7px rgba(138,76,240,.22)); }
.donut-track, .donut-segment { fill: none; stroke-width: 7; }
.donut-track { stroke: #27223d; }
.donut-segment { transition: stroke-dasharray .25s ease; }
.donut-chart strong { z-index: 1; grid-area: 1/1; font-size: 24px; }
.chart-legend { display: grid; gap: 12px; }.chart-legend li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 9px; color: var(--text-secondary); font-size: 12px; }.legend-color { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.legend-0 { color: #8a4cf0; stroke: #8a4cf0; }.legend-1 { color: #4f8cff; stroke: #4f8cff; }.legend-2 { color: #f0648b; stroke: #f0648b; }.legend-3 { color: #59daa0; stroke: #59daa0; }
.system-meta { margin: 0; padding: 0 22px 22px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }.system-meta div { padding: 15px; border: 1px solid var(--border-subtle); border-radius: 12px; background: rgba(8,7,18,.36); }.system-meta dt { color: var(--text-muted); font-size: 10px; }.system-meta dd { margin: 5px 0 0; font-size: 13px; font-weight: 700; overflow-wrap: anywhere; }

.state-card { min-height: 220px; padding: 28px; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.state-icon { width: 48px; height: 48px; display: grid; place-items: center; margin-bottom: 12px; border: 1px solid var(--border); border-radius: 15px; color: var(--accent-2); background: rgba(138,76,240,.12); }.state-icon .icon { width: 24px; height: 24px; }
.state-card h2 { margin: 0; font-size: 16px; }.state-card p { max-width: 430px; margin: 7px 0 17px; color: var(--text-muted); font-size: 12px; }
.state-error .state-icon { color: var(--danger); background: rgba(240,100,139,.1); }
.loading-grid { padding: 2px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.skeleton { min-height: 180px; border: 1px solid var(--border-subtle); border-radius: var(--radius-lg); background: linear-gradient(105deg, rgba(24,20,46,.5) 25%, rgba(88,57,146,.24) 40%, rgba(24,20,46,.5) 55%); background-size: 300% 100%; animation: skeleton-pulse 1.5s ease-in-out infinite; }
.skeleton-1 { grid-column: 1 / -1; min-height: 105px; }.skeleton-3 { min-height: 280px; }
@keyframes skeleton-pulse { from { background-position: 100% 0; } to { background-position: 0 0; } }

.admin-drawer { position: fixed; z-index: 60; top: 18px; bottom: 18px; left: calc(18px + var(--rail-width) + 12px); width: min(348px, calc(100vw - 112px)); padding: 16px; border-color: rgba(151,105,255,.5); border-radius: 24px; display: flex; flex-direction: column; transform: translateX(calc(-100% - 110px)); opacity: 0; visibility: hidden; transition: transform .22s cubic-bezier(.2,.8,.2,1), opacity .18s ease, visibility .22s; box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(211,193,255,.1); background: radial-gradient(circle at 78% 10%, rgba(132,73,241,.17), transparent 34%), linear-gradient(165deg, rgba(23,20,43,.98), rgba(13,12,27,.98)); }
.admin-drawer.is-open { transform: translateX(0); opacity: 1; visibility: visible; }
.drawer-scrim { position: fixed; z-index: 50; inset: 0; border: 0; background: rgba(3,2,10,.58); opacity: 0; visibility: hidden; transition: opacity .18s ease, visibility .18s; backdrop-filter: blur(3px); }
.drawer-scrim.is-open { opacity: 1; visibility: visible; }
.drawer-heading { padding: 7px 5px 17px 9px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: flex-start; justify-content: space-between; }.wordmark { font-size: 20px; letter-spacing: .03em; }.drawer-heading p { margin: 2px 0 0; color: var(--text-muted); font-size: 11px; }
.icon-button { width: 40px; height: 40px; border-radius: 12px; background: rgba(8,7,18,.4); }.icon-button:hover { color: #fff; border-color: var(--border); background: var(--surface-hover); }
.drawer-navigation { min-height: 0; flex: 1; padding: 12px 0; display: grid; align-content: start; gap: 4px; overflow-y: auto; }
.drawer-link { width: 100%; min-height: 48px; padding: 0 13px; border: 1px solid transparent; border-radius: 12px; display: flex; align-items: center; gap: 13px; color: var(--text-secondary); text-align: left; background: transparent; font-size: 13px; font-weight: 650; transition: .16s ease; }.drawer-link:hover { color: #fff; background: var(--surface-hover); }.drawer-link.is-active { color: #fff; border-color: rgba(165,119,255,.36); background: linear-gradient(135deg, rgba(112,57,210,.56), rgba(58,35,108,.58)); box-shadow: 0 10px 24px rgba(48,21,108,.3), inset 0 1px 0 rgba(224,209,255,.1); }.drawer-link .icon { width: 20px; height: 20px; }
.drawer-footer { padding-top: 13px; border-top: 1px solid var(--border-subtle); display: grid; gap: 8px; }.drawer-profile { padding: 7px 10px; display: flex; align-items: center; gap: 10px; }.drawer-logout { color: #f3a1b9; }

.decision-dialog { width: min(480px, calc(100vw - 28px)); padding: 0; border: 1px solid var(--border-strong); border-radius: 20px; color: var(--text-primary); background: linear-gradient(145deg, rgba(29,24,55,.99), rgba(15,13,30,.99)); box-shadow: var(--shadow-strong); }.decision-dialog::backdrop { background: rgba(3,2,10,.72); backdrop-filter: blur(6px); }.decision-dialog form { padding: 20px; }.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }.dialog-heading h2 { margin: 0; font-size: 18px; }.field-label { display: grid; gap: 7px; color: var(--text-secondary); font-size: 12px; font-weight: 650; }.decision-dialog .field-label { margin-top: 18px; }.field-label input, .field-label textarea { width: 100%; border: 1px solid var(--border); border-radius: 12px; outline: 0; color: var(--text-primary); background: var(--surface-field); box-shadow: inset 0 1px 7px rgba(0,0,0,.28); }.field-label input { height: 46px; padding: 0 13px; }.field-label textarea { resize: vertical; min-height: 105px; padding: 12px; }.field-label input:focus, .field-label textarea:focus { border-color: var(--border-strong); box-shadow: var(--focus-ring); }.dialog-actions { margin-top: 16px; display: flex; justify-content: flex-end; gap: 9px; }

.auth-root { display: grid; place-items: center; padding: 24px; overflow: auto; }
.auth-card { position: relative; z-index: 1; width: min(480px, 100%); padding: 28px; border-radius: var(--radius-xl); box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(215,200,255,.1); }
.auth-brand { padding-bottom: 22px; border-bottom: 1px solid var(--border-subtle); display: flex; align-items: center; gap: 12px; }.auth-brand-mark { width: 46px; height: 46px; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 14px; background: linear-gradient(145deg, #8a4cf0, #422181); font-size: 21px; font-weight: 900; box-shadow: 0 12px 26px rgba(83,38,177,.35); }.auth-brand > span:last-child { display: grid; }.auth-brand strong { letter-spacing: .04em; }.auth-brand small { color: var(--text-muted); font-size: 11px; }
.auth-heading { padding: 28px 0 22px; }.auth-heading h1, .access-card h1 { margin: 7px 0 9px; font-size: 29px; letter-spacing: -.035em; }.auth-heading > p:last-child, .access-card > p { margin: 0; color: var(--text-muted); font-size: 13px; }
.auth-form { display: grid; gap: 15px; }.auth-security-note { margin: 2px 0 0; padding: 11px 12px; border: 1px solid rgba(89,218,160,.16); border-radius: 12px; display: flex; align-items: flex-start; gap: 9px; color: #aebfc0; background: rgba(89,218,160,.05); font-size: 10px; line-height: 1.5; }.auth-security-note .icon { width: 17px; height: 17px; color: var(--success); }
.auth-message { min-height: 18px; color: var(--text-muted); font-size: 11px; text-align: center; }.auth-message-error { color: #ffabc2; }.auth-submit { width: 100%; min-height: 48px; }
.auth-footnote { position: fixed; bottom: 16px; margin: 0; color: var(--text-faint); font-size: 10px; text-align: center; }.access-card { display: flex; flex-direction: column; align-items: center; text-align: center; }.access-card .button { margin-top: 22px; }

@media (max-width: 1280px) {
  .metric-card { padding-inline: 14px; }.metric-icon { width: 43px; height: 43px; }.overview-grid { grid-template-columns: minmax(0, 1fr) minmax(340px, .78fr); }
  .report-row { grid-template-columns: 74px minmax(140px, 1fr) 93px 100px 105px 16px; }.report-assignee { display: none; }
  .reports-layout { grid-template-columns: minmax(540px, 1.35fr) minmax(340px, .9fr); }
}

@media (max-width: 1020px) {
  :root { --rail-width: 62px; --shell-gap: 12px; }
  .shell-ready { padding: 12px; }.admin-rail { border-radius: 19px; }.admin-topbar { border-radius: 18px; }
  .profile-button { min-width: 0; }.profile-button .profile-copy, .profile-exit { display: none; }
  .metric-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }.metric-card:nth-child(2) { border-right: 0; }.metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--border-subtle); }
  .overview-grid, .analytics-grid { grid-template-columns: 1fr; }.attention-panel { min-height: auto; }
  .reports-layout { height: auto; min-height: 0; grid-template-columns: 1fr; }.reports-list-panel { min-height: 520px; }.report-detail-panel { min-height: 500px; }
  .admin-main { overflow-y: auto; }.admin-drawer { top: 12px; bottom: 12px; left: calc(12px + var(--rail-width) + 10px); }
}

@media (max-width: 720px) {
  body { overflow: auto; }
  .shell-ready { min-height: 100dvh; height: auto; padding: 10px; display: block; }
  .admin-rail { display: none; }
  .admin-workspace { min-height: calc(100dvh - 20px); display: block; }
  .admin-topbar { position: sticky; z-index: 30; top: 10px; min-height: 60px; margin-bottom: 12px; padding: 8px 10px; }
  .mobile-menu-button { display: grid; }.page-title { font-size: 21px; }.environment-chip { height: 28px; padding-inline: 9px; }.profile-button { padding: 4px; border: 0; background: transparent; }.avatar-sm { width: 37px; height: 37px; }
  .admin-main { overflow: visible; padding: 0 0 10px; }.page-stack { gap: 12px; }
  .metric-strip { grid-template-columns: 1fr; padding: 8px; }.metric-card { min-height: 78px; border-right: 0; border-bottom: 1px solid var(--border-subtle); }.metric-card:nth-child(-n+2) { border-bottom: 1px solid var(--border-subtle); }.metric-card:last-child { border-bottom: 0; }
  .compact-metrics { grid-template-columns: 1fr; }.compact-metrics .metric-card { border: 1px solid var(--border-subtle); }
  .glass-panel, .metric-strip { border-radius: 17px; }.panel-heading { padding: 16px; }.panel-heading .panel-link { width: 38px; padding: 0; justify-content: center; }.panel-heading .panel-link span { display: none; }
  .line-chart { padding-inline: 12px; overflow-x: auto; }.line-chart svg { min-width: 560px; }.chart-labels { min-width: 560px; }
  .attention-list { padding-inline: 12px; }.attention-row { grid-template-columns: auto minmax(0,1fr) auto; }.attention-row .priority-pill { display: none; }
  .reports-layout { display: block; }.reports-list-panel { min-height: 0; margin-bottom: 12px; }.reports-toolbar { grid-template-columns: 1fr; }.reports-toolbar .button { display: none; }
  .report-row { grid-template-columns: 70px minmax(0,1fr) 84px 16px; min-height: 66px; }.report-row .priority-pill, .report-row .report-assignee, .report-row time { display: none; }.report-detail-panel { min-height: 0; }.detail-grid { grid-template-columns: 1fr; }.report-actions { position: static; }
  .analytics-grid { gap: 12px; }.donut-layout { grid-template-columns: 1fr; justify-items: center; }.chart-legend { width: min(100%, 320px); }
  .system-meta { grid-template-columns: repeat(2, 1fr); padding-inline: 15px; }
  .admin-drawer { top: 10px; bottom: 10px; left: 10px; width: min(350px, calc(100vw - 20px)); transform: translateX(calc(-100% - 16px)); }
  .auth-root { padding: 14px; }.auth-card { padding: 22px; border-radius: 20px; }.auth-footnote { position: static; margin-top: 18px; }
  .loading-grid { grid-template-columns: 1fr; }.skeleton-1 { grid-column: auto; }
}

@media (max-width: 430px) {
  .topbar-title-group { gap: 8px; }.environment-chip { font-size: 9px; }.page-title { max-width: 130px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .segmented-control button { padding-inline: 5px; font-size: 10px; }.segmented-control small { min-width: 20px; }
  .report-row { grid-template-columns: 61px minmax(0,1fr) 16px; }.report-row .status-pill { display: none; }
  .system-meta { grid-template-columns: 1fr; }.dialog-actions { display: grid; grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .ambient-cloud { display: none; }
}

@media (prefers-contrast: more) {
  :root { --border-subtle: rgba(220, 207, 255, .34); --border: rgba(220, 207, 255, .48); --text-muted: #bcb5ca; }
  .glass-panel, .metric-strip, .admin-topbar, .admin-rail, .admin-drawer { backdrop-filter: none; }
}
