/* MyPocketDoctor status page, in the mypocketdoctor.com design system: Inter for text, Playfair
   Display for headings, the primary blue scale, the teal accent and white cards with soft shadows.
   Fonts are self-hosted (SIL Open Font License) so the page loads nothing from third parties. */

@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/inter-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url("/fonts/inter-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("/fonts/playfair-display-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600 800; font-display: swap;
  src: url("/fonts/playfair-display-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --primary: #0382bf;
  --primary-50: #e6f4fb;
  --primary-100: #cce9f7;
  --primary-600: #026fa3;
  --primary-700: #025c87;
  --primary-900: #01364f;
  --navy: #0b2a3c;
  /* Fixed brand blues for filled bars and buttons with white text: the same in both themes. */
  --brand-600: #026fa3;
  --brand-700: #025c87;
  --teal: #3fd8be;
  --teal-ink: #0f8f7c;
  --teal-50: #e8faf6;

  --bg: #f8fafc;
  --surface: #ffffff;
  --fg: #1f2937;
  --heading: #0b2a3c;
  --muted: #5b6b78;
  --line: #e5ebf0;

  --ok: #12b76a;      --ok-ink: #067647;   --ok-50: #dcfae6;
  --warn: #f79009;    --warn-ink: #93370d; --warn-50: #fef0c7;
  --bad: #f04438;     --bad-ink: #b42318;  --bad-50: #fee4e2;
  --none: #d0dbe3;    --none-ink: #475467; --none-50: #f2f4f7;

  --shadow: 0 4px 6px -1px rgba(11, 42, 60, 0.08), 0 2px 4px -1px rgba(11, 42, 60, 0.05);
  --shadow-lg: 0 10px 15px -3px rgba(11, 42, 60, 0.10), 0 4px 6px -2px rgba(11, 42, 60, 0.05);
  --radius: 0.75rem;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --serif: "Playfair Display", Georgia, "Times New Roman", serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #06161f;
    --surface: #0b2331;
    --fg: #dbe6ee;
    --heading: #f1f6f9;
    --muted: #93a9b8;
    --line: #17374a;
    --primary: #33a7df;
    --primary-50: #0d2f43;
    --primary-600: #5bbbe8;
    --teal-50: #0d3330;
    --teal-ink: #4fe0c7;
    --ok-50: #0f3324;   --ok-ink: #5fe0a4;
    --warn-50: #3a2a0d; --warn-ink: #fdb022;
    --bad-50: #3d1715;  --bad-ink: #fda29b;
    --none: #2a4558;    --none-ink: #a5b8c6; --none-50: #13303f;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 8px 24px -8px rgba(0, 0, 0, 0.6);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; line-height: 1.2; color: var(--heading); margin: 0; }
p { margin: 0; }
a { color: var(--primary); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 4px; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding-left: max(20px, env(safe-area-inset-left)); padding-right: max(20px, env(safe-area-inset-right)); }
svg.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; flex: 0 0 auto; }

/* Top bar and navigation, as on mypocketdoctor.com */
.topbar { background: var(--brand-600); color: #fff; font-size: 0.85rem; }
.topbar-row { display: flex; justify-content: space-between; gap: 12px; padding-top: 8px; padding-bottom: 8px; flex-wrap: wrap; }
.topbar a { color: #fff; font-weight: 600; text-decoration: none; }
.topbar a:hover { text-decoration: underline; }
.nav { background: var(--surface); border-bottom: 1px solid var(--line); }
.nav-row { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.logo img { display: block; height: 44px; width: auto; }
@media (prefers-color-scheme: dark) { .logo { background: #f8fafc; border-radius: 10px; padding: 4px 8px; } .logo img { height: 36px; } }
.nav-pill { background: var(--primary-50); color: var(--primary); font-weight: 600; font-size: 0.92rem; padding: 6px 14px; border-radius: 10px; }
.nav-cta { margin-left: auto; }
.btn { display: inline-flex; align-items: center; gap: 8px; font: 600 0.95rem/1 var(--sans); padding: 12px 20px; border-radius: 1rem; text-decoration: none; cursor: pointer; border: 2px solid transparent; }
.btn-primary { background: var(--brand-600); color: #fff; box-shadow: var(--shadow); }
.btn-primary:hover { background: var(--brand-700); box-shadow: var(--shadow-lg); }
@media (max-width: 640px) { .nav-cta { display: none; } .nav-pill { margin-left: auto; } .topbar-row span { display: none; } .topbar-row { justify-content: flex-end; } }

/* Hero: the website's deep navy-teal band with a two-line serif headline */
.hero {
  --accent: var(--teal);
  color: #fff;
  background:
    radial-gradient(900px 380px at 85% -10%, rgba(63, 216, 190, 0.18), transparent 60%),
    radial-gradient(700px 360px at 0% 110%, rgba(3, 130, 191, 0.35), transparent 60%),
    linear-gradient(135deg, #0b2a3c 0%, #01364f 55%, #024a6c 100%);
  padding: 72px 0 128px;
}
.hero.state-degraded { --accent: #fdb022; }
.hero.state-outage { --accent: #fd8a80; }
.hero.state-unknown { --accent: #b8cad6; }
.hero-inner { display: flex; flex-direction: column; gap: 18px; }
.hero-eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.12em; text-transform: uppercase; color: rgba(255, 255, 255, 0.78); }
.pulse { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 0 var(--accent); animation: pulse 2.4s ease-out infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 70% { box-shadow: 0 0 0 12px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero h1 { color: #fff; font-size: clamp(2.4rem, 6.4vw, 4.4rem); font-weight: 800; letter-spacing: -0.01em; text-wrap: balance; }
.hero h1 .accent { color: var(--accent); }
.hero-lede { max-width: 60ch; font-size: 1.08rem; color: rgba(255, 255, 255, 0.86); }

/* Stat cards overlapping the hero, like the website's numbers row */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: -72px; position: relative; }
.stat { background: var(--surface); border-radius: 1rem; box-shadow: var(--shadow-lg); padding: 22px 18px; text-align: center; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); }
.stat-value { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 700; color: var(--primary-600); font-variant-numeric: tabular-nums; line-height: 1.2; }
.stat-label { font-size: 0.88rem; color: var(--muted); font-weight: 500; }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; } }

/* Sections */
.main { display: flex; flex-direction: column; gap: 56px; padding-top: 64px; padding-bottom: 80px; }
.section { display: flex; flex-direction: column; gap: 24px; }
.section-head { text-align: center; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.section-head h2 { font-size: clamp(1.8rem, 3.6vw, 2.4rem); }
.section-head p { color: var(--muted); max-width: 60ch; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); }

/* Services */
.services { list-style: none; margin: 0; padding: 0; }
.service { padding: 22px 24px; border-top: 1px solid var(--line); display: grid; grid-template-columns: auto 1fr auto; gap: 6px 16px; align-items: center; }
.service:first-child { border-top: 0; }
.tile { width: 48px; height: 48px; border-radius: 12px; background: var(--teal-50); color: var(--teal-ink); display: grid; place-items: center; grid-row: span 2; }
.tile svg.icon { width: 22px; height: 22px; }
.service-name { font-weight: 600; font-size: 1.05rem; color: var(--heading); }
.service-desc { font-size: 0.9rem; color: var(--muted); grid-column: 2; }
.service .chip { grid-row: 1; grid-column: 3; justify-self: end; }
.service .uptime { grid-column: 1 / -1; margin-top: 12px; }
@media (max-width: 560px) {
  .service { grid-template-columns: auto 1fr; padding: 18px 16px; }
  .service .chip { grid-column: 2; grid-row: auto; justify-self: start; }
  .tile { grid-row: span 3; }
}

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 0.82rem; font-weight: 600; padding: 4px 12px; border-radius: 999px; white-space: nowrap; }
.chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }
.chip.operational, .chip.ok { color: var(--ok-ink); background: var(--ok-50); }
.chip.degraded, .chip.warn { color: var(--warn-ink); background: var(--warn-50); }
.chip.outage, .chip.bad { color: var(--bad-ink); background: var(--bad-50); }
.chip.unknown, .chip.none { color: var(--none-ink); background: var(--none-50); }

.bars { display: flex; gap: 3px; height: 34px; align-items: stretch; }
.bar { flex: 1 1 0; min-width: 2px; border-radius: 3px; background: var(--none); transition: transform 0.15s ease; }
.bar:hover { transform: scaleY(1.12); }
.bar.full { background: var(--ok); }
.bar.minor { background: var(--warn); }
.bar.major { background: var(--bad); }
.bars-foot { display: flex; justify-content: space-between; margin-top: 8px; font-size: 0.8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.bars-foot strong { color: var(--fg); font-weight: 600; }
@media (max-width: 640px) {
  .bar:nth-child(-n+60) { display: none; }
  .bars-foot .span90 { display: none; }
}
@media (min-width: 641px) { .bars-foot .span30 { display: none; } }

/* Data protection cards, like the website's service cards */
.protect-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
@media (max-width: 760px) { .protect-grid { grid-template-columns: 1fr; } }
.protect { padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.protect .tile { grid-row: auto; }
.protect h3 { font-size: 1.25rem; }
.protect p { color: var(--muted); font-size: 0.95rem; }
.protect .chip { align-self: flex-start; }

/* Incidents */
.incidents { display: flex; flex-direction: column; gap: 16px; }
.incident { padding: 20px 24px; border-left: 4px solid var(--warn); display: flex; flex-direction: column; gap: 10px; }
.incident.major { border-left-color: var(--bad); }
.incident.maintenance { border-left-color: var(--primary); }
.incident.closed { border-left-color: var(--line); }
.incident h3 { font-size: 1.2rem; }
.incident .meta { font-size: 0.88rem; color: var(--muted); }
.updates { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.updates li { display: flex; flex-direction: column; gap: 2px; padding-left: 14px; border-left: 2px solid var(--line); }
.updates .status { font-weight: 600; font-size: 0.88rem; color: var(--heading); }
.updates .msg { white-space: pre-wrap; overflow-wrap: anywhere; }

/* Footer */
.footer { background: var(--navy); color: #fff; }
.footer-row { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding-top: 36px; padding-bottom: 36px; }
.footer-brand { font-family: var(--serif); font-weight: 700; font-size: 1.4rem; }
.footer-muted { color: rgba(255, 255, 255, 0.72); font-size: 0.9rem; }
.footer a { color: var(--teal); font-weight: 600; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer-right { display: flex; flex-direction: column; gap: 6px; text-align: right; }
@media (max-width: 640px) { .footer-right { text-align: left; } }

@media (prefers-reduced-motion: reduce) { .pulse { animation: none; } .bar { transition: none; } }

/* Admin page */
.admin-main { display: flex; flex-direction: column; gap: 40px; padding-top: 40px; padding-bottom: 64px; }
.form { padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-size: 0.92rem; font-weight: 500; color: var(--heading); }
.form input[type="text"], .form textarea, .form select, .form input[type="datetime-local"] {
  font: inherit; font-weight: 400; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--fg);
}
.form textarea { min-height: 100px; resize: vertical; }
.form fieldset { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px 18px; }
.form fieldset label { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .form .two { grid-template-columns: 1fr; } }
button { font: 600 0.95rem/1 var(--sans); padding: 12px 20px; border-radius: 1rem; border: 0; background: var(--brand-600); color: #fff; cursor: pointer; align-self: flex-start; box-shadow: var(--shadow); }
button:hover { background: var(--brand-700); }
.notice { padding: 12px 16px; border-radius: 10px; background: var(--warn-50); color: var(--warn-ink); }
.notice.ok { background: var(--ok-50); color: var(--ok-ink); }
.admin-main h2 { font-size: 1.6rem; }
.small { font-size: 0.88rem; }
.muted { color: var(--muted); }
