:root {
    color-scheme: dark;
    --bg: #09111f;
    --surface: #101b2d;
    --surface-2: #14243b;
    --line: #223a56;
    --text: #e6eef8;
    --muted: #8ea3ba;
    --blue: #67b7ff;
    --mint: #55e6b2;
    --amber: #f4c46a;
    --red: #ff7d8d;
    --shadow: 0 18px 45px rgba(0, 0, 0, .24);
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    background:
        radial-gradient(circle at 10% -10%, rgba(103,183,255,.16), transparent 34rem),
        radial-gradient(circle at 100% 0%, rgba(85,230,178,.09), transparent 28rem),
        var(--bg);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a { color: var(--blue); }
a:hover { color: #b4dcff; }

button, a { -webkit-tap-highlight-color: transparent; }

.site-shell { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 56px; }

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 0 30px;
}

.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-mark {
    display: grid; place-items: center; width: 42px; height: 42px; flex: 0 0 auto;
    color: #05231d; background: var(--mint); border-radius: 13px; font-weight: 900;
    box-shadow: 0 0 0 5px rgba(85,230,178,.12);
}
.brand h1 { margin: 0; font-size: clamp(1.25rem, 2vw, 1.55rem); letter-spacing: -.03em; }
.brand p { margin: 2px 0 0; color: var(--muted); font-size: .9rem; }

.header-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.header-actions a, .header-actions button {
    display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); border-radius: 9px;
    padding: 8px 12px; color: var(--muted); background: rgba(16,27,45,.72); text-decoration: none;
    font: inherit; font-size: .84rem; cursor: pointer;
}
.header-actions a:hover, .header-actions button:hover { color: var(--text); border-color: var(--blue); background: var(--surface-2); }

.hero {
    display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding: 28px;
    background: linear-gradient(135deg, rgba(20,36,59,.95), rgba(16,27,45,.82));
    border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow);
}
.hero h2 { margin: 0; font-size: clamp(1.55rem, 3vw, 2.15rem); letter-spacing: -.04em; }
.hero p { max-width: 600px; margin: 8px 0 0; color: var(--muted); }
.health-pill { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; padding: 9px 13px; border-radius: 999px; color: var(--mint); background: rgba(85,230,178,.1); border: 1px solid rgba(85,230,178,.34); font-weight: 700; font-size: .84rem; }
.health-pill.warn { color: var(--amber); background: rgba(244,196,106,.1); border-color: rgba(244,196,106,.34); }
.health-pill::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 4px color-mix(in srgb, currentColor 14%, transparent); }

