:root { color-scheme: light; --ink: #15191f; --muted: #68717f; --line: #e6eaf0; --blue: #3866ef; --violet: #9868d8; --green: #16835a; --red: #bd3434; --yellow: #bc8b23; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: #f7f8fa; font-size: 14px; line-height: 1.65; -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .45; cursor: default; }
a { color: inherit; text-decoration: none; }
button, a, input { -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 3px solid #8caafd; outline-offset: 3px; }
.skip-link { position: fixed; z-index: 10; left: 16px; top: 8px; padding: 9px 14px; background: #fff; border-radius: 8px; transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.app-header { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); background: #fff; padding: 0 max(28px, calc((100vw - 1200px) / 2)); }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; font-size: 16px; font-weight: 600; }
.brand img { flex: 0 0 auto; }
.brand small { color: var(--muted); font-size: 12px; font-weight: 400; margin-left: 14px; }
.header-actions { display: flex; align-items: center; gap: 18px; font-size: 13px; min-width: 0; }
#session-user { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; max-width: 240px; }
main { width: min(1200px, calc(100% - 56px)); margin: 0 auto; }
h1, h2, p { margin: 0; }
h1 { font-size: 30px; line-height: 1.3; font-weight: 600; letter-spacing: -.035em; }
h2 { font-size: 17px; font-weight: 600; line-height: 1.5; }
.eyebrow { color: var(--muted); font-size: 10px; letter-spacing: .15em; margin-bottom: 12px; }
.small { font-size: 12px; }
.muted { color: var(--muted); }
.button { min-height: 40px; padding: 8px 15px; border-radius: 9px; font-weight: 500; border: 1px solid transparent; transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease; white-space: nowrap; }
.button.primary { color: #fff; background: var(--ink); }
.button.primary:hover:enabled { background: #303945; }
.button.quiet { background: transparent; color: var(--muted); border-color: var(--line); }
.button.quiet:hover:enabled { color: var(--ink); background: #edf0f5; }
.button.danger { color: var(--red); }
.button.primary.danger { color: #fff; background: var(--red); }
.auth-shell { min-height: calc(100dvh - 81px); display: flex; justify-content: center; align-items: center; padding: 44px 0; gap: 12px; }
.auth-card { width: min(100%, 420px); background: #fff; border: 1px solid var(--line); border-radius: 20px; padding: 36px; box-shadow: 0 8px 28px #19263706; }
.auth-card h1 { font-size: 28px; }
.auth-subtitle { margin-top: 10px; color: var(--muted); }
#auth-form { margin-top: 28px; }
label { display: block; margin: 18px 0 8px; font-size: 13px; font-weight: 500; }
input { width: 100%; height: 46px; border: 1px solid #d9dfe8; border-radius: 9px; padding: 10px 12px; color: var(--ink); background: #fff; min-width: 0; }
.auth-submit { margin-top: 24px; width: 100%; }
.back-link { display: inline-block; font-size: 12px; color: var(--muted); margin-top: 24px; }
.back-link span { margin-left: 5px; }
#setup-hint { margin-top: 16px; }
.form-error { color: var(--red); font-size: 12px; line-height: 1.8; margin-top: 14px; }
.spinner { display: inline-block; width: 18px; height: 18px; border: 2px solid #e2e7ef; border-top-color: var(--blue); border-radius: 50%; animation: spin 800ms linear infinite; }
.page-heading { padding: 42px 0 26px; display: flex; align-items: center; justify-content: space-between; gap: 20px; }
.live-controls { display: flex; align-items: center; gap: 16px; }
.live-state { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12px; }
.status-dot { width: 7px; height: 7px; display: inline-block; border-radius: 50%; background: #bac1cc; flex: 0 0 auto; }
.status-dot.ok { background: var(--green); }
.status-dot.bad { background: var(--red); }
.status-dot.pending { background: var(--yellow); }
.health-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px 22px; margin-bottom: 24px; font-size: 12px; color: var(--muted); }
.health-row > span { display: inline-flex; align-items: center; gap: 7px; }
.health-row strong { font-weight: 400; color: var(--ink); }
.health-updated { margin-left: auto; }
.banner { background: #fff4ec; color: #8a542b; border: 1px solid #f3e0d1; border-radius: 10px; padding: 11px 15px; font-size: 12px; margin-bottom: 18px; }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.metric { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 22px; }
.metric > span { display: block; color: var(--muted); font-size: 12px; }
.metric > strong { display: block; margin-top: 12px; font-weight: 600; font-size: 34px; line-height: 1.25; font-variant-numeric: tabular-nums; letter-spacing: -.03em; }
.metric > small { display: block; margin-top: 10px; font-size: 11px; color: var(--muted); }
.charts-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 18px; }
.chart-card { min-width: 0; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 23px 24px 16px; }
.chart-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.chart-heading h2 { font-size: 15px; }
.chart-heading > span { font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.chart-description { color: var(--muted); font-size: 11px; margin-top: 8px; }
.legend { display: flex; gap: 18px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }
.legend-dot.blue { background: var(--blue); }
.legend-dot.violet { background: var(--violet); }
.chart { height: 168px; margin-top: 18px; }
.chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.chart svg text { font-family: inherit; font-size: 10px; fill: var(--muted); }
.chart-footer { display: flex; align-items: center; justify-content: space-between; padding-left: 46px; color: var(--muted); font-size: 10px; }
.chart-empty { height: 100%; display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 12px; }
.resource-strip { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 22px; padding: 20px 0 30px; font-size: 11px; color: var(--muted); }
.resource-strip strong { margin-left: 5px; font-weight: 400; color: var(--ink); font-variant-numeric: tabular-nums; }
.users-section { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.users-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 24px; }
.users-heading p { margin-top: 5px; color: var(--muted); font-size: 11px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; font-size: 12px; }
th { padding: 12px 24px; color: var(--muted); font-size: 11px; font-weight: 500; background: #fafbfd; text-align: left; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { padding: 16px 24px; border-bottom: 1px solid #edf0f5; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
td.user-name { white-space: normal; min-width: 140px; max-width: 280px; overflow-wrap: anywhere; }
.user-name strong { font-size: 13px; font-weight: 500; }
.user-role { display: block; margin-top: 3px; font-size: 10px; color: var(--muted); }
.user-state { display: inline-flex; align-items: center; gap: 7px; }
.user-actions { display: flex; justify-content: flex-end; gap: 7px; }
.user-actions .button { font-size: 11px; min-height: 34px; padding: 6px 10px; }
.actions-heading { text-align: right; }
.pagination { border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 14px 24px; font-size: 11px; color: var(--muted); }
.pagination > div { display: flex; gap: 8px; }
.pagination .button { min-height: 34px; font-size: 11px; padding: 6px 10px; }
.empty-users { padding: 30px; text-align: center; color: var(--muted); font-size: 12px; }
.dashboard-footer { display: flex; justify-content: space-between; gap: 20px; color: var(--muted); font-size: 10px; padding: 24px 0 32px; }
dialog { width: min(440px, calc(100% - 40px)); border: 1px solid var(--line); border-radius: 16px; padding: 28px; color: var(--ink); box-shadow: 0 20px 80px #16243d26; }
dialog::backdrop { background: #151e3548; }
dialog h2 { font-size: 20px; }
dialog p { margin-top: 12px; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 25px; }
.noscript { text-align: center; margin: 40px 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (max-width: 900px) { .metric { padding: 18px; } .metric > strong { font-size: 30px; } .chart-card { padding-inline: 18px; } .users-heading .small { max-width: 220px; text-align: right; } th, td { padding-inline: 18px; } }
@media (max-width: 640px) { .app-header { min-height: 68px; padding-inline: 20px; gap: 12px; } .brand { font-size: 14px; gap: 8px; } .brand small { display: block; margin: 0; font-size: 10px; } .brand img { width: 26px; height: 26px; } .header-actions { gap: 10px; font-size: 11px; } #session-user { max-width: 110px; } .header-actions .button { min-height: 34px; padding: 5px 10px; font-size: 11px; } main { width: calc(100% - 32px); } .auth-shell { min-height: calc(100dvh - 69px); } .auth-card { padding: 28px 24px; } .page-heading { padding: 28px 0 22px; align-items: flex-start; } h1 { font-size: 26px; } .eyebrow { margin-bottom: 8px; font-size: 9px; } .live-controls { flex-direction: column; align-items: flex-end; gap: 8px; } .live-state { font-size: 10px; } .live-controls .button { min-height: 32px; padding: 5px 10px; font-size: 11px; } .health-row { gap: 8px 15px; font-size: 10px; margin-bottom: 18px; } .health-updated { margin-left: 0; } .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; } .metric { padding: 17px; border-radius: 12px; } .metric > strong { margin-top: 8px; font-size: 29px; } .metric > span { font-size: 11px; } .metric > small { font-size: 10px; margin-top: 7px; } .charts-grid { grid-template-columns: 1fr; gap: 12px; margin-top: 14px; } .chart-card { padding: 19px 18px 14px; border-radius: 12px; } .chart { height: 156px; } .resource-strip { gap: 8px 15px; font-size: 10px; padding: 17px 2px 25px; } .users-heading { padding: 18px; align-items: flex-start; } .users-heading h2 { font-size: 16px; } .users-heading .small { max-width: 155px; font-size: 10px; line-height: 1.8; } th, td { padding-inline: 16px; } .pagination { padding: 12px 16px; } .dashboard-footer { gap: 12px; font-size: 9px; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }
