:root {
  color-scheme: dark;
  --bg: #080b09;
  --surface: #101411;
  --surface-raised: #151a16;
  --line: #263029;
  --line-soft: #1d251f;
  --text: #f4f7f4;
  --muted: #95a098;
  --green: #92cf42;
  --green-bright: #a8e95c;
  --green-soft: rgba(146, 207, 66, .12);
  --amber: #f7b955;
  --orange: #f08350;
  --red: #f26363;
  --blue: #78a8ff;
  --radius: 16px;
  --shadow: 0 20px 60px rgba(0, 0, 0, .22);
  --font: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.5; }
body::before { position: fixed; inset: 0; z-index: -1; content: ""; background: radial-gradient(circle at 82% -10%, rgba(146,207,66,.09), transparent 28%), linear-gradient(rgba(255,255,255,.012) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.012) 1px, transparent 1px); background-size: auto, 48px 48px, 48px 48px; mask-image: linear-gradient(to bottom, black, transparent 65%); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
.site-shell { width: min(1540px, 100%); margin: 0 auto; padding: 0 32px; }
.skip-link { position: fixed; z-index: 99; top: 12px; left: 12px; padding: 10px 14px; border-radius: 8px; background: var(--green); color: #0a0d0a; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }

.topbar { min-height: 80px; display: flex; align-items: center; gap: 34px; border-bottom: 1px solid var(--line-soft); }
.brand { display: flex; align-items: center; gap: 14px; min-width: max-content; font-weight: 720; letter-spacing: -.02em; }
.brand-mark, .footer-mark { display: block; width: 31px; height: 30px; overflow: hidden; }
.brand-mark img { width: auto; height: 30px; max-width: none; }
.brand-company { font-size: 14px; }
.brand-product { color: var(--muted); font-size: 13px; font-weight: 600; }
.brand-divider { width: 1px; height: 24px; background: var(--line); }
.primary-nav { display: flex; align-self: stretch; gap: 26px; margin-left: auto; }
.primary-nav a { position: relative; display: flex; align-items: center; color: var(--muted); font-size: 14px; font-weight: 600; transition: color .2s ease; }
.primary-nav a:hover, .primary-nav a:focus-visible, .primary-nav .active { color: var(--text); }
.primary-nav .active::after { position: absolute; right: 0; bottom: -1px; left: 0; height: 2px; content: ""; background: var(--green); box-shadow: 0 0 14px rgba(146,207,66,.6); }
.live-status { display: flex; align-items: center; gap: 8px; color: var(--green-bright); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.live-status span { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 5px var(--green-soft); animation: pulse 2.4s infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 8px rgba(146,207,66,0); } }

main { padding: 54px 0 26px; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 48px; margin-bottom: 44px; }
.eyebrow { margin: 0 0 9px; color: var(--green); font-size: 11px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { max-width: 900px; margin-bottom: 16px; font-size: clamp(42px, 5.2vw, 76px); font-weight: 620; line-height: 1.02; letter-spacing: -.055em; }
h1 em { color: var(--green-bright); font-style: normal; }
.hero-copy { max-width: 710px; margin: 0; color: var(--muted); font-size: 18px; }
.refresh-panel { min-width: 270px; padding: 19px 21px; border: 1px solid var(--line); border-radius: 12px; background: rgba(16,20,17,.72); box-shadow: var(--shadow); }
.refresh-panel span, .refresh-panel small { display: block; color: var(--muted); font-size: 11px; letter-spacing: .07em; text-transform: uppercase; }
.refresh-panel strong { display: block; margin: 4px 0 2px; font-size: 14px; }

.metric-grid { display: grid; grid-template-columns: 1.35fr repeat(3, 1fr); gap: 14px; margin-bottom: 14px; }
.metric-card, .panel { border: 1px solid var(--line-soft); border-radius: var(--radius); background: linear-gradient(145deg, rgba(22,27,23,.96), rgba(13,17,14,.98)); box-shadow: var(--shadow); }
.metric-card { min-height: 190px; padding: 22px; overflow: hidden; }
.metric-card--lead { border-color: rgba(146,207,66,.28); background: linear-gradient(145deg, rgba(146,207,66,.12), rgba(13,17,14,.98) 65%); }
.metric-card--attention { border-color: rgba(247,185,85,.24); }
.metric-card--danger { border-color: rgba(242,99,99,.3); }
.metric-heading { display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }
.metric-icon { display: grid; width: 30px; height: 30px; place-items: center; border: 1px solid var(--line); border-radius: 50%; color: var(--muted); font-size: 15px; }
.metric-icon--ok { border-color: rgba(146,207,66,.28); background: var(--green-soft); color: var(--green); }
.metric-card > strong { display: block; margin: 14px 0 8px; font-size: 50px; font-weight: 620; line-height: 1; letter-spacing: -.045em; }
.metric-card > strong small { color: var(--green); font-size: .5em; }
.metric-card > p { margin: 0; color: var(--muted); font-size: 13px; }
.meter { height: 4px; margin: 12px 0; overflow: hidden; border-radius: 99px; background: #222b24; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--green); box-shadow: 0 0 12px rgba(146,207,66,.45); }

.dashboard-grid { display: grid; grid-template-columns: 1.5fr 1fr .8fr; gap: 14px; margin-bottom: 14px; }
.panel { min-width: 0; padding: 24px; }
.panel-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 14px; }
.panel-heading h2 { margin: 0; font-size: 20px; font-weight: 650; letter-spacing: -.025em; }
.panel-note { color: var(--muted); font-size: 11px; }
.chart { width: 100%; height: 300px; }
.next-renewal { display: flex; flex-direction: column; }
.renewal-count { display: flex; align-items: baseline; gap: 10px; margin: 16px 0 5px; }
.renewal-count strong { font-size: 64px; font-weight: 570; line-height: 1; letter-spacing: -.06em; }
.renewal-count span { max-width: 58px; color: var(--muted); font-size: 11px; line-height: 1.25; text-transform: uppercase; }
.renewal-count.warning strong, .renewal-count.urgent strong { color: var(--amber); }
.renewal-count.critical strong, .renewal-count.expired strong { color: var(--red); }
.next-renewal h3 { margin: 8px 0 18px; overflow-wrap: anywhere; font-size: 18px; }
.next-renewal dl { margin: 0 0 18px; }
.next-renewal dl div { padding: 10px 0; border-top: 1px solid var(--line-soft); }
.next-renewal dt { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.next-renewal dd { margin: 3px 0 0; font-size: 12px; }
.text-link { width: fit-content; margin-top: auto; color: var(--green-bright); font-size: 13px; font-weight: 650; }
.text-link span { display: inline-block; transition: transform .2s ease; }
.text-link:hover span { transform: translateX(4px); }

.inventory-panel { padding: 0; overflow: hidden; scroll-margin-top: 18px; }
.inventory-heading { align-items: center; margin: 0; padding: 24px; }
.inventory-actions { display: flex; gap: 10px; }
.search-box { display: flex; width: min(360px, 38vw); align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 9px; background: #0c100d; color: var(--muted); }
.search-box:focus-within { border-color: rgba(146,207,66,.7); box-shadow: 0 0 0 3px var(--green-soft); }
.search-box input { width: 100%; padding: 10px 0; border: 0; outline: 0; background: transparent; color: var(--text); }
.button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 15px; border: 1px solid var(--line); border-radius: 9px; font-size: 13px; font-weight: 700; }
.button:hover, .button:focus-visible { border-color: var(--green); color: var(--green-bright); }
.filter-row { display: flex; gap: 8px; padding: 0 24px 18px; border-bottom: 1px solid var(--line-soft); overflow-x: auto; }
.filter-chip { padding: 7px 11px; border: 1px solid var(--line); border-radius: 99px; background: transparent; color: var(--muted); cursor: pointer; white-space: nowrap; font-size: 12px; }
.filter-chip span { margin-left: 4px; color: var(--text); }
.filter-chip:hover, .filter-chip:focus-visible, .filter-chip.active { border-color: rgba(146,207,66,.38); background: var(--green-soft); color: var(--green-bright); outline: none; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { padding: 12px 18px; border-bottom: 1px solid var(--line); color: #7f8a82; font-size: 10px; letter-spacing: .11em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: 15px 18px; border-bottom: 1px solid var(--line-soft); color: #c8cfca; white-space: nowrap; }
tbody tr { transition: background .18s ease; }
tbody tr:hover { background: rgba(146,207,66,.035); }
td:first-child strong { display: block; color: var(--text); font-weight: 620; }
td:first-child small { display: block; margin-top: 2px; color: #6f7a72; }
.days-cell { color: var(--text); font-weight: 700; }
code { color: #aeb7b0; font: 11px ui-monospace, SFMono-Regular, Menlo, monospace; }
.status-pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 9px; border: 1px solid var(--line); border-radius: 99px; font-size: 11px; }
.status-pill i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.status-pill--healthy { color: var(--green-bright); border-color: rgba(146,207,66,.22); background: var(--green-soft); }
.status-pill--healthy i { background: var(--green); }
.status-pill--watch { color: var(--blue); border-color: rgba(120,168,255,.2); background: rgba(120,168,255,.08); }
.status-pill--watch i { background: var(--blue); }
.status-pill--warning, .status-pill--urgent { color: var(--amber); border-color: rgba(247,185,85,.22); background: rgba(247,185,85,.08); }
.status-pill--warning i, .status-pill--urgent i { background: var(--amber); }
.status-pill--critical, .status-pill--expired { color: #ff8686; border-color: rgba(242,99,99,.22); background: rgba(242,99,99,.08); }
.status-pill--critical i, .status-pill--expired i { background: var(--red); }
.table-footer { display: flex; justify-content: space-between; padding: 17px 24px; color: var(--muted); font-size: 12px; }
.empty-state { padding: 28px; color: var(--muted); text-align: center; }

footer { display: flex; align-items: center; justify-content: space-between; padding: 34px 0 40px; border-top: 1px solid var(--line-soft); color: var(--muted); font-size: 12px; }
footer div { display: flex; align-items: center; gap: 10px; color: var(--text); font-weight: 700; }
.footer-mark { width: 25px; height: 24px; }
.footer-mark img { width: auto; height: 24px; max-width: none; }
footer small { margin-left: 5px; color: var(--muted); font-weight: 500; }
footer p { margin: 0; }

@media (max-width: 1100px) {
  .metric-grid { grid-template-columns: repeat(2, 1fr); }
  .dashboard-grid { grid-template-columns: 1.2fr .8fr; }
  .panel--wide { grid-column: 1 / -1; }
  .primary-nav { gap: 17px; }
}
@media (max-width: 760px) {
  .site-shell { padding: 0 18px; }
  .topbar { min-height: 68px; }
  .brand-mark { width: 25px; height: 24px; }
  .brand-mark img { height: 24px; }
  .brand-company { font-size: 12px; }
  .brand-divider, .brand-product, .live-status { display: none; }
  .primary-nav { gap: 15px; overflow-x: auto; }
  .primary-nav a { font-size: 12px; }
  .primary-nav a:nth-last-child(-n+2) { display: none; }
  main { padding-top: 36px; }
  .hero { grid-template-columns: 1fr; gap: 24px; }
  h1 { font-size: 43px; }
  .refresh-panel { min-width: 0; }
  .metric-grid, .dashboard-grid { grid-template-columns: 1fr; }
  .panel--wide { grid-column: auto; }
  .metric-card { min-height: 166px; }
  .inventory-heading { align-items: stretch; flex-direction: column; }
  .inventory-actions { flex-direction: column; }
  .search-box { width: 100%; }
  .button { width: 100%; }
  .table-footer, footer { align-items: flex-start; flex-direction: column; gap: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