.section { margin-top: 28px; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.section-heading h3 { margin: 0; font-size: 1.02rem; letter-spacing: -.01em; }
.section-heading p { margin: 0; color: var(--muted); font-size: .84rem; }

.metric-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.metric-card { padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(16,27,45,.88); }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; color: var(--muted); font-size: .8rem; }
.metric-value { margin-top: 7px; font-size: 1.65rem; font-weight: 750; letter-spacing: -.03em; }
.meter { height: 7px; margin-top: 14px; overflow: hidden; border-radius: 99px; background: #1b304a; }
.meter span { display: block; height: 100%; border-radius: inherit; background: var(--mint); }
.meter.warn span { background: var(--amber); }
.meter.crit span { background: var(--red); }

.notice { padding: 14px 16px; border: 1px solid rgba(244,196,106,.38); border-radius: 12px; color: #f8d899; background: rgba(244,196,106,.08); }
.notice strong { color: var(--amber); }
.notice ul { margin: 7px 0 0; padding-left: 18px; }

.app-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.app-card { min-width: 0; padding: 17px; border: 1px solid var(--line); border-radius: 14px; background: rgba(16,27,45,.88); transition: border-color .18s ease, transform .18s ease, background .18s ease; }
.app-card:hover { border-color: #3a658c; background: var(--surface-2); transform: translateY(-2px); }
.app-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.app-name { overflow: hidden; color: var(--text); font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.app-link { display: block; margin-top: 3px; overflow: hidden; color: var(--muted); font-size: .8rem; text-overflow: ellipsis; white-space: nowrap; }
.status-badge { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; color: var(--mint); background: rgba(85,230,178,.1); border: 1px solid rgba(85,230,178,.25); font-size: .72rem; font-weight: 750; }
.status-badge.warn { color: var(--amber); background: rgba(244,196,106,.1); border-color: rgba(244,196,106,.3); }
.status-badge.down { color: var(--red); background: rgba(255,125,141,.1); border-color: rgba(255,125,141,.3); }
.app-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 18px; }
.app-stat { padding-top: 10px; border-top: 1px solid var(--line); }
.app-stat label { display: block; color: var(--muted); font-size: .72rem; }
.app-stat strong { display: block; margin-top: 2px; font-size: .92rem; }
.app-meta { margin-top: 14px; color: var(--muted); font-size: .76rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 14px; }
.data-table { width: 100%; min-width: 620px; border-collapse: collapse; }
.data-table th, .data-table td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { color: var(--muted); background: rgba(20,36,59,.72); font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.data-table td { color: var(--text); font-size: .87rem; }
.data-table tr:last-child td { border-bottom: 0; }
.muted { color: var(--muted); }
.empty-state, .loading-state { padding: 34px 18px; border: 1px dashed var(--line); border-radius: 14px; color: var(--muted); text-align: center; }
.loading-state { animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .48; } }

.site-footer { display: flex; justify-content: space-between; gap: 16px; margin-top: 24px; color: var(--muted); font-size: .78rem; }

@media (max-width: 760px) {
    .site-shell { width: min(100% - 22px, 1180px); padding-top: 12px; }
    .site-header, .hero { align-items: flex-start; flex-direction: column; }
    .header-actions { justify-content: flex-start; }
    .hero { padding: 21px; }
    .metric-grid { grid-template-columns: 1fr; }
    .site-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* Calm operations board theme */
:root {
    color-scheme: light;
    --bg: #f4f6f8;
    --surface: #ffffff;
    --surface-2: #f8fafc;
    --line: #dfe5ec;
    --text: #182230;
    --muted: #687587;
    --blue: #315efb;
    --mint: #16805f;
    --amber: #a96b00;
    --red: #c43d50;
    --shadow: 0 8px 24px rgba(30, 44, 64, .07);
}
body { background: var(--bg); }
.site-shell { width: min(1120px, calc(100% - 36px)); padding-top: 22px; }
.site-header { padding: 12px 0 22px; border-bottom: 1px solid var(--line); }
.brand-mark { width: 36px; height: 36px; border-radius: 8px; color: white; background: var(--blue); box-shadow: none; }
.brand h1 { font-size: 1.3rem; letter-spacing: -.02em; }
.brand p { font-size: .82rem; }
.header-actions a, .header-actions button { border-radius: 7px; color: var(--muted); background: transparent; }
.header-actions a:hover, .header-actions button:hover { color: var(--blue); border-color: #b9c8ff; background: #eef2ff; }
.hero { align-items: center; padding: 22px 24px; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: 9px; box-shadow: var(--shadow); }
.hero h2 { font-size: 1.55rem; letter-spacing: -.025em; }
.hero p { margin-top: 4px; }
.health-pill { color: var(--mint); background: #edf8f3; border-color: #b9e5d4; border-radius: 7px; }
.health-pill.warn { color: var(--amber); background: #fff8e8; border-color: #f0d49d; }
.section { margin-top: 25px; }
.section-heading { margin-bottom: 10px; }
.section-heading h3 { font-size: .95rem; text-transform: uppercase; letter-spacing: .06em; color: #445166; }
.metric-grid { gap: 10px; }
.metric-card { padding: 15px 16px; border: 1px solid var(--line); border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.metric-value { font-size: 1.35rem; }
.meter { height: 6px; margin-top: 12px; background: #e8edf3; }
.meter span { background: var(--blue); }
.meter.warn span { background: var(--amber); }
.meter.crit span { background: var(--red); }
.notice { padding: 13px 15px; border-radius: 8px; color: #805200; background: #fff9ed; border-color: #f0d49d; }
.notice strong { color: #8d5e00; }
.table-wrap { border-radius: 9px; background: var(--surface); box-shadow: var(--shadow); }
.data-table th { background: #f7f9fb; color: #667487; }
.data-table td { color: var(--text); }
.data-table tr:hover td { background: #fbfcfe; }
.app-table { min-width: 760px; }
.app-table th, .app-table td { padding: 11px 13px; }
.app-table td:first-child { min-width: 180px; }
.row-meta { display: block; margin-top: 2px; color: var(--muted); font-size: .72rem; }
.status-badge { padding: 3px 7px; color: var(--mint); background: #edf8f3; border-color: #b9e5d4; border-radius: 5px; }
.status-badge.warn { color: var(--amber); background: #fff8e8; border-color: #f0d49d; }
.status-badge.down { color: var(--red); background: #fff0f2; border-color: #efbdc5; }
.data-table a { color: var(--blue); }
.empty-state, .loading-state { border-color: var(--line); border-radius: 9px; background: var(--surface); }
.site-footer { margin-top: 20px; }
