/* طب جو UI v3 — Medical Soft · fixed phone viewport */
@import url("../design-system/tokens.css?v=20260923c");

:root {
  /* Fallbacks if CDN serves stale tokens.css */
  --color-primary: #0e7490;
  --color-primary-soft: #0891b2;
  --color-primary-muted: #e0f7fa;
  --color-secondary: #67e8f9;
  --color-cta: #059669;
  --color-cta-hover: #047857;
  --color-bg: #f3f8f8;
  --color-surface: #ffffff;
  --color-text: #0f2f2c;
  --color-text-muted: #3f6864;
  --color-border: #d5e3e1;
  --color-danger: #b91c1c;
  --color-warning: #b45309;
  --color-featured: #ca8a04;
  --color-disabled-bg: #e5e7eb;
  --color-disabled-text: #9ca3af;
  --color-warning-bg: #fffbeb;
  --color-cta-soft-bg: #ecfdf5;
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  --radius: 18px;
  --radius-sm: 12px;
  --radius-lg: 24px;
  --radius-pill: 999px;
  --touch-min: 48px;
  --font-size-min: 16px;
  --shadow-sm: 0 2px 8px rgba(15, 47, 44, 0.06);
  --shadow-card: 0 8px 28px rgba(14, 116, 144, 0.12);
  --shadow-float: 0 12px 32px rgba(14, 116, 144, 0.22);
  --focus-ring: 0 0 0 3px rgba(14, 116, 144, 0.4);
  --motion-fast: 150ms;
  --motion-normal: 220ms;
  --motion-slow: 300ms;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-grad: linear-gradient(165deg, #0e7490 0%, #0891b2 55%, #5eead4 130%);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

body {
  margin: 0;
  background: #cfd9db;
  color: var(--color-text);
  font-size: var(--font-size-min);
  line-height: 1.55;
}

button,
a.btn,
.btn,
.choice,
.slot,
.chip-btn,
.day-pill,
.doc-card,
.place-card,
.seg-btn,
.lang,
.app-btm button,
.icon-btn {
  cursor: pointer;
  font: inherit;
  transition:
    background-color var(--motion-normal) var(--ease),
    border-color var(--motion-normal) var(--ease),
    color var(--motion-normal) var(--ease),
    box-shadow var(--motion-normal) var(--ease),
    transform var(--motion-fast) var(--ease);
}

button:focus-visible,
.btn:focus-visible,
.field:focus-visible,
input:focus-visible,
select:focus-visible,
.icon-btn:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
}

.ico {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.ico-sm {
  width: 18px;
  height: 18px;
}

/* —— Shell —— */
.ui-app {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  min-height: 100vh;
}

@media (max-width: 900px) {
  .ui-app {
    grid-template-columns: 1fr;
  }
  .ui-side .screen-list {
    display: none;
  }
  .ui-side .jump-wrap {
    display: block;
  }
}

.ui-side {
  background: var(--color-surface);
  border-inline-end: 1px solid var(--color-border);
  padding: var(--space-md);
  overflow: auto;
  overscroll-behavior: contain;
}

.ui-side h1 {
  margin: 0 0 var(--space-xs);
  font-size: 1.05rem;
  color: var(--color-primary);
}

.ui-side .sub {
  margin: 0 0 var(--space-md);
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.ui-side .group {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--color-text-muted);
  margin: var(--space-md) 0 var(--space-xs);
}

.ui-side .screen-list button {
  display: block;
  width: 100%;
  text-align: start;
  border: 0;
  background: transparent;
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius-sm);
  min-height: 44px;
  color: var(--color-text);
  font-size: 0.82rem;
  font-weight: 600;
}

.ui-side .screen-list button.on {
  background: var(--color-primary);
  color: #fff;
}

.ui-side .jump-wrap {
  display: none;
  margin-bottom: var(--space-md);
}

.ui-side .jump-wrap label {
  display: block;
  font-size: 0.75rem;
  font-weight: 700;
  margin-bottom: var(--space-xs);
  color: var(--color-text-muted);
}

.ui-side #jump {
  width: 100%;
  min-height: var(--touch-min);
  font: inherit;
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-sm);
  padding: 0.4rem 0.55rem;
  background: var(--color-surface);
}

.ui-main {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-md);
}

.ui-meta {
  font-size: 0.75rem;
  color: var(--color-text-muted);
  text-align: center;
}

.sizes {
  display: flex;
  gap: var(--space-sm);
}

.sizes button {
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 0.35rem 0.85rem;
  font-size: 0.78rem;
  font-weight: 700;
  min-height: 36px;
}

.sizes button.on {
  background: var(--color-primary);
  color: #fff;
  border-color: var(--color-primary);
}

/* —— Phone —— */
.phone {
  --pw: 390px;
  --ph: 780px;
  width: var(--pw);
  height: var(--ph);
  max-width: 100%;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 24px 56px rgba(15, 47, 44, 0.18);
  position: relative;
}

.phone.m {
  --pw: 390px;
  --ph: 780px;
}
.phone.t {
  --pw: 760px;
  --ph: 900px;
}
.phone.d {
  --pw: 1000px;
  --ph: 900px;
}

.screen {
  display: none !important;
  position: absolute;
  inset: 0;
  overflow: hidden;
  background: var(--color-bg);
}

.screen.show {
  display: flex !important;
  flex-direction: column;
}

.screen.has-btm .pad,
.screen.has-btm .scroll-body {
  padding-bottom: 96px;
}

/* Wireframe title bar — never show in UI preview */
.bar {
  display: none !important;
  height: 0 !important;
  overflow: hidden !important;
  margin: 0 !important;
  padding: 0 !important;
}

.pad {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.scroll-body {
  padding: 1rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* —— Header soft —— */
.hero-head {
  background: linear-gradient(165deg, #0e7490 0%, #0891b2 55%, #5eead4 130%);
  background: var(--header-grad);
  color: #fff;
  padding: 1.15rem 1.15rem 1.5rem;
  border-radius: 0 0 28px 28px;
  position: relative;
  flex: 0 0 auto;
}

.hero-head .row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}

.greet {
  margin: 0;
  font-size: 0.82rem;
  opacity: 0.92;
  font-weight: 500;
}

.greet .name {
  display: block;
  font-size: 1.22rem;
  font-weight: 800;
  margin-top: 0.2rem;
  letter-spacing: -0.01em;
}

.avatar-sm {
  width: 44px !important;
  height: 44px !important;
  max-width: 44px !important;
  border-radius: 50%;
  object-fit: cover !important;
  border: 2px solid rgba(255, 255, 255, 0.85);
  flex-shrink: 0;
}

.icon-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.icon-btn .dot {
  position: absolute;
  top: 10px;
  inset-inline-end: 10px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #f87171;
  border: 1.5px solid #fff;
}

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.85rem 1rem 0.35rem;
}

.page-head h2 {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
}

.back-btn {
  width: 44px;
  height: 44px;
  border: 0;
  border-radius: 50%;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  color: var(--color-text);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.lang-switch {
  display: flex;
  gap: 4px;
}

.lang-switch .lang {
  min-height: 36px;
  min-width: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
}

.lang-switch .lang.on {
  background: #fff;
  color: var(--color-primary);
}

.top-chrome-light {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  background: var(--color-surface);
}

.brand-mini {
  font-weight: 800;
  color: var(--color-primary);
  font-size: 0.95rem;
}

.logo {
  display: block;
  height: auto;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

.logo--sm {
  height: 32px;
  width: auto;
}

.logo--md {
  height: 44px;
  width: auto;
}

.logo--lg {
  height: 52px;
  width: auto;
  max-width: 220px;
}

.logo--mark {
  width: 56px;
  height: 56px;
}

.hub .logo--lg {
  height: 64px;
  max-width: 280px;
  margin: 0 auto 1rem;
}

.top-chrome-light .lang {
  background: var(--color-primary-muted);
  color: var(--color-primary);
}

.top-chrome-light .lang.on {
  background: var(--color-primary);
  color: #fff;
}

/* —— Welcome / splash —— */
.splash {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
  height: 100%;
  background: #0e7490;
  color: #fff;
  position: relative;
  overflow: hidden;
}

.splash-photo {
  position: absolute;
  inset: 0 0 38% 0;
  background-size: cover;
  background-position: center top;
}

.splash-photo::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(14, 116, 144, 0.35) 0%,
    rgba(14, 116, 144, 0.15) 35%,
    rgba(14, 116, 144, 0.55) 70%,
    #0e7490 100%
  );
}

.splash-brand {
  position: absolute;
  top: 1.35rem;
  left: 1rem;
  right: 1rem;
  z-index: 2;
  display: flex;
  justify-content: center;
  align-items: center;
}

.splash-brand .logo {
  height: 48px;
  width: auto;
  max-width: min(240px, 72%);
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.35));
}

.splash-body {
  margin-top: auto;
  position: relative;
  z-index: 1;
  flex: 0 0 auto;
  padding: 1.5rem 1.35rem 1.85rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.7rem;
  background: transparent;
  text-align: center;
}

.splash .brand {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.splash .logo--lg {
  height: 56px;
  max-width: 240px;
  margin-bottom: 0.15rem;
}

.splash-body h1 {
  margin: 0;
  font-size: 1.55rem;
  font-weight: 800;
  line-height: 1.35;
}

.splash-body p {
  margin: 0 auto;
  opacity: 0.92;
  font-size: 0.9rem;
  max-width: 22rem;
}

/* —— Buttons —— */
.btn {
  min-height: var(--touch-min);
  border-radius: var(--radius-pill);
  border: 0;
  font-weight: 700;
  padding: 0 1.25rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  text-decoration: none;
}

.btn.cta {
  background: var(--color-cta);
  color: #fff;
  box-shadow: 0 4px 14px rgba(5, 150, 105, 0.22);
}

.btn.cta:hover {
  background: var(--color-cta-hover);
}

.btn.primary {
  background: #fff;
  color: var(--color-primary);
}

.btn.primary-solid {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 8px 20px rgba(14, 116, 144, 0.28);
}

.btn.ghost {
  background: transparent;
  color: inherit;
  border: 1.5px solid rgba(255, 255, 255, 0.45);
}

.btn.outline {
  background: var(--color-surface);
  color: var(--color-primary);
  border: 1.5px solid var(--color-border);
}

.btn.danger {
  background: #fef2f2;
  color: var(--color-danger);
  border: 1.5px solid #fecaca;
}

.btn.block {
  width: 100%;
}

.btn.sm {
  min-height: 40px;
  padding: 0 1rem;
  font-size: 0.84rem;
}

.row-nav {
  display: flex;
  gap: var(--space-sm);
}

.row-nav .btn {
  flex: 1;
}

/* —— Forms —— */
.field {
  width: 100%;
  min-height: var(--touch-min);
  border: 1.5px solid var(--color-border);
  border-radius: var(--radius-pill);
  padding: 0.7rem 1.1rem;
  background: var(--color-surface);
  color: var(--color-text);
  font-size: 1rem;
  box-shadow: var(--shadow-sm);
}

.lbl {
  font-size: 0.82rem;
  font-weight: 700;
}

.mu {
  color: var(--color-text-muted);
  font-size: 0.88rem;
  margin: 0;
}

.step-hint {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
  margin: 0;
}

.crumb {
  font-size: 0.78rem;
  color: var(--color-text-muted);
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 0.4rem 0.85rem;
  box-shadow: var(--shadow-sm);
  align-self: flex-start;
}

/* —— Cards —— */
.card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  border: 0;
}

.appt-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  overflow: visible;
  box-shadow: var(--shadow-card);
}

.appt-lift {
  margin-top: -0.15rem;
}

.home-body {
  margin-top: -0.35rem;
}

.appt-card .appt-top {
  display: flex;
  gap: 0.85rem;
  padding: 1rem 1rem 0.85rem;
  align-items: center;
}

.appt-card .appt-top img {
  width: 56px !important;
  height: 56px !important;
  max-width: 56px !important;
  border-radius: 50%;
  object-fit: cover !important;
  flex-shrink: 0;
}

.appt-card .appt-meta {
  flex: 1;
  min-width: 0;
}

.appt-card .appt-meta strong {
  display: block;
  font-size: 1rem;
}

