/* ==================================================================
   SMP ARMOR — خنثی‌سازی تداخل قالب (المنتور و سایر قالب‌ها)
   این فایل تضمین می‌کند رنگ و ساختار عناصر افزونه توسط قالب خراب نشود.
   ================================================================== */

/* ---------- متغیرهای پیش‌فرض (توسط تنظیمات ظاهری بازنویسی می‌شوند) ---------- */
:root {
    --smp-primary: #1E3A5F;
    --smp-primary-dark: #16304F;
    --smp-teacher: #17624A;
    --smp-accent: #F4A624;
    --smp-success: #059669;
    --smp-danger: #EF4444;
    --smp-btn-text: #FFFFFF;
    --smp-text: #222222;
    --smp-muted: #64748B;
    --smp-card-bg: #FFFFFF;
    --smp-border: #E2E8F0;
    --smp-radius: 12px;
    --smp-radius-sm: 8px;
    --smp-font-size: 14px;
    --smp-panel-width: 860px;
}

/* ==================================================================
   ریست پایه داخل کانتینرهای افزونه
   ================================================================== */
.smp-panel,
.smp-container,
.smp-login-box,
.smp-jdp {
    font-size: var(--smp-font-size);
    color: var(--smp-text);
    line-height: 1.9;
}

/* همه دکمه‌ها و لینک‌های داخل افزونه: ریست کامل ارث‌بری از قالب */
.smp-panel button,
.smp-panel input,
.smp-panel select,
.smp-panel textarea,
.smp-container button,
.smp-container input,
.smp-container select,
.smp-container textarea {
    font-family: inherit;
    box-sizing: border-box;
}

/* قالب نباید متن دکمه‌های اصلی را تغییر دهد */
.smp-panel .smp-btn,
.smp-container .smp-btn,
a.smp-btn,
button.smp-btn,
.smp-panel a.smp-btn:hover,
.smp-panel a.smp-btn:focus,
.smp-panel a.smp-btn:visited {
    background: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
    border: 0 !important;
    border-radius: var(--smp-radius-sm) !important;
    text-decoration: none !important;
    text-shadow: none !important;
    font-family: inherit !important;
    letter-spacing: normal !important;
}

.smp-panel .smp-btn:hover,
.smp-container .smp-btn:hover,
a.smp-btn:hover {
    background: var(--smp-primary-dark) !important;
    color: var(--smp-btn-text) !important;
}

/* ==================================================================
   نوار تب‌ها (پنل دانش‌آموز و معلم)
   ================================================================== */
.smp-p-nav {
    background: var(--smp-card-bg) !important;
    border: 1px solid var(--smp-border) !important;
    border-radius: var(--smp-radius) !important;
}

.smp-p-nav button,
.smp-p-nav button:hover,
.smp-p-nav button:focus,
.smp-p-nav button:visited {
    background: transparent !important;
    color: var(--smp-muted) !important;
    border: 0 !important;
    box-shadow: none !important;
    text-decoration: none !important;
    text-shadow: none !important;
    border-radius: var(--smp-radius-sm) !important;
    letter-spacing: normal !important;
    min-height: auto !important;
    text-transform: none !important;
}

.smp-p-nav button:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--smp-primary) !important;
}

.smp-p-nav button.active,
.smp-p-nav button.active:hover,
.smp-p-nav button.active:focus {
    background: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
    font-weight: bold !important;
}

/* آیکن و برچسب داخل تب باید رنگ تب را بگیرند */
.smp-p-nav button > span { color: inherit !important; }

/* ==================================================================
   کارت‌های آماری
   ================================================================== */
.smp-p-stat,
.smp-p-stat:hover,
.smp-p-stat:focus {
    background: var(--smp-card-bg) !important;
    border: 1px solid var(--smp-border) !important;
    border-radius: var(--smp-radius) !important;
    color: var(--smp-text) !important;
    box-shadow: none !important;
    text-decoration: none !important;
    min-height: auto !important;
}

.smp-p-stat:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
}

.smp-p-stat > span { color: inherit; }
.smp-p-stat > span:last-child { color: var(--smp-muted) !important; }

