@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;600;700;800&family=Mulish:wght@400;500;600;700;800&display=swap");

* { box-sizing: border-box; }
:root {
  --ink: #16273F; --body: #33404F; --muted: #8791A0; --muted2: #5B6675; --muted3: #98A2B0;
  --card-border: #EAEDF3; --panel-border: #E7EBF1; --cyan: #2FA8C9; --cyan-tint: #E4F5F9; --red: #E8402A;
  --ok: #1F8A5B; --ok-bg: #E7F7F1; --ok-bd: #CDEDE1;
  --bad: #D14545; --bad-bg: #FCECEC; --bad-bd: #F5D5D5;
  --warn: #B5772E; --warn-bg: #FCF6E4; --warn-bd: #F1E7C4;
}
html, body { margin: 0; padding: 0; }
body { min-height: 100vh; font-family: "Mulish", system-ui, sans-serif; color: var(--body); background: linear-gradient(180deg, #F5F3FB 0%, #F1F6F6 100%); -webkit-font-smoothing: antialiased; }
button { font: inherit; cursor: pointer; }
[hidden] { display: none !important; }
.app-shell { min-height: 100vh; display: flex; flex-direction: column; }
body.auth-pending .app-shell { display: none; }
.app-shell .rm-header-inner, .app-shell .rm-footer-inner { max-width: 90%; }
@keyframes stFadeUp { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

/* Header-right controls */
.st-live { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted2); }
.st-live input { accent-color: var(--cyan); width: 15px; height: 15px; }
.st-refresh { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 13px; color: #fff; background: var(--cyan); border: none; border-radius: 10px; padding: 8px 16px; }
.st-refresh:hover { background: #2691AE; }

/* Hero */
.st-hero-inner { max-width: 90%; margin: 0 auto; padding: 30px 32px 4px; }
.st-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 38px; line-height: 1.05; letter-spacing: -0.5px; color: var(--ink); margin: 0 0 6px; }
.st-sub { font-size: 14.5px; color: var(--muted2); padding-bottom: 8px; }

.st-main { flex: 1; max-width: 90%; width: 100%; margin: 0 auto; padding: 20px 32px 56px; animation: stFadeUp 0.35s ease both; }
.st-notice { background: #fff; border: 1px solid var(--card-border); border-radius: 18px; box-shadow: 0 4px 16px rgba(18,38,63,0.05); padding: 48px 20px; text-align: center; color: var(--muted); font-size: 15px; }
.st-notice--bad { color: var(--bad); }
.st-mono { font-family: ui-monospace, Menlo, monospace; font-size: 12.5px; }

/* Summary cards */
.st-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 26px; }
.st-sumcard { background: #fff; border: 1px solid var(--card-border); border-radius: 16px; box-shadow: 0 4px 16px rgba(18,38,63,0.05); padding: 18px 20px; border-left: 4px solid var(--muted3); }
.st-sumval { font-family: "Poppins", sans-serif; font-weight: 800; font-size: 26px; color: var(--ink); }
.st-sumlabel { font-size: 12.5px; color: var(--muted); font-weight: 600; margin-top: 4px; }
.st-sumcard.st-tone--ok { border-left-color: var(--ok); }
.st-sumcard.st-tone--bad { border-left-color: var(--bad); }
.st-sumcard.st-tone--warn { border-left-color: var(--warn); }

/* Sections */
.st-section { margin-bottom: 30px; }
.st-section-title { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.5px; color: var(--muted2); margin: 0 0 14px; }

/* Service cards */
.st-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.st-card { background: #fff; border: 1px solid var(--card-border); border-radius: 14px; box-shadow: 0 4px 16px rgba(18,38,63,0.05); padding: 14px 16px; }
.st-card-top { display: flex; align-items: center; gap: 8px; }
.st-card-label { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 14.5px; color: var(--ink); flex: 1; }
.st-card-meta { font-size: 12.5px; color: var(--muted2); margin-top: 8px; min-height: 16px; }
.st-card-key { color: var(--muted3); margin-top: 4px; }
.st-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--muted3); }
.st-dot.st-tone--ok { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-bg); }
.st-dot.st-tone--bad { background: var(--bad); box-shadow: 0 0 0 3px var(--bad-bg); }
.st-dot.st-tone--warn { background: var(--warn); box-shadow: 0 0 0 3px var(--warn-bg); }

.st-pill { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 10.5px; padding: 3px 9px; border-radius: 999px; white-space: nowrap; }
.st-pill.st-tone--ok { color: var(--ok); background: var(--ok-bg); border: 1px solid var(--ok-bd); }
.st-pill.st-tone--bad { color: var(--bad); background: var(--bad-bg); border: 1px solid var(--bad-bd); }
.st-pill.st-tone--warn { color: var(--warn); background: var(--warn-bg); border: 1px solid var(--warn-bd); }

/* Queue table */
.st-tablewrap { background: #fff; border: 1px solid var(--card-border); border-radius: 16px; box-shadow: 0 4px 16px rgba(18,38,63,0.05); overflow: hidden; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.st-table th { font-family: "Poppins", sans-serif; font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.4px; color: var(--muted); text-align: left; padding: 12px 16px; border-bottom: 1px solid #F1F4F8; background: #FAFBFD; }
.st-table td { padding: 11px 16px; border-bottom: 1px solid #F4F6FA; vertical-align: middle; }
.st-table tr:last-child td { border-bottom: none; }
.st-table tbody tr:hover { background: #F8FAFC; }
.st-r { text-align: right; }
.st-strong { font-weight: 700; color: var(--ink); }
.st-worker { display: inline-block; margin-left: 8px; font-family: "Mulish", sans-serif; font-size: 10.5px; font-weight: 700; color: var(--muted2); background: #F0F3F8; border-radius: 6px; padding: 1px 7px; vertical-align: middle; }
.st-count { font-weight: 700; }
.st-count.st-tone--muted { color: var(--muted3); }
.st-count.st-tone--warn { color: var(--warn); }
.st-count.st-tone--cyan { color: var(--cyan); }
.st-active { color: var(--ok); font-weight: 700; }
.st-idle { color: var(--muted3); }

@media (max-width: 900px) {
  .st-summary { grid-template-columns: repeat(2, 1fr); }
  .st-tablewrap { overflow-x: auto; }
}