.appt-card .appt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: color-mix(in srgb, var(--color-primary) 12%, white);
  color: var(--color-primary);
  font-size: 0.82rem;
  font-weight: 700;
  border-radius: 0 0 var(--radius) var(--radius);
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 0.25rem 0 0;
  font-size: 1rem;
  font-weight: 800;
}

.section-title .link {
  border: 0;
  background: 0;
  color: var(--color-primary);
  font-weight: 700;
  font-size: 0.82rem;
}

/* —— Chips / specialty —— */
.chips-scroll {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0.15rem 0 0.45rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  min-height: 48px;
  align-items: center;
  flex-shrink: 0;
}

.chips-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.chip-btn {
  flex: 0 0 auto;
  min-height: 44px;
  height: 44px;
  padding: 0 1.05rem;
  border-radius: var(--radius-pill);
  border: 0;
  background: var(--color-surface);
  color: var(--color-text);
  font-weight: 700;
  font-size: 0.84rem;
  box-shadow: var(--shadow-sm);
  white-space: nowrap;
  line-height: 1;
}

.chip-btn.on {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(14, 116, 144, 0.3);
}

.choice {
  width: 100%;
  text-align: start;
  min-height: var(--touch-min);
  padding: 0.9rem 1.1rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-surface);
  font-weight: 700;
  color: var(--color-text);
  box-shadow: var(--shadow-card);
}

.choice:hover {
  box-shadow: var(--shadow-float);
}

/* —— Doctor cards —— */
.doc-card {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  width: 100%;
  text-align: start;
  padding: 0.9rem;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}

.doc-card img {
  width: 64px !important;
  height: 64px !important;
  max-width: 64px !important;
  border-radius: 18px;
  object-fit: cover !important;
  flex-shrink: 0;
}

