/*
Theme Name: دکتر امین بهشتی
Theme URI: https://drbeheshti.ir
Author: Custom Theme
Author URI: https://drbeheshti.ir
Description: قالب اختصاصی مطب دکتر امین بهشتی - جراح و متخصص گوش و حلق و بینی و زیبایی سر و گردن. دارای سیستم نوبت‌دهی آنلاین حرفه‌ای.
Version: 3.3.0
Requires at least: 6.0
Tested up to: 6.7
Requires PHP: 8.0
License: GNU General Public License v2 or later
Text Domain: dr-beheshti
Tags: medical, doctor, clinic, rtl, appointment, booking
*/

/* ============================================
   متغیرهای اصلی و ریست
   ============================================ */
:root {
    --primary: #0a4d68;
    --primary-dark: #083d54;
    --primary-light: #0e6b8a;
    --accent: #c9a227;
    --accent-hover: #b8911f;
    --text: #1a1a2e;
    --text-light: #555;
    --bg: #ffffff;
    --bg-light: #f7f9fc;
    --bg-section: #eef4f8;
    --border: #e2e8f0;
    --success: #10b981;
    --danger: #ef4444;
    --shadow: 0 4px 20px rgba(10, 77, 104, 0.08);
    --shadow-lg: 0 10px 40px rgba(10, 77, 104, 0.12);
    --radius: 12px;
    --radius-sm: 8px;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
    color: var(--text);
    background: var(--bg);
    line-height: 1.7;
    direction: rtl;
    font-size: 16px;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul, ol {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ============================================
   دکمه‌ها
   ============================================ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 32px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border: none;
    transition: var(--transition);
    text-align: center;
}

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

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: var(--shadow);
}

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

.btn-accent:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
}

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

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

.btn-lg {
    padding: 16px 40px;
    font-size: 17px;
}

.btn-block {
    width: 100%;
}

/* ============================================
   هدر
   ============================================ */
.site-header {
    background: #fff;
    box-shadow: 0 2px 15px rgba(0,0,0,0.06);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.site-header .container {
    position: relative;
}

.header-top {
    background: var(--primary);
    color: #fff;
    padding: 8px 0;
    font-size: 13px;
}

.header-top .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.header-top a {
    color: #fff;
    opacity: 0.9;
}

.header-top a:hover {
    opacity: 1;
}

.header-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}

.site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.site-logo img {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    object-fit: cover;
}

.site-logo .logo-text h1 {
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    margin: 0;
}

.site-logo .logo-text span {
    font-size: 12px;
    color: var(--text-light);
}

.main-nav ul {
    display: flex;
    gap: 28px;
    align-items: center;
}

.main-nav a {
    font-weight: 500;
    color: var(--text);
    font-size: 15px;
    position: relative;
}

