:root {
  --brand: #0e7490;          /* clinical cyan */
  --brand-dark: #155e75;
  --brand-soft: #ecfeff;
  --accent: #ef4444;         /* medical red cross */
  --bg: #f1f5f9;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --border: #e2e8f0;
  --error: #b91c1c;
  --success: #166534;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans Arabic", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

[dir="rtl"] body { text-align: right; }

a { color: var(--brand); }
a:hover { color: var(--brand-dark); }

.container { max-width: 960px; margin: 0 auto; padding: 0 1.25rem; }

/* Top nav */
.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: white;
  padding: .75rem 1.25rem;
  border-bottom: 1px solid var(--border);
}
.nav .brand { font-weight: 700; color: var(--brand-dark); text-decoration: none; font-size: 1.1rem; }
.nav .links { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; }
.nav .links a { color: var(--text); text-decoration: none; font-size: .95rem; }
.nav .links a:hover { color: var(--brand); }
.nav .lang-toggle { background: none; border: 1px solid var(--border); border-radius: 6px; padding: .25rem .6rem; cursor: pointer; font-size: .85rem; color: var(--muted); }

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  padding: 4rem 0 3rem;
}
.hero h1 { font-size: 2.5rem; margin: 0 0 .5rem; }
.hero h1 .tag { opacity: .8; font-weight: 400; font-size: 1.25rem; }
.hero .lead { font-size: 1.125rem; opacity: .95; max-width: 520px; }