.doc-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.doc-name {
  font-weight: 800;
  font-size: 0.98rem;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.doc-line {
  font-size: 0.84rem;
  font-weight: 600;
}

.doc-meta-line {
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.star {
  color: var(--color-featured);
  font-size: 0.8rem;
  font-weight: 800;
}

.badge-feat {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: var(--radius-pill);
  background: #fef9c3;
  color: #a16207;
  font-size: 0.7rem;
  font-weight: 800;
}

.chev {
  color: var(--color-text-muted);
}

.docs-h {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  overflow-y: visible;
  padding: 0.15rem 0 0.65rem;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  flex-shrink: 0;
  min-height: 168px;
  align-items: stretch;
}

.docs-h::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.doc-mini {
  flex: 0 0 140px;
  flex-shrink: 0;
  border: 0;
  border-radius: var(--radius);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  padding: 0.85rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.doc-mini img {
  width: 72px !important;
  height: 72px !important;
  max-width: 72px !important;
  border-radius: 50%;
  object-fit: cover !important;
  margin: 0 auto 0.45rem;
}

.doc-mini strong {
  display: block;
  font-size: 0.85rem;
}

.doc-mini span {
  font-size: 0.75rem;
  color: var(--color-text-muted);
}

/* —— Profile —— */
.profile-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.55rem;
  padding: 0.5rem 0 0.25rem;
}

.profile-hero img {
  width: 96px !important;
  height: 96px !important;
  max-width: 96px !important;
  border-radius: 50%;
  object-fit: cover !important;
  box-shadow: var(--shadow-card);
  border: 3px solid #fff;
  flex-shrink: 0;
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.stat {
  background: var(--color-surface);
  border-radius: var(--radius-sm);
  padding: 0.7rem 0.4rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.stat strong {
  display: block;
  font-size: 0.95rem;
  color: var(--color-primary);
}

.stat span {
  font-size: 0.68rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

.chips {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  justify-content: center;
}

.chip {
  border-radius: var(--radius-pill);
  padding: 0.3rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--color-primary-muted);
  color: var(--color-primary);
}

.place-card {
  text-align: start;
  border: 0;
  border-radius: var(--radius);
  padding: 1rem;
  background: var(--color-surface);
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  width: 100%;
  box-shadow: var(--shadow-card);
}

.place-card.on {
  outline: 2px solid var(--color-cta);
}

.place-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.place-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 0.35rem 0 0.65rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--color-text-muted);
}

.place-facts span {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--color-primary-muted);
  color: var(--color-primary);
  padding: 0.3rem 0.7rem;
  border-radius: var(--radius-pill);
}

.map-ph {
  height: 96px;
  border-radius: var(--radius-sm);
  background:
    linear-gradient(135deg, rgba(14, 116, 144, 0.15), rgba(5, 150, 105, 0.12)),
    url("assets/hero-banner.jpg") center/cover;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* —— Calendar / slots —— */
.days-scroll {
  display: flex;
  gap: 0.45rem;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 0.35rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.days-scroll::-webkit-scrollbar {
  display: none;
  width: 0;
  height: 0;
}

.day-pill {
  flex: 0 0 56px;
  height: 68px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--color-text-muted);
}

.day-pill strong {
  font-size: 1.05rem;
  color: var(--color-text);
}

.day-pill.on {
  background: var(--color-primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(14, 116, 144, 0.3);
}

.day-pill.on strong {
  color: #fff;
}

.slots {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
}

.slot {
  min-height: 48px;
  border: 0;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  font-weight: 700;
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.slot.on {
  background: var(--color-cta);
  color: #fff;
  box-shadow: 0 6px 16px rgba(5, 150, 105, 0.28);
}

.scope-card {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  box-shadow: var(--shadow-card);
}

/* —— Status / booking —— */
.badge,
.status {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.72rem;
  font-weight: 700;
}

.status-confirmed {
  background: var(--color-cta-soft-bg);
  color: var(--color-cta);
}
.status-pending {
  background: var(--color-warning-bg);
  color: var(--color-warning);
}
.status-needs {
  background: var(--color-primary-muted);
  color: var(--color-primary);
}
.status-cancelled {
  background: #fef2f2;
  color: var(--color-danger);
}
.status-done {
  background: #eef2f1;
  color: var(--color-text-muted);
}

.booking-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.5rem;
}

.banner {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 0;
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: var(--shadow-sm);
  text-align: start;
  width: 100%;
}

.banner.tap:active {
  transform: scale(0.99);
}

.center {
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  align-items: center;
  padding: 1rem 0;
}

.brand {
  font-size: 1.75rem;
  font-weight: 800;
  color: #fff;
}

.ok {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  border: 0;
  background: var(--color-cta-soft-bg);
  color: var(--color-cta);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  font-weight: 800;
  box-shadow: var(--shadow-card);
}

.seg {
  display: flex;
  gap: 0.35rem;
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  padding: 0.3rem;
  box-shadow: var(--shadow-sm);
}

.seg-btn {
  flex: 1;
  min-height: 40px;
  border: 0;
  border-radius: var(--radius-pill);
  background: transparent;
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--color-text-muted);
}

.seg-btn.on {
  background: var(--color-primary);
  color: #fff;
}

.hidden {
  display: none !important;
}

.progress {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 8px 14px;
  background: var(--color-cta-soft-bg);
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.progress .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-border);
}

.progress .dot.done {
  background: var(--color-primary);
}

.progress .dot.on {
  background: var(--color-cta);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
}

.prog-lbl {
  font-size: 0.65rem;
  color: var(--color-text-muted);
  margin-inline-start: auto;
  font-weight: 600;
}

.cal-block {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  font-size: 0.84rem;
  font-weight: 600;
  background: var(--color-surface);
  box-shadow: var(--shadow-sm);
}

.cal-block.avail {
  background: var(--color-cta-soft-bg);
  color: var(--color-cta);
}

.cal-block.booked {
  background: var(--color-primary-muted);
  color: var(--color-primary);
}

.cal-block.unavail {
  background: #f1f5f4;
  color: var(--color-text-muted);
}

.cal-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--color-text-muted);
}

.cal-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  border-radius: 3px;
  margin-inline-end: 4px;
  vertical-align: middle;
}

.cal-legend .lg-a {
  background: var(--color-cta);
}
.cal-legend .lg-b {
  background: var(--color-primary);
}
.cal-legend .lg-u {
  background: #94a3b8;
}

