/* ===================================================================
   PezashkCare.ir — استایل صفحه اصلی (تم روشن آبی/سبز)
   فقط داخل #homePage اعمال می‌شود تا فرم‌ها دست‌نخورده بمانند.
   =================================================================== */

:root {
    --pc-blue: #1546a8;
    --pc-blue-2: #2f6fe4;
    --pc-blue-soft: #eaf1fd;
    --pc-green: #12885a;
    --pc-green-2: #2ecc80;
    --pc-green-soft: #e8f8f0;
    --pc-red: #e04a4a;
    --pc-ink: #12213d;
    --pc-muted: #5c6b85;
    --pc-line: #dde6f4;
    --pc-card: #ffffff;
    --pc-page: #f2f6fc;
    --pc-shadow: 0 6px 24px rgba(21, 70, 168, 0.08);
}

/* وقتی صفحه اصلی باز است، پس‌زمینه روشن می‌شود */
body.home-active { background-color: var(--pc-page); }
body.home-active .ambient-glow { display: none; }

/* ---------- نوار بالای صفحه ---------- */
body.home-active .nav-wrapper { padding: 16px 10px 0; }
body.home-active .nav-pill {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--pc-line);
    box-shadow: var(--pc-shadow);
    gap: 22px;
}
body.home-active .nav-pill a { color: var(--pc-ink); font-weight: 600; }
body.home-active .nav-pill a:hover { color: var(--pc-blue-2); text-shadow: none; }

body.home-active .auth-btn {
    background: #fff;
    border-color: var(--pc-line);
    color: var(--pc-ink);
}
body.home-active .auth-btn:hover {
    border-color: var(--pc-blue-2);
    color: var(--pc-blue-2);
    box-shadow: 0 0 18px rgba(47, 111, 228, 0.18);
}
body.home-active .auth-btn.primary {
    background: var(--pc-blue-2);
    border-color: var(--pc-blue-2);
    color: #fff;
}
body.home-active .auth-btn.primary:hover { background: var(--pc-blue); color: #fff; }
body.home-active .auth-user-chip {
    background: var(--pc-blue-soft);
    border-color: var(--pc-blue-2);
    color: var(--pc-blue);
}

/* ---------- چیدمان کلی ---------- */
#homePage.pc-home {
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 16px 60px;
    color: var(--pc-ink);
    font-family: 'Vazirmatn', sans-serif;
    display: block;
    min-height: auto;
}

.pc-card {
    background: var(--pc-card);
    border: 1px solid var(--pc-line);
    border-radius: 18px;
    box-shadow: var(--pc-shadow);
}

/* ---------- لندینگ / هیرو تصویری ---------- */
.pc-landing {
    position: relative;
    display: flex;
    align-items: center;
    min-height: clamp(320px, 42vw, 520px);
    padding: 40px clamp(20px, 5vw, 64px);
    margin-bottom: 16px;
    border-radius: 18px;
    overflow: hidden;
    background: url('2.jpeg') center right / cover no-repeat;
    box-shadow: var(--pc-shadow);
}
/* پرده‌ی روشن روی سمت چپ تصویر تا متن زنده‌ی صفحه خوانا بماند */
.pc-landing::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right,
        #f4f7fb 0%, #f4f7fb 44%,
        rgba(244, 247, 251, 0.72) 56%, rgba(244, 247, 251, 0) 72%);
}
/* در چیدمان راست‌به‌چپ، متن را به سمت چپ کادر می‌برد (هم‌راستا با طرح تصویر) */
.pc-landing-copy { position: relative; max-width: min(500px, 48%); margin-inline-start: auto; }
.pc-landing-brand {
    direction: ltr;
    font-size: clamp(1.1rem, 2.4vw, 1.5rem);
    font-weight: 900;
    letter-spacing: -0.5px;
    margin-bottom: 10px;
}
.pc-landing-brand .b { color: var(--pc-blue); }
.pc-landing-brand .g { color: var(--pc-green); }
.pc-landing-title {
    font-size: clamp(1.5rem, 4.2vw, 2.9rem);
    font-weight: 900;
    line-height: 1.45;
    color: var(--pc-ink);
    margin: 0;
}
.pc-landing-title .ltr { direction: ltr; display: inline-block; }
.pc-landing-sub {
    font-size: clamp(0.85rem, 1.8vw, 1.05rem);
    color: var(--pc-muted);
    font-weight: 500;
    line-height: 2;
    margin: 12px 0 0;
}
.pc-landing-cta { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 22px; }

.pc-hero-badges {
    display: flex; flex-wrap: wrap; gap: 10px;
    margin-bottom: 22px;
}
.pc-badge {
    display: flex; align-items: center; gap: 9px;
    background: #fff;
    border: 1px solid var(--pc-line);
    border-radius: 12px;
    padding: 9px 13px;
    font-size: 0.84rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(21, 70, 168, 0.06);
}
.pc-badge .ico { font-size: 1.05rem; }