/* Cards / Forms */
.card {
  background: var(--card);
  border-radius: 12px;
  padding: 1.75rem;
  margin: 2rem auto;
  max-width: 460px;
  box-shadow: 0 4px 16px rgba(15, 23, 42, .06);
}
.card h2 { margin-top: 0; color: var(--brand-dark); }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .85rem; color: var(--muted); margin-bottom: .35rem; }
.field input {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: white;
}
.field input:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.btn {
  display: inline-block;
  background: var(--brand);
  color: white;
  border: none;
  padding: .7rem 1.25rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn:hover { background: var(--brand-dark); color: white; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn-block { display: block; width: 100%; text-align: center; }

.note { font-size: .9rem; color: var(--muted); margin-top: 1rem; text-align: center; }
.alert { padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1rem; font-size: .9rem; display: none; }
.alert.error   { background: #fee2e2; color: var(--error);   display: block; }
.alert.success { background: #dcfce7; color: var(--success); display: block; }

footer {
  margin-top: 3rem;
  padding: 1.5rem 0;
  color: var(--muted);
  text-align: center;
  border-top: 1px solid var(--border);
  background: white;
}

/* Wide cards for the edit-profile form */
.card-wide { max-width: 720px; }

.section { margin: 2rem 0; }
.section h3 { margin: 0 0 .25rem; color: var(--brand-dark); }
.section .hint { color: var(--muted); font-size: .9rem; margin-bottom: 1rem; }

textarea, select {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: white;
}
textarea { min-height: 90px; resize: vertical; }
.field textarea:focus, .field select:focus { outline: 2px solid var(--brand); outline-offset: 1px; }

.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 540px) { .row-2 { grid-template-columns: 1fr; } }

.radio-group { display: flex; gap: 1rem; }
.radio-group label { display: flex; align-items: center; gap: .35rem; font-size: .95rem; color: var(--text); }

.spec-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .75rem; }
@media (max-width: 540px) { .spec-grid { grid-template-columns: 1fr; } }
.spec-grid label { display: flex; align-items: center; gap: .5rem; padding: .35rem .5rem; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.spec-grid label:has(input:checked) { background: #ccfbf1; border-color: var(--brand); }

.avail-row {
  display: grid;
  grid-template-columns: 1.6rem 6rem 1fr 1fr;
  gap: .5rem;
  align-items: center;
  padding: .25rem 0;
}
.avail-row.disabled .time-input { opacity: .5; pointer-events: none; }
.time-input {
  padding: .4rem .5rem;
  border: 1px solid var(--border);
  border-radius: 6px;
  font: inherit;
}

.photo-row { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.profile-img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  border: 2px solid var(--border); background: #f1f5f9;
}
.profile-img.placeholder { display: flex; align-items: center; justify-content: center; color: var(--muted); font-size: 2rem; }

.btn-secondary {
  display: inline-block;
  background: white;
  color: var(--brand-dark);
  border: 1px solid var(--brand);
  padding: .5rem 1rem;
  border-radius: 8px;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}
.btn-secondary:hover { background: #ccfbf1; color: var(--brand-dark); }

.status-banner {
  padding: .75rem 1rem; border-radius: 8px; margin-bottom: 1.25rem;
  font-size: .92rem;
}
.status-banner.warn { background: #fef3c7; color: #854d0e; }
.status-banner.ok   { background: #dcfce7; color: var(--success); }

.docs-list { list-style: none; padding: 0; margin: 0; }
.docs-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .4rem 0; border-bottom: 1px solid var(--border); font-size: .92rem; }
.docs-list li:last-child { border-bottom: 0; }

/* ===== Admin ===== */
.card-full { max-width: 1140px; }

.stat-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: .75rem; margin-bottom: 1.5rem;
}
.stat-tile {
  background: #f1f5f9;
  border-radius: 10px;
  padding: 1rem;
  border: 1px solid var(--border);
}
.stat-tile .num { font-size: 1.75rem; font-weight: 700; color: var(--brand-dark); }
.stat-tile .label { color: var(--muted); font-size: .85rem; }

.tabs { display: flex; gap: .5rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; flex-wrap: wrap; }
.tab {
  background: none; border: none; padding: .65rem 1rem;
  border-bottom: 2px solid transparent;
  cursor: pointer; color: var(--muted); font: inherit; font-weight: 600;
}
.tab.active { color: var(--brand-dark); border-bottom-color: var(--brand); }

.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.tbl th, table.tbl td { padding: .65rem .55rem; text-align: start; border-bottom: 1px solid var(--border); vertical-align: top; }
table.tbl th { color: var(--muted); font-weight: 600; background: #f8fafc; position: sticky; top: 0; }
table.tbl tr:hover td { background: #f8fafc; }

.thumb {
  width: 36px; height: 36px; border-radius: 50%;
  object-fit: cover; border: 1px solid var(--border);
  background: #e2e8f0;
  display: inline-block; vertical-align: middle;
}

.pill {
  display: inline-block; padding: 2px 8px; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
}
.pill.green  { background: #dcfce7; color: var(--success); }
.pill.amber  { background: #fef3c7; color: #854d0e; }
.pill.red    { background: #fee2e2; color: var(--error); }
.pill.gray   { background: #e2e8f0; color: var(--muted); }

.btn-tiny { padding: .25rem .55rem; font-size: .82rem; border-radius: 6px; border: 1px solid var(--border); background: white; cursor: pointer; }
.btn-tiny.primary { background: var(--brand); color: white; border-color: var(--brand); }
.btn-tiny.danger  { background: white;       color: var(--error); border-color: var(--error); }
.btn-tiny:hover { filter: brightness(.95); }

.action-cell { display: flex; gap: .35rem; flex-wrap: wrap; }

/* ===== Landing page ===== */
.hero-search {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  padding: 4rem 0 3.5rem;
}
.hero-search h1 { font-size: 2.5rem; margin: 0 0 .5rem; }
.hero-search h1 .tag { opacity: .85; font-weight: 400; font-size: 1.2rem; }
.hero-search .lead { font-size: 1.1rem; opacity: .95; max-width: 620px; margin-bottom: 1.5rem; }
.search-bar {
  display: flex; gap: .5rem; flex-wrap: wrap;
  background: white; padding: .65rem;
  border-radius: 12px; max-width: 720px;
  box-shadow: 0 6px 20px rgba(15, 23, 42, .15);
}
.search-bar input, .search-bar select {
  flex: 1 1 180px; min-width: 140px;
  border: none; padding: .5rem .65rem; font: inherit; background: transparent;
  color: var(--text);
}
.search-bar input:focus, .search-bar select:focus { outline: 2px solid var(--brand); outline-offset: -2px; border-radius: 6px; }
.search-bar .btn { padding: .55rem 1.25rem; }

.section-title { text-align: center; margin: 2.5rem 0 1.25rem; color: var(--brand-dark); }

.specs-row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: .75rem; margin-bottom: 2rem;
}
.specs-row .pill-card {
  background: white; border: 1px solid var(--border); border-radius: 10px;
  padding: .8rem 1rem; text-align: center; font-weight: 600; color: var(--brand-dark);
  text-decoration: none;
}
.specs-row .pill-card:hover { border-color: var(--brand); background: #ccfbf1; }

.how-row {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem;
}
@media (max-width: 720px) { .how-row { grid-template-columns: 1fr; } }
.how-card {
  background: white; border-radius: 12px; padding: 1.25rem;
  border: 1px solid var(--border);
}
.how-card .step {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--brand); color: white; font-weight: 700;
  margin-bottom: .5rem;
}

.featured-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.nurse-card {
  background: white; border-radius: 12px; border: 1px solid var(--border);
  padding: 1rem; display: flex; flex-direction: column; gap: .5rem;
  text-decoration: none; color: var(--text);
  transition: transform .15s, box-shadow .15s;
}
.nurse-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(15, 23, 42, .08); border-color: var(--brand); }
.nurse-card .photo {
  width: 64px; height: 64px; border-radius: 50%;
  object-fit: cover; border: 2px solid var(--border);
  background: #e2e8f0;
}
.nurse-card .name { font-weight: 700; color: var(--brand-dark); }
.nurse-card .meta { color: var(--muted); font-size: .88rem; }
.nurse-card .specs { font-size: .82rem; color: var(--muted); margin-top: auto; }
.nurse-card .phone { font-size: .9rem; color: var(--text); margin-top: .35rem; direction: ltr; }
.nurse-card .actions { display: flex; gap: .4rem; margin-top: .5rem; flex-wrap: wrap; }
.nurse-card .actions .btn-tiny { flex: 1; min-width: 80px; text-align: center; text-decoration: none; padding: .4rem .6rem; }
.nurse-card .actions .btn-call { background: var(--brand); color: white; border-color: var(--brand); }
.nurse-card .actions .btn-wa   { background: #25d366;     color: white; border-color: #25d366; }

/* ===== Reviews ===== */
.stars { color: #f59e0b; letter-spacing: 1px; }
.stars .empty { color: #cbd5e1; }
.review-list { list-style: none; padding: 0; margin: 0; }
.review-list li { border-bottom: 1px solid var(--border); padding: .65rem 0; }
.review-list li:last-child { border-bottom: 0; }
.review-list .meta { color: var(--muted); font-size: .85rem; margin-top: .25rem; }
.star-input { display: inline-flex; gap: 4px; }
.star-input button {
  background: none; border: none; cursor: pointer; padding: 0;
  font-size: 1.5rem; color: #cbd5e1; transition: color .1s;
}
.star-input button.active, .star-input button:hover, .star-input button:hover ~ button.active { color: #f59e0b; }

.share-btn {
  background: #25d366; color: white; border: none;
  padding: .6rem 1.1rem; border-radius: 8px; font: inherit; font-weight: 600;
  cursor: pointer; text-decoration: none;
  display: inline-block;
}
.share-btn:hover { filter: brightness(.95); color: white; }

/* ===== Brand mark (logo image) ===== */
.brand-mark {
  display: inline-block;
  width: 32px; height: 32px;
  margin-inline-end: .5rem;
  vertical-align: middle;
  object-fit: contain;
}
.nav .brand { display: inline-flex; align-items: center; gap: 0; }

/* ===== Hero with illustration (healthcare theme) ===== */
.hero-medical {
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.18) 0, transparent 45%),
    linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
  color: white;
  padding: 3.5rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 1rem;
  align-items: center;
}
@media (max-width: 760px) { .hero-grid { grid-template-columns: 1fr; } .hero-illustration { display: none; } }
.hero-illustration { display: flex; justify-content: center; }
.hero-illustration svg { width: 100%; max-width: 320px; height: auto; }
.hero-illustration .hero-logo {
  width: 100%; max-width: 320px; height: auto;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,.18));
}

/* ===== Specializations card (icons) ===== */
.specs-row .pill-card {
  display: flex; align-items: center; gap: .55rem;
  text-align: start;
}
.specs-row .pill-card .icon { font-size: 1.25rem; line-height: 1; }

/* ===== How-it-works step icons ===== */
.how-card .step-icon {
  display: inline-flex; align-items: center; justify-content: center;
  width: 48px; height: 48px; border-radius: 12px;
  background: var(--brand-soft); color: var(--brand-dark);
  margin-bottom: .75rem;
}
.how-card .step-icon svg { width: 26px; height: 26px; }

/* Trust strip under the hero */
.trust-strip {
  background: white; border-bottom: 1px solid var(--border);
  padding: .9rem 0;
}
.trust-strip .container {
  display: flex; gap: 1.25rem; flex-wrap: wrap; justify-content: center;
  color: var(--muted); font-size: .9rem;
}
.trust-strip .item { display: flex; align-items: center; gap: .4rem; }
.trust-strip .item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }

/* ===== Subscription bundle picker ===== */
.bundle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .75rem;
  margin: 1rem 0;
}
.bundle-card {
  position: relative;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 1rem .9rem;
  background: white;
  cursor: pointer;
  text-align: center;
  transition: border-color .15s, transform .1s;
}
.bundle-card:hover { border-color: var(--brand); }
.bundle-card.selected { border-color: var(--brand-dark); background: var(--brand-soft); }
.bundle-card .name { font-weight: 700; color: var(--brand-dark); margin-bottom: .25rem; }
.bundle-card .total { font-size: 1.5rem; font-weight: 800; }
.bundle-card .per-month { color: var(--muted); font-size: .8rem; }
.bundle-card .save-badge {
  position: absolute; top: -10px; right: -8px;
  background: var(--accent); color: white;
  font-size: .72rem; font-weight: 700;
  padding: 3px 8px; border-radius: 999px;
}
.bundle-card input { position: absolute; opacity: 0; pointer-events: none; }
[dir="rtl"] .bundle-card .save-badge { right: auto; left: -8px; }

/* ===== 7-day views bar chart (pure CSS) ===== */
.views-chart {
  display: flex; align-items: flex-end; gap: 6px;
  height: 100px; margin-top: .5rem;
}
.views-chart .col {
  flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px;
  justify-content: flex-end;
}
.views-chart .bar {
  width: 100%; background: var(--brand);
  border-radius: 4px 4px 0 0;
  min-height: 2px;
  transition: height .3s;
}
.views-chart .label { font-size: .7rem; color: var(--muted); }
.views-chart .count { font-size: .72rem; color: var(--text); font-weight: 600; }

/* ===== Verification badges (used on cards + profile) ===== */
.badge-row { display: inline-flex; flex-wrap: wrap; gap: .3rem; margin-top: .25rem; }
.vbadge {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .72rem; font-weight: 600;
  padding: 2px 7px; border-radius: 999px;
  background: #ecfeff; color: var(--brand-dark);
  border: 1px solid #a5f3fc;
}
.vbadge.gold { background: #fef3c7; color: #854d0e; border-color: #fcd34d; }
.vbadge.green { background: #dcfce7; color: var(--success); border-color: #86efac; }
.vbadge::before { content: "✓"; font-weight: 800; }
.vbadge.gold::before { content: "★"; }

.cta-banner {
  background: linear-gradient(135deg, #0f766e, #134e4a);
  color: white; border-radius: 16px; padding: 2rem;
  margin: 3rem 0 1rem; text-align: center;
}
.cta-banner h2 { margin: 0 0 .5rem; }
.cta-banner p { opacity: .92; margin-bottom: 1.25rem; }
.cta-banner .btn { background: white; color: var(--brand-dark); }
.cta-banner .btn:hover { background: #f0fdfa; color: var(--brand-dark); }
.cta-banner .price-line { font-size: .92rem; opacity: .85; margin-top: .75rem; }

.faq details {
  background: white; border: 1px solid var(--border); border-radius: 8px;
  padding: .9rem 1rem; margin-bottom: .5rem;
}
.faq summary { cursor: pointer; font-weight: 600; color: var(--brand-dark); }
.faq p { color: var(--muted); margin: .5rem 0 0; }
