/* طبگر - سایت عمومی (بدون کتابخانه خارجی برای سرعت بارگذاری بهتر) */
:root {
  --brand: #0e7490;
  --brand-2: #2563eb;
  --brand-dark: #155e75;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg: #ffffff;
  --bg-alt: #f1f7fa;
  --card: #ffffff;
  --radius: 18px;
  --shadow: 0 10px 30px -12px rgba(15, 23, 42, .18);
  --font: "Vazirmatn", "Vazir", IRANSans, "Segoe UI", Tahoma, system-ui, sans-serif;
  color-scheme: light;
}
/* Dark theme: chosen with the theme button (html.dark), or the system setting when nothing was chosen */
:root.dark {
  --ink: #f1f5f9; --text: #cbd5e1; --muted: #94a3b8; --line: #1e293b;
  --bg: #0b1220; --bg-alt: #0f1a2c; --card: #111c30; --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --brand: #22a6c3; color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not(.light) {
    --ink: #f1f5f9; --text: #cbd5e1; --muted: #94a3b8; --line: #1e293b;
    --bg: #0b1220; --bg-alt: #0f1a2c; --card: #111c30; --shadow: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --brand: #22a6c3; color-scheme: dark;
  }
}
:root.dark .hero-art { opacity: .94; }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; overflow-x: hidden; }
body {
  margin: 0; font-family: var(--font); color: var(--text); background: var(--bg);
  line-height: 1.95; font-size: 16px; font-weight: 400;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  transition: background-color .2s, color .2s;
  font-feature-settings: "ss01" 1, "tnum" 1;
  -webkit-font-feature-settings: "ss01" 1, "tnum" 1;
  font-variant-numeric: tabular-nums;
  overflow-x: hidden;
  max-width: 100vw;
}
button, input, select, textarea {
  font-family: inherit;
  font-feature-settings: "ss01" 1, "tnum" 1;
  -webkit-font-feature-settings: "ss01" 1, "tnum" 1;
  font-variant-numeric: tabular-nums;
}
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { color: var(--ink); line-height: 1.55; margin: 0 0 .6em; letter-spacing: -.005em; }
h1 { font-size: clamp(1.75rem, 3.6vw, 2.7rem); font-weight: 850; line-height: 1.45; }
h2 { font-size: clamp(1.3rem, 2.4vw, 1.75rem); font-weight: 800; }
h3 { font-size: 1.06rem; font-weight: 700; }
strong, b { font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 20px; }
.center { text-align: center; }
.skip { position: absolute; right: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { right: 8px; }
:focus-visible { outline: 3px solid #38bdf8; outline-offset: 2px; border-radius: 6px; }

/* buttons */
.btn { white-space: nowrap; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 12px; font-weight: 700; font-family: inherit; font-size: .95rem; border: 2px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s; text-decoration: none !important; }
.btn:hover { transform: translateY(-1px); }
.btn-sm { padding: 7px 14px; font-size: .85rem; border-radius: 10px; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; box-shadow: 0 8px 20px -8px rgba(14, 116, 144, .7); }
.btn-outline { border-color: var(--brand); color: var(--brand); background: transparent; }
.btn-light { background: #fff; color: var(--brand-dark); }
.btn-ghost-light { border-color: rgba(255, 255, 255, .7); color: #fff; }
.btn[disabled] { opacity: .6; cursor: wait; transform: none; }

/* header */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.header-row { display: flex; align-items: center; justify-content: space-between; gap: 18px; min-height: 68px; }
.logo { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; flex-shrink: 0; white-space: nowrap; margin-left: 14px; }
.logo span { display: flex; flex-direction: column; line-height: 1.3; white-space: nowrap; }
.logo b { font-size: 1.25rem; white-space: nowrap; }
.logo small { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.main-nav { display: flex; align-items: center; gap: 3px; flex-shrink: 0; }
.main-nav > a { white-space: nowrap; color: var(--text); padding: 7px 10px; border-radius: 10px; font-size: .89rem; font-weight: 600; }
.main-nav > a:hover, .main-nav > a[aria-current="page"] { background: var(--bg-alt); color: var(--brand); text-decoration: none; }
.nav-login { display: flex; gap: 8px; margin-right: 10px; flex-shrink: 0; }
.header-tools { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.support-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .82rem; font-weight: 700; color: var(--brand); padding: 6px 10px; border-radius: 999px; background: var(--bg-alt); white-space: nowrap; }
.support-pill:hover { text-decoration: none; filter: brightness(.97); }
.theme-btn { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.theme-btn:hover { border-color: var(--brand); color: var(--brand); }
.theme-btn .sun { display: none; }
:root.dark .theme-btn .sun { display: block; }
:root.dark .theme-btn .moon { display: none; }
@media (max-width: 1300px) {
  .support-pill .label { display: none; }
  .main-nav > a { padding: 6px 8px; font-size: .84rem; }
  .nav-login { margin-right: 6px; gap: 6px; }
  .nav-login .btn { padding: 6px 10px; font-size: .8rem; }
}
@media (max-width: 480px) { .support-pill { width: 40px; height: 40px; padding: 0; justify-content: center; border-radius: 12px; } .support-pill span { display: none; } }
.menu-btn { display: none; background: none; border: 0; padding: 10px; cursor: pointer; }
.menu-btn span { display: block; width: 22px; height: 2px; background: var(--ink); margin: 5px 0; border-radius: 2px; }
@media (max-width: 1160px) {
  .menu-btn { display: block; }
  .main-nav { display: none; position: absolute; top: 68px; right: 0; left: 0; flex-direction: column; align-items: stretch; background: var(--bg); border-bottom: 1px solid var(--line); padding: 12px 16px 18px; box-shadow: var(--shadow); z-index: 60; }
  .main-nav.open { display: flex; }
  .main-nav > a { padding: 10px 14px; font-size: .95rem; }
  .nav-login { margin: 8px 0 0; }
  .nav-login .btn { flex: 1; }
  .logo small { display: none; }
}

.crumbs { padding-top: 18px; font-size: .85rem; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* hero */
.hero { background: radial-gradient(1200px 500px at 85% -10%, rgba(37, 99, 235, .12), transparent), radial-gradient(900px 500px at 0% 0%, rgba(14, 116, 144, .14), transparent); padding: 56px 0 64px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; background: var(--bg-alt); color: var(--brand); font-weight: 700; font-size: .82rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
.grad { background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lead { font-size: 1.08rem; color: var(--muted); }
.hero-art { width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(15, 23, 42, .15)); }
.hero-note { margin-top: 14px; font-weight: 600; }
.login-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-top: 26px; }
.login-card { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important; transition: transform .15s, border-color .15s; }
.login-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.login-card .ic { flex: none; width: 44px; height: 44px; padding: 10px; border-radius: 12px; }
.login-card.inplace .ic { background: linear-gradient(135deg, #10b981, #059669); color: #fff; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.login-card.doctor .ic { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; }
.login-card.secretary .ic { background: #ede9fe; color: #6d28d9; }
.login-card.patient .ic { background: #dcfce7; color: #15803d; }
[data-theme="dark"] .login-card.secretary .ic { background: rgba(147, 51, 234, 0.2); color: #c084fc; }
[data-theme="dark"] .login-card.patient .ic { background: rgba(16, 185, 129, 0.2); color: #34d399; }
.login-card span { display: flex; flex-direction: column; line-height: 1.5; }
.login-card small { color: var(--muted); font-size: .8rem; }
.inplace-tag { background: var(--card); border: 1px solid var(--line); padding: 3px 10px; border-radius: 999px; color: var(--ink); text-decoration: none !important; transition: all .15s ease; font-weight: 500; }
.inplace-tag:hover { border-color: #10b981; color: #10b981; background: rgba(16, 185, 129, 0.08); transform: translateY(-1px); }
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-art { max-width: 520px; margin: 0 auto; }
  .hero { padding-top: 28px; }
}
@media (max-width: 480px) { .login-cards { grid-template-columns: 1fr; } }

.page-hero { background: linear-gradient(180deg, var(--bg-alt), var(--bg)); padding: 34px 0 30px; }
.big-404 { font-size: 5rem; font-weight: 900; margin: 0; background: linear-gradient(135deg, var(--brand), var(--brand-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* sections */
.section { padding: 56px 0; }
.section.alt { background: var(--bg-alt); }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 34px; }
.section-head p { color: var(--muted); }
.grid { display: grid; gap: 18px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 960px) { .grid-3 { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .grid-3 { grid-template-columns: 1fr; } }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); }
.feature p { color: var(--muted); font-size: .93rem; margin: 0; }
.feature-icon { display: inline-flex; width: 46px; height: 46px; border-radius: 14px; align-items: center; justify-content: center; background: var(--bg-alt); color: var(--brand); margin-bottom: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.checks { list-style: none; padding: 0; margin: 0; }
.checks li { position: relative; padding-right: 30px; margin-bottom: 10px; }
.checks li::before { content: "✓"; position: absolute; right: 0; top: 2px; width: 22px; height: 22px; border-radius: 50%; background: #dcfce7; color: #15803d; font-weight: 800; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.steps li { counter-increment: s; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; position: relative; }
.steps li::before { content: counter(s, persian); display: flex; width: 38px; height: 38px; border-radius: 12px; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; font-weight: 800; margin-bottom: 10px; }
.steps p { color: var(--muted); margin: 6px 0 0; font-size: .93rem; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
.prose { max-width: 860px; }
.prose h2 { margin-top: 1.6em; font-size: 1.3rem; }
.prose ul { padding-right: 1.2em; }

/* faq */
.faq { max-width: 860px; margin: 0 auto; display: grid; gap: 10px; }
.faq-item { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 4px 18px; }
.faq-item summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--brand); font-weight: 700; }
.faq-item[open] summary::after { content: "−"; }
.faq-item summary h3 { margin: 0; font-size: 1rem; }
.faq-item p { color: var(--muted); }

/* cta */
.cta-band { background: linear-gradient(135deg, var(--brand-dark), var(--brand-2)); color: #e0f2fe; padding: 52px 0; text-align: center; }
.cta-band h2 { color: #fff; }
.actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; margin-top: 18px; }

/* contact */
.contact-form label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: 14px; color: var(--ink); }
.contact-form input, .contact-form select, .contact-form textarea { display: block; width: 100%; margin-top: 6px; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(14, 116, 144, .18); }
.contact-form .hp { position: absolute; right: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 12px 0 0; font-weight: 700; }
.form-status.ok { color: #15803d; }
.form-status.err { color: #dc2626; }
.contact-list { list-style: none; padding: 0; }
.contact-list li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--line); }
.contact-list span { min-width: 110px; color: var(--muted); }

/* footer */
.support-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 10px 18px; margin-top: 18px; font-weight: 700; }
.support-band a { color: #fff; font-size: 1.25rem; direction: ltr; }
.site-footer { background: #0b1220; color: #94a3b8; padding: 44px 0 0; font-size: .92rem; }
.site-footer .logo { color: #fff; margin-bottom: 12px; }
.site-footer h2 { color: #fff; font-size: 1rem; margin: 0 0 10px; }
.site-footer a { color: #cbd5e1; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 18px; }
.site-footer li { margin-bottom: 6px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr auto; gap: 28px; align-items: start; }
@media (max-width: 960px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
.footer-trust { display: flex; flex-direction: column; align-items: flex-start; }
.enamad-wrap { background: #ffffff; border-radius: 14px; padding: 6px; display: inline-flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,0.25); min-width: 95px; min-height: 95px; }
.enamad-wrap img { max-width: 105px; height: auto; display: block; border-radius: 8px; }
.copyright { border-top: 1px solid #1e293b; margin-top: 24px; padding: 16px; text-align: center; font-size: .82rem; }
@media (max-width: 580px) {
  .site-footer { padding: 22px 0 0; font-size: .8rem; }
  .site-footer .logo { margin-bottom: 6px; }
  .site-footer p { margin: 0 0 8px; line-height: 1.55; }
  .site-footer h2 { font-size: .86rem; margin: 0 0 6px; }
  .site-footer ul { margin: 0 0 10px; }
  .site-footer li { margin-bottom: 0; }
  .footer-grid { grid-template-columns: 1fr auto; gap: 14px 12px; }
  .footer-grid > div:first-child,
  .footer-grid > nav { grid-column: 1 / -1; }
  .footer-grid > nav ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 5px 12px; }
  .footer-grid > div:nth-child(3) ul:first-of-type { display: flex; flex-wrap: wrap; gap: 4px 12px; }
  .footer-grid > div:nth-child(3) ul:nth-of-type(2) { display: flex; flex-direction: column; gap: 3px; }
  .footer-trust { align-items: center; justify-self: end; text-align: center; }
  .enamad-wrap { min-width: 76px; min-height: 76px; padding: 4px; border-radius: 10px; }
  .enamad-wrap img { max-width: 74px; }
  .copyright { margin-top: 14px; padding: 12px; font-size: .76rem; }
}

/* patient portal */
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: .82rem; }
.btn-block { width: 100%; }
.portal { background: var(--bg-alt); min-height: 100vh; }
.portal-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.portal-action-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  white-space: nowrap;
}
.portal-action-btn .btn-icon {
  font-size: 1.05rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.portal-action-btn .btn-icon svg {
  width: 17px;
  height: 17px;
  display: block;
}

@media (max-width: 768px) {
  .header-row {
    gap: 8px;
  }
  .portal-actions {
    gap: 5px;
  }
  .portal-action-btn {
    padding: 0 !important;
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
    justify-content: center;
    flex-shrink: 0;
  }
  .portal-action-btn .btn-label {
    display: none !important;
  }
  .portal-action-btn .btn-icon {
    font-size: 1.15rem;
  }
  .theme-btn {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 12px;
    flex-shrink: 0;
  }
}

@media (max-width: 480px) {
  .wrap {
    padding: 0 12px;
  }
  .header-row {
    min-height: 56px;
    gap: 4px;
  }
  .logo {
    gap: 6px;
    margin-left: 4px;
  }
  .logo img {
    width: 30px;
    height: 30px;
  }
  .logo b {
    font-size: 1.1rem;
  }
  .portal-actions {
    gap: 4px;
  }
  .portal-action-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
  }
  .portal-action-btn .btn-icon {
    font-size: 1.05rem;
  }
  .portal-action-btn .btn-icon svg {
    width: 15px;
    height: 15px;
  }
  .theme-btn {
    width: 34px;
    height: 34px;
    min-width: 34px;
    border-radius: 10px;
  }
  .theme-btn svg {
    width: 18px;
    height: 18px;
  }
}
.portal-main { padding-top: 28px; padding-bottom: 48px; }
.portal-login { max-width: 420px; margin: 20px auto; text-align: center; }
.portal-login form { text-align: right; margin: 18px 0; }
.portal-login label { display: block; font-weight: 700; font-size: .9rem; color: var(--ink); margin-bottom: 6px; }
.portal-login input { width: 100%; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; text-align: center; font-size: 1.05rem; margin-bottom: 8px; }
.portal-login input:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px rgba(14, 116, 144, .18); }
.portal-logo { display: block; margin: 0 auto 8px; }
.code-input { letter-spacing: .6em; font-size: 1.4rem !important; font-family: ui-monospace, Consolas, monospace; }
.row-between { display: flex; justify-content: space-between; margin-bottom: 8px; }
.link-btn { background: none; border: 0; color: var(--brand); font: inherit; font-size: .85rem; font-weight: 700; cursor: pointer; padding: 4px 0; }
.link-btn[disabled] { color: var(--muted); cursor: default; }
.portal-hello { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: 18px; }
.portal-hello h1 { font-size: 1.4rem; margin: 0; }
.portal-hello p { margin: 0; }
.clinic-box { display: flex; flex-direction: column; font-size: .88rem; color: var(--muted); }
.clinic-box b { color: var(--ink); }
.portal-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: 16px; padding: 8px; margin-bottom: 16px; }
@media (max-width: 680px) { .portal-tabs { grid-template-columns: repeat(2, 1fr); } }
.portal-tabs button { border: 0; background: var(--card); padding: 12px 8px; border-radius: 12px; font: inherit; font-weight: 700; font-size: .85rem; line-height: 1.4; color: var(--ink); cursor: pointer; transition: all .2s ease; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 2px; text-align: center; }
.portal-tabs button:hover { background: rgba(14,116,144,0.08); border-color: var(--brand); transform: translateY(-1px); }
@media (max-width: 420px) { .portal-tabs button { font-size: .75rem; padding: 10px 6px; } }
.portal-tabs button[aria-selected="true"] { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; box-shadow: 0 4px 12px rgba(14,116,144,0.3); }
.portal-filter-bar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; padding: 10px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 12px; }
.portal-filter-title { font-size: .85rem; font-weight: 700; color: var(--muted); }
.portal-filter-chip { border: 1px solid var(--line); background: var(--bg); color: var(--ink); border-radius: 999px; padding: 5px 12px; font-size: .82rem; font-weight: 600; cursor: pointer; transition: all .15s; }
.portal-filter-chip:hover { border-color: var(--brand); color: var(--brand); }
.portal-filter-chip.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.portal-doc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.portal-doc-card { display: flex; flex-direction: column; justify-content: space-between; padding: 16px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); }
.portal-doc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.portal-doc-info h3 { font-size: 1.05rem; margin: 0 0 2px; }
.portal-doc-info small { color: var(--muted); display: block; font-size: .82rem; }
.portal-doc-fee { background: var(--bg-alt); padding: 8px 12px; border-radius: 10px; font-size: .82rem; margin: 8px 0 12px; line-height: 1.6; }
.portal-doc-fee b { color: var(--ink); }
.portal-doc-deposit-warning { color: #dc2626; font-size: .75rem; font-weight: 700; margin-top: 3px; display: block; }
.portal-doc-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; }
.turn-fee-info { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 8px; font-size: .85rem; }
.turn-deposit-note { font-size: .78rem; color: #dc2626; font-weight: 600; display: block; margin-top: 3px; }
.portal-booking-wrap { margin-top: 16px; padding: 18px; border: 2px solid var(--brand); border-radius: var(--radius); background: var(--card); }
.portal-list { display: grid; gap: 12px; }
.item { padding: 16px 18px; }
.item p { margin: 6px 0 0; }
.item-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.badge { font-size: .75rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: #fef9c3; color: #854d0e; }
.badge.ok { background: #dcfce7; color: #166534; }
.badge.bad { background: #fee2e2; color: #991b1b; }
.badge.now { background: #dbeafe; color: #1e40af; }
.rx { margin-top: 8px; }
.rx pre { white-space: pre-wrap; font-family: inherit; background: var(--bg-alt); border-radius: 10px; padding: 10px 12px; margin: 6px 0 0; unicode-bidi: plaintext; text-align: start; }
.empty { text-align: center; color: var(--muted); }

/* doctors directory, profile and booking */
.page-doctors .page-hero { padding: 22px 0 6px; }
.page-doctors .page-hero h1 { margin-bottom: .2em; }
.page-doctors .page-hero .lead { margin-bottom: 0; }
.page-doctors .section { padding-top: 10px; }
.page-doctor .page-hero { padding: 16px 0 6px; }
.page-doctor .page-hero .lead { margin-bottom: 4px; }
.page-doctor .section { padding-top: 8px; }
.page-doctor .booking-card { margin-top: 0; top: 76px; }
.doc-filter-card { margin-top: 0; }
.doc-grid { align-items: stretch; }
.doc-card { display: flex; flex-direction: column; gap: 14px; padding: 18px; }
.doc-card-link { display: flex; gap: 14px; align-items: center; color: inherit; text-decoration: none !important; }
.doc-card-body { display: flex; flex-direction: column; line-height: 1.7; }
.doc-card-body h2 { font-size: 1.05rem; margin: 0; }
.doc-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.doc-photo { flex: none; border-radius: 50%; object-fit: cover; background: var(--bg-alt); border: 3px solid var(--card); box-shadow: var(--shadow); }
.doc-initial { display: inline-flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), var(--brand-2)); }
.doc-hero { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.doc-hero h1 { margin-bottom: .2em; }
.doc-actions { justify-content: flex-start; margin-top: 8px; }
.booking-card { position: sticky; top: 90px; min-width: 0; }
/* grid/flex children may shrink below their content (the day row scrolls inside the card instead of widening the page) */
.split > *, .grid > *, .hero-grid > * { min-width: 0; }
.booking-step { font-weight: 800; color: var(--ink); margin: 14px 0 8px; }
.day-chips { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x proximity; }
.day-chip { flex: none; scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 2px; min-width: 92px; padding: 10px 8px; border-radius: 14px;
  border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; cursor: pointer; line-height: 1.5; }
.day-chip span { font-size: .85rem; }
.day-chip small { font-size: .72rem; color: var(--muted); }
.day-chip.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--bg)); }
.slot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(76px, 1fr)); gap: 8px; }
.slot { padding: 9px 6px; border-radius: 10px; border: 1px solid var(--line); background: var(--bg); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.slot:hover { border-color: var(--brand); }
.slot.active { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: #fff; border-color: transparent; }
.booking-form { margin-top: 6px; }
.booking-summary { background: var(--bg-alt); border-radius: 12px; padding: 10px 12px; font-weight: 700; color: var(--ink); }
.code-row { display: flex; align-items: flex-end; gap: 10px; }
.code-row label { flex: 1; }
.booking-ok { font-size: 1.2rem; font-weight: 800; color: #15803d; }
@media (max-width: 860px) { .booking-card { position: static; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }
.portal-doc-btns { display: flex; gap: 8px; width: 100%; }
.portal-doc-btns > * { flex: 1; text-align: center; justify-content: center; }
.portal-doc-slot-full { width: 100%; display: flex; justify-content: center; }
.portal-doc-slot-full .badge { width: 100%; text-align: center; justify-content: center; white-space: nowrap; }

@media print { .site-header, .site-footer, .cta-band { display: none; } }

/* Number typography & Persian digits for portal, booking & tables */
.font-mono,
.font-num,
.tabular-nums,
table th, table td,
.slot,
.day-chip,
.portal-doc-fee,
.price, .badge, .counter {
  font-family: var(--font) !important;
  font-feature-settings: "ss01" 1, "tnum" 1 !important;
  -webkit-font-feature-settings: "ss01" 1, "tnum" 1 !important;
  font-variant-numeric: tabular-nums !important;
}

@keyframes tebgarSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.tebgar-spinner {
  display: inline-block;
  border-radius: 50%;
  border: 2.5px solid rgba(0, 0, 0, 0.1);
  border-top-color: currentColor;
  animation: tebgarSpin 0.75s linear infinite;
}

/* ==========================================================================
   BOGHRAT-STYLE SPECIALISTS & INPLACE APPOINTMENT DIRECTORY (/doctors)
   ========================================================================== */
.boghrat-hero {
  padding: 28px 0 20px;
  background: linear-gradient(180deg, rgba(14, 116, 144, 0.08) 0%, rgba(37, 99, 235, 0.02) 100%);
  border-bottom: 1px solid var(--line);
}
.boghrat-crumbs {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.boghrat-crumbs a {
  color: var(--muted);
  text-decoration: none;
}
.boghrat-crumbs a:hover {
  color: var(--brand);
}
.boghrat-title-box {
  text-align: center;
  max-width: 760px;
  margin: 0 auto 20px;
}
.boghrat-title-box h1 {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 8px;
  line-height: 1.4;
}
.boghrat-title-box p {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0;
}

/* Service Type Tabs (Inplace, Online, Centers) */
.boghrat-tabs-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  width: 100%;
}
.boghrat-tabs {
  display: inline-flex;
  align-items: center;
  background: var(--bg);
  padding: 5px;
  border-radius: 9999px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 10px rgba(0,0,0,0.04);
  gap: 4px;
  max-width: 100%;
}
.boghrat-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 9999px;
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--muted);
  text-decoration: none;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.boghrat-tab:hover {
  color: var(--ink);
}
.boghrat-tab.active {
  background: var(--brand);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(14, 116, 144, 0.25);
}
@media (max-width: 680px) {
  .boghrat-tabs-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding: 2px 0 6px;
    justify-content: flex-start;
  }
  .boghrat-tabs-wrap::-webkit-scrollbar {
    display: none;
  }
  .boghrat-tabs {
    flex-shrink: 0;
    margin: 0 auto;
  }
  .boghrat-tab {
    padding: 6px 12px;
    font-size: 0.78rem;
    gap: 5px;
  }
  .boghrat-tab svg {
    width: 14px;
    height: 14px;
  }
}

/* Boghrat Search Bar */
.boghrat-search-bar {
  display: flex;
  align-items: center;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: 0 10px 30px -10px rgba(0,0,0,0.08);
  padding: 6px 8px;
  max-width: 860px;
  margin: 0 auto;
  gap: 8px;
}
@media (max-width: 680px) {
  .boghrat-search-bar {
    padding: 6px 10px;
    border-radius: 16px;
  }
  .boghrat-search-city-field,
  .boghrat-search-btn,
  .boghrat-search-divider {
    display: none !important;
  }
  .boghrat-search-input-field {
    padding: 6px 8px;
    width: 100%;
  }
}
.boghrat-search-field {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  flex: 1 1 200px;
  width: 100%;
}
.boghrat-search-field svg {
  color: var(--brand);
  flex-shrink: 0;
}
.boghrat-search-field input,
.boghrat-search-field select {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 0.92rem;
  outline: none;
  padding: 4px 0;
}
.boghrat-search-divider {
  width: 1px;
  height: 28px;
  background: var(--line);
  flex-shrink: 0;
}
@media (max-width: 680px) {
  .boghrat-search-divider {
    display: none;
  }
}
.boghrat-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 26px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff;
  border: none;
  border-radius: 14px;
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  flex-shrink: 0;
}
.boghrat-search-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(14, 116, 144, 0.3);
}
@media (max-width: 680px) {
  .boghrat-search-btn {
    width: 100%;
  }
}

/* Specialty Category Pills / Carousel */
.boghrat-spec-section {
  padding: 16px 0 10px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.boghrat-spec-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding: 4px 2px 10px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}
.boghrat-spec-scroll::-webkit-scrollbar {
  height: 4px;
}
.boghrat-spec-scroll::-webkit-scrollbar-thumb {
  background: var(--line);
  border-radius: 4px;
}
.boghrat-spec-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.2s ease;
  user-select: none;
}
.boghrat-spec-chip:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: rgba(14, 116, 144, 0.04);
}
.boghrat-spec-chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(14, 116, 144, 0.2);
}
.boghrat-spec-chip svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

/* Two-Column Layout */
.boghrat-container {
  padding: 24px 0 60px;
}
.boghrat-layout {
  display: grid;
  grid-template-columns: 290px 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 992px) {
  .boghrat-layout {
    grid-template-columns: 1fr;
  }
}

/* Sticky Filter Sidebar */
.boghrat-sidebar {
  position: sticky;
  top: 90px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 20px;
  box-shadow: var(--shadow);
}
.boghrat-sidebar-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}
.boghrat-sidebar-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 800;
  color: var(--ink);
}
.boghrat-clear-btn {
  background: transparent;
  border: none;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ef4444;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background 0.15s;
}
.boghrat-clear-btn:hover {
  background: rgba(239, 68, 68, 0.08);
}
.boghrat-filter-group {
  margin-bottom: 16px;
}
.boghrat-filter-label {
  display: block;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 6px;
}
.boghrat-filter-input {
  width: 100%;
  padding: 9px 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.85rem;
  outline: none;
  transition: border-color 0.2s;
}
.boghrat-filter-input:focus {
  border-color: var(--brand);
}

/* iOS-style Switch Toggle */
.boghrat-switch-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}
.boghrat-switch-row:last-child {
  border-bottom: none;
}
.boghrat-switch-info {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--ink);
  user-select: none;
}
.boghrat-switch-info small {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 400;
}
.boghrat-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
}
.boghrat-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}
.boghrat-slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: var(--line);
  transition: .25s;
  border-radius: 24px;
}
.boghrat-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  right: 3px;
  bottom: 3px;
  background-color: #ffffff;
  transition: .25s;
  border-radius: 50%;
  box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}
.boghrat-switch input:checked + .boghrat-slider {
  background-color: #10b981;
}
.boghrat-switch input:checked + .boghrat-slider:before {
  transform: translateX(-20px);
}

/* Results Main Content */
.boghrat-main {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.boghrat-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--card);
  padding: 12px 18px;
  border-radius: 16px;
  border: 1px solid var(--line);
  box-shadow: 0 2px 8px rgba(0,0,0,0.03);
  flex-wrap: wrap;
  gap: 12px;
}
.boghrat-count {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--ink);
}
.boghrat-sort-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  color: var(--muted);
}
.boghrat-sort-select {
  padding: 6px 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  outline: none;
  cursor: pointer;
}