.pc-hero-center { text-align: center; }
.pc-brand {
    font-size: clamp(2.1rem, 6vw, 3.6rem);
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1.1;
    direction: ltr;
}
.pc-brand .b { color: var(--pc-blue); }
.pc-brand .g { color: var(--pc-green); }
.pc-hero-title {
    font-size: clamp(1.05rem, 2.6vw, 1.6rem);
    font-weight: 800;
    color: var(--pc-ink);
    margin-top: 10px;
}
.pc-hero-sub {
    direction: ltr;
    font-size: clamp(0.85rem, 2vw, 1.05rem);
    color: var(--pc-muted);
    font-weight: 500;
    margin-top: 4px;
}
.pc-hero-cta { display: flex; gap: 10px; justify-content: center; margin-top: 18px; flex-wrap: wrap; }
.pc-btn {
    border: none; cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700; font-size: 0.92rem;
    padding: 12px 24px; border-radius: 12px;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
    text-decoration: none; display: inline-flex; align-items: center; gap: 8px;
}
.pc-btn-primary { background: var(--pc-blue-2); color: #fff; box-shadow: 0 6px 18px rgba(47, 111, 228, 0.3); }
.pc-btn-primary:hover { background: var(--pc-blue); transform: translateY(-2px); }
.pc-btn-green { background: var(--pc-green); color: #fff; box-shadow: 0 6px 18px rgba(24, 122, 78, 0.28); }
.pc-btn-green:hover { background: var(--pc-green-2); transform: translateY(-2px); }
.pc-btn-ghost { background: #fff; color: var(--pc-green); border: 1px solid var(--pc-green-2); }
.pc-btn-ghost:hover { background: var(--pc-green-soft); transform: translateY(-2px); }

.pc-hero-logo { display: flex; justify-content: center; }
.pc-hero-logo img { width: min(210px, 40vw); height: auto; }

/* ---------- تیتر بخش‌ها ---------- */
.pc-section-head {
    display: inline-flex; align-items: center; gap: 10px;
    background: var(--pc-blue);
    color: #fff;
    padding: 9px 20px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 0.98rem;
    margin: 34px 0 16px;
}

/* ---------- ۷ گام فرایند ---------- */
.pc-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}
.pc-step {
    padding: 18px 16px;
    position: relative;
    background: var(--pc-card);
    border: 1px solid var(--pc-line);
    border-radius: 18px;
    box-shadow: var(--pc-shadow);
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.pc-step:hover {
    transform: translateY(-4px);
    border-color: var(--pc-blue-2);
    box-shadow: 0 12px 30px rgba(21, 70, 168, 0.14);
}
.pc-step-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.pc-step-num {
    flex-shrink: 0;
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--pc-blue); color: #fff;
    display: grid; place-items: center;
    font-weight: 800; font-size: 0.95rem;
}
.pc-step-title { font-weight: 800; font-size: 0.98rem; line-height: 1.35; }
.pc-step-title small { display: block; direction: ltr; color: var(--pc-muted); font-weight: 500; font-size: 0.74rem; }

.pc-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.pc-list li {
    display: flex; align-items: flex-start; gap: 8px;
    font-size: 0.85rem; color: var(--pc-ink);
    background: #f8fafd;
    border: 1px solid var(--pc-line);
    border-radius: 10px;
    padding: 8px 10px;
}
.pc-list li .ico { flex-shrink: 0; }
.pc-list li.hl { border-color: rgba(224, 74, 74, 0.4); background: #fdf0f0; color: var(--pc-red); font-weight: 700; }
.pc-list li.ok { border-color: rgba(46, 204, 128, 0.4); background: var(--pc-green-soft); }

/* زنجیره تصمیم داخل کارت‌ها */
.pc-chain { display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.pc-chain .node {
    text-align: center; padding: 9px 10px; border-radius: 10px;
    font-size: 0.83rem; font-weight: 700; border: 1px solid var(--pc-line); background: #f8fafd;
}
.pc-chain .node.blue { background: var(--pc-blue-soft); border-color: rgba(47,111,228,.35); color: var(--pc-blue); }
.pc-chain .node.green { background: var(--pc-green-soft); border-color: rgba(46,204,128,.4); color: var(--pc-green); }
.pc-chain .node.amber { background: #fff7e8; border-color: #f3d9a4; color: #a06a12; }
.pc-chain .node.red { background: #fdf0f0; border-color: rgba(224,74,74,.4); color: var(--pc-red); }
.pc-chain .arrow { text-align: center; color: var(--pc-muted); font-size: 0.8rem; line-height: 1; }

/* ---------- مسیر درمان بیمار ---------- */
.pc-journey {
    padding: 20px 16px;
    overflow-x: auto;
    scrollbar-width: thin;
}
.pc-journey-track {
    display: flex; align-items: flex-start; gap: 4px;
    min-width: max-content;
    padding-bottom: 6px;
}
.pc-journey-step { text-align: center; width: 96px; flex-shrink: 0; }
.pc-journey-step .bubble {
    width: 62px; height: 62px; margin: 0 auto 8px;
    border-radius: 50%;
    display: grid; place-items: center;
    font-size: 1.6rem;
    background: var(--pc-blue-soft);
    border: 2px solid rgba(47, 111, 228, 0.28);
}
.pc-journey-step:nth-child(4n) .bubble { background: var(--pc-green-soft); border-color: rgba(46, 204, 128, 0.35); }
.pc-journey-step .cap { font-size: 0.74rem; direction: ltr; color: var(--pc-muted); font-weight: 600; }
.pc-journey-arrow { align-self: center; margin-top: -18px; color: var(--pc-blue-2); font-size: 1.1rem; }

/* ---------- مزایای سامانه ---------- */
.pc-benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 12px;
}
.pc-benefit {
    display: flex; align-items: center; gap: 10px;
    padding: 13px 14px;
    background: #fff;
    border: 1px solid var(--pc-line);
    border-radius: 14px;
    font-size: 0.88rem; font-weight: 600;
    box-shadow: 0 3px 10px rgba(21, 70, 168, 0.05);
    transition: border-color 0.2s, transform 0.2s;
}
.pc-benefit:hover { border-color: var(--pc-green-2); transform: translateX(-3px); }
.pc-benefit .ico { font-size: 1.25rem; flex-shrink: 0; }
.pc-benefit .tick { margin-inline-start: auto; color: var(--pc-green-2); font-weight: 900; }

/* ---------- خدمات ویژه مدیران ---------- */
/* ---------- لینک‌های دسترسی پس از ورود پزشک/مدیر ---------- */
.pc-quick { margin: 28px 0 34px; }
.pc-quick-head {
    font-size: 0.86rem;
    font-weight: 700;
    color: var(--pc-muted);
    text-align: center;
    margin-bottom: 14px;
}

.pc-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}
.pc-service {
    color: inherit;
    text-decoration: none;
    display: block;
    padding: 18px 14px;
    text-align: center;
    background: #fff;
    border: 1px solid var(--pc-line);
    border-radius: 16px;
    cursor: pointer;
    font-weight: 700;
    box-shadow: var(--pc-shadow);
    transition: transform 0.25s, border-color 0.25s, box-shadow 0.25s;
}
.pc-service:hover { transform: translateY(-4px); border-color: var(--pc-blue-2); box-shadow: 0 12px 28px rgba(21,70,168,.15); }
.pc-service { font-size: 0.9rem; }
.pc-service .ico { font-size: 1.6rem; display: block; margin-bottom: 8px; }

/* بخش «خدمات تخصصی» سمت سرور در index.php رندر می‌شود و برای
   مهمان و کاربر عادی اصلاً در HTML خروجی وجود ندارد — اینجا
   قاعده‌ای برای پنهان‌سازی لازم نیست. */

/* ---------- آمار و تاثیر ---------- */
.pc-impact {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}
.pc-impact-item {
    padding: 18px 14px; text-align: center;
    background: #fff; border: 1px solid var(--pc-line);
    border-radius: 16px; box-shadow: var(--pc-shadow);
}
.pc-impact-item .num {
    font-size: 1.9rem; font-weight: 900; direction: ltr;
    color: var(--pc-blue);
}
.pc-impact-item .num.up { color: var(--pc-green); }
.pc-impact-item .lbl { font-size: 0.85rem; color: var(--pc-muted); font-weight: 600; margin-top: 4px; }

/* ---------- اعتماد / امنیت ---------- */
/* ---------- بنر تصویری دوم ---------- */
.pc-showcase {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    margin: 26px 0 34px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, #f7fbfa 0%, #e8f8f0 100%);
    box-shadow: var(--pc-shadow);
}
.pc-showcase img {
    display: block;
    width: 100%;
    height: clamp(240px, 32vw, 380px);
    object-fit: cover;
    object-position: center 35%;
}
/* پرده‌ی روشن روی نیمه‌ی چپ تا متن چاپ‌شده روی خود عکس پوشانده شود */
.pc-showcase::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to right,
        #f7fbfa 0%, #f7fbfa 48%,
        rgba(247, 251, 250, 0.7) 58%, rgba(247, 251, 250, 0) 72%);
}
.pc-showcase-note {
    position: absolute;
    left: 0; right: auto;
    padding: 0 clamp(20px, 5vw, 56px);
    max-width: min(720px, 100%);
    width: 100%;
    text-align: center;
}
.pc-showcase-note p {
    margin: 0;
    font-size: clamp(1rem, 2.2vw, 1.5rem);
    font-weight: 800;
    line-height: 2;
    color: var(--pc-ink);
}

/* ---------- سه اصل ---------- */
.pc-trust {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0;
    margin-top: 6px;
    border-top: 1px solid var(--pc-line);
    border-bottom: 1px solid var(--pc-line);
}
.pc-trust-item { padding: 22px 18px; text-align: center; }
.pc-trust-item + .pc-trust-item { border-inline-start: 1px solid var(--pc-line); }
.pc-trust-item h4 {
    font-size: 0.95rem; margin: 0 0 6px;
    color: var(--pc-green); font-weight: 800;
}
.pc-trust-item p { font-size: 0.82rem; color: var(--pc-muted); line-height: 1.9; margin: 0; }

/* ---------- فوتر ---------- */
.pc-footer {
    margin-top: 40px; padding-top: 22px;
    border-top: 1px solid var(--pc-line);
    text-align: center; color: var(--pc-muted); font-size: 0.82rem;
}
.pc-footer .brand { font-weight: 800; color: var(--pc-blue); direction: ltr; }

/* ---------- تبلت و موبایل ---------- */
@media (max-width: 900px) {
    /* دکمه‌های ورود/ثبت‌نام دیگر روی منو نمی‌افتند */
    body.home-active .auth-corner {
        position: static;
        justify-content: center;
        padding: 14px 12px 0;
        margin: 0;
    }
    body.home-active .nav-wrapper { padding: 10px 10px 0; }
    body.home-active .nav-pill { gap: 12px; flex-wrap: wrap; justify-content: center; }

    .pc-landing { min-height: 300px; }
    .pc-landing-copy { max-width: 62%; }
    .pc-landing::before {
        background: linear-gradient(to right,
            #f4f7fb 0%, #f4f7fb 55%, rgba(244, 247, 251, 0.45) 80%, rgba(244, 247, 251, 0) 100%);
    }
    .pc-hero-badges { justify-content: center; }
    .pc-badge { font-size: 0.78rem; padding: 7px 11px; }
}

@media (max-width: 520px) {
    body.home-active .auth-corner { flex-wrap: wrap; gap: 8px; }
    body.home-active .auth-btn { min-height: 40px; padding: 9px 14px; }
    body.home-active .nav-pill { width: 100%; gap: 6px; padding: 8px 10px; }
    body.home-active .nav-pill a { padding: 7px 8px; font-size: .82rem; }
    #homePage.pc-home { padding: 14px 12px 36px; }
    .pc-landing { padding: 28px 18px; min-height: 310px; background-position: 68% center; }
    .pc-landing-copy { max-width: 100%; }
    .pc-landing::before {
        background: linear-gradient(to right, #f4f7fb 0%, #f4f7fb 62%, rgba(244, 247, 251, 0.9) 100%);
    }
    .pc-landing-cta { gap: 8px; }
    .pc-landing-cta .pc-btn { flex: 1 1 140px; justify-content: center; padding: 12px 14px; font-size: 0.88rem; }
    .pc-section-head { margin: 26px 0 12px; font-size: 0.9rem; padding: 8px 15px; }
    .pc-step { padding: 15px 13px; }
    .pc-benefit { font-size: 0.83rem; padding: 11px 12px; }
    .pc-impact-item .num { font-size: 1.6rem; }
    /* تک‌ستونه شدن قطعی روی نمایشگرهای باریک */
    .pc-steps, .pc-services, .pc-benefits, .pc-impact, .pc-trust { grid-template-columns: 1fr; }
    .pc-showcase::before {
        background: linear-gradient(to right, #f7fbfa 0%, #f7fbfa 58%, rgba(247, 251, 250, 0.85) 100%);
    }
    .pc-showcase { min-height: 132px; margin: 20px 0 26px; }
    .pc-showcase-note { max-width: 100%; padding: 20px 16px; }
    .pc-showcase-note p { font-size: 1rem; line-height: 1.9; }
    .pc-trust-item { padding: 16px 12px; }
    .pc-trust-item + .pc-trust-item { border-inline-start: none; border-top: 1px solid var(--pc-line); }
}

/* راهنمای اسکرول افقی نوار مسیر درمان */
.pc-journey { position: relative; }
.pc-journey-hint {
    display: none;
    text-align: center;
    font-size: 0.72rem;
    color: var(--pc-muted);
    margin-top: 8px;
}
@media (max-width: 900px) {
    .pc-journey-hint { display: block; }
    .pc-journey-step { width: 84px; }
    .pc-journey-step .bubble { width: 54px; height: 54px; font-size: 1.35rem; }
    .pc-journey-step .cap { font-size: 0.68rem; }
}

/* ---------- چاپ ---------- */
@media print {
    #homePage.pc-home { display: none !important; }
}

/* ===================================================================
   فرم ورود / ثبت‌نام — تم PezashkCare
   =================================================================== */
.auth-modal-overlay { background: rgba(12, 33, 61, 0.55); backdrop-filter: blur(8px); }

.auth-modal.pc-auth {
    max-width: 420px;
    border-radius: 22px;
    padding: 26px 24px 20px;
    border: 1px solid var(--pc-line);
    box-shadow: 0 30px 70px rgba(12, 33, 61, 0.35);
    background:
        radial-gradient(circle at 100% 0%, rgba(46, 204, 128, 0.10), transparent 42%),
        radial-gradient(circle at 0% 100%, rgba(47, 111, 228, 0.10), transparent 42%),
        #fff;
    font-family: 'Vazirmatn', sans-serif;
    color: var(--pc-ink);
}
.pc-auth .close-x {
    top: 14px; left: 16px;
    width: 30px; height: 30px; border-radius: 50%;
    display: grid; place-items: center;
    background: #f2f6fc; color: var(--pc-muted);
    font-size: 1.2rem; line-height: 1;
    transition: background 0.2s, color 0.2s;
}
.pc-auth .close-x:hover { background: #e6edf9; color: var(--pc-ink); }

.pc-auth-brand { display: flex; align-items: center; justify-content: center; gap: 9px; margin-bottom: 16px; }
.pc-auth-brand img { width: 52px; height: 52px; }
.pc-auth-brand-txt { font-size: 1.25rem; font-weight: 900; direction: ltr; letter-spacing: -0.5px; }
.pc-auth-brand-txt .b { color: var(--pc-blue); }
.pc-auth-brand-txt .g { color: var(--pc-green); }

.pc-auth-tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
    background: #eef3fb; border: 1px solid var(--pc-line);
    border-radius: 12px; padding: 4px; margin-bottom: 18px;
}
.pc-auth-tab {
    border: none; cursor: pointer; background: transparent;
    font-family: 'Vazirmatn', sans-serif; font-weight: 700; font-size: 0.88rem;
    color: var(--pc-muted); padding: 9px 10px; border-radius: 9px;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}
.pc-auth-tab.active { background: #fff; color: var(--pc-blue); box-shadow: 0 2px 8px rgba(21, 70, 168, 0.12); }

.pc-auth h3 { font-family: 'Vazirmatn', sans-serif; font-weight: 800; font-size: 1.2rem; color: var(--pc-ink); }
.pc-auth .sub { color: var(--pc-muted); font-size: 0.83rem; margin-bottom: 14px; }
.pc-auth label { font-size: 0.8rem; font-weight: 700; color: var(--pc-ink); margin-bottom: 6px; }
.pc-auth label .opt { color: var(--pc-muted); font-weight: 500; }

.pc-field { position: relative; margin-bottom: 13px; }
.pc-field-ico {
    position: absolute; inset-inline-start: 12px; top: 50%; transform: translateY(-50%);
    font-size: 0.95rem; opacity: 0.65; pointer-events: none;
}
.pc-auth .pc-field input {
    width: 100%; margin: 0;
    padding: 12px 40px 12px 40px;
    background: #f8fafd;
    border: 1.5px solid var(--pc-line);
    border-radius: 11px;
    font-family: 'Vazirmatn', sans-serif; font-size: 0.9rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
.pc-auth .pc-field input:focus {
    background: #fff;
    border-color: var(--pc-blue-2);
    box-shadow: 0 0 0 3px rgba(47, 111, 228, 0.16);
}
.pc-field-eye {
    position: absolute; inset-inline-end: 10px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer;
    font-size: 0.95rem; opacity: 0.5; padding: 4px;
}
.pc-field-eye:hover { opacity: 0.9; }
.pc-field-eye.on { opacity: 1; }

.pc-auth .submit-btn {
    font-family: 'Vazirmatn', sans-serif; font-weight: 800; font-size: 0.98rem;
    background: var(--pc-blue-2); color: #fff;
    border-radius: 12px; padding: 13px;
    margin-top: 8px;
    box-shadow: 0 8px 20px rgba(47, 111, 228, 0.28);
    transition: background 0.2s, transform 0.2s;
}
.pc-auth .submit-btn:hover { background: var(--pc-blue); color: #fff; transform: translateY(-1px); }
.pc-auth .submit-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

.pc-auth .switch-link { color: var(--pc-muted); font-size: 0.83rem; margin-top: 14px; }
.pc-auth .switch-link a { color: var(--pc-blue-2); font-weight: 800; }
.pc-auth .switch-link a:hover { color: var(--pc-green); }

.pc-auth .auth-msg { font-weight: 600; }
.pc-auth .auth-msg.err { color: #c0392b; background: #fdf0f0; border-radius: 9px; padding: 8px 10px; }
.pc-auth .auth-msg.ok  { color: var(--pc-green); background: var(--pc-green-soft); border-radius: 9px; padding: 8px 10px; }

.pc-auth-note {
    text-align: center; font-size: 0.73rem; color: var(--pc-muted);
    margin-top: 16px; padding-top: 12px; border-top: 1px solid var(--pc-line);
}

/* ---------- آمار بازدید (فقط مدیر) ---------- */
.pc-visits {
    background: #fff;
    border: 1px solid var(--pc-line);
    border-inline-start: 4px solid var(--pc-blue);
    border-radius: 16px;
    padding: 16px 18px;
    margin-bottom: 20px;
    box-shadow: var(--pc-shadow);
}
.pc-visits-head {
    display: flex; align-items: center; gap: 8px;
    font-weight: 800; color: var(--pc-ink); font-size: 0.95rem;
    margin-bottom: 14px;
}
.pc-visits-head .tag {
    margin-inline-start: auto;
    background: #fdeeee; color: #a8321f;
    border-radius: 999px; padding: 3px 12px;
    font-size: 0.72rem; font-weight: 700;
}
.pc-visits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
}
.pc-visit-item {
    text-align: center;
    background: var(--pc-blue-soft);
    border-radius: 12px;
    padding: 12px 8px;
}
.pc-visit-item .num {
    font-size: 1.5rem; font-weight: 900; color: var(--pc-blue);
}
.pc-visit-item .lbl {
    font-size: 0.76rem; color: var(--pc-muted); font-weight: 600; margin-top: 2px;
}
.pc-visits-note {
    font-size: 0.74rem; color: var(--pc-muted);
    margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--pc-line);
}

/* ---------- پیام موفقیت ثبت‌نام ---------- */
.pc-reg-success {
    text-align: center;
    background: var(--pc-green-soft);
    border: 1px solid var(--pc-green);
    border-radius: 14px;
    padding: 22px 18px;
}
.pc-reg-success .ico { font-size: 2.4rem; line-height: 1; margin-bottom: 10px; }
.pc-reg-success h4 {
    margin: 0 0 8px; font-size: 1.05rem; font-weight: 900; color: var(--pc-green);
}
.pc-reg-success p { margin: 0 0 6px; font-size: 0.86rem; color: var(--pc-ink); }
.pc-reg-success .note {
    font-size: 0.8rem; color: var(--pc-muted); font-weight: 600;
    margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--pc-green);
}
.pc-reg-success .submit-btn { margin-top: 14px; }

/* بارگذاری فرم‌های تخصصی */
.pc-form-loading {
    display: none; text-align: center; padding: 60px 20px;
    color: var(--pc-muted); font-weight: 600;
}
.pc-form-loading.on { display: block; }
.pc-form-loading::before {
    content: ''; display: block; width: 34px; height: 34px; margin: 0 auto 14px;
    border: 3px solid var(--pc-line); border-top-color: var(--pc-blue-2);
    border-radius: 50%; animation: pcSpin 0.8s linear infinite;
}
@keyframes pcSpin { to { transform: rotate(360deg); } }

@media (max-width: 420px) {
    .auth-modal.pc-auth { padding: 22px 16px 16px; border-radius: 18px; }
    .pc-auth-brand img { width: 44px; height: 44px; }
    .pc-auth-brand-txt { font-size: 1.1rem; }
}

/* ===================================================================
   تم PezashkCare روی صفحات فرم تخصصی
   (خارج از @media print تا چاپ دست‌نخورده بماند)
   =================================================================== */

/* پس‌زمینه روشن در همه صفحات، نه فقط خانه */
body { background-color: var(--pc-page); }
.ambient-glow { display: none; }

/* ---------- نوار ناوبری و دکمه‌های کاربر در همه صفحات ---------- */
.nav-pill {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--pc-line);
    box-shadow: var(--pc-shadow);
    gap: 22px;
}
.nav-pill a { color: var(--pc-ink); font-weight: 600; }
.nav-pill a:hover { color: var(--pc-blue-2); text-shadow: none; }

.auth-btn {
    background: #fff;
    border: 1px solid var(--pc-line);
    color: var(--pc-ink);
    font-family: 'Vazirmatn', sans-serif;
}
.auth-btn:hover {
    border-color: var(--pc-blue-2);
    color: var(--pc-blue-2);
    box-shadow: 0 0 18px rgba(47, 111, 228, 0.18);
}
.auth-btn.primary { background: var(--pc-blue-2); border-color: var(--pc-blue-2); color: #fff; }
.auth-btn.primary:hover { background: var(--pc-blue); color: #fff; }

/* ---------- کارت کاربر واردشده ---------- */
.auth-user-chip {
    gap: 10px;
    padding: 6px 8px 6px 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--pc-line);
    color: var(--pc-ink);
    font-size: 0.82rem;
    font-weight: 700;
    box-shadow: 0 4px 14px rgba(21, 70, 168, 0.10);
}
.auth-user-chip #userChipName {
    display: inline-flex; align-items: center; gap: 7px;
    white-space: nowrap; max-width: 190px; overflow: hidden; text-overflow: ellipsis;
}
/* آواتار حرف اول نام کاربر */
.auth-user-chip #userChipName::before {
    content: attr(data-initial);
    flex-shrink: 0;
    width: 26px; height: 26px; border-radius: 50%;
    display: inline-grid; place-items: center;
    background: linear-gradient(135deg, var(--pc-blue-2), var(--pc-green-2));
    color: #fff; font-weight: 800; font-size: 0.78rem;
}
.auth-user-chip .role-tag {
    font-size: 0.68rem; font-weight: 800;
    padding: 2px 8px; border-radius: 999px;
    background: var(--pc-green-soft); color: var(--pc-green);
    border: 1px solid rgba(46, 204, 128, 0.35);
}
.auth-user-chip .role-tag.user { background: var(--pc-blue-soft); color: var(--pc-blue); border-color: rgba(47, 111, 228, 0.3); }
.auth-user-chip .auth-btn { padding: 5px 12px !important; font-size: 0.74rem !important; border-radius: 999px; }
.auth-user-chip .auth-btn.logout { color: var(--pc-red); border-color: rgba(224, 74, 74, 0.35); }
.auth-user-chip .auth-btn.logout:hover { background: #fdf0f0; color: var(--pc-red); border-color: var(--pc-red); box-shadow: none; }

/* ---------- بدنه فرم‌های تخصصی ---------- */
.form-page {
    background: #fff;
    color: var(--pc-ink);
    border: 1px solid var(--pc-line);
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(21, 70, 168, 0.10);
    max-width: 1000px;
    margin: 22px auto 60px;
}
.form-header {
    border-bottom: none;
    padding-bottom: 18px;
    margin-bottom: 26px;
    position: relative;
}
.form-header::after {
    content: ''; position: absolute; bottom: 0; inset-inline: 0;
    height: 3px; border-radius: 3px;
    background: linear-gradient(90deg, var(--pc-blue-2), var(--pc-green-2));
}
/* فونت عنوان فرم: هماهنگ با تم سایت (Vazirmatn) به‌جای Lalezar */
.form-header h2 {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 900;
    letter-spacing: -0.4px;
    color: var(--pc-blue);
}
.form-header p { color: var(--pc-muted); }

.form-section { border-bottom: 1px solid var(--pc-line); }
.section-title { color: var(--pc-ink); }
.section-title span { background: var(--pc-blue); color: #fff; font-weight: 800; }

.form-group label { color: var(--pc-ink); }
.form-input {
    border: 1.5px solid var(--pc-line);
    border-radius: 10px;
    background: #f8fafd;
}
.form-input:focus {
    border-color: var(--pc-blue-2);
    box-shadow: 0 0 0 3px rgba(47, 111, 228, 0.16);
    background: #fff;
}
.checkbox-item input[type="checkbox"],
.checkbox-item input[type="radio"] { accent-color: var(--pc-blue-2); }

/* دکمه‌های عملیات */
.form-actions { border-top: 1px solid var(--pc-line); }
.btn-print {
    font-family: 'Vazirmatn', sans-serif; font-weight: 800; font-size: 1rem;
    background: var(--pc-blue-2); color: #fff; border-radius: 12px;
}
.btn-print:hover { background: var(--pc-blue); color: #fff; box-shadow: 0 10px 24px rgba(47, 111, 228, 0.3); }
.btn-back {
    font-family: 'Vazirmatn', sans-serif;
    color: var(--pc-blue); border: 2px solid var(--pc-line); border-radius: 12px; background: #fff;
}
.btn-back:hover { background: var(--pc-blue-soft); color: var(--pc-blue); border-color: var(--pc-blue-2); }
.btn-save-db {
    font-family: 'Vazirmatn', sans-serif; font-weight: 800; font-size: 1rem;
    background: var(--pc-green); border-radius: 12px;
}
.btn-save-db:hover { background: var(--pc-green-2); box-shadow: 0 8px 20px rgba(46, 204, 128, 0.35); }

/* جعبه‌ها و پنل‌ها */
.voice-box { background: #f8fafd; border: 2px dashed var(--pc-blue-2); border-radius: 14px; }
.voice-box-title { color: var(--pc-blue); }
.form-summary-box { border: 1.5px solid var(--pc-line); background: #f8fafd; border-radius: 14px; }
.form-summary-box .summary-title { color: var(--pc-blue); }
.form-summary-box textarea.summary-output:focus { border-color: var(--pc-blue-2); box-shadow: 0 0 0 3px rgba(47, 111, 228, 0.16); }
.print-settings-panel { border-color: var(--pc-line); border-radius: 14px; }
.print-settings-panel summary { color: var(--pc-blue); }

@media (max-width: 900px) {
    .auth-corner { position: static; justify-content: center; padding: 14px 12px 0; margin: 0; }
    .nav-wrapper { padding: 10px 10px 0; }
    .auth-user-chip #userChipName { max-width: 120px; }
}

/* ===================================================================
   نوار بالای صفحه — چیدمان flex واقعی (بدون position:absolute)
   =================================================================== */
.pc-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
    max-width: 1280px;
    margin: 0 auto;
    padding: 14px 16px 0;
}
.pc-topbar .auth-corner {
    position: static;
    inset: auto;
    order: 2;          /* سمت چپ در چیدمان RTL */
    padding: 0;
    margin: 0;
    flex-shrink: 0;
}
.pc-topbar .nav-wrapper {
    order: 1;
    flex: 1 1 auto;
    justify-content: flex-start;
    padding: 0;
    width: auto;
}
.pc-topbar .nav-pill { max-width: 100%; }

@media (max-width: 900px) {
    .pc-topbar { flex-direction: column; gap: 10px; padding: 12px 12px 0; }
    .pc-topbar .auth-corner { order: 1; justify-content: center; flex-wrap: wrap; }
    .pc-topbar .nav-wrapper { order: 2; width: 100%; justify-content: center; }
}

/* بازنشانی قوانین قدیمیِ گوشه‌ای */
body.home-active .nav-wrapper { padding: 0; }

/* ---------- دکمه‌های ضبط صدا و بارگذاری در تم سایت ---------- */
.btn-voice { background: var(--pc-blue-2); color: #fff; border-radius: 10px; }
.btn-voice:hover { background: var(--pc-blue); color: #fff; }
.btn-voice.recording { background: var(--pc-red); color: #fff; }

.btn-other-voice { background: var(--pc-blue-2); color: #fff; border-color: var(--pc-blue-2); }
.btn-other-voice:hover { background: var(--pc-blue); color: #fff; }
.btn-other-voice.recording { background: var(--pc-red); color: #fff; border-color: var(--pc-red); }
.btn-other-clear { color: var(--pc-red); border-color: rgba(224, 74, 74, 0.4); background: #fff; }
.btn-other-clear:hover { background: #fdf0f0; }

.btn-upload-file { background: var(--pc-blue-2); color: #fff; }
.btn-upload-file:hover { background: var(--pc-blue); color: #fff; }
.btn-upload-camera { background: var(--pc-green); color: #fff; }
.btn-auto-detect { background: var(--pc-blue-2); color: #fff; }

/* ===================================================================
   دکمه‌های عملیات فرم — تایپوگرافی و رنگ نهایی
   =================================================================== */
:root {
    /* فیروزه‌ای عمیق: پل میان آبی و سبزِ تم */
    --pc-teal: #0e7c86;
    --pc-teal-2: #10a0ad;
}

.btn-print,
.btn-save-db,
.btn-back {
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 800;
    font-size: 0.95rem;
    letter-spacing: -0.2px;
    line-height: 1.6;
    border-radius: 12px;
    padding: 14px 26px;
}

/* ذخیره در دیتابیس — فیروزه‌ای */
.btn-save-db {
    background: linear-gradient(135deg, var(--pc-teal-2), var(--pc-teal));
    color: #fff;
    box-shadow: 0 6px 18px rgba(14, 124, 134, 0.28);
}
.btn-save-db:hover {
    background: linear-gradient(135deg, var(--pc-teal), #0a626b);
    box-shadow: 0 10px 26px rgba(14, 124, 134, 0.38);
}

/* ارسال به پرینتر — آبی تم */
.btn-print {
    background: linear-gradient(135deg, var(--pc-blue-2), var(--pc-blue));
    color: #fff;
    box-shadow: 0 6px 18px rgba(47, 111, 228, 0.28);
}
.btn-print:hover {
    background: linear-gradient(135deg, var(--pc-blue), #0f3580);
    color: #fff;
    box-shadow: 0 10px 26px rgba(47, 111, 228, 0.38);
}

/* ---------- فیلد Discretion (متن چندخطی با ضبط صدا) ---------- */
#surgeryDiscretion {
    min-height: 92px;
    resize: vertical;
    line-height: 1.9;
    font-family: 'Vazirmatn', sans-serif;
    padding: 12px 15px;
}
#surgeryDiscretion::placeholder { color: var(--pc-muted); opacity: 0.75; }

/* دکمه‌ها کنار textarea بالا بچسبند، نه کشیده در تمام ارتفاع */
.other-voice-row:has(#surgeryDiscretion) { align-items: flex-start; }
.other-voice-row:has(#surgeryDiscretion) .other-voice-btns { flex-direction: column; }

@media (max-width: 620px) {
    .other-voice-row:has(#surgeryDiscretion) .other-voice-btns { flex-direction: row; width: 100%; }
}

/* ===================================================================
   ترازِ عمودی چک‌باکس و رادیو با خط اول متن
   قبلاً margin-top:3px باعث می‌شد باکس‌ها پایین‌تر از نوشته بنشینند.
   مقدار درست = (ارتفاع خط − ارتفاع باکس) ÷ ۲
   با font-size:0.85rem و line-height:1.5 → (20.4px − 18px) ÷ 2 ≈ 1.2px
   =================================================================== */
/* گروه: آیتم‌ها به قد بلندترین عضو کشیده نشوند (عامل انحراف ۷px) */
.checkbox-group { align-items: flex-start; }

.checkbox-item {
    align-items: flex-start;   /* لیبل‌های چندخطی از بالا تراز شوند */
    align-content: flex-start;
    line-height: 1.5;
}
.checkbox-item input[type="checkbox"],
.checkbox-item input[type="radio"] {
    width: 18px;
    height: 18px;
    margin-top: 1.2px;
    align-self: flex-start;
}

/* آیتم‌هایی که فیلد درون‌خطی دارند: خط بلندتر است، پس تراز مرکزی */
.checkbox-item:has(.inline-input) { align-items: center; }
.checkbox-item:has(.inline-input) input[type="checkbox"],
.checkbox-item:has(.inline-input) input[type="radio"] { margin-top: 0; align-self: center; }

/* لیبل‌های تک‌خطی داخل ردیف‌های افقی: تراز مرکزی دقیق‌تر است */
.checkbox-group[style*="nowrap"] .checkbox-item { align-items: center; }
.checkbox-group[style*="nowrap"] .checkbox-item input[type="checkbox"],
.checkbox-group[style*="nowrap"] .checkbox-item input[type="radio"] { margin-top: 0; }

@media (max-width: 768px) {
    /* app.css در این بازه font-size را به 0.82rem می‌رساند → آفست ≈ 0.8px */
    .checkbox-item input[type="checkbox"],
    .checkbox-item input[type="radio"] { margin-top: 0.8px !important; }
}

/* ===================================================================
   بخش ۳ — DASI / Risk Level / METs در یک سطر (صرفه‌جویی در صفحات چاپ)
   =================================================================== */
.dasi-grid {
    grid-template-columns: minmax(180px, 0.9fr) minmax(240px, 1.4fr) minmax(200px, 1fr);
    align-items: start;
}
.dasi-choices {
    flex-direction: column;
    flex-wrap: nowrap;
    gap: 6px;
}
.dasi-choices .checkbox-item {
    white-space: normal;
    width: 100%;
}

@media (max-width: 900px) {
    .dasi-grid { grid-template-columns: 1fr 1fr; }
    .dasi-grid .form-group:first-child { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
    .dasi-grid { grid-template-columns: 1fr; }
    .dasi-grid .form-group:first-child { grid-column: auto; }
}

/* ===================================================================
   جهت فرم: بخش ۱ راست‌چین (فارسی/دموگرافیک) — بقیه بخش‌ها چپ‌چین
   محتوای این فرم‌ها انگلیسی است و LTR خواناتر می‌شود.
   =================================================================== */
#formSurgery .form-section:not(:first-of-type) {
    direction: ltr;
    text-align: left;
}
#formSurgery .form-section:not(:first-of-type) .section-title,
#formSurgery .form-section:not(:first-of-type) .form-group label,
#formSurgery .form-section:not(:first-of-type) .checkbox-item {
    text-align: left;
}
/* فیلدهای متنی هم LTR شوند مگر آن‌که محتوای فارسی داشته باشند */
#formSurgery .form-section:not(:first-of-type) .form-input { direction: ltr; text-align: left; }

/* استثناها: فیلدهایی که ورودی فارسی می‌گیرند راست‌چین بمانند */
#formSurgery #surgeryDescription,
#formSurgery #surgeryOtherSymptoms {
    direction: rtl;
    text-align: right;
}
#formSurgery .other-voice-status { direction: rtl; text-align: right; }

/* ===================================================================
   رفع بزرگ‌نمایی/کشیدگی هدر هنگام اسکرول
   علت: backdrop-filter روی نوار منو و دکمه‌ها یک لایه compositing
   جدا می‌سازد که در برخی کارت‌های گرافیک هنگام اسکرول دوباره‌رسم
   ناقص می‌شود و نوار کش‌آمده/بزرگ‌شونده دیده می‌شود.
   پس‌زمینه الان ۹۲٪ مات است و بلور عملاً دیده نمی‌شد، پس حذفش
   هیچ تغییر ظاهری ندارد.
   =================================================================== */
.nav-pill,
.auth-btn,
.auth-user-chip {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}
.nav-pill {
    background: #ffffff;
    /* لایه را پایدار و بدون تغییر اندازه نگه می‌دارد */
    will-change: auto;
    transform: none;
    contain: layout paint;
    flex-shrink: 0;
}
/* نوار منو نباید در فضای کم کشیده یا فشرده شود */
.pc-topbar .nav-wrapper { flex: 0 1 auto; }

/* ===================================================================
   رفع باگ بازترسیم (repaint) هنگام اسکرول
   -------------------------------------------------------------------
   علت: app.css خط ۲ روی html و body هم‌زمان `overflow-x: hidden`
   گذاشته بود. این کار هر دو را به ظرف اسکرول تبدیل می‌کند و در
   Chromium باعث می‌شود ناحیه‌های بالای صفحه هنگام اسکرول بازترسیم
   نشوند — نتیجه‌اش نوارهای سفید و محتوای بریده‌شده است.

   راه‌حل: `overflow-x: clip` به‌جای `hidden`. سرریز افقی همچنان
   بریده می‌شود ولی ظرف اسکرول جدیدی ساخته نمی‌شود.
   =================================================================== */
/* html باید کاملاً visible بماند تا اسکرول به viewport واگذار شود
   و ظرف اسکرول دومی ساخته نشود. (clip + auto طبق مشخصات CSS به
   hidden تبدیل می‌شود، پس روی html اصلاً overflow نمی‌گذاریم.) */
html, body {
    overflow: visible !important;
    max-width: none !important;
}
/* سرریز افقی در سطح عناصر کنترل می‌شود، نه با ظرف اسکرول سراسری.
   (اندازه‌گیری شد: عرض سند = عرض نمایشگر، پس نیازی به بریدن نیست.) */

/* contain باعث لایه compositing جدا و همان مشکل می‌شود — حذف */
.nav-pill { contain: none; }

/* backdrop-filter‌های باقی‌مانده در تم روشن دیده نمی‌شوند
   ولی لایه اضافه می‌سازند و مستعد همین باگ‌اند */
.service-card {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

/* ===================================================================
   فشرده‌سازی سطرها برای کاهش تعداد صفحات چاپ
   =================================================================== */

/* بخش ۳ — متن بلند Risk Level کوچک‌تر شود تا در یک خط کنار رادیو جا شود */
.dasi-choices .checkbox-item {
    font-size: 0.76rem;
    line-height: 1.45;
}
.dasi-choices .checkbox-item input[type="radio"] {
    width: 15px;
    height: 15px;
    margin-top: 1px;
}

/* بخش ۵ — RWMA در همان سطر EF (%) */
.rwma-group { grid-column: span 2; }
.rwma-group .other-voice-row { flex-wrap: nowrap; }
.rwma-group .btn-other-voice,
.rwma-group .btn-other-clear { padding: 10px 12px; white-space: nowrap; }

/* بخش ۷ — ICU (Lvl:) در همان سطر General و CCU */
.ward-group .checkbox-item { white-space: nowrap; }
.ward-group .inline-input {
    max-width: 56px !important;
    min-width: 40px !important;
    padding: 4px 6px !important;
}

/* در نمایشگرهای باریک اجازه شکستن بده تا فشرده نشود */
@media (max-width: 780px) {
    .rwma-group { grid-column: 1 / -1; }
    .ward-group .checkbox-group { flex-wrap: wrap !important; }
}

/* ===================================================================
   بخش ۵ — تراز کردن سطر Troponin / Stress Test / NT-proBNP
   -------------------------------------------------------------------
   دو مشکل: (۱) نوار وضعیت خالیِ زیر RWMA ۱۵px فضا می‌گرفت و سطر دوم
   را پایین می‌راند. (۲) گروه رادیوها ۸px پایین‌تر از تکست‌باکس‌ها بود
   چون .checkbox-group یک margin-top: 8px دارد.
   =================================================================== */

/* نوار وضعیت ضبط صدا وقتی خالی است فضا نگیرد */
.other-voice-status:empty {
    display: none;
}

/* گروه رادیوها هم‌ارتفاع و هم‌تراز با تکست‌باکس‌های کنارش */
.paraclinical-grid .form-group > .checkbox-group,
.align-row-grid .form-group > .checkbox-group {
    margin-top: 0;
    min-height: 49px;          /* برابر ارتفاع .form-input */
    align-items: center;
    align-content: center;
}
.paraclinical-grid .form-group > .checkbox-group .checkbox-item,
.align-row-grid .form-group > .checkbox-group .checkbox-item {
    align-items: center;
}
.paraclinical-grid .form-group > .checkbox-group .checkbox-item input[type="radio"],
.align-row-grid .form-group > .checkbox-group .checkbox-item input[type="radio"] {
    margin-top: 0;
    align-self: center;
}

/* سطرها به هم نزدیک‌تر شوند */
.paraclinical-grid { row-gap: 10px; }
.paraclinical-grid .form-group { align-self: start; }

/* ===================================================================
   بخش ۷ — تراز و جلوگیری از شکستن متن زیر رادیو
   -------------------------------------------------------------------
   .checkbox-item از app.css دارای flex-wrap: wrap است؛ وقتی گروه
   nowrap شد و عرض کم آمد، متن به خط بعدی زیر رادیو می‌افتاد.
   =================================================================== */
.postop-grid { row-gap: 10px; }
.postop-grid .form-group { align-self: start; }

/* اعضای گروه هرگز داخل خودشان نشکنند */
.postop-grid .checkbox-item,
.ward-group .checkbox-item {
    flex-wrap: nowrap;
    white-space: nowrap;
}

/* ستون Ward پهن‌تر باشد تا هر سه گزینه جا شوند */
.postop-grid { grid-template-columns: 1fr 0.8fr 1.6fr; }
.ward-group .checkbox-group { gap: 12px !important; }
.ward-group .inline-input {
    max-width: 48px !important;
    min-width: 36px !important;
    padding: 3px 5px !important;
    font-size: 0.78rem !important;
}

@media (max-width: 900px) {
    .postop-grid { grid-template-columns: 1fr; }
    .postop-grid .checkbox-item,
    .ward-group .checkbox-item { white-space: normal; }
}

/* ===================================================================
   بخش ۸ — تراز کردن گزینه Other با دو گزینه دیگر
   -------------------------------------------------------------------
   گزینه Other به‌خاطر تکست‌باکس درون‌خطی ۳۴px ارتفاع دارد ولی دو
   گزینه دیگر ۲۰px؛ چون گروه flex-start بود، بالای‌شان هم‌تراز
   می‌شد نه وسط‌شان.
   =================================================================== */
.tool-group > .checkbox-group {
    align-items: center;
}
.tool-group .checkbox-item {
    align-items: center;
    flex-wrap: nowrap;
    white-space: nowrap;
}
.tool-group .checkbox-item input[type="radio"] {
    margin-top: 0;
    align-self: center;
}
.tool-group .inline-input {
    max-width: 110px !important;
    padding: 4px 8px !important;
    font-size: 0.78rem !important;
}

@media (max-width: 780px) {
    .tool-group > .checkbox-group { flex-wrap: wrap !important; }
    .tool-group .checkbox-item { white-space: normal; }
}

/* ===================================================================
   حذف خط تکراری بالای دکمه‌های عملیات
   -------------------------------------------------------------------
   قبلاً دو خط پشت‌سرهم دیده می‌شد: border-bottom آخرین form-section
   و border-top خود .form-actions. اولی حذف می‌شود.
   =================================================================== */
/* آخرین بخش = بخشی که بلافاصله قبل از .form-actions است.
   (:last-child / :last-of-type کار نمی‌کند چون .form-actions هم div است.) */
.form-page .form-section:has(+ .form-actions) { border-bottom: none; }
.form-page .form-section:last-child { border-bottom: none; }

/* ===================================================================
   تقویم شمسی
   =================================================================== */
.jalali-input { direction: rtl !important; text-align: right !important; cursor: pointer; }

.jalali-picker {
    position: absolute;
    z-index: 10000;
    width: 268px;
    background: #fff;
    border: 1px solid var(--pc-line);
    border-radius: 14px;
    box-shadow: 0 18px 44px rgba(12, 33, 61, 0.22);
    padding: 12px;
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    color: var(--pc-ink);
}
.jp-head {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 10px;
}
.jp-title { font-weight: 800; font-size: 0.92rem; color: var(--pc-blue); }
.jp-nav {
    width: 28px; height: 28px; border-radius: 8px; cursor: pointer;
    border: 1px solid var(--pc-line); background: #f8fafd;
    color: var(--pc-blue); font-size: 1.1rem; line-height: 1;
}
.jp-nav:hover { background: var(--pc-blue-soft); border-color: var(--pc-blue-2); }

.jp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
    text-align: center;
}
.jp-dow {
    font-size: 0.7rem; font-weight: 700; color: var(--pc-muted);
    padding: 4px 0;
}
.jp-day {
    border: none; background: transparent; cursor: pointer;
    padding: 6px 0; border-radius: 8px;
    font-family: 'Vazirmatn', sans-serif; font-size: 0.82rem;
    color: var(--pc-ink);
}
.jp-day:hover { background: var(--pc-blue-soft); color: var(--pc-blue); }
.jp-day.sel { background: var(--pc-blue-2); color: #fff; font-weight: 800; }

.jp-time {
    margin-top: 10px; font-size: 0.8rem; font-weight: 600;
    display: flex; align-items: center; gap: 8px;
}
.jp-time-input {
    flex: 1; padding: 6px 8px; border: 1px solid var(--pc-line);
    border-radius: 8px; font-family: 'Vazirmatn', sans-serif;
}

.jp-foot {
    display: flex; gap: 8px; margin-top: 10px;
    padding-top: 10px; border-top: 1px solid var(--pc-line);
}
.jp-btn {
    flex: 1; padding: 7px; border-radius: 8px; cursor: pointer;
    font-family: 'Vazirmatn', sans-serif; font-weight: 700; font-size: 0.78rem;
    border: 1px solid var(--pc-line); background: #fff; color: var(--pc-ink);
}
.jp-today { background: var(--pc-blue-2); color: #fff; border-color: var(--pc-blue-2); }
.jp-clear { color: var(--pc-red); border-color: rgba(224, 74, 74, 0.35); }

/* در چاپ، نوار بالا و تقویم دیده نشوند */
@media print {
    .pc-topbar,
    .jalali-picker { display: none !important; }
}