.main-nav a:hover,
.main-nav a.active {
    color: var(--primary);
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    right: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s;
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

.header-cta .btn {
    padding: 10px 22px;
    font-size: 14px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: var(--primary);
}

/* ============================================
   هیرو
   ============================================ */
.hero {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%);
    color: #fff;
    padding: 80px 0 100px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -20%;
    width: 600px;
    height: 600px;
    background: rgba(255,255,255,0.05);
    border-radius: 50%;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content h1 {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.4;
    margin-bottom: 16px;
}

.hero-content .subtitle {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: 12px;
}

.hero-content p {
    font-size: 16px;
    opacity: 0.85;
    margin-bottom: 30px;
    max-width: 480px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.hero-image {
    text-align: center;
}

.hero-image img {
    max-width: 380px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    margin: 0 auto;
    border: 5px solid rgba(255,255,255,0.2);
}

.hero-badges {
    display: flex;
    gap: 20px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.hero-badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================
   بخش‌های عمومی
   ============================================ */
.section {
    padding: 80px 0;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h2 {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 12px;
}

.section-title p {
    color: var(--text-light);
    font-size: 16px;
    max-width: 600px;
    margin: 0 auto;
}

.section-title .line {
    width: 60px;
    height: 3px;
    background: var(--accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

/* ============================================
   خدمات
   ============================================ */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
}

.service-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 30px 25px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border);
    text-align: center;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.service-card .icon {
    width: 70px;
    height: 70px;
    background: var(--bg-section);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 28px;
    color: var(--primary);
}

.service-card h3 {
    font-size: 18px;
    margin-bottom: 10px;
    color: var(--text);
}

.service-card p {
    font-size: 14px;
    color: var(--text-light);
    margin-bottom: 15px;
}

.service-card a {
    color: var(--primary);
    font-weight: 600;
    font-size: 14px;
}

/* ============================================
   درباره دکتر
   ============================================ */
.about-section {
    background: var(--bg-light);
}

.about-grid {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.about-image img {
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.about-content h2 {
    font-size: 28px;
    color: var(--primary);
    margin-bottom: 15px;
}

.about-content .degree {
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 20px;
    display: block;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 15px;
}

.about-stats {
    display: flex;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-item .number {
    font-size: 28px;
    font-weight: 800;
    color: var(--primary);
}

.stat-item .label {
    font-size: 13px;
    color: var(--text-light);
}

/* ============================================
   سیستم نوبت‌دهی
   ============================================ */
.appointment-section {
    background: linear-gradient(135deg, var(--bg-section) 0%, #fff 100%);
}

.appointment-box {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    max-width: 900px;
    margin: 0 auto;
}

.appointment-header {
    background: var(--primary);
    color: #fff;
    padding: 25px 30px;
    text-align: center;
}

.appointment-header h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

.appointment-header p {
    opacity: 0.85;
    font-size: 14px;
}

.appointment-body {
    padding: 35px 30px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    font-size: 14px;
    color: var(--text);
}

.form-group label .required {
    color: var(--danger);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 13px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 15px;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(10, 77, 104, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.time-slots {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.time-slot {
    padding: 10px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    text-align: center;
    cursor: pointer;
    font-size: 14px;
    transition: var(--transition);
    background: var(--bg-light);
}

.time-slot:hover {
    border-color: var(--primary);
    background: #e8f4f8;
}

.time-slot.selected {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.time-slot.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: line-through;
}

.form-message {
    padding: 15px 20px;
    border-radius: var(--radius-sm);
    margin-bottom: 20px;
    font-size: 14px;
    display: none;
}

.form-message.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
    display: block;
}

.form-message.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
    display: block;
}

/* ============================================
   گالری قبل/بعد
   ============================================ */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
}

.gallery-item {
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

.gallery-caption {
    padding: 15px;
    background: #fff;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
}

/* ============================================
   نظرات بیماران
   ============================================ */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
}

.testimonial-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 30px;
    box-shadow: var(--shadow);
    border-right: 4px solid var(--accent);
}

.testimonial-card .stars {
    color: var(--accent);
    margin-bottom: 12px;
    font-size: 16px;
}

.testimonial-card p {
    color: var(--text-light);
    font-size: 15px;
    margin-bottom: 15px;
    font-style: italic;
}

.testimonial-card .author {
    font-weight: 700;
    font-size: 14px;
    color: var(--primary);
}

/* ============================================
   تماس
   ============================================ */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.contact-info-item {
    display: flex;
    gap: 15px;
    margin-bottom: 25px;
    align-items: flex-start;
}

.contact-info-item .icon {
    width: 50px;
    height: 50px;
    background: var(--bg-section);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 20px;
    flex-shrink: 0;
}

.contact-info-item h4 {
    font-size: 15px;
    margin-bottom: 4px;
}

.contact-info-item p {
    font-size: 14px;
    color: var(--text-light);
}

.map-container {
    border-radius: var(--radius);
    overflow: hidden;
    height: 350px;
    box-shadow: var(--shadow);
}

.map-container iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

/* ============================================
   فوتر
   ============================================ */
.site-footer {
    background: var(--primary-dark);
    color: #fff;
    padding: 60px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-about h3 {
    font-size: 18px;
    margin-bottom: 15px;
}

.footer-about p {
    font-size: 14px;
    opacity: 0.8;
    line-height: 1.8;
}

.footer-links h4,
.footer-contact h4 {
    font-size: 16px;
    margin-bottom: 18px;
    position: relative;
    padding-bottom: 10px;
}

.footer-links h4::after,
.footer-contact h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 2px;
    background: var(--accent);
}

.footer-links ul li {
    margin-bottom: 10px;
}

.footer-links a {
    font-size: 14px;
    opacity: 0.8;
}

.footer-links a:hover {
    opacity: 1;
    color: var(--accent);
}

.footer-contact p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    opacity: 0.7;
}

/* ============================================
   پنل ادمین نوبت‌ها (استایل داخل ادمین)
   ============================================ */
.drb-admin-status {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.drb-status-pending { background: #fef3c7; color: #92400e; }
.drb-status-confirmed { background: #d1fae5; color: #065f46; }
.drb-status-cancelled { background: #fee2e2; color: #991b1b; }
.drb-status-completed { background: #e0e7ff; color: #3730a3; }

/* ============================================
   ریسپانسیو
   ============================================ */

/* ============================================
   ریسپانسیو — تبلت
   ============================================ */
@media (max-width: 992px) {
    .container {
        padding: 0 16px;
    }

    .hero {
        padding: 50px 0 60px;
    }

    .hero .container {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .hero-content {
        order: 2;
    }

    .hero-image {
        order: 1;
    }

    .hero-image > div,
    .hero-image img {
        max-width: 260px !important;
        height: auto !important;
        margin: 0 auto;
    }

    .hero-content h1 {
        font-size: 28px;
    }

    .hero-content p {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .hero-badges {
        justify-content: center;
    }

    .about-grid,
    .contact-grid,
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .about-image > div {
        height: 320px !important;
    }

    /* منوی موبایل */
    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        left: 0;
        background: #fff;
        box-shadow: 0 10px 30px rgba(0,0,0,0.12);
        padding: 0;
        z-index: 999;
        border-top: 1px solid var(--border);
    }

    .main-nav.active {
        display: block;
    }

    .main-nav ul {
        flex-direction: column;
        gap: 0;
        padding: 8px 0;
    }

    .main-nav ul li {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .main-nav ul li:last-child {
        border-bottom: none;
    }

    .main-nav a {
        display: block;
        padding: 14px 20px;
        font-size: 15px;
    }

    .main-nav a::after {
        display: none;
    }

    .mobile-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        background: var(--bg-section);
        border-radius: 8px;
        font-size: 22px;
    }

    .header-cta {
        display: none;
    }

    .header-main {
        position: relative;
        padding: 12px 0;
    }

    .site-logo .logo-text h1 {
        font-size: 15px;
    }

    .site-logo .logo-text span {
        font-size: 11px;
    }

    .site-logo img,
    .site-logo > div {
        width: 44px !important;
        height: 44px !important;
        font-size: 18px !important;
    }
}

/* ============================================
   ریسپانسیو — موبایل
   ============================================ */
@media (max-width: 768px) {
    body {
        font-size: 15px;
        overflow-x: hidden;
    }

    .container {
        padding: 0 14px;
        max-width: 100%;
    }

    /* هدر */
    .header-top {
        display: none;
    }

    .header-main {
        gap: 10px;
    }

    .site-logo {
        gap: 8px;
        flex: 1;
        min-width: 0;
    }

    .site-logo .logo-text h1 {
        font-size: 14px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    /* هیرو */
    .hero {
        padding: 35px 0 45px;
    }

    .hero-content h1 {
        font-size: 22px;
        line-height: 1.5;
    }

    .hero-content .subtitle {
        font-size: 14px;
    }

    .hero-content p {
        font-size: 14px;
        margin-bottom: 20px;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
        padding: 13px 20px;
        font-size: 14px;
    }

    .hero-badges {
        gap: 8px;
        margin-top: 20px;
    }

    .hero-badge {
        padding: 8px 12px;
        font-size: 11px;
    }

    .hero-image > div {
        max-width: 200px !important;
        height: 240px !important;
    }

    /* بخش‌ها */
    .section {
        padding: 40px 0;
    }

    .section-title {
        margin-bottom: 30px;
    }

    .section-title h2 {
        font-size: 22px;
    }

    .section-title p {
        font-size: 14px;
    }

    /* خدمات */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .service-card {
        padding: 22px 18px;
    }

    .service-card .icon {
        width: 56px;
        height: 56px;
        font-size: 24px;
    }

    .service-card h3 {
        font-size: 16px;
    }

    /* درباره */
    .about-content h2 {
        font-size: 22px;
    }

    .about-stats {
        gap: 16px;
        justify-content: center;
    }

    .stat-item .number {
        font-size: 22px;
    }

    .about-image > div {
        height: 260px !important;
    }

    /* گالری */
    .gallery-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

    .gallery-item img,
    .gallery-item > div {
        height: 140px !important;
    }

    .gallery-caption {
        padding: 10px;
        font-size: 12px;
    }

    /* نظرات */
    .testimonials-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .testimonial-card {
        padding: 22px;
    }

    /* فرم نوبت */
    .appointment-box {
        border-radius: 10px;
        margin: 0 -2px;
    }

    .appointment-header {
        padding: 18px 16px;
    }

    .appointment-header h3 {
        font-size: 18px;
    }

    .appointment-body {
        padding: 20px 16px;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .form-group {
        margin-bottom: 16px;
    }

    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 14px;
        font-size: 16px; /* جلوگیری از زوم iOS */
    }

    .time-slots {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }

    .time-slot {
        padding: 10px 4px;
        font-size: 13px;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 15px;
    }

    /* تماس */
    .contact-info-item {
        gap: 12px;
        margin-bottom: 18px;
    }

    .contact-info-item .icon {
        width: 42px;
        height: 42px;
        font-size: 18px;
    }

    .map-container {
        height: 250px;
        margin-top: 10px;
    }

    /* فوتر */
    .site-footer {
        padding: 40px 0 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
    }

    .footer-about h3 {
        font-size: 16px;
    }

    .footer-bottom {
        padding: 16px 0;
        font-size: 12px;
    }

    /* پنل بیمار — تب‌ها */
    .panel-tab {
        padding: 10px 12px;
        font-size: 12px;
        white-space: nowrap;
    }

    /* جداول پنل */
    .panel-table {
        font-size: 12px;
        min-width: 480px;
    }

    .panel-table th,
    .panel-table td {
        padding: 10px 8px;
    }

    /* تیکت */
    .ticket-msg {
        max-width: 95%;
        padding: 12px 14px;
    }

    .ticket-msg-text {
        font-size: 13px;
    }
}

/* موبایل خیلی کوچک */
@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 20px;
    }

    .gallery-grid {
        grid-template-columns: 1fr;
    }

    .time-slots {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-badge {
        font-size: 10px;
        padding: 6px 10px;
    }

    .site-logo .logo-text span {
        display: none;
    }
}

/* لودینگ فرم */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.btn-loading::after {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    margin-right: 8px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* جلوگیری از overflow افقی */
html, body {
    max-width: 100vw;
    overflow-x: hidden;
}

img, iframe, video {
    max-width: 100%;
}

/* پنل بیمار — استایل‌های کمکی موبایل */
.panel-tabs-scroll {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    border-bottom: 2px solid var(--border);
    margin-bottom: 20px;
}

.panel-tabs-scroll::-webkit-scrollbar {
    display: none;
}


/* تقویم فارسی */
.datepicker-plot-area,
.datepicker-container {
    font-family: 'Vazirmatn', Tahoma, sans-serif !important;
    direction: rtl !important;
    z-index: 99999 !important;
}
.datepicker-plot-area {
    box-shadow: 0 8px 30px rgba(0,0,0,0.15) !important;
    border-radius: 12px !important;
    border: 1px solid #e2e8f0 !important;
}
.datepicker-plot-area .datepicker-day-view .table-days td span {
    font-family: inherit !important;
    border-radius: 8px !important;
}
.datepicker-plot-area .datepicker-day-view .table-days td.selected span,
.datepicker-plot-area .datepicker-day-view .table-days td span.selected {
    background: #0a4d68 !important;
    color: #fff !important;
}
.datepicker-plot-area .toolbox {
    direction: rtl !important;
}
#drb-date-fa {
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%230a4d68' stroke-width='2'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cline x1='16' y1='2' x2='16' y2='6'/%3E%3Cline x1='8' y1='2' x2='8' y2='6'/%3E%3Cline x1='3' y1='10' x2='21' y2='10'/%3E%3C/svg%3E") no-repeat left 12px center !important;
    padding-left: 40px !important;
    cursor: pointer !important;
}
/* موبایل: تقویم تمام‌عرض‌تر */
@media (max-width: 480px) {
    .datepicker-plot-area {
        width: 95vw !important;
        max-width: 320px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
}

/* ========== تقویم شمسی داخلی ========== */
.jdp-popup {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    box-shadow: 0 12px 40px rgba(10, 77, 104, 0.18);
    padding: 14px;
    width: 300px;
    max-width: 95vw;
    font-family: 'Vazirmatn', Tahoma, sans-serif;
    user-select: none;
}
.jdp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.jdp-title {
    font-weight: 700;
    font-size: 15px;
    color: #0a4d68;
}
.jdp-nav {
    width: 34px;
    height: 34px;
    border: none;
    background: #eef4f8;
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    color: #0a4d68;
    display: flex;
    align-items: center;
    justify-content: center;
}
.jdp-nav:hover { background: #0a4d68; color: #fff; }
.jdp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 6px;
    text-align: center;
}
.jdp-weekdays span {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    padding: 4px 0;
}
.jdp-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.jdp-day, .jdp-empty {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
    color: #1a1a2e;
}
.jdp-day:hover:not(:disabled) {
    background: #e8f4f8;
}
.jdp-day.jdp-today {
    border: 2px solid #0a4d68;
    font-weight: 700;
}
.jdp-day.jdp-selected {
    background: #0a4d68 !important;
    color: #fff !important;
}
.jdp-day.jdp-past,
.jdp-day:disabled {
    color: #ccc;
    cursor: not-allowed;
}
.jdp-footer {
    margin-top: 10px;
    text-align: center;
}
.jdp-today-btn {
    border: none;
    background: #eef4f8;
    color: #0a4d68;
    padding: 8px 20px;
    border-radius: 8px;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.jdp-today-btn:hover { background: #0a4d68; color: #fff; }

/* اعلامیه‌ها */
.drb-announcements { margin-bottom: 25px; }
.drb-ann {
    padding: 14px 18px;
    border-radius: 10px;
    margin-bottom: 12px;
    border-right: 4px solid;
    font-size: 14px;
}
.drb-ann-info { background: #e8f4f8; border-color: #0a4d68; }
.drb-ann-success { background: #d1fae5; border-color: #10b981; }
.drb-ann-warning { background: #fef3c7; border-color: #f59e0b; }
.drb-ann-danger { background: #fee2e2; border-color: #ef4444; }
.drb-ann-title { font-weight: 700; margin-bottom: 4px; }
.drb-ann-date { font-size: 12px; opacity: 0.7; margin-top: 6px; }

/* ========== آمار KPI ========== */
.stats-kpi-section {
    padding: 40px 0;
    background: linear-gradient(135deg, #0a4d68 0%, #0e6b8a 100%);
    margin-top: -1px;
}
.stats-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}
.stats-kpi-card {
    text-align: center;
    color: #fff;
    padding: 20px 10px;
}
.kpi-icon {
    font-size: 32px;
    opacity: 0.9;
    margin-bottom: 8px;
}
.kpi-number {
    font-size: 36px;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 4px;
}
.kpi-label {
    font-size: 14px;
    opacity: 0.85;
}

/* ========== نمودارها ========== */
.charts-section {
    background: var(--bg-light);
}
.charts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}
.charts-grid-bottom {
    margin-bottom: 0;
}
.chart-card {
    background: #fff;
    border-radius: var(--radius);
    padding: 24px;
    box-shadow: var(--shadow);
    border: 1px solid var(--border);
}
.chart-card-header {
    margin-bottom: 20px;
}
.chart-card-header h3 {
    font-size: 17px;
    color: var(--primary);
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}
.chart-card-header p {
    font-size: 13px;
    color: var(--text-light);
}
.chart-canvas-wrap {
    position: relative;
    height: 260px;
    width: 100%;
}
.chart-doughnut-wrap {
    height: 240px;
    max-width: 280px;
    margin: 0 auto;
}
.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 16px;
    justify-content: center;
    margin-top: 16px;
    font-size: 12px;
}
.chart-legend li {
    display: flex;
    align-items: center;
    gap: 6px;
}
.chart-legend .leg-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.summary-list {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.summary-item {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}
.summary-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.summary-label {
    flex: 1;
    color: var(--text);
}
.summary-val {
    font-weight: 700;
    color: var(--primary);
}
.summary-footer {
    margin-top: 24px;
}

@media (max-width: 992px) {
    .stats-kpi-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .kpi-number { font-size: 28px; }
    .charts-grid {
        grid-template-columns: 1fr;
    }
}
@media (max-width: 480px) {
    .stats-kpi-grid {
        grid-template-columns: 1fr 1fr;
    }
    .kpi-icon { font-size: 24px; }
    .kpi-number { font-size: 24px; }
    .kpi-label { font-size: 12px; }
    .chart-canvas-wrap { height: 220px; }
}
