:root {
  color-scheme: light;
  --ink: #172c2c;
  --muted: #516764;
  --teal: #087c7c;
  --line: #e3eeeb;
  --white: #fff;
  font: 15px/1.45 "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); }
a { color: #075f60; text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, p { margin: 0 0 .75rem; }
h1 { font-size: clamp(1.85rem, 4vw, 2.8rem); line-height: 1.06; letter-spacing: -.055em; }
h2 { font-size: 1.12rem; letter-spacing: -.025em; }
h3 { font-size: 1rem; }
small, .muted, .empty { color: var(--muted); }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #0b777a; outline-offset: 3px; }
.auth-body, .workspace-body { min-height: 100vh; }
.auth-body { background: #bfd8d0; }
.workspace-body { background: #edf6f4; }
.auth-body { display: grid; justify-items: center; padding: 4vh 16px; }
.auth-card { width: min(100%, 485px); align-self: center; border-radius: 26px; padding: clamp(22px, 6vw, 42px); background: var(--white); box-shadow: 0 18px 65px #21443c15; }
.auth-card .brand { margin-bottom: 2rem; }
.auth-card form + p, .auth-card .notice { margin-top: 1rem; }
.brand { display: inline-flex; align-items: center; gap: .42rem; color: var(--ink); font-weight: 800; font-size: 1.15rem; letter-spacing: -.055em; }
.brand span { color: var(--teal); margin-left: -.32rem; }
.brand b { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 14px 14px 7px 7px; background: var(--teal); color: white; font-size: 1.3rem; }
form { display: grid; gap: .85rem; }
.field { display: grid; gap: .35rem; font-size: .86rem; font-weight: 650; min-width: 0; }
input:not([type=checkbox], [type=radio]), select, textarea {
  width: 100%; min-width: 0; padding: .72rem .8rem; border: 1px solid #d8e6e2; border-radius: 10px;
  background: #f7faf9; color: var(--ink); font: inherit; font-weight: 450;
}
textarea { min-height: 85px; resize: vertical; }
.password-field { position: relative; }
.password-field input { padding-right: 58px; }
.reveal { position: absolute; inset: 0 .5rem 0 auto; border: 0; background: transparent; color: var(--teal); cursor: pointer; font-weight: 650; }
.otp { letter-spacing: .55em; font-variant-numeric: tabular-nums; }
.check { display: flex; align-items: center; gap: .45rem; font-size: .88rem; }
.check input { accent-color: var(--teal); }
fieldset { border: 1px solid var(--line); border-radius: 12px; margin: 0; }
.feature-list { display: grid; gap: .45rem; grid-template-columns: repeat(auto-fit,minmax(160px,1fr)); }
.split, .account-menu { display: flex; align-items: center; justify-content: space-between; gap: .65rem; flex-wrap: wrap; }
.button { display: inline-flex; align-items: center; justify-content: center; justify-self: start; width: fit-content; min-height: 39px;
  padding: .55rem 1rem; border: 0; border-radius: 100px; background: var(--teal); color: white; font: inherit; font-size: .86rem; font-weight: 700; cursor: pointer; }
.button:hover { filter: brightness(.95); text-decoration: none; }
.button:disabled { opacity: .7; cursor: wait; }
.button.accent, .selected { background: #f8d976; color: #302808; }
.button.quiet { background: #eaf4f2; color: #165a55; }
.button.danger { background: #f7e0e0; color: #832d2d; }
.form-message, .notice { border-radius: 12px; padding: .7rem .9rem; margin: 0; background: #e3f1ee; color: #17514d; }
.form-message { background: #fbebe7; color: #812e22; }
.workspace { width: 100%; min-height: 100vh; padding: clamp(16px, 2vw, 32px); }
.work-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.account-menu { background: white; border-radius: 999px; padding: .28rem .35rem .28rem .4rem; font-size: .85rem; font-weight: 650; }
.account-role { color: var(--muted); }
.avatar { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: #cce8e1; color: #17514d; }
.work-layout { display: grid; grid-template-columns: 60px minmax(0,1fr); gap: 16px; }
.rail { min-width: 0; z-index: 3; }
.rail nav { display: grid; grid-auto-columns: 46px; gap: 5px; padding: 6px; width: fit-content; max-width: 100%; background: white; border: 1px solid #e3eeeb; border-radius: 20px; }
.rail-control { position: relative; display: grid; place-items: center; inline-size: 46px; block-size: 46px; padding: 0;
  border: 0; border-radius: 14px; background: transparent; color: #204540; cursor: pointer; }
.rail-control:hover, .rail-control:focus-visible { background: #e7f3ef; }
.rail-control.selected, .rail-control.selected:hover, .rail-control.selected:focus-visible { background: #f8d976; }
.rail-icon { display: block; opacity: .82; }
.rail-control.selected .rail-icon, .rail-control:hover .rail-icon { opacity: 1; }
.nav-label { visibility: hidden; pointer-events: none; position: absolute; z-index: 5; inset-inline-start: calc(100% + 13px);
  top: 50%; opacity: 0; transform: translate(-5px,-50%); padding: .5rem .75rem; border-radius: 9px; white-space: nowrap;
  background: #173d37; color: white; box-shadow: 0 4px 14px #1237332b; font-size: .78rem; font-weight: 700;
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms; }
.nav-label::before { content: ''; position: absolute; inset-inline-start: -4px; top: calc(50% - 4px); width: 8px; height: 8px; background: inherit; transform: rotate(45deg); }
.rail-control:hover .nav-label, .rail-control:focus-visible .nav-label { visibility: visible; opacity: 1; transform: translate(0,-50%); }
@media (prefers-reduced-motion: reduce) { .nav-label { transition: none; } }
.work-content, .dashboard-main, .dashboard-side { min-width: 0; display: grid; grid-template-columns: minmax(0,1fr); align-content: start; gap: 14px; }
.surface { min-width: 0; background: white; border-radius: 19px; padding: clamp(15px, 2.1vw, 24px); }
.titlebar { display: flex; justify-content: space-between; align-items: center; gap: .8rem; }
.titlebar h1 { margin-bottom: .35rem; }
.titlebar .muted { margin: 0; }
.eyebrow { font-size: .69rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: #325f5a; margin-bottom: .5rem; }
.dashboard-grid { display: grid; grid-template-columns: minmax(200px, .8fr) minmax(0, 2.5fr); gap: 14px; }
.status-panel { background: #087d7f; color: white; }
.status-panel .eyebrow { color: #d3f3eb; }
.status-panel p:last-child { margin: 0; }
.registration-list { display: grid; gap: .75rem; padding: 0; margin: .75rem 0 0; list-style: none; }
.registration-list li { display: flex; gap: .5rem; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--line); padding-bottom: .55rem; overflow-wrap: anywhere; }
.registration-list small { display: block; }
.metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 10px; }
.metric { min-height: 108px; padding: clamp(12px, 2vw, 20px); display: grid; align-content: space-between; border-radius: 16px; font-weight: 650; overflow-wrap: anywhere; }
.metric strong { font-size: clamp(1.6rem,3vw,2.6rem); line-height: 1; letter-spacing: -.06em; font-variant-numeric: tabular-nums; }
.mint { background: #d1ebe3; } .blue { background: #c9eaf3; } .peach { background: #fae3cc; }
.pink { background: #f6d7eb; } .lavender { background: #e2dcf9; } .sand { background: #f7ebbc; }
.badge { display: inline-block; width: fit-content; border-radius: 100px; padding: .22rem .55rem; background: #eef2f2; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.status-active, .status-enabled { background: #ddf1e6; color: #195946; }
.status-pending, .status-scheduled { background: #f9ebbe; color: #624b13; }
.status-blocked, .status-suspended, .status-expired { background: #f8dfe3; color: #802e42; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .84rem; text-align: left; }
th { color: var(--muted); background: #f4f8f7; white-space: nowrap; }
td, th { padding: .65rem .7rem; border-bottom: 1px solid var(--line); }
td { min-width: 52px; overflow-wrap: anywhere; }
.filters { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); align-items: end; gap: 10px; margin-bottom: 1rem; }
.pagination { display: flex; align-items: center; gap: .85rem; margin-top: .9rem; font-size: .85rem; }
.account-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,260px),1fr)); gap: 14px; align-items: start; }
dl { display: grid; grid-template-columns: auto 1fr; gap: .35rem .8rem; }
dt { color: var(--muted); } dd { margin: 0; }
@media(max-width: 900px) {
  .dashboard-grid { grid-template-columns: minmax(0,1fr); }
  .dashboard-side { grid-template-columns: repeat(auto-fit,minmax(min(100%,220px),1fr)); }
}
@media(max-width: 650px) {
  .workspace { padding: 11px; }
  .work-layout { grid-template-columns: minmax(0,1fr); gap: 10px; }
  .rail nav { display: flex; flex-wrap: wrap; gap: 3px; padding: 4px; }
  .rail-control { inline-size: 40px; block-size: 42px; }
  .rail nav > :nth-child(n + 5) .nav-label { inset-inline: auto 0; top: calc(100% + 6px); transform: none; }
  .rail nav > :nth-child(n + 5) .nav-label::before { inset-inline: auto 16px; top: -4px; }
  .work-head { flex-wrap: wrap; margin-bottom: 10px; }
  .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .titlebar { align-items: flex-start; flex-wrap: wrap; }
}