/* Doctor Cards List */
.boghrat-cards-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

/* Boghrat Doctor Card */
.boghrat-doc-card {
  display: flex;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 22px;
  box-shadow: var(--shadow);
  gap: 20px;
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
  position: relative;
  overflow: hidden;
}
.boghrat-doc-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 34px -10px rgba(0,0,0,0.12);
  border-color: rgba(14, 116, 144, 0.3);
}
@media (max-width: 768px) {
  .boghrat-doc-card {
    flex-direction: column;
  }
}

/* Doctor Info Column (Right) */
.boghrat-doc-info {
  display: flex;
  gap: 16px;
  flex: 1 1 auto;
}
.boghrat-avatar-wrap {
  position: relative;
  flex-shrink: 0;
  width: 88px;
  height: 88px;
}
.boghrat-avatar-img {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid var(--card);
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
  background: var(--bg-alt);
}
.boghrat-avatar-initial {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.2rem;
  font-weight: 800;
  color: #ffffff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.boghrat-verified-badge {
  position: absolute;
  bottom: 2px;
  left: 2px;
  width: 22px;
  height: 22px;
  background: #10b981;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--card);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.boghrat-details {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
}
.boghrat-doc-name {
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
  line-height: 1.4;
}
.boghrat-doc-name a {
  color: inherit;
  text-decoration: none;
  transition: color 0.15s;
}
.boghrat-doc-name a:hover {
  color: var(--brand);
}
.boghrat-doc-spec {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--brand);
}
.boghrat-doc-code {
  font-size: 0.78rem;
  color: var(--muted);
}
.boghrat-rating-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 2px 0;
  flex-wrap: wrap;
}
.boghrat-stars {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #f59e0b;
}
.boghrat-satisfaction {
  font-size: 0.78rem;
  font-weight: 700;
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 8px;
  border-radius: 6px;
}
.boghrat-badges-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin: 4px 0;
}
.boghrat-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 8px;
  background: var(--bg-alt);
  color: var(--text);
  border: 1px solid var(--line);
}
.boghrat-doc-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.8rem;
  color: var(--muted);
  margin-top: 2px;
}
.boghrat-doc-meta-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Doctor Action Column (Left) */
.boghrat-doc-action {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  width: 240px;
  flex-shrink: 0;
  border-right: 1px dashed var(--line);
  padding-right: 20px;
  gap: 12px;
}
@media (max-width: 768px) {
  .boghrat-doc-action {
    width: 100%;
    border-right: none;
    border-top: 1px dashed var(--line);
    padding-right: 0;
    padding-top: 16px;
  }
}

.boghrat-slot-box {
  background: rgba(16, 185, 129, 0.08);
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 14px;
  padding: 10px 12px;
  text-align: center;
}
.boghrat-slot-box.empty {
  background: var(--bg-alt);
  border-color: var(--line);
}
.boghrat-slot-label {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 2px;
}
.boghrat-slot-time {
  display: block;
  font-size: 0.88rem;
  font-weight: 800;
  color: #10b981;
}
.boghrat-slot-box.empty .boghrat-slot-time {
  color: var(--muted);
  font-weight: 600;
}

.boghrat-book-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 16px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #ffffff !important;
  border-radius: 12px;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none !important;
  text-align: center;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(14, 116, 144, 0.2);
}
.boghrat-book-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(14, 116, 144, 0.35);
}
.boghrat-profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 14px;
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  text-decoration: none !important;
  text-align: center;
  transition: all 0.15s;
}
.boghrat-profile-btn:hover {
  background: var(--bg-alt);
  border-color: var(--brand);
  color: var(--brand);
}


