:root {
  color-scheme: light;
  --bg: #f5f7f6;
  --surface: #fff;
  --ink: #17211f;
  --muted: #65706d;
  --line: #d8dfdc;
  --teal: #0c7b72;
  --teal-deep: #07534e;
  --soft: #e7efed;
  --red: #9a2d21;
  --gold: #8a5b00;
  --radius: 8px;
  --sidebar: 236px;
  --header: 72px;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; outline-offset: 3px; }
button { cursor: pointer; color: inherit; }
button:disabled { opacity: .55; cursor: not-allowed; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p { margin: 0; }
:focus-visible { outline: 2px solid var(--teal); }
input:focus, select:focus, textarea:focus { border-color: var(--teal); }
.icon { width: 19px; height: 19px; display: inline-block; flex-shrink: 0; vertical-align: middle; }
.muted { color: var(--muted); }
.mono { font-family: "Cascadia Code", Consolas, monospace; }
.right { text-align: right; }
.center { text-align: center; }
.warn-text { color: var(--gold) !important; }
.numeric, .amount { font-variant-numeric: tabular-nums; white-space: nowrap; }
.amount { font-weight: 600; }
.loading { padding: 20vh 24px; text-align: center; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); font-weight: 500; line-height: 1.4; white-space: nowrap; }
.btn:hover { background: #f0f4f2; border-color: #aebeb7; }
.btn.primary { color: #fff; background: var(--teal); border-color: var(--teal); }
.btn.primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); }
.btn.text { border-color: transparent; background: transparent; color: var(--teal-deep); }
.btn.text:hover { background: var(--soft); }
.btn.small { min-height: 32px; padding: 5px 10px; font-size: 13px; }
.btn.soft-blue { color: var(--teal-deep); background: #edf5f2; border-color: #c5dcd4; }
.btn.danger { color: var(--red); border-color: #e8c2ba; background: #fff5f3; }
.btn.full { width: 100%; }
.icon-btn { border: 0; background: transparent; width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border-radius: 6px; color: var(--muted); flex-shrink: 0; }
.icon-btn:hover { background: var(--soft); color: var(--ink); }

/* Application frame */
.topbar { height: var(--header); position: fixed; z-index: 40; top: 0; left: 0; right: 0; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 32px; background: #fff; border-bottom: 1px solid var(--line); }
.header-brand, .brand, .top-actions { display: flex; align-items: center; }
.header-brand { gap: 20px; min-width: 0; }
.brand { gap: 12px; flex-shrink: 0; }
.brand-mark { width: 38px; height: 38px; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; color: #fff; background: var(--ink); }
.brand-mark .icon { height: 23px; width: 23px; }
.brand b { font-size: 23px; font-weight: 700; letter-spacing: 1px; }
.brand b span { display: block; font-size: 12px; font-weight: 400; letter-spacing: 0; margin-top: 2px; }
.brand-description { font-size: 14px; color: var(--muted); padding-left: 20px; border-left: 1px solid var(--line); }
.top-actions { gap: 18px; white-space: nowrap; }
.today { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.local-label { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.local-label i, .status-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--teal); }
.header-user { padding-left: 18px; border-left: 1px solid var(--line); font-size: 13px; }
.notification { position: relative; }
.notification i { width: 6px; height: 6px; background: #c64f3f; position: absolute; top: 6px; right: 7px; border-radius: 50%; }
.mobile-menu { display: none; }
.sidebar { position: fixed; top: var(--header); left: 0; bottom: 0; width: var(--sidebar); background: #fff; border-right: 1px solid var(--line); padding: 24px 16px 16px; display: flex; flex-direction: column; overflow-y: auto; z-index: 30; }
.sidebar-heading { font-size: 17px; font-weight: 700; padding: 0 14px 22px; }
.nav-caption { font-size: 12px; color: var(--muted); padding: 0 14px; margin: 0 0 8px; }
nav .nav-caption { margin-top: 25px; }
.nav-item { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 9px 14px; margin: 3px 0; border-radius: 6px; color: #4b5853; white-space: nowrap; }
.nav-item .icon { width: 18px; height: 18px; }
.nav-item:hover { background: #f2f5f3; color: var(--ink); }
.nav-item.active { background: var(--soft); color: var(--teal-deep); font-weight: 600; }
.nav-count { margin-left: auto; font-size: 11px; min-width: 21px; border-radius: 4px; padding: 0 5px; line-height: 21px; text-align: center; background: #f4e9de; color: #8a5b00; }
.sidebar-bottom { margin-top: auto; padding-top: 30px; }
.storage-note { border-top: 1px solid var(--line); padding: 18px 14px 0; margin-top: 18px; font-size: 12px; }
.storage-note .status-dot { margin-right: 7px; }
.storage-note b { font-weight: 500; }
.storage-note small { display: block; color: var(--muted); font-size: 11px; margin-top: 4px; }
.main-wrap { margin-left: var(--sidebar); padding-top: var(--header); min-height: 100vh; min-width: 0; }
.demo-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 34px; border-bottom: 1px solid #dce5e0; background: #edf3ef; color: #496258; font-size: 12px; }
.demo-bar button { border: 0; padding: 0; background: transparent; color: var(--teal-deep); font-size: 12px; font-weight: 600; white-space: nowrap; }
.demo-bar .icon { height: 15px; width: 15px; margin-left: 5px; }
.main { padding: 30px 34px 0; max-width: 1900px; margin: 0 auto; }
.page-heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 26px; }
.eyebrow { color: var(--muted); font-size: 12px; margin-bottom: 7px; }
.page-heading h1 { font-size: 32px; line-height: 1.3; font-weight: 700; letter-spacing: -.5px; }
.page-heading p { color: var(--muted); font-size: 14px; margin-top: 10px; }
.heading-actions { display: flex; gap: 10px; flex-shrink: 0; }
.footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; font-size: 11px; color: var(--muted); padding: 26px 0; }

/* Overview and counters */
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 20px; }
.metric { text-align: left; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 18px 20px; min-width: 0; }
.metric:hover { border-color: #8cae9f; background: #fcfdfc; }
.metric-top { display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; }
.metric-top .icon { width: 15px; height: 15px; color: #78867f; }
.metric-value { font-size: 30px; font-weight: 650; line-height: 1.3; margin: 10px 0; font-variant-numeric: tabular-nums; letter-spacing: -.7px; overflow-wrap: anywhere; }
.metric-value small { font-size: 13px; color: var(--muted); font-weight: 400; margin-left: 8px; }
.metric.red .metric-value { color: var(--red); }
.metric.amber .metric-value { color: var(--gold); }
.metric-note { color: var(--muted); font-size: 12px; }
.attention { background: #fbf8ef; border: 1px solid #e6dcc3; border-radius: var(--radius); padding: 16px 20px; display: flex; align-items: center; gap: 14px; margin-bottom: 20px; }
.attention-icon { color: var(--gold); display: inline-flex; }
.attention b { font-size: 14px; font-weight: 600; }
.attention div > span { color: #77684d; display: block; font-size: 13px; margin-top: 3px; }
.attention > .btn { margin-left: auto; min-height: 34px; font-size: 13px; }
.attention.calm { background: #f0f6f2; border-color: #d3e1d7; }
.attention.calm .attention-icon { color: var(--teal); }
.attention.calm div > span { color: var(--muted); }
.customer-summary { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; padding: 17px 20px; margin-bottom: 22px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.customer-summary > div:first-child { display: flex; align-items: center; gap: 12px; }
.customer-summary b { font-size: 14px; font-weight: 600; }
.customer-summary small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.customer-summary > div:nth-child(2) { display: flex; gap: 12px; align-items: center; font-size: 13px; }
.customer-summary > div:nth-child(2) b { font-size: 21px; font-variant-numeric: tabular-nums; }
.customer-summary > div:nth-child(2) small { margin: 0; }
.customer-summary .btn { font-size: 13px; }
.feature-icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); background: #f8faf9; border-radius: 6px; color: var(--teal-deep); }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 20px; margin-bottom: 20px; }
.bottom-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); min-width: 0; overflow: hidden; }
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 20px; }
.panel-title h2 { font-size: 17px; font-weight: 600; }
.panel-title p { color: var(--muted); font-size: 12px; margin-top: 5px; }
.panel-title > .icon { color: var(--muted); }
.panel-title .btn { font-size: 12px; min-height: 32px; padding: 5px 8px; }
.count { display: inline-block; font-size: 12px; font-weight: 500; padding: 1px 7px; border-radius: 4px; background: #eef1ef; color: var(--muted); vertical-align: middle; margin-left: 5px; }
.panel-foot { padding: 13px 20px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); background: #fcfdfc; }
.panel-foot .icon { width: 14px; height: 14px; margin-right: 4px; }
.resource-total { display: flex; gap: 10px; align-items: baseline; margin: 0 20px 18px; border-top: 1px solid var(--line); padding-top: 20px; }
.resource-total b { font-size: 36px; line-height: 1.2; font-weight: 600; }
.resource-total span { font-size: 12px; color: var(--muted); }
.distribution-list { padding: 0 20px 24px; display: grid; gap: 20px; }
.provider-row { display: flex; align-items: center; justify-content: space-between; font-size: 13px; margin-bottom: 8px; }
.provider-row b { font-weight: 600; }
.provider-row small { color: var(--muted); font-weight: 400; }
.provider-bar { height: 5px; background: #edf1ef; border-radius: 2px; overflow: hidden; }
.provider-bar i { display: block; height: 100%; background: #408d77; }
.quality-list { padding: 0 20px 8px; }
.quality-row { border: 0; border-top: 1px solid #e7ece9; background: #fff; display: flex; align-items: center; justify-content: space-between; width: 100%; padding: 15px 0; font-size: 13px; }
.quality-row:hover { color: var(--teal); }
.quality-row > span { display: flex; align-items: center; gap: 9px; }
.quality-row > span:last-child { color: var(--muted); font-size: 12px; }
.quality-row b { color: var(--ink); font-size: 14px; font-variant-numeric: tabular-nums; }
.quality-row .icon { width: 16px; height: 16px; color: var(--muted); }
.activity { padding: 0 20px 12px; }
.activity-item { display: flex; align-items: flex-start; gap: 12px; padding: 12px 0; border-top: 1px solid #e7ece9; }
.activity-item > i { width: 6px; height: 6px; border-radius: 50%; background: #84a496; margin-top: 7px; flex-shrink: 0; }
.activity-item b { font-size: 13px; font-weight: 500; }
.activity-item p { color: var(--muted); font-size: 12px; margin-top: 3px; overflow-wrap: anywhere; }
.activity-item > small { color: var(--muted); font-size: 11px; margin-left: auto; white-space: nowrap; }

/* Tables and filters */
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 900px; text-align: left; font-size: 14px; }
th { color: var(--muted); background: #f8faf9; font-size: 12px; font-weight: 600; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 13px 16px; white-space: nowrap; }
td { border-bottom: 1px solid #e6ebe8; padding: 16px; vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcfb; }
td b { font-weight: 600; }
td.right { white-space: nowrap; }
.compact-table { min-width: 660px; font-size: 13px; }
.compact-table th, .compact-table td { padding-left: 16px; padding-right: 16px; }
.entity-table { min-width: 940px; }
.entity-table td { padding-top: 19px; padding-bottom: 19px; }
.entity-table .date-line { max-width: 260px; overflow-wrap: anywhere; }
.cell-actions { display: flex; align-items: center; justify-content: flex-end; gap: 2px; }
.table-links { display: grid; gap: 5px; min-width: 130px; }
.table-links .link-title { font-size: 13px; font-weight: 400; }
.link-title { padding: 0; border: 0; background: none; color: var(--teal-deep); font-size: 14px; font-weight: 600; text-align: left; line-height: 1.55; }
.link-title:hover { text-decoration: underline; text-underline-offset: 3px; }
.server-title { border: 0; background: none; padding: 0; display: flex; align-items: center; gap: 10px; text-align: left; }
.server-title b { color: var(--ink); font-size: 14px; font-weight: 600; }
.server-title:hover b { color: var(--teal); }
.server-title small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }
.server-mini { width: 30px; height: 32px; border: 1px solid #dbe5df; border-radius: 5px; background: #f6f9f7; display: inline-flex; align-items: center; justify-content: center; color: #6a8477; flex-shrink: 0; }
.server-mini .icon { width: 17px; height: 17px; }
.pills { display: flex; gap: 5px; flex-wrap: wrap; margin: 9px 0 0 40px; }
.pill { display: inline-flex; border: 1px solid #e0e7e2; border-radius: 4px; color: #486558; background: #f3f7f4; padding: 2px 6px; font-size: 11px; max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
button.pill:hover { background: #e7efea; }
.customer-line { color: var(--muted); font-size: 11px; margin: 5px 0 0 40px; max-width: 250px; }
.date-line { display: block; font-size: 12px; font-weight: 400; color: var(--muted); margin-top: 5px; line-height: 1.55; }
.person { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-size: 13px; }
.avatar { width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #edf1ee; color: #4f6559; font-size: 10px; flex-shrink: 0; }
.avatar.missing { color: var(--gold); background: #fcf2dd; }
.account-cell { display: flex; align-items: center; gap: 7px; font-size: 13px; }
.provider-mark { width: 25px; height: 25px; border: 1px solid #dfe5e1; border-radius: 5px; color: #51675b; background: #f5f8f6; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.badge { display: inline-flex; align-items: center; gap: 5px; white-space: nowrap; font-size: 12px; font-weight: 600; border-radius: 20px; padding: 4px 9px; line-height: 1.35; }
.badge i { width: 5px; height: 5px; background: currentColor; border-radius: 50%; }
.badge.healthy { color: #17623c; background: #e8f4ec; }
.badge.overdue { color: #9a2d21; background: #ffe7e4; }
.badge.urgent, .badge.soon { color: #8a5b00; background: #fff3d9; }
.badge.neutral, .badge.unknown, .badge.usage, .badge.archived { color: #59625f; background: #eef1f0; }
.tabs { display: flex; gap: 26px; border-bottom: 1px solid var(--line); padding: 0 20px; overflow-x: auto; }
.tabs button { position: relative; padding: 16px 0; border: 0; border-bottom: 2px solid transparent; white-space: nowrap; background: none; color: var(--muted); font-size: 14px; }
.tabs button:hover { color: var(--teal-deep); }
.tabs button.selected { border-color: var(--teal); color: var(--teal-deep); font-weight: 600; }
.tabs button span { font-size: 11px; background: #eef1ef; padding: 1px 6px; margin-left: 6px; border-radius: 4px; }
.tabs button.selected span { background: var(--soft); }
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 20px; }
.search-field { position: relative; display: flex; flex: 1; min-width: 240px; max-width: 430px; }
.search-field .icon { width: 17px; height: 17px; position: absolute; top: 12px; left: 12px; color: var(--muted); pointer-events: none; }
.search-field input { width: 100%; padding-left: 38px; }
.filter-bar select { max-width: 170px; }
.filter-bar > .muted { margin-left: auto; font-size: 12px; }
.filter-notice { padding: 0 20px 15px; color: var(--gold); font-size: 13px; }
.filter-notice .btn { margin-left: 10px; }
input, select, textarea { border: 1px solid #cdd8d1; border-radius: 6px; background: #fff; color: var(--ink); padding: 9px 11px; min-height: 40px; max-width: 100%; line-height: 1.5; }
input::placeholder, textarea::placeholder { color: #7b8780; opacity: 1; }
input:disabled { background: #f2f5f3; color: var(--muted); }
textarea { resize: vertical; min-height: 90px; }
.empty { padding: 56px 24px; text-align: center; }
.empty > .icon { width: 36px; height: 36px; color: #8fa298; margin-bottom: 15px; }
.empty h3 { font-size: 17px; font-weight: 600; margin-bottom: 7px; }
.empty p { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.renewal-note, .info-strip { display: flex; align-items: center; gap: 10px; border: 1px solid #d8e3dc; border-radius: 6px; padding: 12px 16px; background: #edf4ef; color: #486253; font-size: 13px; margin-bottom: 20px; }
.renewal-note .icon, .info-strip .icon { width: 17px; height: 17px; }
.entity-panel .info-strip { margin: 0 20px 20px; }

/* Settings */
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.settings-card { padding: 25px; }
.settings-card h2 { font-size: 18px; font-weight: 600; margin: 16px 0 10px; }
.settings-card p { color: var(--muted); font-size: 14px; line-height: 1.85; margin-bottom: 20px; }
.settings-card small { color: var(--muted); display: block; margin-top: 18px; font-size: 12px; line-height: 1.8; }
.settings-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.rule { display: flex; align-items: center; gap: 15px; margin: 15px 0; font-size: 13px; }
.rule .badge { min-width: 76px; justify-content: center; }
.guide { padding-left: 20px; line-height: 2.2; font-size: 13px; color: var(--muted); }

/* Dialogs and forms */
.modal-open { overflow: hidden; }
.modal-backdrop { position: fixed; z-index: 100; inset: 0; background: #17211f66; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal { width: 540px; max-width: 100%; max-height: 90vh; background: #fff; border-radius: var(--radius); box-shadow: 0 20px 70px #10291b26; display: flex; flex-direction: column; overflow: hidden; }
.modal.wide { width: 920px; }
.modal-header { padding: 20px 26px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.modal-header h2 { font-size: 21px; font-weight: 600; overflow-wrap: anywhere; }
.modal-body { padding: 24px 26px; overflow-y: auto; min-height: 0; overscroll-behavior: contain; }
.modal-footer { padding: 16px 26px; display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #f8faf9; border-top: 1px solid var(--line); flex-shrink: 0; }
.modal-footer > div { display: flex; gap: 10px; }
.modal-footer > .muted { font-size: 12px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-grid.single { grid-template-columns: 1fr; }
.form-grid label, .auth-form label { display: flex; flex-direction: column; gap: 8px; font-size: 13px; color: #45564d; min-width: 0; }
.form-grid input, .form-grid select { width: 100%; min-width: 0; }
.span-2 { grid-column: span 2; }
.field-help { color: var(--muted); font-size: 12px; line-height: 1.8; }
form > .field-help { margin-top: 20px; }
.form-error { color: var(--red); font-size: 13px; margin-top: 15px; min-height: 1px; }
.form-grid .checkbox-field { flex-direction: row; align-items: center; padding-top: 24px; }
.checkbox-field input { width: 16px; height: 16px; min-height: 0; accent-color: var(--teal); }
.section-label { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.section-label b { font-size: 15px; font-weight: 600; }
.deployment-editor { border-top: 1px solid var(--line); padding-top: 20px; }
.deployment-row { border: 1px solid var(--line); border-radius: 6px; padding: 18px; margin-top: 14px; background: #fafcfb; }
.deployment-row-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.deployment-row-head b { display: flex; gap: 8px; align-items: center; font-size: 13px; font-weight: 500; }
.deployment-row-head .icon { width: 16px; height: 16px; }
.detail-banner { display: flex; align-items: center; gap: 14px; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 24px; }
.detail-banner > .badge { margin-left: auto; }
.detail-server-icon { width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: #edf3ef; border: 1px solid var(--line); border-radius: 6px; color: var(--teal-deep); }
.detail-banner h3 { font-size: 19px; font-weight: 600; }
.detail-banner p { color: var(--muted); font-size: 13px; margin-top: 4px; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 22px 32px; margin: 0; }
.detail-grid dt { color: var(--muted); font-size: 12px; margin-bottom: 6px; }
.detail-grid dd { margin: 0; overflow-wrap: anywhere; font-size: 14px; }
.detail-section { font-size: 16px; font-weight: 600; margin: 28px 0 14px; display: flex; align-items: center; gap: 8px; }
.detail-section .btn { margin-left: auto; }
.detail-notes { border: 1px solid var(--line); background: #f8faf9; padding: 16px; border-radius: 6px; margin-top: 24px; font-size: 13px; }
.detail-notes b { font-weight: 600; }
.detail-notes p { color: var(--muted); margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
.related-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 6px; overflow: hidden; }
.related-list button { background: #fff; border: 0; border-bottom: 1px solid #e4ebe6; display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; gap: 14px; text-align: left; font-size: 13px; color: var(--teal-deep); }
.related-list button:last-child { border-bottom: 0; }
.related-list button:hover { background: #f2f7f4; }
.related-list span { display: flex; align-items: center; gap: 10px; }
.related-list .icon { width: 16px; height: 16px; }
.deployment-details { display: grid; gap: 12px; }
.deployment-details > div { border: 1px solid var(--line); border-radius: 6px; padding: 18px; }
.deployment-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.deployment-title b { font-size: 14px; font-weight: 600; }
.deployment-title span { color: var(--muted); font-size: 13px; }
.deployment-details dl { display: grid; grid-template-columns: 80px 1fr; gap: 8px 12px; margin: 15px 0 0; font-size: 13px; }
.deployment-details dt { color: var(--muted); }
.deployment-details dd { margin: 0; overflow-wrap: anywhere; }
.modal .table-scroll { border: 1px solid var(--line); border-radius: 6px; }
.modal .table-scroll table { min-width: 800px; }
.modal .table-scroll .compact-table { min-width: 660px; }
.modal .table-scroll th { border-top: 0; }
.modal .empty { padding: 24px 18px; }
.modal .empty > .icon { height: 26px; width: 26px; margin-bottom: 10px; }
.modal .empty h3 { font-size: 15px; }
.modal .empty p { margin-bottom: 0; font-size: 12px; }
.bill-detail-summary { display: flex; justify-content: space-between; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); padding-bottom: 22px; margin-bottom: 24px; }
.bill-detail-summary p { color: var(--muted); font-size: 14px; }
.bill-detail-summary h3 { font-size: 34px; font-weight: 600; margin-top: 8px; }
.next-period { margin-top: 20px; }
#toast { position: fixed; z-index: 200; bottom: 28px; left: 50%; transform: translate(-50%, 12px); max-width: 90vw; padding: 13px 22px; border-radius: 6px; background: var(--ink); color: #fff; font-size: 14px; box-shadow: 0 5px 25px #17211f20; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; }
#toast.visible { opacity: 1; transform: translate(-50%, 0); }

/* Initial setup and sign-in */
.auth-shell { min-height: 100vh; display: grid; grid-template-columns: 44% 56%; background: #fff; }
.auth-story { padding: 48px 56px; background: #172d25; color: #fff; display: flex; flex-direction: column; }
.brand.light .brand-mark { background: #fff; color: #172d25; }
.brand.light b span { color: #bfcec4; }
.auth-pitch { margin: auto 0; padding: 60px 0; }
.auth-pitch .eyebrow { color: #bccdc2; font-size: 13px; }
.auth-pitch h1 { font-size: 46px; font-weight: 600; line-height: 1.5; letter-spacing: 1px; margin: 22px 0; }
.auth-pitch em { font-style: normal; color: #a8d4bb; }
.auth-pitch p { color: #bfcec4; line-height: 1.9; font-size: 15px; }
.auth-link { display: flex; align-items: center; gap: 10px; margin-top: 36px; color: #d0dfd5; font-size: 13px; }
.auth-link span { display: flex; align-items: center; gap: 8px; padding: 10px; border: 1px solid #52695c; border-radius: 6px; }
.auth-link .icon { width: 17px; height: 17px; }
.auth-link i { width: 14px; height: 1px; background: #718a7c; }
.auth-story > small { color: #b8c9bf; font-size: 12px; }
.auth-form-wrap { padding: 48px; display: flex; align-items: center; justify-content: center; }
.auth-form { width: 380px; max-width: 100%; }
.auth-symbol { width: 44px; height: 44px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--line); border-radius: 8px; background: #f3f7f4; color: var(--teal-deep); }
.auth-symbol .icon { width: 24px; height: 24px; }
.auth-form h2 { font-size: 26px; font-weight: 600; margin-top: 22px; }
.auth-form > p { color: var(--muted); margin: 12px 0 28px; font-size: 14px; line-height: 1.8; }
.auth-form label { margin-bottom: 18px; }
.auth-form input { height: 44px; }
.auth-form .full { min-height: 44px; }
.auth-form .form-error { margin: 0 0 15px; }
.auth-divider { border-top: 1px solid var(--line); position: relative; text-align: center; margin: 30px 0 22px; }
.auth-divider span { position: relative; top: -11px; background: #fff; padding: 0 12px; color: var(--muted); font-size: 12px; }
.auth-form p.auth-note { font-size: 12px; margin-top: 24px; text-align: center; }
.auth-note .icon { width: 14px; height: 14px; margin-right: 4px; }

/* The two renewal modules share the same focused workspace. */
.module-nav { min-height: 70px; padding: 14px 12px; margin: 8px 0; gap: 10px; }
.module-nav > span:not(.nav-count) { min-width: 0; }
.module-nav b { display: block; font-size: 14px; font-weight: 600; }
.module-nav small { display: block; font-size: 11px; font-weight: 400; color: var(--muted); margin-top: 4px; }
.module-nav .nav-count { min-width: 19px; font-size: 10px; }
.metrics.module-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.module-metrics .metric { padding-top: 16px; padding-bottom: 16px; }
.inline-link { border: 0; padding: 0; background: transparent; color: var(--teal-deep); font-size: inherit; text-align: left; line-height: inherit; }
.inline-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.extra-filters summary { color: var(--muted); cursor: pointer; font-size: 13px; padding: 9px 0; }
.extra-filters > div { display: flex; gap: 8px; margin-top: 5px; }
.bill-table { min-width: 980px; }
.bill-table .table-links { max-width: 210px; font-size: 12px; }
.management-tabs { display: flex; gap: 8px; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.management-tabs .active { background: var(--soft); color: var(--teal-deep); border-color: #bad0c6; }
.management-search { padding: 18px 0; }
.modal:has(.management-tabs) { width: 1100px; }
.server-picker { margin: 0; padding: 16px; border: 1px solid var(--line); border-radius: 6px; min-width: 0; }
.server-picker legend { padding: 0 6px; color: var(--ink); font-size: 14px; font-weight: 600; }
.server-picker > input { margin: 12px 0; width: 100%; }
.server-options { max-height: 240px; overflow-y: auto; display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.server-picker .server-option { display: flex; flex-direction: row; align-items: center; gap: 10px; border: 1px solid #e1e8e3; background: #fafcfb; border-radius: 5px; padding: 10px; cursor: pointer; }
.server-option:has(input:checked) { border-color: #85afa0; background: #edf5f0; }
.server-option input { width: 16px; min-height: 16px; height: 16px; flex-shrink: 0; accent-color: var(--teal); }
.server-option b { display: block; font-size: 12px; font-weight: 500; }
.server-option small { display: block; font-size: 11px; color: var(--muted); margin-top: 3px; }
.server-option[hidden] { display: none; }
.inherited-servers { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--line); }
@media (max-width: 1150px) {
  .page-heading { flex-direction: column; }
  .page-heading .heading-actions { max-width: none; justify-content: flex-start; }
  .page-heading p { max-width: none; }
  .module-nav { padding-left: 8px; padding-right: 8px; }
  .module-nav b { font-size: 13px; }
}
@media (max-width: 600px) {
  .metrics.module-metrics { grid-template-columns: 1fr; }
  .module-metrics .metric { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; align-items: center; padding: 12px 16px; }
  .module-metrics .metric-value { grid-column: 2; grid-row: 1 / 3; margin: 0; font-size: 24px; }
  .module-metrics .metric-top .icon { display: none; }
  .module-metrics .metric-note { grid-column: 1; }
  .server-options { grid-template-columns: 1fr; }
}
@media (max-width: 1450px) {
  .main { padding: 28px 26px 0; }
  .demo-bar { padding-left: 26px; padding-right: 26px; }
  .customer-summary > div:nth-child(2) { display: block; }
  .customer-summary > div:nth-child(2) b { margin-left: 8px; }
  .customer-summary > div:nth-child(2) small { margin-top: 2px; }
  .overview-grid { grid-template-columns: 1fr; }
  .distribution { display: grid; grid-template-columns: 240px 1fr; align-items: center; padding: 20px; gap: 4px 30px; }
  .distribution .panel-title { padding: 0; }
  .distribution .panel-title > .icon { display: none; }
  .resource-total { margin: 12px 0 0; border-top: 0; padding: 0; grid-column: 1; }
  .distribution-list { padding: 0; grid-column: 2; grid-row: 1 / 3; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 28px; }
}
@media (max-width: 1150px) {
  :root { --sidebar: 210px; }
  .topbar { padding: 0 24px; }
  .brand-description { font-size: 13px; }
  .top-actions { gap: 12px; }
  .sidebar { padding-left: 12px; padding-right: 12px; }
  .nav-item { padding-left: 12px; gap: 9px; font-size: 13px; }
  .page-heading { align-items: flex-start; }
  .page-heading p { max-width: 400px; }
  .page-heading h1 { font-size: 29px; }
  .heading-actions { flex-wrap: wrap; justify-content: flex-end; max-width: 180px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .bottom-grid, .settings-grid { grid-template-columns: 1fr; }
  .customer-summary { flex-wrap: wrap; gap: 12px; }
  .customer-summary > div:first-child { flex: 1; }
  .filter-bar .search-field { max-width: none; flex-basis: 100%; }
  .auth-story { padding: 40px 30px; }
  .auth-pitch h1 { font-size: 38px; }
  .auth-link { gap: 6px; }
  .auth-link span { padding: 7px; font-size: 11px; }
}
@media (max-width: 800px) {
  :root { --header: 64px; --sidebar: 236px; }
  .topbar { padding: 0 16px; gap: 10px; }
  .header-brand { gap: 12px; }
  .brand { gap: 8px; }
  .brand b { font-size: 21px; }
  .brand-mark { width: 34px; height: 34px; }
  .brand-description, .today, .header-user { display: none; }
  .top-actions { gap: 6px; }
  .local-label { font-size: 11px; }
  .mobile-menu { display: inline-flex; }
  .sidebar { transform: translateX(-100%); transition: transform .15s; border-right: 1px solid var(--line); box-shadow: 15px 0 30px #17211f14; }
  .sidebar.open { transform: translateX(0); }
  .main-wrap { margin-left: 0; }
  .main { padding: 24px 20px 0; }
  .demo-bar { padding: 9px 20px; font-size: 11px; }
  .demo-bar button { font-size: 11px; }
  .page-heading { flex-wrap: wrap; gap: 16px; }
  .page-heading p { max-width: none; font-size: 13px; }
  .heading-actions { max-width: none; justify-content: flex-start; }
  .footer { font-size: 10px; flex-wrap: wrap; gap: 5px; }
  .auth-shell { display: block; }
  .auth-story { padding: 24px; }
  .auth-pitch { padding: 28px 0 0; }
  .auth-pitch h1 { font-size: 28px; margin: 12px 0 0; }
  .auth-pitch h1 br { display: none; }
  .auth-pitch p, .auth-link, .auth-story > small { display: none; }
  .auth-form-wrap { padding: 36px 24px; }
  .auth-symbol { display: none; }
  .auth-form h2 { margin-top: 0; }
}
@media (max-width: 540px) {
  .main { padding: 22px 16px 0; }
  .demo-bar { padding: 9px 16px; align-items: flex-start; }
  .demo-bar > span { max-width: 54%; }
  .demo-bar .icon { display: none; }
  .page-heading h1 { font-size: 28px; }
  .page-heading p { line-height: 1.8; }
  .heading-actions .btn { font-size: 13px; }
  .metrics { gap: 10px; }
  .metric { padding: 14px; }
  .metric-top { font-size: 12px; }
  .metric-value { font-size: 25px; }
  .metric-note { font-size: 11px; }
  .attention { padding: 14px; align-items: flex-start; flex-wrap: wrap; }
  .attention > div { flex: 1; }
  .attention > .btn { margin-left: 32px; }
  .attention div > span { font-size: 12px; }
  .customer-summary { padding: 16px; }
  .customer-summary > div:first-child { flex-basis: 100%; }
  .customer-summary > div:nth-child(2) small { font-size: 11px; }
  .customer-summary .btn { font-size: 12px; padding: 6px; }
  .distribution { display: block; padding: 18px; }
  .distribution-list { margin-top: 24px; gap: 18px; }
  .resource-total { margin-top: 16px; }
  .panel-title { padding: 18px 16px; align-items: flex-start; }
  .panel-title h2 { font-size: 16px; }
  .panel-title > .btn .icon { display: none; }
  .panel-title p { font-size: 11px; }
  .panel-foot { padding: 12px 16px; font-size: 11px; }
  .tabs { gap: 22px; padding: 0 16px; }
  .tabs button { font-size: 13px; }
  .filter-bar { padding: 16px; gap: 10px; }
  .search-field { min-width: 0; }
  .filter-bar select { min-width: 0; max-width: 100%; flex: 1; font-size: 13px; }
  .filter-bar > .muted { margin-left: 0; }
  .renewal-note, .info-strip { font-size: 12px; align-items: flex-start; }
  .entity-panel .info-strip { margin-left: 16px; margin-right: 16px; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: 94vh; }
  .modal-header { padding: 16px; }
  .modal-header h2 { font-size: 18px; }
  .modal-body { padding: 20px 16px; }
  .modal-footer { padding: 14px 16px; flex-wrap: wrap; }
  .modal-footer .btn { padding-left: 11px; padding-right: 11px; font-size: 13px; }
  .modal-footer > div { margin-left: auto; }
  .form-grid { grid-template-columns: 1fr; gap: 17px; }
  .span-2 { grid-column: auto; }
  .form-grid .checkbox-field { padding-top: 0; }
  .detail-grid { gap: 20px 16px; }
  .detail-grid dd { font-size: 13px; }
  .detail-banner { flex-wrap: wrap; }
  .detail-banner h3 { font-size: 17px; }
  .detail-server-icon { display: none; }
  .detail-section { font-size: 15px; }
  .deployment-title { flex-wrap: wrap; }
  .settings-card { padding: 20px; }
  .auth-pitch h1 { font-size: 25px; }
  .auth-form h2 { font-size: 23px; }
}
@media (max-height: 820px) and (min-width: 801px) {
  .sidebar { padding-top: 18px; }
  .sidebar-heading { padding-bottom: 14px; }
  .nav-item { min-height: 34px; padding-top: 6px; padding-bottom: 6px; margin: 2px 0; }
  nav .nav-caption { margin-top: 18px; }
  .sidebar-bottom { padding-top: 12px; }
  .storage-note { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