/* ==================================================================
   دکمه‌های میان‌بر پنل معلم
   ================================================================== */
.smp-quick-btn,
.smp-quick-btn:hover,
.smp-quick-btn:focus,
.smp-quick-btn:visited {
    background: var(--smp-teacher) !important;
    color: var(--smp-btn-text) !important;
    border: 0 !important;
    border-radius: var(--smp-radius) !important;
    text-decoration: none !important;
    text-shadow: none !important;
    font-family: inherit !important;
    letter-spacing: normal !important;
}

.smp-quick-alt,
.smp-quick-alt:hover,
.smp-quick-alt:focus {
    background: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
}

/* ==================================================================
   دکمه‌های کوچک عملیات
   ================================================================== */
.smp-mini-btn,
.smp-mini-btn:focus,
.smp-mini-btn:visited {
    background: var(--smp-card-bg) !important;
    color: var(--smp-muted) !important;
    border: 1px solid var(--smp-border) !important;
    border-radius: var(--smp-radius-sm) !important;
    text-decoration: none !important;
    text-shadow: none !important;
    min-height: auto !important;
    letter-spacing: normal !important;
    text-transform: none !important;
}

.smp-mini-btn:hover {
    background: rgba(0, 0, 0, 0.04) !important;
    color: var(--smp-primary) !important;
}

.smp-mini-primary,
.smp-mini-primary:focus,
.smp-mini-primary:visited {
    background: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
    border-color: var(--smp-primary) !important;
}
.smp-mini-primary:hover {
    background: var(--smp-primary-dark) !important;
    color: var(--smp-btn-text) !important;
}

.smp-mini-danger,
.smp-mini-danger:focus {
    color: var(--smp-danger) !important;
    border-color: #fecaca !important;
}
.smp-mini-danger:hover {
    background: #fef2f2 !important;
    color: var(--smp-danger) !important;
}

/* ==================================================================
   دکمه پرداخت شهریه و دکمه‌های کوچک درون کارت
   ================================================================== */
.smp-tu-pay-btn,
.smp-tu-pay-btn:focus,
.smp-tu-pay-btn:visited,
.smp-notif2-btn,
.smp-notif2-btn:focus {
    background: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
    border: 0 !important;
    border-radius: var(--smp-radius-sm) !important;
    text-decoration: none !important;
    text-shadow: none !important;
    min-height: auto !important;
    letter-spacing: normal !important;
}

.smp-tu-pay-btn:hover,
.smp-notif2-btn:hover {
    background: var(--smp-primary-dark) !important;
    color: var(--smp-btn-text) !important;
}

/* ==================================================================
   چیپ‌ها و فیلترها
   ================================================================== */
.smp-chip,
.smp-chip:focus,
.smp-chip:visited,
.smp-subj-chip,
.smp-subj-chip:focus {
    text-decoration: none !important;
    text-shadow: none !important;
    min-height: auto !important;
    letter-spacing: normal !important;
    border-radius: 20px !important;
}

.smp-chip.active,
.smp-chip.active:hover {
    background: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
    border-color: var(--smp-primary) !important;
}

/* ==================================================================
   دکمه خروج در هدر
   ================================================================== */
.smp-p-logout,
.smp-p-logout:hover,
.smp-p-logout:focus,
.smp-p-logout:visited {
    color: var(--smp-btn-text) !important;
    text-decoration: none !important;
    background: rgba(255, 255, 255, 0.16) !important;
    border: 0 !important;
}
.smp-p-logout:hover { background: rgba(255, 255, 255, 0.3) !important; }

/* هدر: همه متن‌ها روشن بمانند */
.smp-p-hero,
.smp-p-hero h2,
.smp-p-hero strong,
.smp-p-hero span,
.smp-p-hero small {
    color: var(--smp-btn-text) !important;
}

/* ==================================================================
   کارت‌ها و کانتینرها
   ================================================================== */
.smp-card {
    background: var(--smp-card-bg);
    border: 1px solid var(--smp-border);
    border-radius: var(--smp-radius);
}

.smp-panel { max-width: var(--smp-panel-width); }

