@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn-Regular.ttf") format("truetype");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Vazirmatn";
  src: url("/fonts/Vazirmatn-Bold.ttf") format("truetype");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #e9f3f4;
  --text: #17272d;
  --muted: #60737a;
  --line: #d8e2e5;
  --accent: #087f8c;
  --accent-strong: #07636d;
  --success: #16865b;
  --warning: #a86608;
  --danger: #b13a3a;
  --shadow: 0 12px 34px rgba(23, 39, 45, 0.09);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111719;
  --surface: #1b2427;
  --surface-soft: #203236;
  --text: #f2f6f7;
  --muted: #a9babf;
  --line: #334348;
  --accent: #48b9c4;
  --accent-strong: #77d2da;
  --success: #56c695;
  --warning: #e8ae56;
  --danger: #ef8585;
  --shadow: 0 12px 34px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 280px;
  background: var(--bg);
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Vazirmatn", Tahoma, sans-serif;
  font-size: 15px;
  letter-spacing: 0;
}

.app-shell {
  width: min(100%, 720px);
  min-height: 100vh;
  margin: 0 auto;
  padding: max(18px, env(safe-area-inset-top)) 16px max(18px, env(safe-area-inset-bottom));
}

.brand {
  display: flex;
  min-height: 60px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 2px 14px;
}

.brand-name,
.brand-meta,
.eyebrow,
h1,
footer {
  margin: 0;
}

.brand-name {
  font-size: 22px;
  font-weight: 700;
}

.brand-meta {
  margin-top: 2px;
  color: var(--muted);
  font-size: 13px;
}

.brand-badge {
  display: inline-flex;
  width: 48px;
  height: 28px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--accent-strong);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 12px;
  font-weight: 700;
}

.medical-visual {
  height: clamp(128px, 25vh, 190px);
  margin: 0 0 14px;
  overflow: hidden;
  border-radius: 8px;
  background: #c9eef0;
}

.medical-visual img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: 72% 52%;
}

.status-panel {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.status-heading {
  display: flex;
  min-height: 92px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 700;
}

h1 {
  margin-top: 4px;
  font-size: 20px;
  line-height: 1.4;
}

.overall-status {
  max-width: 160px;
  padding: 7px 10px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.overall-status.is-success {
  background: color-mix(in srgb, var(--success) 14%, var(--surface));
  color: var(--success);
}

.overall-status.is-warning {
  background: color-mix(in srgb, var(--warning) 14%, var(--surface));
  color: var(--warning);
}

.overall-status.is-danger {
  background: color-mix(in srgb, var(--danger) 14%, var(--surface));
  color: var(--danger);
}

.check-list {
  margin: 0;
}

.check-row {
  display: grid;
  min-height: 58px;
  grid-template-columns: minmax(0, 1fr) minmax(110px, auto);
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--line);
}

.check-row:last-child {
  border-bottom: 0;
}

.check-row dt,
.check-row dd {
  min-width: 0;
  margin: 0;
}

.check-row dt {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 700;
}

.check-row dd {
  overflow-wrap: anywhere;
  color: var(--muted);
  font-size: 13px;
  text-align: left;
}

.status-dot {
  width: 10px;
  height: 10px;
  flex: 0 0 10px;
  border-radius: 50%;
  background: var(--line);
}

.status-dot.is-success {
  background: var(--success);
}

.status-dot.is-warning {
  background: var(--warning);
}

.status-dot.is-danger {
  background: var(--danger);
}

footer {
  padding: 16px 2px 0;
  color: var(--muted);
  direction: ltr;
  font-size: 12px;
  text-align: center;
}

@media (max-width: 420px) {
  .app-shell {
    padding-inline: 12px;
  }

  .status-heading {
    align-items: flex-start;
  }

  .overall-status {
    max-width: 130px;
  }

  .check-row {
    grid-template-columns: minmax(0, 1fr) minmax(88px, auto);
    padding-inline: 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
  }
}