.week-bar {
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.week-bar .chip {
  cursor: pointer;
  font: inherit;
  border: 0;
}

.week-bar .chip.on {
  background: var(--color-primary);
  color: #fff;
}

/* —— Floating bottom nav —— */
.app-btm {
  display: flex;
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  height: 64px;
  background: var(--color-surface);
  border-radius: var(--radius-pill);
  box-shadow: var(--shadow-float);
  z-index: 8;
  padding: 0 0.35rem;
  border: 0;
}

.app-btm.hidden {
  display: none !important;
}

.app-btm button {
  flex: 1;
  border: 0;
  background: transparent;
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  border-radius: var(--radius-pill);
}

.app-btm button.on {
  color: var(--color-primary);
}

.app-btm button.on .ico {
  stroke: var(--color-primary);
}

.app-btm.clinic-nav button.on {
  color: var(--color-cta);
}

/* Hub */
.hub {
  max-width: 28rem;
  margin: 0 auto;
  padding: var(--space-2xl) var(--space-md);
  text-align: center;
}

.hub h1 {
  color: var(--color-primary);
  font-size: clamp(2rem, 6vw, 2.75rem);
  margin: 0 0 var(--space-sm);
}

.hub .lead {
  color: var(--color-text-muted);
  margin: 0 0 var(--space-xl);
}

.hub .actions {
  display: grid;
  gap: var(--space-sm);
}

.hub a.btn {
  text-decoration: none;
}

.otp-boxes {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

.otp-boxes .field {
  width: 52px;
  text-align: center;
  padding: 0;
  font-size: 1.25rem;
  letter-spacing: 0;
  border-radius: var(--radius-sm);
}

.big {
  font-size: 1.15rem;
  color: var(--color-primary);
  font-weight: 800;
}

/* —— Layout helpers —— */
.stack {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
}

.stack > .stack {
  gap: 0.85rem;
}

.page-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 800;
}

.greet-wrap {
  min-width: 0;
  flex: 1;
}

.lang-pill {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary);
  background: var(--color-primary-muted);
  padding: 0.35rem 0.75rem;
  border-radius: var(--radius-pill);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.field.search {
  background-image: none;
  padding-inline-start: 1.1rem;
}

.card.soft {
  background: var(--color-primary-muted);
  box-shadow: none;
}

.card.booking-card,
.pending-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}

.tap-card {
  border: 0;
  font: inherit;
  color: inherit;
  cursor: pointer;
}

.home-body {
  margin-top: 0;
}

.icon-btn.light {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: var(--shadow-sm);
}

.badge-count {
  position: absolute;
  top: 6px;
  inset-inline-end: 6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: #ef4444;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid #fff;
  line-height: 1;
}

.badge-count.static {
  position: static;
  border: 0;
  margin-inline-start: auto;
}

.icon-btn .dot {
  display: none;
}

/* Notifications list */
.notif-item {
  display: flex;
  gap: 0.75rem;
  width: 100%;
  text-align: start;
  border: 0;
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius);
  padding: 0.95rem 1rem;
  color: inherit;
  font: inherit;
}

.notif-item.unread {
  outline: 2px solid color-mix(in srgb, var(--color-primary) 35%, transparent);
}

.notif-ico {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-primary-muted);
  color: var(--color-primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-body {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  min-width: 0;
  flex: 1;
}

.notif-time {
  font-size: 0.72rem;
  color: var(--color-text-muted);
  font-weight: 600;
}

/* Month navigation (p6 / clinic cal) */
.month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 0.45rem 0.55rem;
  box-shadow: var(--shadow-sm);
}

.month-label {
  text-align: center;
  flex: 1;
  min-width: 0;
}

.month-label strong {
  display: block;
  font-size: 0.98rem;
}

.day-pill.far {
  border: 1.5px dashed var(--color-border);
  background: color-mix(in srgb, var(--color-primary-muted) 50%, white);
}

.day-pill {
  min-width: 58px;
}

/* Clinic */
.clinic-switch {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.postpone-box {
  background: var(--color-surface);
  border-radius: var(--radius);
  padding: 1rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.toast {
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  box-shadow: var(--shadow-float);
}

.toast.warn {
  background: var(--color-warning-bg);
  color: var(--color-warning);
  border: 1px solid #fcd34d;
}

.toast[hidden] {
  display: none !important;
}

.toast.show {
  display: block !important;
  animation: toast-in 220ms var(--ease);
}

@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