/* ==================================================================
   فیلدهای فرم — قالب نباید ارتفاع/رنگ را خراب کند
   ================================================================== */
.smp-panel .smp-form-group input[type="text"],
.smp-panel .smp-form-group input[type="password"],
.smp-panel .smp-form-group input[type="tel"],
.smp-panel .smp-form-group input[type="email"],
.smp-panel .smp-form-group input[type="number"],
.smp-panel .smp-form-group select,
.smp-panel .smp-form-group textarea {
    background: #fff !important;
    color: var(--smp-text) !important;
    border: 1px solid var(--smp-border) !important;
    border-radius: var(--smp-radius-sm) !important;
    box-shadow: none !important;
}

.smp-panel .smp-form-group input:focus,
.smp-panel .smp-form-group select:focus,
.smp-panel .smp-form-group textarea:focus {
    border-color: var(--smp-primary) !important;
    outline: none !important;
}

/* ==================================================================
   لینک‌های عمومی داخل پنل
   ================================================================== */
.smp-link-btn,
.smp-link-btn:hover,
.smp-link-btn:focus,
.smp-link-btn:visited {
    color: var(--smp-primary) !important;
    background: transparent !important;
    border: 0 !important;
    text-decoration: none !important;
    box-shadow: none !important;
}

.smp-mat-btn,
.smp-mat-btn:focus,
.smp-mat-btn:visited {
    color: var(--smp-primary) !important;
    text-decoration: none !important;
    border-radius: var(--smp-radius-sm) !important;
    min-height: auto !important;
}

/* آیتم‌های لیست قابل کلیک */
.smp-tk-item,
.smp-tk-item:hover,
.smp-tk-item:focus,
.smp-tk-item:visited,
.smp-mgr-card,
.smp-mgr-card:hover,
.smp-mgr-card:focus,
.smp-mgr-card:visited {
    text-decoration: none !important;
    color: var(--smp-text) !important;
}

.smp-tk-item strong,
.smp-mgr-card strong { color: var(--smp-primary) !important; }

/* ==================================================================
   تقویم جلالی — مقاوم‌سازی کامل در برابر استایل قالب
   ================================================================== */
.smp-jdp,
.smp-jdp * {
    box-sizing: border-box !important;
}

.smp-jdp {
    width: 300px !important;
    max-width: calc(100vw - 24px) !important;
    background: #fff !important;
    border: 1px solid var(--smp-border) !important;
    border-radius: var(--smp-radius) !important;
    padding: 12px !important;
    direction: rtl !important;
    line-height: 1.5 !important;
    font-size: 13px !important;
}

/* دکمه‌های ناوبری ماه/سال */
.smp-jdp .smp-jdp-nav,
.smp-jdp .smp-jdp-nav:hover,
.smp-jdp .smp-jdp-nav:focus {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
    min-height: 32px !important;
    max-width: 32px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: var(--smp-radius-sm) !important;
    background: #f1f5f9 !important;
    color: var(--smp-primary) !important;
    font-size: 15px !important;
    line-height: 1 !important;
    font-weight: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex: 0 0 auto !important;
}

