:root {
  color-scheme: light;
  --ink: #0f1f3d;
  --muted: #0f1f3d;
  --line: #e7eaf0;
  --surface: #ffffff;
  --canvas: #f4f6fa;
  --nav: #111827;
  --nav-soft: #1d2738;
  --accent: #ff6b35;
  --accent-dark: #ea5522;
  --accent-soft: #fff0e9;
  --green: #16a36a;
  --green-soft: #e9f8f1;
  --red: #d94a4a;
  --red-soft: #fff0f0;
  --blue: #3478f6;
  --blue-soft: #eef4ff;
  --shadow: 0 12px 36px rgba(26, 35, 53, 0.08);
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: #0f1f3d;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--canvas); color: var(--ink); }
body { min-height: 100vh; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
.hidden { display: none !important; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 34px;
  padding: 40px 20px;
  background:
    radial-gradient(circle at 16% 16%, rgba(255, 107, 53, 0.13), transparent 27%),
    radial-gradient(circle at 84% 84%, rgba(52, 120, 246, 0.09), transparent 26%),
    #f7f8fb;
  position: relative;
  overflow: hidden;
}
.login-shell::before, .login-shell::after {
  content: "";
  position: absolute;
  width: 420px;
  height: 420px;
  border: 1px solid rgba(255, 107, 53, 0.12);
  border-radius: 50%;
  pointer-events: none;
}
.login-shell::before { left: -260px; top: -220px; }
.login-shell::after { right: -270px; bottom: -250px; width: 520px; height: 520px; }
.login-brand, .sidebar-brand { display: flex; align-items: center; gap: 13px; }
.login-brand strong, .sidebar-brand strong { display: block; font-size: 22px; letter-spacing: .16em; }
.login-brand small, .sidebar-brand small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; letter-spacing: .08em; }
.brand-mark { width: 48px; height: 48px; border-radius: 15px; background: linear-gradient(145deg, #ff7d4d, #f24a17); position: relative; box-shadow: 0 12px 24px rgba(255, 107, 53, .25); }
.brand-mark span { position: absolute; background: white; border-radius: 10px; transform: rotate(-35deg); }
.brand-mark span:first-child { width: 9px; height: 25px; left: 14px; top: 10px; }
.brand-mark span:last-child { width: 9px; height: 18px; right: 13px; bottom: 9px; opacity: .76; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 12px; }
.brand-mark.small span:first-child { width: 7px; height: 20px; left: 11px; top: 8px; }
.brand-mark.small span:last-child { width: 7px; height: 14px; right: 10px; bottom: 8px; }

.login-card { width: min(440px, 100%); background: rgba(255,255,255,.96); border: 1px solid rgba(223,227,235,.9); border-radius: 24px; box-shadow: 0 24px 70px rgba(22,32,51,.12); padding: 42px; position: relative; z-index: 1; }
.eyebrow { color: var(--accent); font-weight: 800; font-size: 11px; letter-spacing: .16em; }
.login-heading h1 { margin: 10px 0 8px; font-size: 29px; letter-spacing: -.03em; }
.login-heading p { margin: 0 0 30px; color: var(--muted); font-size: 14px; line-height: 1.7; }
label { display: grid; gap: 9px; color: #3f4859; font-size: 13px; font-weight: 700; }
label + label { margin-top: 18px; }
label small { color: var(--muted); font-weight: 400; }
input, select, textarea { width: 100%; border: 1px solid #dfe3eb; border-radius: 11px; background: #fff; color: var(--ink); padding: 12px 13px; outline: none; transition: border-color .18s, box-shadow .18s; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,107,53,.12); }
.primary-button, .secondary-button, .danger-button { border: 0; border-radius: 10px; padding: 10px 16px; font-size: 13px; font-weight: 750; transition: transform .16s, background .16s, box-shadow .16s; }
.primary-button { color: white; background: var(--accent); box-shadow: 0 7px 16px rgba(255,107,53,.18); }
.primary-button:hover { background: var(--accent-dark); transform: translateY(-1px); }
.secondary-button { color: #455066; background: white; border: 1px solid var(--line); }
.secondary-button:hover { border-color: #cbd1dc; background: #fafbfc; }
.danger-button { color: var(--red); background: var(--red-soft); border: 1px solid #ffd9d9; }
.login-button { width: 100%; padding: 13px; margin-top: 7px; }
.form-error { min-height: 20px; color: var(--red); font-size: 12px; margin: 10px 0 0; }
.security-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; display: flex; align-items: center; justify-content: center; gap: 8px; }
.security-dot, .status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px rgba(22,163,106,.13); }
.login-footer { color: #9aa1ae; font-size: 12px; z-index: 1; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar { position: fixed; inset: 0 auto 0 0; width: 240px; background: var(--nav); color: #dbe0ea; padding: 26px 18px 20px; display: flex; flex-direction: column; z-index: 30; }
.sidebar-brand { padding: 0 10px 28px; border-bottom: 1px solid rgba(255,255,255,.07); }
.sidebar-brand strong { color: white; font-size: 18px; }
.sidebar-brand small { color: #8390a5; }
.nav-list { display: grid; gap: 5px; padding-top: 22px; }
.nav-list button { border: 0; background: transparent; color: #aab3c3; padding: 11px 13px; border-radius: 10px; text-align: left; display: flex; align-items: center; gap: 12px; font-size: 13px; transition: .16s; }
.nav-list button:hover { color: white; background: rgba(255,255,255,.05); }
.nav-list button.active { color: white; background: linear-gradient(90deg, rgba(255,107,53,.22), rgba(255,107,53,.08)); box-shadow: inset 3px 0 var(--accent); }
.nav-icon { font-size: 17px; width: 20px; text-align: center; color: #8d98aa; }
.nav-list button.active .nav-icon { color: var(--accent); }
.sidebar-footer { margin-top: auto; border-radius: 12px; padding: 13px; background: var(--nav-soft); display: flex; align-items: center; gap: 12px; }
.sidebar-footer strong, .sidebar-footer small { display: block; }
.sidebar-footer strong { font-size: 12px; color: #e7ebf2; }
.sidebar-footer small { font-size: 10px; color: #7f8ba0; margin-top: 4px; }
.main-area { grid-column: 2; min-width: 0; }
.topbar { height: 82px; padding: 0 30px; background: rgba(255,255,255,.94); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.topbar-left, .topbar-actions, .admin-identity { display: flex; align-items: center; }
.topbar-left { gap: 14px; }
.breadcrumb { margin: 0 0 3px; color: #9aa1ad; font-size: 10px; }
.topbar h1 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.topbar-actions { gap: 12px; }
.admin-identity { gap: 9px; padding-left: 10px; }
.admin-identity > span { width: 35px; height: 35px; border-radius: 11px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; font-weight: 800; }
.admin-identity strong, .admin-identity small { display: block; }
.admin-identity strong { font-size: 12px; }
.admin-identity small { font-size: 10px; color: var(--muted); margin-top: 2px; }
.icon-button { border: 1px solid var(--line); background: white; color: #667084; border-radius: 9px; min-width: 36px; height: 36px; display: grid; place-items: center; font-size: 17px; }
.menu-button { display: none; }
.workspace { padding: 28px 30px 50px; max-width: 1600px; margin: 0 auto; }

.page-intro { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 23px; }
.page-intro h2 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.025em; }
.page-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.metrics-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 16px; margin-bottom: 20px; }
.metric-card { background: var(--surface); border: 1px solid var(--line); border-radius: 15px; padding: 20px; box-shadow: 0 4px 16px rgba(22,32,51,.035); display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.metric-card p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.metric-card strong { font-size: 28px; letter-spacing: -.04em; }
.metric-card small { display: block; color: var(--green); font-size: 10px; margin-top: 7px; }
.metric-icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; font-weight: 900; color: var(--accent); background: var(--accent-soft); }
.metric-card.blue .metric-icon { color: var(--blue); background: var(--blue-soft); }
.metric-card.green .metric-icon { color: var(--green); background: var(--green-soft); }
.metric-card.red .metric-icon { color: var(--red); background: var(--red-soft); }
.content-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 18px; }
.panel { background: white; border: 1px solid var(--line); border-radius: 15px; box-shadow: 0 4px 18px rgba(22,32,51,.035); min-width: 0; }
.panel-header { padding: 18px 20px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.panel-header h3 { margin: 0; font-size: 15px; }
.panel-header p { margin: 4px 0 0; color: var(--muted); font-size: 11px; }
.panel-body { padding: 18px 20px; }
.audit-list { display: grid; }
.audit-row { display: grid; grid-template-columns: 34px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 12px 0; border-bottom: 1px solid #f0f2f5; }
.audit-row:last-child { border: 0; }
.audit-badge { width: 32px; height: 32px; border-radius: 10px; background: #f3f5f8; color: #697386; display: grid; place-items: center; font-size: 12px; font-weight: 800; }
.audit-row strong { display: block; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.audit-row small { color: var(--muted); font-size: 10px; }
.quick-actions { display: grid; gap: 10px; }
.quick-action { border: 1px solid var(--line); background: white; border-radius: 12px; padding: 13px; display: flex; align-items: center; gap: 12px; text-align: left; }
.quick-action:hover { border-color: #ffc6b1; background: #fffaf8; }
.quick-action b { display: block; font-size: 12px; }
.quick-action small { display: block; color: var(--muted); font-size: 10px; margin-top: 3px; }

.provider-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(300px, .8fr); gap: 18px; margin-bottom: 18px; }
.provider-dashboard-panel { overflow: hidden; }
.provider-usage-summary { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 10px; margin-bottom: 16px; }
.provider-usage-summary > div, .provider-limit-grid > div { padding: 13px 14px; border: 1px solid var(--line); border-radius: 11px; background: #fafbfc; }
.provider-usage-summary span, .provider-limit-grid span, .provider-balance-block > span, .provider-account-placeholder > span { display: block; color: var(--muted); font-size: 10px; }
.provider-usage-summary strong { display: block; margin-top: 6px; color: var(--ink); font-size: 18px; letter-spacing: -.025em; }
.provider-model-list { display: grid; }
.provider-model-row { display: grid; grid-template-columns: 28px minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 2px; border-top: 1px solid #f0f2f5; }
.provider-model-rank { width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; color: var(--accent); background: var(--accent-soft); font-size: 10px; font-weight: 800; }
.provider-model-row strong, .provider-model-row small { display: block; }
.provider-model-row strong { overflow: hidden; color: var(--ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.provider-model-row small { margin-top: 3px; color: var(--muted); font-size: 10px; }
.provider-model-row b { color: var(--ink); font-size: 12px; }
.provider-account-summary { display: grid; gap: 17px; }
.provider-balance-block { padding: 18px; border-radius: 13px; background: linear-gradient(135deg, #fff3ed, #fffaf8); border: 1px solid #ffe1d5; }
.provider-balance-block strong, .provider-account-placeholder strong { display: block; margin: 7px 0 5px; color: var(--ink); font-size: 34px; letter-spacing: -.05em; }
.provider-balance-block small, .provider-account-placeholder small { color: var(--muted); font-size: 10px; }
.provider-limit-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.provider-limit-grid strong { display: block; margin-top: 5px; color: var(--ink); font-size: 19px; }
.provider-dashboard-actions { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.provider-dashboard-empty { min-height: 210px; display: flex; align-items: center; justify-content: center; gap: 14px; text-align: left; }
.provider-dashboard-empty.compact { min-height: 100px; border-top: 1px solid #f0f2f5; }
.provider-dashboard-empty strong { display: block; color: var(--ink); font-size: 13px; }
.provider-dashboard-empty p { max-width: 520px; margin: 6px 0 0; color: var(--muted); font-size: 11px; line-height: 1.7; }
.provider-account-placeholder { min-height: 210px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; }
.provider-account-placeholder .secondary-button { margin-top: 18px; }

.provider-health { margin: -8px 0 18px; padding: 11px 14px; border: 1px solid #d8eee4; border-radius: 12px; background: #f7fcf9; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 11px; }
.provider-health > div { display: flex; align-items: center; gap: 10px; }
.provider-health a { color: var(--blue); font-weight: 700; text-decoration: none; }
.provider-health a:hover { text-decoration: underline; }
.provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; }
.provider-table { min-width: 560px; }
.provider-time { font-size: 19px !important; letter-spacing: -.02em !important; }
.provider-notice { border-width: 1px; }
.provider-notice .panel-body { padding: 28px; }
.provider-notice h3 { margin: 10px 0 8px; }
.provider-notice p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.8; }
.provider-notice code { color: var(--ink); background: rgba(255,255,255,.78); border: 1px solid rgba(0,0,0,.07); border-radius: 6px; padding: 2px 6px; }
.provider-notice.warning { background: #fffaf0; border-color: #f5dfaa; }
.provider-notice.danger { background: var(--red-soft); border-color: #ffd7d7; }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 15px; }
.filters { display: flex; gap: 9px; flex: 1; }
.filters input { max-width: 330px; }
.filters select { width: 150px; }
.table-panel { overflow: hidden; }
.table-scroll { overflow: auto; }
table { width: 100%; border-collapse: collapse; min-width: 840px; }
th { text-align: left; background: #fafbfc; color: #778094; font-size: 10px; letter-spacing: .04em; font-weight: 800; padding: 11px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 13px 16px; border-bottom: 1px solid #eff1f4; color: #3d4759; font-size: 12px; vertical-align: middle; }
tbody tr:hover { background: #fcfcfd; }
tbody tr:last-child td { border-bottom: 0; }
.primary-cell strong, .primary-cell small { display: block; }
.primary-cell strong { color: var(--ink); font-size: 12px; }
.primary-cell small { color: #9098a7; margin-top: 3px; font-size: 10px; }
.mono { font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; }
.users-table { min-width: 1480px; }
.user-identity-cell { width: 260px; min-width: 260px; }
.hardware-cell { width: 250px; min-width: 250px; }
.hardware-cell strong, .hardware-cell small { display: block; }
.hardware-cell strong { color: var(--ink); font-size: 10px; letter-spacing: .01em; }
.hardware-cell small { margin-top: 4px; color: var(--muted); font-size: 9px; white-space: nowrap; }
.hardware-cell.empty strong, .hardware-cell.empty small { color: #a3aab7; }
.full-identifier { max-width: 100%; white-space: normal; overflow-wrap: anywhere; word-break: break-all; line-height: 1.45; user-select: all; }
.number-cell { color: var(--ink); font-variant-numeric: tabular-nums; }
.count-unit { margin-left: 4px; color: var(--muted); font-size: 10px; }
.license-table { min-width: 1380px; }
.license-plaintext-cell { min-width: 290px; }
.license-plaintext { display: inline-block; padding: 6px 8px; border: 1px solid #d7e5f7; border-radius: 7px; background: #f5f9ff; color: #174f91; font-family: "SFMono-Regular", Consolas, monospace; font-size: 10px; font-weight: 700; letter-spacing: .035em; line-height: 1; white-space: nowrap; user-select: all; }
.license-plaintext-unavailable { color: #9a6a45; font-size: 10px; white-space: nowrap; }
.license-generator-cell strong, .license-generator-cell small { display: block; }
.license-generator-cell strong { color: var(--ink); font-size: 11px; }
.license-generator-cell small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 99px; padding: 5px 9px; font-size: 10px; font-weight: 750; white-space: nowrap; background: #f1f3f6; color: #677083; }
.pill::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.pill.success { background: var(--green-soft); color: var(--green); }
.pill.danger { background: var(--red-soft); color: var(--red); }
.pill.warning { background: #fff5e4; color: #c67a13; }
.pill.info { background: var(--blue-soft); color: var(--blue); }
.row-action { border: 0; color: var(--blue); background: transparent; padding: 5px; font-size: 11px; }
.row-actions { display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.row-action.edit { color: #1f66d1; font-weight: 750; }
.row-action.danger { color: var(--red); }
.row-action:hover { text-decoration: underline; }
.pagination { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px; border-top: 1px solid var(--line); color: var(--muted); font-size: 11px; }
.pagination-buttons { display: flex; gap: 7px; }
.pagination button { border: 1px solid var(--line); background: white; border-radius: 8px; padding: 6px 10px; color: #556074; }
.pagination button:disabled { opacity: .4; cursor: not-allowed; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--muted); }
.empty-state strong { display: block; color: var(--ink); margin-bottom: 7px; }
.loading { min-height: 340px; display: grid; place-items: center; color: var(--muted); font-size: 13px; }
.loading::before { content: ""; width: 28px; height: 28px; border: 3px solid #e3e7ed; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; margin-right: 10px; }
@keyframes spin { to { transform: rotate(360deg); } }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; }
.plan-card { border: 1px solid var(--line); background: white; border-radius: 15px; padding: 20px; box-shadow: var(--shadow); }
.plan-card.disabled-plan { background: #fbfcfe; }
.plan-card-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.plan-card h3 { margin: 5px 0 4px; }
.plan-card p { color: var(--muted); margin: 0; font-size: 11px; }
.plan-stats { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.plan-stats span { color: var(--muted); font-size: 10px; }
.plan-stats strong { display: block; color: var(--ink); font-size: 13px; margin-top: 5px; line-height: 1.45; }
.plan-card-actions { min-height: 43px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.plan-card-actions > span { color: var(--muted); font-size: 10px; }
.plan-card-actions button { display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; }
.plan-disabled-reason { margin-top: 12px !important; padding: 9px 11px; border-radius: 8px; color: var(--red) !important; background: var(--red-soft); line-height: 1.6; }
.snapshot-policy-banner { margin-bottom: 16px; padding: 13px 16px; border: 1px solid #cce2ff; border-radius: 12px; color: #315b8d; background: var(--blue-soft); display: flex; align-items: center; gap: 12px; font-size: 11px; line-height: 1.6; }
.snapshot-policy-banner > .ti { flex: 0 0 auto; color: var(--blue); font-size: 22px; }
.snapshot-policy-banner strong { display: block; color: var(--ink); font-size: 12px; }
.pricing-panel { margin: 0 0 18px; }
.plan-section-heading { margin: 22px 4px 13px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.plan-section-heading h3 { margin: 0; color: var(--ink); font-size: 15px; }
.plan-section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.plan-section-heading > span { flex: 0 0 auto; padding: 6px 10px; border-radius: 99px; color: var(--blue); background: var(--blue-soft); font-size: 10px; font-weight: 700; }

.modal { border: 0; padding: 0; border-radius: 18px; width: min(480px, calc(100% - 30px)); box-shadow: 0 26px 90px rgba(12,18,30,.28); }
.modal::backdrop { background: rgba(11,17,28,.58); backdrop-filter: blur(3px); }
.wide-modal { width: min(720px, calc(100% - 30px)); }
.license-generator-modal { width: min(1160px, calc(100% - 24px)); max-height: none; overflow: visible; }
.license-generator-modal .modal-card { display: flex; flex-direction: column; }
.license-generator-modal .modal-header { padding: 14px 18px 12px; }
.license-generator-modal .modal-header h2 { margin-top: 4px; }
.license-generator-modal .modal-subtitle { margin-top: 3px; }
.license-generator-body { padding: 14px 18px 10px; overflow: visible; }
.license-generator-grid { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(190px, .5fr); gap: 12px; }
.license-generator-grid label + label { margin-top: 0; }
.license-generator-grid small { margin-top: 4px; line-height: 1.35; }
.license-plan-preview { margin-top: 11px; }
.license-binding-card { overflow: hidden; border: 1px solid #cfe0fb; border-radius: 14px; background: linear-gradient(145deg, #f9fbff, #fff); box-shadow: 0 8px 24px rgba(46, 104, 194, .07); }
.license-binding-card.tier-trial { border-color: #d8dce5; background: linear-gradient(145deg, #fafbfc, #fff); }
.license-binding-card.tier-basic { border-color: #bcd8ff; }
.license-binding-card.tier-pro { border-color: #bcd9d0; background: linear-gradient(145deg, #f7fcfa, #fff); }
.license-binding-card.tier-flagship { border-color: #ead4ac; background: linear-gradient(145deg, #fffbf3, #fff); }
.license-binding-header { padding: 10px 14px; display: flex; align-items: center; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(80, 111, 158, .12); }
.license-binding-header h3 { display: inline-block; margin: 0 8px; font-size: 16px; vertical-align: middle; }
.license-binding-header p { margin: 0; color: var(--muted); font-size: 10px; }
.license-tier-badge { display: inline-flex; padding: 3px 7px; border-radius: 99px; color: var(--blue); background: var(--blue-soft); font-size: 9px; font-weight: 800; letter-spacing: .04em; vertical-align: middle; }
.license-entitlement-grid { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1px; background: rgba(80, 111, 158, .1); }
.license-entitlement-grid > div { min-height: 56px; padding: 9px 11px; background: rgba(255,255,255,.94); }
.license-entitlement-grid span { display: block; color: var(--muted); font-size: 10px; }
.license-entitlement-grid strong { display: block; margin-top: 4px; color: var(--ink); font-size: 11px; line-height: 1.35; white-space: nowrap; }
.license-feature-scope { padding: 10px 14px 7px; }
.license-feature-scope > span, .license-excluded-scope > span { display: block; margin-bottom: 8px; color: var(--muted); font-size: 10px; font-weight: 700; }
.license-feature-heading { margin-bottom: 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.license-feature-heading > span { color: var(--muted); font-size: 10px; font-weight: 700; }
.license-feature-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.license-feature-scope b { padding: 4px 7px; border-radius: 7px; color: #37628e; background: #eef5ff; font-size: 9px; font-weight: 650; }
.license-feature-edit-button { min-height: 26px; padding: 0 9px; border: 1px solid #bfd7f8; border-radius: 8px; display: inline-flex; align-items: center; gap: 5px; color: var(--blue); background: #fff; font-size: 9px; font-weight: 750; cursor: pointer; }
.license-feature-edit-button:hover { border-color: var(--blue); background: var(--blue-soft); }
.license-feature-edit-button .ti { font-size: 14px; }
.license-excluded-scope { padding: 5px 14px 10px; display: flex; align-items: center; gap: 8px; color: #9b5a5a; font-size: 9px; }
.license-excluded-scope > span { margin: 0; }
.license-excluded-scope strong { font-weight: 650; }
.license-excluded-scope.all-enabled { color: var(--green); }
.license-feature-editor { padding: 10px 14px 11px; background: #f7fbff; }
.license-feature-editor-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; }
.license-feature-editor-heading strong { display: inline; color: var(--ink); font-size: 12px; }
.license-feature-editor-heading div > span { display: inline; margin-left: 8px; color: var(--muted); font-size: 9px; line-height: 1.4; }
.license-feature-edit-count { flex: 0 0 auto; padding: 4px 8px; border-radius: 99px; color: var(--blue); background: #fff; font-size: 10px; font-weight: 750; }
.license-feature-checklist { margin-top: 8px; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 6px; }
.license-feature-checklist label { min-height: 32px; margin: 0; padding: 5px 8px; border: 1px solid #d7e5f8; border-radius: 8px; display: flex; align-items: center; gap: 7px; color: #315b8d; background: #fff; font-size: 9px; font-weight: 650; cursor: pointer; }
.license-feature-checklist label:hover { border-color: #a9ccfa; }
.license-feature-checklist input { flex: 0 0 auto; width: 15px; height: 15px; margin: 0; padding: 0; accent-color: var(--blue); }
.license-feature-editor-footer { margin-top: 8px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.license-feature-editor-note { flex: 1 1 auto; padding: 7px 9px; border-radius: 8px; color: #81612d; background: #fff8e9; font-size: 9px; line-height: 1.4; }
.license-feature-error { margin: 9px 0 0; }
.license-feature-error:empty, #generate-error:empty { display: none; }
.license-feature-editor-actions { flex: 0 0 auto; display: flex; justify-content: flex-end; gap: 7px; }
.license-feature-editor-actions button { min-height: 31px; padding: 0 11px; font-size: 9px; }
.license-generator-notices { margin-top: 10px; display: grid; grid-template-columns: 1.15fr .85fr; gap: 10px; }
.license-binding-confirm { margin: 0; min-height: 46px; padding: 9px 11px; border: 1px solid #cfe0fb; border-radius: 10px; display: flex; align-items: center; gap: 9px; color: #315b8d; background: var(--blue-soft); font-size: 10px; line-height: 1.45; }
.license-binding-confirm input { flex: 0 0 auto; width: 17px; height: 17px; margin: 1px 0 0; accent-color: var(--blue); }
.license-generator-notices .warning-box { margin: 0; min-height: 46px; padding: 9px 11px; display: flex; align-items: center; gap: 6px; font-size: 10px; line-height: 1.45; }
.license-generator-modal .modal-actions { padding: 10px 18px 13px; }
.generated-plan-summary { margin-bottom: 14px; padding: 14px 16px; border: 1px solid #cfe0fb; border-radius: 12px; display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--blue-soft); }
.generated-plan-summary > div { display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 6px 9px; }
.generated-plan-summary strong { color: var(--ink); font-size: 13px; }
.generated-plan-summary small { grid-column: 1 / -1; color: #456b94; font-size: 10px; }
.generated-plan-summary > .ti { color: var(--blue); font-size: 24px; }
.license-policy-banner { margin-top: -5px; }
.extra-wide-modal { width: min(1080px, calc(100% - 30px)); max-height: calc(100vh - 30px); overflow: hidden; }
.modal-card { margin: 0; }
.modal-header { padding: 21px 22px 16px; display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 6px 0 0; font-size: 19px; }
.modal-subtitle { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.modal-body { padding: 22px; }
.modal-actions { padding: 15px 22px 20px; display: flex; gap: 9px; justify-content: flex-end; }
.user-edit-modal { width: min(680px, calc(100% - 30px)); max-height: calc(100vh - 30px); overflow: hidden; }
.user-edit-modal .modal-card { max-height: calc(100vh - 30px); display: flex; flex-direction: column; }
.user-edit-body { flex: 1 1 auto; min-height: 0; display: grid; grid-auto-rows: max-content; align-content: start; gap: 19px; overflow-y: auto; }
.user-edit-modal .modal-actions { flex: 0 0 auto; border-top: 1px solid var(--line); background: #fff; }
.user-edit-current { min-height: 66px; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid #cfe0fb; border-radius: 12px; background: #f5f9ff; overflow: hidden; }
.user-edit-current > div { min-width: 0; padding: 14px 16px; border-left: 1px solid #dce8f8; }
.user-edit-current > div:first-child { border-left: 0; }
.user-edit-current span, .user-edit-current strong { display: block; }
.user-edit-current span { color: var(--muted); font-size: 10px; }
.user-edit-current strong { margin-top: 6px; color: #173e70; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-edit-section { padding: 16px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.user-edit-section .section-heading { margin-bottom: 13px; }
.membership-adjustment-section { display: grid; gap: 14px; background: #fbfdff; }
.membership-adjustment-toggle { gap: 6px; }
.membership-adjustment-toggle small { color: var(--muted); font-size: 10px; line-height: 1.55; }
.membership-adjustment-toggle .switch-row { color: #234d80; background: #f3f8ff; border-color: #d4e4f8; }
.user-edit-membership-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 13px; transition: opacity .16s; }
.user-edit-membership-fields label + label { margin-top: 0; }
.user-edit-membership-fields.disabled { opacity: .48; }
.user-edit-membership-fields input:disabled, .user-edit-membership-fields select:disabled { cursor: not-allowed; background: #f2f4f7; }
.user-edit-reason { margin-top: 0; }
.user-edit-body .warning-box { margin-top: 0; }
.extra-wide-modal .modal-card { max-height: calc(100vh - 30px); display: flex; flex-direction: column; }
.plan-modal-body { overflow-y: auto; }
.sticky-actions { flex: 0 0 auto; border-top: 1px solid var(--line); background: #fff; }
.plan-edit-section + .plan-edit-section { margin-top: 24px; }
.section-heading { margin-bottom: 15px; display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.section-heading h3 { margin: 0; color: var(--ink); font-size: 15px; }
.section-heading p { margin: 5px 0 0; color: var(--muted); font-size: 11px; }
.plan-form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.plan-form-grid label + label { margin-top: 0; }
.plan-form-grid label { align-content: start; }
.switch-label { align-content: start; }
.switch-row { min-height: 43px; padding: 0 12px; border: 1px solid var(--line); border-radius: 10px; display: flex; align-items: center; gap: 9px; color: #456387; font-size: 11px; font-weight: 600; }
.switch-row input, .table-checkbox { width: 17px; height: 17px; margin: 0; padding: 0; accent-color: var(--blue); }
.disable-reason { margin-top: 15px; }
.feature-table-scroll { border: 1px solid var(--line); border-radius: 11px; }
.feature-config-table { min-width: 800px; }
.feature-config-table th:nth-child(1) { width: 32%; }
.feature-config-table th:nth-child(2) { width: 80px; }
.feature-config-table td { padding-top: 8px; padding-bottom: 8px; }
.feature-config-table .quota-input { min-width: 105px; padding: 8px 9px; border-radius: 8px; font-size: 11px; }
.snapshot-warning { margin-top: 20px; }
.warning-box, .danger-box { margin-top: 18px; padding: 13px 14px; border-radius: 11px; font-size: 11px; line-height: 1.65; }
.warning-box { color: #9a6212; background: #fff8e9; border: 1px solid #f9e5b6; }
.danger-box { margin-top: 0; color: #9f3737; background: var(--red-soft); border: 1px solid #ffd7d7; display: grid; gap: 3px; }
.code-output { margin-top: 15px; border: 1px solid var(--line); border-radius: 12px; max-height: 350px; overflow: auto; }
.code-row { display: grid; grid-template-columns: 42px 1fr; padding: 10px 12px; border-bottom: 1px solid var(--line); font-family: Consolas, monospace; font-size: 12px; }
.code-row:last-child { border-bottom: 0; }
.code-row span:first-child { color: #a2a8b4; }
.toast-region { position: fixed; right: 22px; bottom: 22px; display: grid; gap: 9px; z-index: 100; }
.toast { background: #202a3b; color: white; border-radius: 11px; padding: 12px 15px; font-size: 12px; box-shadow: var(--shadow); animation: toast-in .2s ease-out; }
.toast.error { background: #a93636; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1050px) {
  .metrics-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .content-grid { grid-template-columns: 1fr; }
  .provider-dashboard-grid { grid-template-columns: 1fr; }
  .provider-grid { grid-template-columns: 1fr; }
  .plan-form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .license-feature-checklist { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .license-entitlement-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .license-feature-checklist { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .app-shell { display: block; }
  .license-generator-modal { max-height: calc(100vh - 20px); overflow: auto; }
  .license-generator-grid, .license-entitlement-grid { grid-template-columns: 1fr; }
  .license-feature-checklist { grid-template-columns: 1fr; }
  .license-generator-notices { grid-template-columns: 1fr; }
  .license-feature-editor-footer { align-items: stretch; flex-direction: column; }
  .license-feature-editor-heading { display: block; }
  .license-feature-edit-count { display: inline-flex; margin-top: 8px; }
  .sidebar { transform: translateX(-100%); transition: transform .2s; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open { transform: translateX(0); }
  .main-area { margin: 0; }
  .menu-button { display: grid; }
  .topbar { padding: 0 16px; height: 72px; }
  .topbar .secondary-button, .admin-identity div { display: none; }
  .workspace { padding: 20px 14px 40px; }
  .metrics-grid, .plan-grid { grid-template-columns: 1fr; }
  .provider-usage-summary { grid-template-columns: 1fr; }
  .page-intro, .toolbar { align-items: stretch; flex-direction: column; }
  .plan-section-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .provider-health { align-items: flex-start; flex-direction: column; }
  .filters { flex-direction: column; }
  .filters input, .filters select { max-width: none; width: 100%; }
  .login-card { padding: 30px 24px; }
  .plan-form-grid { grid-template-columns: 1fr; }
  .plan-card-actions { align-items: stretch; flex-direction: column; }
  .plan-card-actions button { justify-content: center; }
}

/* 2026 blue-and-white admin redesign */
:root {
  --ink: #11336d;
  --muted: #6680aa;
  --line: #dce8f8;
  --surface: #ffffff;
  --canvas: #f4f8fe;
  --nav: #0868e9;
  --nav-soft: rgba(255, 255, 255, .1);
  --accent: #0868ef;
  --accent-dark: #075dd5;
  --accent-soft: #edf5ff;
  --green: #20b77a;
  --green-soft: #eafaf4;
  --red: #f04444;
  --red-soft: #fff1f2;
  --blue: #0868ef;
  --blue-soft: #edf5ff;
  --shadow: 0 8px 28px rgba(30, 88, 170, .07);
}
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(8, 104, 239, .22); outline-offset: 2px; }
.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; }
.ti { line-height: 1; }

.login-shell { background: linear-gradient(145deg, #eef6ff 0%, #fff 45%, #edf5ff 100%); }
.login-shell::before, .login-shell::after { border: 0; background: rgba(8, 104, 239, .055); }
.login-brand strong, .login-heading h1 { color: #0b2b63; }
.brand-mark { width: 50px; height: 50px; border-radius: 14px; display: grid; place-items: center; overflow: hidden; background: #fff; box-shadow: 0 9px 24px rgba(8, 91, 205, .17); }
.brand-mark img { width: 46px; height: 46px; object-fit: contain; display: block; }
.brand-mark.small { width: 46px; height: 46px; border-radius: 13px; }
.brand-mark.small img { width: 42px; height: 42px; }
.login-card { border-color: var(--line); border-radius: 20px; box-shadow: 0 24px 70px rgba(15, 74, 153, .14); }
input, select, textarea { border-color: #cbdcf4; border-radius: 10px; color: var(--ink); }
input:focus, select:focus, textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(8, 104, 239, .1); }
.primary-button { background: var(--blue); box-shadow: 0 7px 16px rgba(8, 104, 239, .18); }
.primary-button:hover { background: var(--accent-dark); }
.secondary-button { color: #315786; border-color: var(--line); }
.secondary-button:hover { border-color: #bad2f2; background: #f7fbff; }

.app-shell { grid-template-columns: 228px minmax(0, 1fr); }
.sidebar { width: 228px; padding: 24px 12px 18px; background: linear-gradient(180deg, #0868e9, #075dd5); box-shadow: 8px 0 24px rgba(8, 89, 201, .08); overflow-y: auto; }
.sidebar-brand { padding: 0 10px 24px; border-bottom: 0; }
.sidebar-brand strong { font-size: 19px; letter-spacing: .05em; }
.sidebar-brand small { color: rgba(255, 255, 255, .78); }
.nav-list { gap: 5px; padding-top: 3px; }
.nav-list button { min-height: 50px; color: rgba(255, 255, 255, .9); padding: 0 17px; gap: 13px; font-size: 14px; font-weight: 650; }
.nav-list button:hover { color: #fff; background: rgba(255, 255, 255, .11); transform: translateX(1px); }
.nav-list button.active { color: #fff; background: rgba(104, 181, 255, .38); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .06); }
.nav-icon { width: 22px; flex: 0 0 22px; color: currentColor; font-size: 21px; }
.nav-list button.active .nav-icon { color: currentColor; }
.sidebar-footer { min-height: 72px; padding: 13px 14px; grid-template-columns: 8px 18px minmax(0, 1fr); background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .07); display: grid; gap: 9px; }
.sidebar-footer > .ti { font-size: 18px; color: #cce4ff; }
.sidebar-footer strong { color: #fff; }
.sidebar-footer small { color: rgba(255, 255, 255, .72); }

.topbar { height: 64px; padding: 0 24px 0 36px; border-color: var(--line); }
.breadcrumb { margin: 0; color: var(--ink); font-size: 13px; }
.breadcrumb span { padding: 0 11px; color: #a2b3cc; }
.breadcrumb b { font-weight: 700; }
.topbar-actions { gap: 10px; }
.topbar-button { height: 38px; display: inline-flex; align-items: center; gap: 7px; padding: 0 14px; }
.topbar-button .ti { font-size: 17px; color: var(--blue); }
.topbar-separator { width: 1px; height: 27px; margin: 0 3px; background: var(--line); }
.admin-menu-wrap { position: relative; }
.admin-identity { gap: 10px; padding: 2px 4px 2px 1px; border: 0; color: var(--ink); background: transparent; text-align: left; border-radius: 10px; }
.admin-identity:hover { background: var(--blue-soft); }
.admin-identity > span { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(145deg, #3a9bff, #0868ef); color: #fff; }
.admin-identity > .ti { margin-left: 7px; color: var(--muted); font-size: 15px; }
.admin-menu { position: absolute; top: calc(100% + 9px); right: 0; width: 150px; padding: 6px; border: 1px solid var(--line); border-radius: 11px; background: #fff; box-shadow: var(--shadow); }
.admin-menu button { width: 100%; border: 0; border-radius: 8px; padding: 10px 11px; background: #fff; color: var(--ink); display: flex; align-items: center; gap: 9px; text-align: left; font-size: 12px; }
.admin-menu button:hover { background: var(--blue-soft); }
.admin-menu .ti { color: var(--blue); font-size: 16px; }
.icon-button:hover { border-color: #bad2f2; color: var(--blue); background: #f8fbff; }
.workspace { padding: 15px 14px 28px; max-width: 1560px; }
.page-intro { margin: 8px 4px 20px; }
.page-intro h2, .panel-header h3 { color: #0b2b63; }
.license-generate-button { min-width: 118px; min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; align-self: flex-start; box-shadow: 0 9px 20px rgba(8, 104, 239, .22); }
.license-generate-button .ti { font-size: 17px; }
.metrics-grid { gap: 14px; margin-bottom: 16px; }
.metric-card, .panel { border-radius: 12px; border-color: var(--line); box-shadow: var(--shadow); }
.metric-icon { border-radius: 10px; color: var(--blue); background: var(--blue-soft); font-size: 20px; }
.content-grid, .provider-dashboard-grid, .provider-grid { gap: 15px; }
.panel-header { border-color: var(--line); }
.quick-action:hover { border-color: #bad2f2; background: #f7fbff; }
.provider-balance-block { background: var(--blue-soft); border-color: #d7e8ff; }
.provider-model-rank { color: var(--blue); background: var(--blue-soft); }
.provider-health { border-color: #cbeede; background: #f4fdf9; }
th { background: #f6f9fe; color: #7189ad; border-color: var(--line); }
td { border-color: #edf3fb; color: #456387; }
tbody tr:hover { background: #f8fbff; }
.toast { background: var(--blue); }
.modal::backdrop { background: rgba(16, 49, 94, .48); }

.dashboard-layout { display: grid; gap: 14px; }
.dashboard-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); min-width: 0; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 2.18fr) minmax(300px, 1fr); gap: 14px; }
.overview-card { overflow: hidden; }
.overview-heading { min-height: 60px; padding: 17px 19px 13px; display: flex; align-items: center; gap: 12px; }
.overview-heading h2, .pending-card h2, .resource-card h2, .health-card h2, .recent-card h2 { margin: 0; color: #0b2b63; font-size: 20px; letter-spacing: -.02em; }
.live-badge { display: inline-flex; border-radius: 6px; padding: 6px 9px; color: var(--muted); background: var(--blue-soft); font-size: 10px; }
.overview-metrics { margin: 0 18px; padding: 22px 0 24px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.overview-metric { min-width: 0; padding: 0 34px; border-left: 1px solid var(--line); }
.overview-metric:first-child { border-left: 0; }
.overview-metric span { display: block; color: #43658f; font-size: 13px; }
.overview-metric strong { display: block; margin: 7px 0 6px; color: #0b2b63; font-size: 30px; letter-spacing: -.035em; }
.overview-metric.primary strong { color: var(--blue); }
.overview-metric small { color: var(--muted); font-size: 11px; white-space: nowrap; }
.overview-metric small b { color: var(--green); font-weight: 700; }
.trend-block { padding: 15px 18px 15px; }
.trend-head { display: flex; align-items: center; gap: 22px; margin-bottom: 6px; }
.trend-head strong { font-size: 13px; color: #0b2b63; }
.legend { display: inline-flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; }
.legend::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.legend.cyan::before { background: #18aeea; }
.trend-chart { width: 100%; height: 185px; display: block; overflow: visible; }
.chart-grid-line { stroke: #dce9fa; stroke-width: 1; stroke-dasharray: 3 3; }
.chart-axis-text { fill: #6680aa; font-family: inherit; font-size: 10px; }
.chart-line-primary, .chart-line-cyan, .cost-line { fill: none; stroke-linecap: round; stroke-linejoin: round; }
.chart-line-primary { stroke: var(--blue); stroke-width: 2.6; }
.chart-line-cyan { stroke: #18aeea; stroke-width: 2.4; }
.chart-point-primary { fill: var(--blue); stroke: #fff; stroke-width: 1.5; }
.chart-point-cyan { fill: #18aeea; stroke: #fff; stroke-width: 1.5; }

.pending-card { padding: 19px 20px 20px; display: flex; flex-direction: column; }
.pending-card h2 { padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.pending-list { display: grid; }
.pending-row { min-height: 83px; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 44px minmax(0, 1fr) auto 18px; gap: 12px; align-items: center; }
.pending-icon { width: 44px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: var(--blue); background: var(--blue-soft); font-size: 22px; }
.pending-row span { color: #34577f; font-size: 13px; }
.pending-row strong { color: var(--blue); font-size: 22px; }
.pending-row.danger strong { color: var(--red); }
.pending-row.warning strong { color: #f37b18; }
.pending-row > .ti:last-child { color: #6b89b3; font-size: 16px; }
.pending-button { width: 100%; margin-top: auto; min-height: 44px; }

.resource-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(330px, 1fr); gap: 14px; }
.resource-card, .health-card { padding: 17px 19px 19px; }
.resource-title, .health-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.resource-title > div { display: flex; align-items: center; gap: 10px; }
.status-inline { display: inline-flex; align-items: center; gap: 7px; color: var(--green); font-size: 10px; }
.status-inline::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.status-inline.error { color: var(--red); }
.status-inline.warning { color: #f37b18; }
.resource-stats { display: grid; grid-template-columns: 1.55fr repeat(3, minmax(0, 1fr)); align-items: stretch; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.balance-stat span, .resource-mini span, .concurrency-card span { display: block; color: var(--muted); font-size: 11px; }
.balance-stat strong { display: block; margin-top: 5px; color: #0b2b63; font-size: 31px; letter-spacing: -.03em; }
.resource-mini { padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; }
.resource-mini strong { display: block; margin-top: 6px; color: #0b2b63; font-size: 16px; }
.resource-bottom { display: grid; grid-template-columns: minmax(0, 2fr) minmax(180px, .78fr); gap: 14px; padding-top: 11px; }
.cost-chart-wrap { min-width: 0; }
.cost-chart-wrap > span, .model-block > span { display: block; color: var(--muted); font-size: 10px; margin-bottom: 5px; }
.cost-chart { width: 100%; height: 86px; display: block; overflow: visible; }
.cost-line { stroke: var(--blue); stroke-width: 2.4; }
.cost-area { fill: url(#costGradient); }
.model-block { padding-left: 15px; border-left: 1px solid var(--line); }
.model-name { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.model-name .ti { color: var(--blue); font-size: 24px; }
.model-name strong { display: block; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #0b2b63; font-size: 13px; }
.model-block small { display: block; margin: 8px 0 0 33px; color: var(--muted); font-size: 10px; }
.resource-empty { padding: 30px 4px 24px; color: var(--muted); font-size: 12px; line-height: 1.7; }

.health-list { display: grid; gap: 10px; padding: 11px 0; }
.health-row { min-height: 45px; border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; display: flex; align-items: center; gap: 10px; color: #34577f; font-size: 12px; }
.health-row .ti { color: var(--blue); font-size: 17px; }
.health-row .health-status { margin-left: auto; color: var(--green); display: inline-flex; align-items: center; gap: 7px; }
.health-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.concurrency-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.concurrency-card { padding: 12px 13px; border: 1px solid var(--line); border-radius: 8px; }
.concurrency-card strong { display: block; margin-top: 6px; color: #0b2b63; font-size: 20px; }

.recent-card { padding: 14px 18px 6px; }
.recent-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 6px; }
.recent-columns, .recent-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(200px, .9fr) 210px 20px; gap: 14px; align-items: center; }
.recent-columns { min-height: 29px; color: var(--muted); font-size: 11px; border-bottom: 1px solid var(--line); }
.recent-row { min-height: 36px; border-bottom: 1px solid var(--line); color: #55729a; font-size: 11px; }
.recent-row:last-child { border-bottom: 0; }
.recent-action { min-width: 0; display: flex; align-items: center; gap: 10px; }
.recent-action .ti { color: var(--green); font-size: 16px; }
.recent-action.failure .ti { color: var(--red); }
.recent-action strong { color: #34577f; font-size: 12px; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.recent-row > .ti { color: #6d8cb8; font-size: 15px; }
.recent-empty { padding: 30px 0; color: var(--muted); text-align: center; font-size: 12px; }

/* 软件版本与七牛直传 */
.release-storage-banner { min-height: 68px; margin-bottom: 14px; padding: 14px 18px; border: 1px solid #bad9ff; border-radius: 12px; background: #edf6ff; color: #1259a8; display: flex; align-items: center; gap: 14px; }
.release-storage-banner > .ti { font-size: 26px; }
.release-storage-banner span, .release-storage-banner strong { display: block; }
.release-storage-banner strong { margin-bottom: 4px; color: #0b4385; font-size: 13px; }
.release-storage-banner span { font-size: 11px; line-height: 1.6; }
.release-storage-banner.blocked { border-color: #ffd8a8; background: #fff8eb; color: #9a5a08; }
.release-storage-banner.blocked strong { color: #7d4700; }
.release-toolbar { min-height: 58px; margin-bottom: 12px; padding: 8px 13px; border: 1px solid var(--line); border-radius: 11px; background: #fff; display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.release-toolbar form { display: flex; align-items: center; gap: 10px; }
.release-toolbar form label { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 11px; }
.release-toolbar select { min-width: 132px; }
.release-toolbar > span { color: var(--muted); font-size: 11px; }
.release-list { display: grid; gap: 11px; }
.release-card { overflow: hidden; border-left: 4px solid #f0a32f; }
.release-card.published { border-left-color: var(--green); }
.release-card-main { min-height: 145px; padding: 18px 18px 17px; display: grid; grid-template-columns: 175px minmax(230px, 1.05fr) minmax(240px, 1.2fr) 170px 130px; gap: 22px; align-items: center; }
.release-card-main > div:not(:first-child) { min-width: 0; }
.release-card-main > div + div { padding-left: 21px; border-left: 1px solid var(--line); }
.release-version-block > span, .release-package-block > span, .release-notes-block > span, .release-time-block > span { display: block; color: var(--muted); font-size: 10px; }
.release-version-block > strong { display: block; margin: 7px 0 11px; color: #0b2b63; font-size: 27px; letter-spacing: -.025em; }
.release-version-block > div { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.release-policy-badge { display: inline-flex; padding: 4px 8px; border-radius: 99px; color: #376391; background: #eef5fd; font-size: 9px; font-weight: 750; }
.release-policy-badge.danger { color: #aa3232; background: #ffeded; }
.release-package-block > strong { display: block; margin: 7px 0 5px; color: #173e70; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-package-block small, .release-time-block small, .release-notes-block small { display: block; color: var(--muted); font-size: 10px; line-height: 1.5; }
.release-package-block code { display: block; width: fit-content; max-width: 100%; margin-top: 8px; padding: 5px 7px; border-radius: 6px; color: #47678d; background: #f3f7fc; font-size: 9px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-notes-block ul { min-height: 48px; max-height: 70px; margin: 6px 0 5px; padding-left: 17px; color: #34577f; font-size: 11px; line-height: 1.6; overflow: auto; }
.release-time-block > strong { display: block; margin: 8px 0 6px; color: #244b7a; font-size: 11px; line-height: 1.5; }
.release-action-block { display: flex; justify-content: flex-end; }
.release-publish-button { width: 118px; min-height: 40px; white-space: nowrap; }
.release-published-by { display: flex; align-items: center; gap: 6px; color: var(--green); font-size: 11px; font-weight: 750; flex-wrap: wrap; }
.release-published-by small { width: 100%; padding-left: 20px; color: var(--muted); font-size: 9px; font-weight: 500; }
.release-empty { padding: 50px 20px; }

.software-release-modal { width: min(920px, calc(100% - 30px)); max-height: calc(100vh - 30px); overflow: hidden; }
.software-release-modal .modal-card { width: 100%; max-height: calc(100vh - 30px); display: flex; flex-direction: column; }
.software-release-body { display: grid; gap: 15px; overflow-y: auto; }
.release-upload-files { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.release-file-picker { min-height: 105px; padding: 15px; border: 1px dashed #9fc8fa; border-radius: 12px; background: #f6faff; display: flex; align-items: center; gap: 13px; cursor: pointer; transition: .16s; }
.release-file-picker:hover { border-color: var(--blue); background: #eef6ff; transform: translateY(-1px); }
.release-file-picker input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.release-file-icon { flex: 0 0 auto; width: 48px; height: 48px; border-radius: 11px; background: #dcebff; color: var(--blue); display: grid; place-items: center; font-size: 24px; }
.release-file-icon.package { color: #a7640c; background: #fff0d7; }
.release-file-picker span > strong, .release-file-picker span > small, .release-file-picker span > b { display: block; }
.release-file-picker span > strong { color: #173e70; font-size: 12px; }
.release-file-picker span > small { margin: 4px 0 8px; color: var(--muted); font-size: 10px; line-height: 1.4; }
.release-file-picker span > b { max-width: 280px; color: #225da3; font-size: 10px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.release-package-preview { padding: 14px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fbfdff; display: grid; grid-template-columns: 1fr .55fr 1.3fr; gap: 12px 18px; }
.release-package-preview > span { grid-column: 1 / -1; color: var(--muted); font-size: 11px; }
.release-package-preview div > span, .release-package-preview div > strong { display: block; }
.release-package-preview div > span { color: var(--muted); font-size: 9px; }
.release-package-preview div > strong { margin-top: 5px; color: #173e70; font-size: 11px; }
.release-preview-hash { grid-column: 1 / -1; }
.release-preview-hash code { display: block; margin-top: 5px; padding: 7px 9px; border-radius: 7px; color: #47678d; background: #eef4fb; font-size: 9px; overflow-wrap: anywhere; }
.release-file-match { grid-column: 1 / -1; display: flex; align-items: center; gap: 7px; font-size: 10px; }
.release-file-match.success { color: var(--green); }
.release-file-match.danger { color: var(--red); }
.release-options-grid { display: grid; grid-template-columns: .7fr 1fr 1.15fr; gap: 12px; align-items: start; }
.release-mandatory-option small { display: block; margin-top: 6px; color: var(--muted); font-size: 9px; line-height: 1.45; }
.release-upload-progress { padding: 13px 15px; border: 1px solid #b9d7ff; border-radius: 11px; background: #f4f9ff; }
.release-upload-progress > div { display: flex; justify-content: space-between; gap: 12px; color: #174e91; font-size: 11px; }
.release-upload-progress progress { width: 100%; height: 8px; margin: 10px 0 7px; accent-color: var(--blue); }
.release-upload-progress small { display: block; color: var(--muted); font-size: 9px; }

@media (max-width: 1180px) {
  .overview-grid, .resource-grid { grid-template-columns: 1fr; }
  .release-card-main { grid-template-columns: 160px minmax(220px, 1fr) minmax(220px, 1fr); }
  .release-time-block { grid-column: 2; }
  .release-action-block { grid-column: 3; }
  .pending-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
  .pending-row { border: 1px solid var(--line); border-radius: 9px; padding: 0 10px; grid-template-columns: 38px minmax(0, 1fr) auto; }
  .pending-row > .ti:last-child { display: none; }
  .pending-icon { width: 38px; height: 38px; }
}
@media (max-width: 1050px) {
  .overview-metric { padding: 0 20px; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { box-shadow: 20px 0 50px rgba(8, 72, 160, .2); }
  .topbar { padding: 0 14px; height: 64px; }
  .topbar-button { padding: 0 10px; }
  #monitor-button, .topbar-separator, .admin-identity div { display: none; }
  .workspace { padding: 14px 10px 30px; }
  .overview-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 0; }
  .overview-metric:nth-child(3) { border-left: 0; }
  .resource-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .balance-stat { grid-column: 1 / -1; }
  .recent-columns, .recent-row { grid-template-columns: minmax(0, 1fr) 150px 18px; }
  .release-card-main { grid-template-columns: 1fr; gap: 15px; }
  .release-card-main > div + div { padding: 13px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .release-time-block, .release-action-block { grid-column: auto; }
  .release-action-block { justify-content: flex-start; }
  .release-upload-files, .release-options-grid { grid-template-columns: 1fr; }
  .release-package-preview { grid-template-columns: 1fr; }
  .release-preview-hash, .release-file-match { grid-column: auto; }
  .recent-columns span:nth-child(2), .recent-row > span:nth-child(2) { display: none; }
}
@media (max-width: 620px) {
  .pending-list { grid-template-columns: 1fr; }
  .overview-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .overview-metrics { margin: 0 14px; }
  .overview-metric { padding: 0 14px; }
  .trend-head { align-items: flex-start; flex-wrap: wrap; gap: 10px 16px; }
  .resource-stats { grid-template-columns: 1fr; }
  .balance-stat { grid-column: auto; }
  .resource-bottom { grid-template-columns: 1fr; }
  .model-block { padding: 12px 0 0; border-left: 0; border-top: 1px solid var(--line); }
  .recent-columns, .recent-row { grid-template-columns: minmax(0, 1fr) 18px; }
  .recent-columns span:nth-child(3), .recent-row > span:nth-child(3) { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/*
 * 全站字体规范
 * 功能图标使用独立字体，不参与文字字体覆盖；按钮反白、状态提示与深色侧栏
 * 继续使用各自的功能色，以保证可读性与状态辨识度。
 */
html,
body,
button,
input,
select,
textarea {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 12px;
  font-weight: 500;
}

body :where(
  h1, h2, h3, h4, h5, h6,
  p, a, button, label, input, select, textarea,
  table, thead, tbody, tfoot, tr, th, td,
  ul, ol, li, span, small, strong, b, code
) {
  font-family: "Microsoft YaHei UI", "Microsoft YaHei", sans-serif !important;
  font-size: 12px !important;
  font-weight: 500 !important;
}

.main-area,
.login-shell,
dialog {
  color: #0f1f3d;
}

/* 重点信息层级：侧栏入口和经营概览标题需要比普通正文更醒目。 */
.nav-list button {
  font-size: 15px !important;
  font-weight: 700 !important;
}

.overview-metric > span {
  color: #0f1f3d !important;
  font-size: 15px !important;
  font-weight: 700 !important;
}

/*
 * 用户 UUID 与硬件码保持完整单行显示。
 * clamp 会根据可用屏幕宽度在 9px–11px 之间平滑缩小，避免长标识符折行。
 */
.user-identity-cell .full-identifier,
.hardware-cell .full-identifier {
  max-width: none;
  overflow-wrap: normal !important;
  word-break: normal !important;
  white-space: nowrap !important;
  font-size: clamp(9px, .55vw, 11px) !important;
  font-weight: 500 !important;
  letter-spacing: -.015em;
  line-height: 1.35;
}
