/* Lithora Status — clean, restrained, industry-grade dark theme */

:root {
    --bg: #0a0b0d;
    --surface: #111317;
    --surface-2: #15181d;
    --border: #20242b;
    --border-2: #1a1d23;

    --text: #f2f4f7;
    --text-2: #aab1bd;
    --text-3: #6f7783;

    --op: #2fbd6a;
    --op-soft: rgba(47, 189, 106, 0.14);
    --deg: #e0a73b;
    --deg-soft: rgba(224, 167, 59, 0.15);
    --down: #ec5b5b;
    --down-soft: rgba(236, 91, 91, 0.15);
    --none: #262a31;

    --radius: 12px;
    --radius-sm: 8px;
    --maxw: 720px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.5;
    font-feature-settings: "cv11", "ss01";
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    min-height: 100vh;
}

.page {
    max-width: var(--maxw);
    margin: 0 auto;
    padding: 28px 22px 56px;
}

/* ---------- Top bar ---------- */
.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 26px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    text-decoration: none;
    color: var(--text);
}
.brand-logo { border-radius: 7px; display: block; flex-shrink: 0; }
.brand-logo.is-hidden { display: none; }
.brand-name { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.brand-sep { color: var(--text-3); font-weight: 400; }
.brand-tag { font-size: 15px; font-weight: 500; color: var(--text-2); }

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-3);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s ease;
}
.topbar-link:hover { color: var(--text-2); }

/* ---------- Hero / overall ---------- */
.hero {
    display: flex;
    align-items: center;
    gap: 14px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px 22px;
    margin-bottom: 32px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    left: 0; top: 0; bottom: 0;
    width: 3px;
    background: var(--none);
}
.hero.op::before { background: var(--op); }
.hero.deg::before { background: var(--deg); }
.hero.down::before { background: var(--down); }

.hero-dot {
    width: 26px; height: 26px;
    border-radius: 50%;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    background: var(--none);
}
.hero.op .hero-dot { background: var(--op-soft); }
.hero.deg .hero-dot { background: var(--deg-soft); }
.hero.down .hero-dot { background: var(--down-soft); }
.hero-dot svg { width: 15px; height: 15px; }
.hero.op .hero-dot svg { color: var(--op); }
.hero.deg .hero-dot svg { color: var(--deg); }
.hero.down .hero-dot svg { color: var(--down); }

.hero-title { font-size: 18px; font-weight: 600; letter-spacing: -0.02em; }
.hero-sub { font-size: 13px; color: var(--text-3); margin-top: 1px; }

/* ---------- Services panel ---------- */
.panel-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 12px;
}
.panel-head h2 { font-size: 13px; font-weight: 600; color: var(--text-2); letter-spacing: 0.01em; }
.panel-sub { font-size: 12px; color: var(--text-3); display: inline-flex; align-items: center; gap: 7px; }
.live {
    width: 6px; height: 6px; border-radius: 50%;
    background: var(--op); position: relative;
}
.live::after {
    content: ""; position: absolute; inset: -3px; border-radius: 50%;
    border: 1px solid var(--op); opacity: 0.35;
}

.svc-list {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.svc {
    padding: 17px 20px;
    border-bottom: 1px solid var(--border-2);
}
.svc:last-child { border-bottom: none; }

.svc-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 13px;
}
.svc-name { font-size: 14.5px; font-weight: 550; letter-spacing: -0.005em; }
.svc-right { display: inline-flex; align-items: center; gap: 13px; flex-shrink: 0; }
.svc-uptime { font-size: 12px; color: var(--text-3); font-variant-numeric: tabular-nums; }

.svc-state {
    display: inline-flex; align-items: center; gap: 7px;
    font-size: 12.5px; font-weight: 550;
}
.svc-state .d { width: 7px; height: 7px; border-radius: 50%; }
.svc-state.op { color: var(--op); } .svc-state.op .d { background: var(--op); }
.svc-state.deg { color: var(--deg); } .svc-state.deg .d { background: var(--deg); }
.svc-state.down { color: var(--down); } .svc-state.down .d { background: var(--down); }
.svc-state.pending { color: var(--text-3); } .svc-state.pending .d { background: var(--text-3); }

/* Uptime bars */
.bars { display: flex; gap: 3px; align-items: stretch; height: 28px; }
.bar {
    flex: 1; min-width: 0; border-radius: 2px;
    background: var(--none);
    transition: opacity 0.12s ease, transform 0.12s ease;
    position: relative; cursor: default;
}
.bar.op { background: var(--op); opacity: 0.85; }
.bar.deg { background: var(--deg); opacity: 0.9; }
.bar.down { background: var(--down); }
.bar:hover { opacity: 1; transform: scaleY(1.08); }
.bar[data-tip]:hover::after {
    content: attr(data-tip);
    position: absolute; bottom: calc(100% + 7px); left: 50%; transform: translateX(-50%);
    background: #1c2026; color: var(--text); border: 1px solid var(--border);
    padding: 5px 9px; border-radius: 7px; font-size: 11px; font-weight: 500; white-space: nowrap;
    z-index: 5; box-shadow: 0 6px 20px rgba(0,0,0,0.4); pointer-events: none;
}

.axis {
    display: flex; justify-content: space-between;
    margin-top: 7px; font-size: 10.5px; color: var(--text-3);
    letter-spacing: 0.01em;
}

/* Legend */
.legend {
    list-style: none; display: flex; flex-wrap: wrap; gap: 18px;
    margin-top: 16px; padding: 0 2px; font-size: 11.5px; color: var(--text-3);
}
.legend li { display: inline-flex; align-items: center; gap: 7px; }
.sw { width: 9px; height: 9px; border-radius: 2.5px; }
.sw.op { background: var(--op); } .sw.deg { background: var(--deg); }
.sw.down { background: var(--down); } .sw.none { background: var(--none); }

/* Footer */
.foot {
    display: flex; flex-wrap: wrap; align-items: center; gap: 16px;
    margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--border-2);
    font-size: 12px; color: var(--text-3);
}
.foot-mid { display: inline-flex; align-items: center; gap: 7px; }
.refresh-dot {
    width: 6px; height: 6px; border-radius: 50%; background: var(--text-3);
    transition: background 0.25s ease, box-shadow 0.25s ease;
}
.refresh-dot.on { background: var(--op); box-shadow: 0 0 0 3px var(--op-soft); }
.foot-copy { margin-left: auto; }

/* Skeleton */
.skeleton {
    background: linear-gradient(90deg, #15181d 25%, #1d2127 37%, #15181d 63%);
    background-size: 400% 100%;
    animation: sh 1.4s ease infinite;
    border-radius: 6px;
}
.skeleton-row { height: 64px; }
.hero-dot.skeleton { border-radius: 50%; }
@keyframes sh { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

@media (max-width: 540px) {
    .page { padding: 22px 16px 44px; }
    .hero-title { font-size: 16px; }
    .svc-uptime { display: none; }
    .bars { height: 24px; }
    .foot-copy { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
    * { animation: none !important; transition: none !important; }
}