.smp-jdp .smp-jdp-nav:hover { background: #e2e8f0 !important; }

.smp-jdp .smp-jdp-head {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    gap: 4px !important;
    margin: 0 0 10px !important;
}

.smp-jdp .smp-jdp-title {
    font-size: 14px !important;
    font-weight: bold !important;
    color: var(--smp-primary) !important;
    flex: 1 !important;
    text-align: center !important;
    white-space: nowrap !important;
}

.smp-jdp .smp-jdp-week {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
    text-align: center !important;
    font-size: 11px !important;
    color: var(--smp-muted) !important;
    margin: 0 0 6px !important;
}

.smp-jdp .smp-jdp-week span {
    padding: 2px 0 !important;
    line-height: 1.4 !important;
}

.smp-jdp .smp-jdp-grid {
    display: grid !important;
    grid-template-columns: repeat(7, 1fr) !important;
    gap: 2px !important;
    margin: 0 !important;
}

/* خانه‌های روز: اندازه ثابت، بدون padding/border قالب */
.smp-jdp .smp-jdp-day,
.smp-jdp .smp-jdp-day:hover,
.smp-jdp .smp-jdp-day:focus {
    width: 100% !important;
    height: 34px !important;
    min-width: 0 !important;
    min-height: 34px !important;
    max-height: 34px !important;
    padding: 0 !important;
    margin: 0 !important;
    border: 0 !important;
    border-radius: var(--smp-radius-sm) !important;
    background: transparent !important;
    color: #334155 !important;
    font-size: 13px !important;
    line-height: 1 !important;
    font-weight: normal !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    overflow: hidden !important;
}

.smp-jdp .smp-jdp-day:hover {
    background: #eef4fb !important;
    color: var(--smp-primary) !important;
}

.smp-jdp .smp-jdp-today,
.smp-jdp .smp-jdp-today:hover {
    background: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
    font-weight: bold !important;
}

.smp-jdp .smp-jdp-empty {
    display: block !important;
    height: 34px !important;
}

.smp-jdp .smp-jdp-foot {
    display: flex !important;
    justify-content: space-between !important;
    gap: 6px !important;
    margin: 10px 0 0 !important;
    padding: 10px 0 0 !important;
    border-top: 1px solid #f1f5f9 !important;
}

.smp-jdp .smp-jdp-btn,
.smp-jdp .smp-jdp-btn:hover,
.smp-jdp .smp-jdp-btn:focus {
    border: 0 !important;
    background: transparent !important;
    color: var(--smp-primary) !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    margin: 0 !important;
    min-height: auto !important;
    border-radius: var(--smp-radius-sm) !important;
    line-height: 1.4 !important;
    letter-spacing: normal !important;
    text-transform: none !important;
    text-shadow: none !important;
    box-shadow: none !important;
    width: auto !important;
    cursor: pointer !important;
}

.smp-jdp .smp-jdp-btn:hover { background: #f1f5f9 !important; }

/* ==================================================================
   جلوگیری از خرابی چیدمان توسط قالب
   ================================================================== */
.smp-panel .smp-hw-item summary,
.smp-panel .smp-form-card > summary {
    background: transparent !important;
    padding-right: 0 !important;
}

.smp-panel details > summary { list-style: none !important; }
.smp-panel details > summary::-webkit-details-marker { display: none !important; }

/* بج‌ها */
.smp-badge, .smp-hw-badge, .smp-tk-badge {
    text-shadow: none !important;
    letter-spacing: normal !important;
    line-height: 1.7 !important;
}

/* ==================================================================
   لایه دوم — تخصص بالاتر برای قالب‌های بسیار تهاجمی
   (مثل قالب‌هایی که از .elementor-widget button استفاده می‌کنند)
   ================================================================== */
.smp-panel .smp-p-nav button,
.smp-panel .smp-p-nav button span,
body .smp-panel .smp-p-nav button:not(.active) {
    color: var(--smp-muted) !important;
    background-color: transparent !important;
}

.smp-panel .smp-p-nav button.active,
.smp-panel .smp-p-nav button.active span,
body .smp-panel .smp-p-nav button.active {
    color: var(--smp-btn-text) !important;
    background-color: var(--smp-primary) !important;
}

body .smp-panel .smp-btn,
body .smp-container .smp-btn,
body a.smp-btn,
body .smp-panel .smp-quick-alt {
    color: var(--smp-btn-text) !important;
    background-color: var(--smp-primary) !important;
}

body .smp-panel .smp-quick-btn {
    color: var(--smp-btn-text) !important;
    background-color: var(--smp-teacher) !important;
}
body .smp-panel .smp-quick-btn.smp-quick-alt {
    background-color: var(--smp-primary) !important;
}

body .smp-panel .smp-mini-primary,
body .smp-panel .smp-tu-pay-btn,
body .smp-panel .smp-notif2-btn {
    color: var(--smp-btn-text) !important;
    background-color: var(--smp-primary) !important;
}

body .smp-panel .smp-p-hero,
body .smp-panel .smp-p-hero * {
    color: var(--smp-btn-text) !important;
}
/* گرادیان هدر نباید توسط قانون بالا پاک شود */
body .smp-panel .smp-p-hero { background-color: transparent !important; }

body .smp-jdp .smp-jdp-day { color: #334155 !important; background-color: transparent !important; }
body .smp-jdp .smp-jdp-day.smp-jdp-today {
    color: var(--smp-btn-text) !important;
    background-color: var(--smp-primary) !important;
}
body .smp-jdp .smp-jdp-nav { color: var(--smp-primary) !important; background-color: #f1f5f9 !important; }
body .smp-jdp .smp-jdp-btn { color: var(--smp-primary) !important; background-color: transparent !important; }

/* ==================================================================
   لایه سوم — خنثی‌سازی border/padding تحمیلی قالب
   (قالب‌هایی که با .page-content button یا مشابه، کادر رنگی می‌گذارند)
   ================================================================== */
body .smp-panel .smp-btn,
body .smp-panel .smp-quick-btn,
body .smp-panel .smp-tu-pay-btn,
body .smp-panel .smp-notif2-btn,
body .smp-panel .smp-p-nav button,
body .smp-container .smp-btn,
body a.smp-btn {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}

body .smp-panel .smp-mini-btn {
    border: 1px solid var(--smp-border) !important;
    outline: none !important;
}
body .smp-panel .smp-mini-primary { border-color: var(--smp-primary) !important; }
body .smp-panel .smp-mini-danger { border-color: #fecaca !important; }

/* دکمه خروج در هدر */
body .smp-panel .smp-p-hero .smp-p-logout,
body .smp-panel .smp-p-hero a.smp-p-logout {
    color: var(--smp-btn-text) !important;
    background-color: rgba(255, 255, 255, 0.18) !important;
    border: 0 !important;
    text-decoration: none !important;
    padding: 8px 14px !important;
    min-height: auto !important;
    font-size: 13px !important;
}
body .smp-panel .smp-p-hero a.smp-p-logout:hover {
    background-color: rgba(255, 255, 255, 0.32) !important;
}

/* تقویم: کادر و padding تحمیلی قالب */
body .smp-jdp .smp-jdp-day,
body .smp-jdp .smp-jdp-nav,
body .smp-jdp .smp-jdp-btn {
    border: 0 !important;
    outline: none !important;
    box-shadow: none !important;
}
body .smp-jdp .smp-jdp-day,
body .smp-jdp .smp-jdp-nav {
    padding: 0 !important;
    font-size: 13px !important;
    min-height: 0 !important;
}
body .smp-jdp .smp-jdp-nav {
    width: 32px !important;
    height: 32px !important;
    min-width: 32px !important;
}
body .smp-jdp .smp-jdp-day { height: 34px !important; min-height: 34px !important; }
body .smp-jdp .smp-jdp-btn { padding: 6px 12px !important; min-height: 0 !important; font-size: 13px !important; }

/* چیپ‌ها و لینک‌های داخل کارت */
body .smp-panel .smp-chip,
body .smp-panel .smp-subj-chip,
body .smp-panel .smp-mat-btn,
body .smp-panel .smp-link-btn {
    min-height: auto !important;
    box-shadow: none !important;
}
body .smp-panel .smp-link-btn { border: 0 !important; background-color: transparent !important; }
body .smp-panel .smp-chip.active {
    color: var(--smp-btn-text) !important;
    background-color: var(--smp-primary) !important;
}

/* کارت‌های آماری و لیست‌ها نباید کادر رنگی قالب بگیرند */
body .smp-panel .smp-p-stat,
body .smp-panel .smp-mgr-card,
body .smp-panel .smp-tk-item,
body .smp-panel .smp-stu-item {
    border: 1px solid var(--smp-border) !important;
    background-color: var(--smp-card-bg) !important;
    box-shadow: none !important;
}
body .smp-panel .smp-p-stat:hover,
body .smp-panel .smp-mgr-card:hover {
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
}

/* دکمه‌های کوچک: زمینه هم باید از قالب محافظت شود */
body .smp-panel .smp-mini-btn,
body .smp-panel button.smp-mini-btn {
    background-color: var(--smp-card-bg) !important;
    color: var(--smp-muted) !important;
}
body .smp-panel .smp-mini-btn:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
    color: var(--smp-primary) !important;
}
body .smp-panel .smp-mini-primary,
body .smp-panel button.smp-mini-primary {
    background-color: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
}
body .smp-panel .smp-mini-danger,
body .smp-panel button.smp-mini-danger {
    background-color: var(--smp-card-bg) !important;
    color: var(--smp-danger) !important;
}
body .smp-panel .smp-mini-danger:hover {
    background-color: #fef2f2 !important;
    color: var(--smp-danger) !important;
}

/* چیپ‌های پیشنهاد و فیلتر */
body .smp-panel .smp-subj-chip,
body .smp-panel button.smp-subj-chip {
    background-color: #eef4fb !important;
    color: var(--smp-primary) !important;
    border: 1px solid #c9dcf0 !important;
}
body .smp-panel .smp-chip:not(.active) {
    background-color: #f1f5f9 !important;
    color: var(--smp-muted) !important;
}
body .smp-panel .smp-mat-btn {
    background-color: #eef4fb !important;
    color: var(--smp-primary) !important;
    border: 1px solid #c9dcf0 !important;
}

/* ==================== بنر و مودال PWA — محافظت از قالب ==================== */
body .smp-pwa-banner-in {
    background-color: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
}
body .smp-pwa-banner-in strong,
body .smp-pwa-banner-in small,
body .smp-pwa-banner-in .smp-pwa-ico {
    color: var(--smp-btn-text) !important;
}
body .smp-pwa-banner .smp-pwa-install,
body button.smp-pwa-install {
    background-color: var(--smp-btn-text) !important;
    color: var(--smp-primary) !important;
    border: 0 !important;
    min-height: auto !important;
    padding: 9px 20px !important;
    box-shadow: none !important;
}
body .smp-pwa-banner .smp-pwa-close,
body button.smp-pwa-close {
    background-color: transparent !important;
    color: var(--smp-btn-text) !important;
    border: 0 !important;
    min-height: auto !important;
    padding: 0 4px !important;
    box-shadow: none !important;
}
body .smp-pwa-modal .smp-pwa-ok,
body button.smp-pwa-ok {
    background-color: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
    border: 0 !important;
    box-shadow: none !important;
}

/* کارت فعال‌سازی اعلان — محافظت از قالب */
body .smp-panel .smp-push-yes,
body button.smp-push-yes {
    background-color: var(--smp-accent) !important;
    color: #fff !important;
    border: 0 !important;
    min-height: auto !important;
    box-shadow: none !important;
}
body .smp-panel .smp-push-no,
body button.smp-push-no {
    background-color: transparent !important;
    color: #a16207 !important;
    border: 0 !important;
    min-height: auto !important;
    box-shadow: none !important;
}
body .smp-panel .smp-push-txt strong { color: #92400e !important; }
body .smp-panel .smp-push-txt small { color: #a16207 !important; }

/* برنامه هفتگی و درس‌ها — محافظت از قالب */
body .smp-panel .smp-lesson,
body .smp-panel .smp-day-block,
body .smp-panel .smp-course-card {
    background-color: #fff !important;
    box-shadow: none !important;
}
body .smp-panel .smp-lesson.smp-cs-canceled { background-color: #fef2f2 !important; }
body .smp-panel .smp-lesson.smp-cs-online { background-color: #f0f9ff !important; }
body .smp-panel .smp-lesson.smp-cs-moved { background-color: #fffbeb !important; }

body .smp-panel .smp-lesson-title,
body .smp-panel a.smp-lesson-title,
body .smp-panel .smp-course-card strong {
    color: var(--smp-primary) !important;
    text-decoration: none !important;
}
body .smp-panel .smp-course-card,
body .smp-panel a.smp-course-card {
    color: var(--smp-text) !important;
    text-decoration: none !important;
    border: 1px solid var(--smp-border) !important;
}
body .smp-panel .smp-course-card:hover { box-shadow: 0 8px 20px rgba(0,0,0,.08) !important; }

body .smp-panel .smp-join-btn,
body .smp-panel a.smp-join-btn {
    background-color: #0891b2 !important;
    color: #fff !important;
    border: 0 !important;
    text-decoration: none !important;
    min-height: auto !important;
}

body .smp-panel .smp-course-hero,
body .smp-panel .smp-course-hero h3,
body .smp-panel .smp-course-hero p { color: #fff !important; }

body .smp-panel .smp-today-tag {
    background-color: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
}

/* عنوان درس در برنامه هفتگی — حذف کادر/زمینه تحمیلی قالب */
body .smp-panel .smp-lesson-title,
body .smp-panel a.smp-lesson-title,
body .smp-panel .smp-lesson .smp-lesson-title {
    background-color: transparent !important;
    border: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    min-height: auto !important;
    box-shadow: none !important;
    display: block !important;
    width: auto !important;
}

body .smp-panel .smp-course-card .smp-course-go,
body .smp-panel .smp-course-card small,
body .smp-panel .smp-lesson-main small {
    background-color: transparent !important;
    border: 0 !important;
}

/* لینک‌های ناوبری هفته */
body .smp-panel .smp-week-nav .smp-mini-btn,
body .smp-panel .smp-week-nav a.smp-mini-btn {
    background-color: var(--smp-card-bg) !important;
    color: var(--smp-muted) !important;
    border: 1px solid var(--smp-border) !important;
}

/* کارت درس: حذف کادر صورتی قالب از خود لینک */
body .smp-panel a.smp-course-card {
    background-color: #fff !important;
    border: 1px solid var(--smp-border) !important;
    padding: 14px !important;
    min-height: auto !important;
}

/* برچسب فرستنده — محافظت از قالب */
body .smp-panel .smp-from,
body .smp-panel span.smp-from {
    border: 0 !important;
    text-shadow: none !important;
    letter-spacing: normal !important;
    min-height: auto !important;
}
body .smp-panel .smp-from-admin   { background-color: #dbeafe !important; color: #1e40af !important; }
body .smp-panel .smp-from-teacher { background-color: #d1fae5 !important; color: #065f46 !important; }
body .smp-panel .smp-from-student { background-color: #fef3c7 !important; color: #92400e !important; }
body .smp-panel .smp-from-system  { background-color: #f1f5f9 !important; color: #475569 !important; }

/* ==================================================================
   نمای روزمحور برنامه — اجبار چیدمان در برابر قالب
   قالب‌ها معمولاً به button سبک inline-block/عرض ثابت می‌دهند که
   شبکه را می‌شکند و باعث اسکرول افقی می‌شود؛ اینجا اجبار می‌کنیم.
   ================================================================== */
body .smp-panel .smp-days-grid {
    display: grid !important;
    grid-template-columns: repeat(7, minmax(0, 1fr)) !important;
    gap: 8px !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: visible !important;
    float: none !important;
}

body .smp-panel .smp-day-card,
body .smp-panel button.smp-day-card {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: flex-start !important;
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    min-height: auto !important;
    height: auto !important;
    box-sizing: border-box !important;
    padding: 12px 6px !important;
    margin: 0 !important;
    float: none !important;
    background-color: #fff !important;
    color: var(--smp-text) !important;
    border: 1px solid var(--smp-border) !important;
    border-radius: var(--smp-radius) !important;
    box-shadow: none !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    text-shadow: none !important;
    line-height: 1.6 !important;
    font-size: 13px !important;
    text-align: center !important;
    white-space: normal !important;
}

body .smp-panel .smp-day-card:hover {
    border-color: var(--smp-primary) !important;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.09) !important;
}

body .smp-panel .smp-day-card.is-today {
    background-color: #f8fbff !important;
    border-color: var(--smp-primary) !important;
    border-width: 2px !important;
    padding: 11px 5px !important;
}

/* عناصر داخل کارت: بلوکی و بدون سبک تحمیلی */
body .smp-panel .smp-day-card > span {
    display: block !important;
    width: auto !important;
    max-width: 100% !important;
    margin: 0 !important;
    background-color: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    position: static !important;
    transform: none !important;
}

body .smp-panel .smp-day-card > span.smp-day-name {
    color: var(--smp-primary) !important;
    font-size: 13px !important;
    font-weight: bold !important;
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
}
body .smp-panel .smp-day-card > span.smp-day-date {
    color: var(--smp-muted) !important;
    font-size: 10.5px !important;
}
body .smp-panel .smp-day-card > span.smp-day-count {
    background-color: #eef4fb !important;
    color: #1E3A5F !important;
    font-size: 11px !important;
    padding: 3px 9px !important;
    border-radius: 20px !important;
    margin-top: 4px !important;
    white-space: nowrap !important;
}
body .smp-panel .smp-day-card > span.smp-day-none {
    background-color: #f8fafc !important;
    color: #94a3b8 !important;
}
body .smp-panel .smp-day-card > span.smp-day-first {
    color: var(--smp-muted) !important;
    font-size: 10px !important;
}
body .smp-panel .smp-day-card > span.smp-day-today {
    background-color: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
    font-size: 9.5px !important;
    padding: 2px 10px !important;
    border-radius: 12px !important;
    margin-bottom: 2px !important;
    position: static !important;
    transform: none !important;
    white-space: nowrap !important;
}
body .smp-panel .smp-day-card > span.smp-day-flags {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: center !important;
    gap: 3px !important;
    margin-top: 4px !important;
}
body .smp-panel .smp-flag {
    display: inline-block !important;
    font-size: 9.5px !important;
    padding: 2px 7px !important;
    border-radius: 12px !important;
    font-style: normal !important;
    white-space: nowrap !important;
}
body .smp-panel .smp-flag-cancel { background-color: #fee2e2 !important; color: #b91c1c !important; }
body .smp-panel .smp-flag-online { background-color: #cffafe !important; color: #155e75 !important; }

/* ریسپانسیو اجباری */
@media (max-width: 900px) {
    body .smp-panel .smp-days-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; }
}
@media (max-width: 560px) {
    body .smp-panel .smp-days-grid { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; gap: 7px !important; }
    body .smp-panel .smp-day-card { padding: 10px 4px !important; font-size: 12px !important; }
    body .smp-panel .smp-day-card > span.smp-day-name { font-size: 12px !important; }
}
@media (max-width: 360px) {
    body .smp-panel .smp-days-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

/* ---------- مودال روز ---------- */
body .smp-day-modal .smp-day-modal-head,
body .smp-day-modal .smp-day-modal-head strong,
body .smp-day-modal .smp-day-modal-head small {
    color: var(--smp-btn-text) !important;
}
body .smp-day-modal .smp-day-modal-head { background-color: var(--smp-primary) !important; }
body .smp-day-modal .smp-day-modal-close,
body .smp-day-modal button.smp-day-modal-close {
    background-color: rgba(255,255,255,.18) !important;
    color: var(--smp-btn-text) !important;
    border: 0 !important;
    min-height: auto !important;
    padding: 0 !important;
    width: 32px !important;
    height: 32px !important;
    flex: 0 0 auto !important;
}
body .smp-day-modal .smp-day-modal-foot .smp-mini-btn {
    background-color: #fff !important;
    color: var(--smp-muted) !important;
    border: 1px solid var(--smp-border) !important;
}
body .smp-day-modal .smp-day-modal-foot .smp-mini-primary {
    background-color: var(--smp-primary) !important;
    color: var(--smp-btn-text) !important;
    border-color: var(--smp-primary) !important;
}
body .smp-day-modal .smp-lesson { background-color: #fff !important; }
body .smp-day-modal .smp-lesson.smp-cs-canceled { background-color: #fef2f2 !important; }
body .smp-day-modal .smp-lesson.smp-cs-online { background-color: #f0f9ff !important; }
body .smp-day-modal .smp-lesson.smp-cs-moved { background-color: #fffbeb !important; }
body .smp-day-modal .smp-lesson-title {
    color: var(--smp-primary) !important;
    background-color: transparent !important;
    border: 0 !important;
    padding: 0 !important;
}
