:root {
  color-scheme: light;
  --forest: #16382d;
  --forest-deep: #102e25;
  --green: #247355;
  --leaf: #70b796;
  --mint: #e4f1e8;
  --page: #f4f6f2;
  --paper: #fff;
  --ink: #192b23;
  --muted: #53675d;
  --line: #dde6dd;
  --amber: #87571a;
  --amber-light: #fbefd8;
  --red: #a02e2a;
  --red-light: #fae8e5;
  --radius: 15px;
  --rail: 14.25rem;
  font: 100%/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  font-optical-sizing: auto;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-inline-size: 0; }
::selection { background: #c5e6d3; color: var(--forest-deep); }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: .18em; }
button, input, select, textarea { font: inherit; color: inherit; }
button, a, select { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
button:active:not(:disabled), .button:active { transform: translateY(1px); }
:focus-visible { outline: 2px solid #438969; outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: 2.25rem; line-height: 1.12; letter-spacing: -.035em; font-weight: 700; }
h2 { font-size: 1.08rem; line-height: 1.3; letter-spacing: -.016em; }
h3 { font-size: .96rem; }
small { font-size: .78rem; }
svg { flex: none; }
.skip { position: fixed; z-index: 10; top: 1rem; left: 1rem; background: white; padding: .7rem 1rem; transform: translateY(-200%); }
.skip:focus { transform: none; }
.shell { min-height: 100vh; display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); }
.sidebar {
  position: sticky; inset-block-start: 0; height: 100dvh; min-height: 24rem; display: flex; flex-direction: column;
  background: var(--forest); color: #f1fbf3; padding: 1.7rem 1rem 1rem; z-index: 2;
}
.brand { display: flex; flex: none; align-items: center; gap: .7rem; padding: .15rem .55rem 1.7rem; }
.brand-mark {
  display: grid; place-items: center; inline-size: 2.25rem; block-size: 2.25rem; border-radius: 10px;
  background: #cee9d4; color: #204d3a;
}
.brand-name { font-size: 1.14rem; font-weight: 730; letter-spacing: -.028em; line-height: 1.15; }
.brand-caption { color: #bdd5c8; font-size: .73rem; margin-top: .13rem; }
.nav { display: grid; gap: .24rem; }
.nav-link, .signout {
  display: flex; align-items: center; gap: .7rem; text-decoration: none; border: 0; background: transparent;
  text-align: left; width: 100%; border-radius: 9px; padding: .68rem .72rem; min-height: 2.7rem;
  color: #dcf0e4; font-size: .88rem; font-weight: 550;
}
.nav-label.compact { display: none; }
.nav-link:hover, .signout:hover { background: #245241; }
.nav-link[aria-current="page"] { color: white; background: #295a46; box-shadow: inset 0 0 0 1px #3d6c56; }
.nav-link[aria-current="page"] svg { color: #b2e3c0; }
.sidebar-foot { margin-top: auto; padding-top: 1rem; }
.sidebar-foot .signout { color: #c2d9cc; }
.workspace { min-width: 0; padding: 2.45rem clamp(1.15rem, 3.1vw, 3.15rem) 2.8rem; }
.content { max-width: 86rem; margin-inline: auto; outline: none; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.65rem; }
.page-head p { color: var(--muted); margin-top: .36rem; font-size: .87rem; }
.page-tools, .actions, .legend, .pager { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; }
.page-tools { justify-content: flex-end; }
.button, .icon-button, select, input, textarea {
  min-height: 2.65rem; border-radius: 9px; border: 1px solid #cfddd2; background: #fff;
}
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem; padding: .42rem .78rem;
  font-weight: 620; font-size: .83rem; text-decoration: none; color: var(--ink); white-space: nowrap;
}
.button:hover, .icon-button:hover { background: #edf4ed; }
.button.primary { border-color: var(--green); background: var(--green); color: #fff; }
.button.primary:hover { background: #1b6347; }
.button.danger { color: var(--red); border-color: #ead1cc; }
.button.danger:hover { background: var(--red-light); }
.button.text { color: var(--green); border-color: transparent; background: transparent; }
.button.text:hover { background: var(--mint); }
.icon-button { display: inline-grid; place-items: center; inline-size: 2.65rem; padding: 0; text-decoration: none; color: var(--ink); }
input, select, textarea { min-width: 0; padding: .45rem .65rem; accent-color: var(--green); font-size: .87rem; }
input::placeholder, textarea::placeholder { color: #5f7469; }
textarea { min-height: 5rem; resize: vertical; }
.load, .empty, .error-state { display: grid; justify-items: start; align-content: center; min-height: 6rem; gap: .7rem; padding: 1.2rem; color: var(--muted); }
.error-state { border-color: #e5bcb4; }
.skeleton {
  background: linear-gradient(100deg, #e6ece5 30%, #f1f4ee 50%, #e6ece5 70%);
  background-size: 220% 100%; animation: loading 1.3s linear infinite; block-size: .86rem; border-radius: 6px;
  inline-size: min(13rem, 65%);
}
@keyframes loading { to { background-position: -220% 0; } }
.stack { display: grid; gap: 1.2rem; }
.panel { min-inline-size: 0; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.panel-pad { padding: 1.16rem 1.25rem; }
.panel-head { display: flex; align-items: start; justify-content: space-between; gap: .65rem; margin-bottom: .9rem; }
.panel-head p { color: var(--muted); font-size: .79rem; margin-top: .22rem; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.metric { padding: .98rem 1.1rem 1rem; min-inline-size: 0; }
.metric + .metric { border-inline-start: 1px solid var(--line); }
.metric-link { text-decoration: none; color: inherit; }
.metric-link:hover { background: #f3f8f2; }
.metric:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.metric:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.metric-label { display: flex; align-items: center; gap: .45rem; font-size: .8rem; color: var(--muted); }
.metric-label svg { color: var(--green); }
.metric-value { display: block; font-size: 1.85rem; margin-block: .25rem .08rem; line-height: 1.15; letter-spacing: -.033em; font-weight: 680; overflow-wrap: anywhere; }
.metric-note { display: block; color: var(--muted); font-size: .74rem; }
.num { font-variant-numeric: tabular-nums; }
.two-col { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); gap: 1.2rem; align-items: start; }
.two-col.even { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid { stroke: #e8ede7; stroke-width: 1; }
.chart text { fill: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .full { fill: #347f5c; }
.chart .trial { fill: #b1d4b7; stroke: #547960; stroke-width: 1; }
.chart .latest-line { stroke: #b3c8bb; stroke-dasharray: 3 4; }
.chart .chart-bg { fill: #f4f8f2; }
.chart [data-day] { cursor: default; }
.chart [data-day]:focus-visible { outline: 2px solid var(--green); outline-offset: 0; }
.chart [data-day]:hover .full, .chart [data-day]:focus .full { fill: #164e37; }
.chart [data-day]:hover .trial, .chart [data-day]:focus .trial { fill: #81b492; }
.chart-caption { min-height: 1.35rem; color: var(--muted); font-size: .8rem; margin: .24rem 0 .15rem; }
.legend { color: var(--muted); font-size: .74rem; gap: .3rem .75rem; }
.legend span { display: inline-flex; align-items: center; gap: .28rem; }
.dot { inline-size: .52rem; block-size: .52rem; background: var(--green); border-radius: 100%; flex: none; }
.dot.light { background: #b1d4b7; }
.dot.amber { background: #ac722a; }
.dot.red { background: var(--red); }
.dot.gray { background: #7d9186; }
.queue { display: grid; gap: 0; }
.queue-item {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; align-items: center; gap: .65rem;
  padding: .75rem 0; color: inherit; text-decoration: none; border-top: 1px solid var(--line); font-size: .84rem;
}
.queue-item:hover { color: var(--green); }
.queue-item:last-child { padding-bottom: 0; }
.queue-item .value { font-size: 1.12rem; font-weight: 680; }
.queue-icon { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 8px; color: var(--green); background: var(--mint); }
.queue-icon.amber { color: var(--amber); background: var(--amber-light); }
.queue-icon.red { color: var(--red); background: var(--red-light); }
.queue-detail, .muted { color: var(--muted); }
.queue-detail { display: block; font-size: .74rem; margin-top: .1rem; }
.bars { display: grid; gap: .65rem; }
.bar-line { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .22rem .5rem; align-items: center; }
.bar-name { font-size: .83rem; overflow-wrap: anywhere; }
.bar-value { font-weight: 620; font-size: .81rem; }
progress { inline-size: 100%; block-size: .44rem; grid-column: 1 / -1; border: 0; border-radius: .3rem; background: #edf2ec; }
progress::-webkit-progress-bar { background: #edf2ec; border-radius: .3rem; }
progress::-webkit-progress-value { background: #5d9c79; border-radius: .3rem; }
progress::-moz-progress-bar { background: #5d9c79; border-radius: .3rem; }
progress.alt::-webkit-progress-value { background: #8ba55a; }
progress.alt::-moz-progress-bar { background: #8ba55a; }
progress.cost::-webkit-progress-value { background: #c39455; }
progress.cost::-moz-progress-bar { background: #c39455; }
.filters { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; padding: .9rem 1rem; border-bottom: 1px solid var(--line); }
.search { flex: 1 1 12rem; min-width: 9rem; }
.operations-select { display: none; }
.filter-chips { display: flex; flex-wrap: wrap; gap: .36rem; margin-bottom: .9rem; }
.chip {
  text-decoration: none; color: var(--muted); font-size: .8rem; font-weight: 590; padding: .43rem .64rem;
  border: 1px solid transparent; border-radius: 7px; white-space: nowrap; min-height: 2.2rem;
}
.chip:hover { background: #e9f0e8; }
.chip.selected { background: #e1eee4; border-color: #cbdece; color: #24523d; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .82rem; }
th { text-align: left; color: var(--muted); font-size: .74rem; font-weight: 610; background: #f5f8f3; }
th, td { padding: .67rem .88rem; vertical-align: middle; overflow-wrap: anywhere; }
th:first-child, td:first-child { padding-inline-start: 1rem; }
td { border-top: 1px solid #eaf0e9; }
td a { font-weight: 650; }
tbody tr:hover { background: #fbfcfa; }
.display-only { display: table-cell; }
.badge { display: inline-flex; align-items: center; gap: .28rem; background: #edf2ed; color: var(--muted); border-radius: 5px; padding: .14rem .39rem; font-size: .72rem; font-weight: 610; }
.badge.active { background: var(--mint); color: #215b3e; }
.badge.soon { background: var(--amber-light); color: var(--amber); }
.badge.expired, .badge.restricted { background: var(--red-light); color: var(--red); }
.pager { justify-content: space-between; padding: .65rem 1rem; border-top: 1px solid var(--line); font-size: .8rem; color: var(--muted); }
.pager + .pager { border-top: 0; }
.details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .85rem; margin: .8rem 0; }
.details > div { border-top: 1px solid var(--line); padding-top: .55rem; }
.details dt { color: var(--muted); font-size: .77rem; }
.details dd { margin: .21rem 0 0; font-weight: 620; overflow-wrap: anywhere; }
.form { display: grid; gap: .75rem; }
.form label { display: grid; gap: .33rem; color: var(--muted); font-size: .82rem; }
.form label > :is(input, select, textarea) { color: var(--ink); width: 100%; }
.form label.inline { display: flex; align-items: center; gap: .5rem; }
.form label.inline input { width: auto; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.form-error { color: var(--red); font-size: .82rem; min-height: 0; }
.form-error:empty { display: none; }
.login-shell { min-height: 100dvh; display: grid; place-items: center; padding: 1rem; background: var(--forest); }
.login { width: min(100%, 25rem); background: var(--page); border-radius: 18px; padding: 1.65rem; }
.login .brand { padding: 0 0 1.5rem; color: var(--ink); }
.login .brand-caption { color: var(--muted); }
.login h1 { font-size: 1.65rem; margin-bottom: .4rem; }
.login p { color: var(--muted); font-size: .86rem; margin-bottom: 1rem; }
dialog { border: 1px solid #d6e3d8; padding: 0; border-radius: 17px; width: min(100% - 2rem, 33rem); max-height: calc(100dvh - 2rem); color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #102e2575; }
dialog[open] { animation: reveal 160ms ease-out; }
@keyframes reveal { from { opacity: 0; transform: translateY(.35rem); } }
.dialog-inner { padding: 1.3rem; }
.dialog-inner h2 { padding-inline-end: 2rem; margin-bottom: .65rem; font-size: 1.2rem; }
.dialog-close { position: absolute; inset: .65rem .65rem auto auto; }
.dialog-close button { font-size: 1.32rem; }
.dialog-section { margin-block: 1rem; }
.traffic-detail summary { cursor: pointer; color: var(--green); font-size: .85rem; font-weight: 620; }
.traffic-detail .bars { margin-top: .65rem; }
.action-form { padding-top: .85rem; border-top: 1px solid var(--line); margin-top: .85rem; }
.notification {
  position: fixed; inset: auto 1.1rem 1.15rem auto; z-index: 4; max-width: min(90vw, 27rem); border-radius: 10px;
  background: var(--forest); color: white; padding: .75rem 1rem; box-shadow: 0 8px 22px #0003; font-size: .85rem;
}
.finance-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(8rem, .45fr); gap: 1rem; align-items: center; }
.finance-row + .finance-row { padding-top: .8rem; margin-top: .8rem; border-top: 1px solid var(--line); }
.finance-total { border-left: 1px solid var(--line); padding-left: 1rem; }
.finance-total .metric-value { font-size: 1.35rem; }
.money-negative { color: var(--red); }
@media (max-width: 1000px) {
  :root { --rail: 11.5rem; }
  .sidebar { padding-inline: .68rem; }
  .two-col { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); }
  .metric { padding-inline: .78rem; }
  .metric-label svg { display: none; }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .sidebar { height: auto; min-height: 0; padding: .66rem .75rem .48rem; background: #16382df5; backdrop-filter: blur(14px); }
  .brand { padding: 0 .3rem .52rem; }
  .brand-mark { width: 1.88rem; height: 1.88rem; border-radius: 7px; }
  .brand-caption { display: none; }
  .nav { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: .16rem; }
  .nav-link { display: grid; justify-items: center; gap: .18rem; min-height: 2.7rem; font-size: .64rem; padding: .33rem .1rem; }
  .nav-link svg { width: 16px; height: 16px; }
  .nav-label.full { display: none; }
  .nav-label.compact { display: inline; }
  .chart text { font-size: 19px; }
  .chart .date-mid { display: none; }
  .sidebar-foot { position: absolute; inset: .55rem .78rem auto auto; padding: 0; }
  .signout { min-height: 2rem; padding: .35rem .42rem; font-size: .75rem; }
  .signout svg { width: 15px; height: 15px; }
  .workspace { padding: 1.32rem .9rem 2rem; }
  h1 { font-size: 1.72rem; }
  .page-head { align-items: flex-start; margin-bottom: 1rem; }
  .page-head p { font-size: .76rem; }
  .two-col, .two-col.even { grid-template-columns: minmax(0, 1fr); gap: .8rem; }
  .stack { gap: .85rem; }
  .panel-pad { padding: .9rem; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric:nth-child(3) { border-inline-start: 0; }
  .metric:nth-child(n+3) { border-top: 1px solid var(--line); }
  .metric:first-child { border-radius: var(--radius) 0 0 0; }
  .metric:last-child { border-radius: 0 0 var(--radius) 0; }
  .metric-value { font-size: 1.5rem; }
  .metric-label, .metric-note { font-size: .73rem; }
  .display-only { display: none; }
  .operations-nav .filter-chips { display: none; }
  .operations-select { display: block; margin-bottom: .75rem; max-width: 100%; }
  th, td { padding: .57rem .4rem; font-size: .74rem; }
  th:first-child, td:first-child { padding-inline-start: .65rem; }
  .filters { padding: .7rem; }
  .button, input, select { min-height: 2.62rem; }
  .chip { min-height: 2.45rem; }
  .finance-row { grid-template-columns: 1fr; gap: .55rem; }
  .finance-total { border-left: 0; padding-left: 0; }
}
@media (max-width: 360px) {
  .page-head { flex-wrap: wrap; }
  .form-grid { grid-template-columns: 1fr; }
  .nav-link { font-size: .59rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; scroll-behavior: auto !important; }
}
@media (prefers-reduced-transparency: reduce), (prefers-contrast: more) {
  .sidebar { background: var(--forest); backdrop-filter: none; }
}

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}
.console-shell { max-width: 58rem; }
.console-nav { display: flex; gap: .55rem; margin-bottom: .8rem; align-items: center; }
.console-nav label { min-width: 0; }
.console-nav select { max-width: 100%; }
.console-content { gap: .75rem; }
.console-status:empty { display: none; }
.console-status[role="alert"] { color: var(--red); }
.console-card > h2 { margin-bottom: .55rem; }
.console-details { display: grid; gap: .55rem; }
.console-details:empty { display: none; }
.console-details p { font-size: .86rem; line-height: 1.5; max-width: 72ch; overflow-wrap: anywhere; }
.console-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem 1rem; margin: 0; }
.console-facts > div { padding: .4rem 0; border-bottom: 1px solid var(--line); min-width: 0; }
.console-facts dt { color: var(--muted); font-size: .75rem; }
.console-facts dd { margin: .13rem 0 0; font-size: .87rem; font-weight: 600; overflow-wrap: anywhere; }
.console-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem; margin-top: .7rem; }
.console-actions .button { white-space: normal; text-align: center; }
.console-attachment { display: grid; gap: .5rem; justify-items: start; margin-top: .65rem; }
.console-attachment img { max-width: min(100%, 24rem); max-height: 22rem; object-fit: contain; border-radius: 9px; }
.console-wide { grid-column: 1 / -1; }
@media (max-width: 420px) {
  .console-form .form-grid { grid-template-columns: 1fr; }
  .console-nav label { flex: 1 1 auto; }
  .console-nav select { width: 100%; }
}
