:root {
    color-scheme: light !important;
    --dc-navy:#0e1a2b;
    --dc-blue:#176b87;
    --dc-sky:#3aa6c9;
    --dc-teal:#25a795;
    --dc-orange:#f5a623;
    --dc-bg:#f2f7fa;
    --dc-card:#ffffff;
    --dc-text:#172334;
    --dc-muted:#647789;
    --dc-border:#d7e4eb;
}

html,body,.fi-body {
    direction:rtl;
    color-scheme:light !important;
    background:var(--dc-bg) !important;
    color:var(--dc-text) !important;
    font-family:Tahoma,Arial,sans-serif !important;
}

.fi-main {
    background:
        radial-gradient(circle at 15% 8%,rgba(58,166,201,.10),transparent 22%),
        radial-gradient(circle at 88% 25%,rgba(245,166,35,.08),transparent 20%),
        var(--dc-bg) !important;
}

.fi-topbar,.fi-topbar nav {
    background:#fff !important;
    border-bottom:1px solid var(--dc-border) !important;
    box-shadow:0 4px 18px rgba(14,26,43,.06) !important;
}

.fi-sidebar,
.fi-sidebar-nav,
.fi-sidebar-header,
aside.fi-sidebar {
    background:linear-gradient(180deg,#17344b 0%,#0e1a2b 100%) !important;
}

.fi-sidebar {
    box-shadow:-8px 0 28px rgba(14,26,43,.14) !important;
}

.fi-sidebar .fi-logo,
.fi-sidebar .fi-sidebar-item-label,
.fi-sidebar .fi-sidebar-group-label {
    color:#f7fbfd !important;
}

.fi-sidebar .fi-sidebar-item-icon {
    color:#9bc3d5 !important;
}

.fi-sidebar .fi-sidebar-item-button {
    border-radius:11px !important;
    margin-block:3px !important;
}

.fi-sidebar .fi-sidebar-item-button:hover {
    background:rgba(58,166,201,.16) !important;
}

.fi-sidebar .fi-active > .fi-sidebar-item-button,
.fi-sidebar .fi-sidebar-item.fi-active .fi-sidebar-item-button {
    background:linear-gradient(90deg,rgba(245,166,35,.25),rgba(58,166,201,.18)) !important;
    border-right:3px solid var(--dc-orange) !important;
}

.fi-header-heading {
    color:var(--dc-navy) !important;
    font-weight:900 !important;
}

.fi-section,
.fi-ta-ctn,
.fi-wi-widget,
.fi-wi-stats-overview-stat {
    background:var(--dc-card) !important;
    border:1px solid var(--dc-border) !important;
    border-radius:16px !important;
    box-shadow:0 8px 22px rgba(14,26,43,.06) !important;
}

.fi-wi-stats-overview-stat {
    position:relative !important;
    overflow:hidden !important;
}

.fi-wi-stats-overview-stat::before {
    content:"";
    position:absolute;
    inset:0 0 auto;
    height:5px;
    background:var(--dc-blue);
}

.fi-wi-stats-overview-stat:nth-child(4n+1)::before {background:var(--dc-orange)}
.fi-wi-stats-overview-stat:nth-child(4n+2)::before {background:var(--dc-sky)}
.fi-wi-stats-overview-stat:nth-child(4n+3)::before {background:var(--dc-teal)}
.fi-wi-stats-overview-stat:nth-child(4n+4)::before {background:#7668c9}

.fi-ta-header-cell,.fi-ta-header {
    background:#eaf3f7 !important;
}

.fi-ta-row {
    background:#fff !important;
    border-bottom-color:#e4edf2 !important;
}

.fi-ta-row:hover {
    background:#f5fafc !important;
}

.fi-input-wrp,
.fi-fo-field-wrp input,
.fi-fo-field-wrp textarea,
.fi-fo-field-wrp select {
    background:#fff !important;
    color:var(--dc-text) !important;
    border-color:#c8d9e2 !important;
    border-radius:11px !important;
}

.fi-input-wrp:focus-within {
    border-color:var(--dc-sky) !important;
    box-shadow:0 0 0 3px rgba(58,166,201,.15) !important;
}

.fi-btn {
    border-radius:11px !important;
    font-weight:800 !important;
}

.fi-btn.fi-color-primary {
    background:linear-gradient(135deg,var(--dc-orange),#ec8600) !important;
    color:#172334 !important;
}

.fi-simple-layout {
    background:
        radial-gradient(circle at 15% 15%,rgba(58,166,201,.20),transparent 30%),
        radial-gradient(circle at 85% 80%,rgba(245,166,35,.18),transparent 28%),
        linear-gradient(145deg,#eef8fb,#fff8eb) !important;
}

.fi-simple-main {
    background:#fff !important;
    border:1px solid var(--dc-border) !important;
    border-top:5px solid var(--dc-orange) !important;
    border-radius:22px !important;
    box-shadow:0 24px 65px rgba(14,26,43,.17) !important;
}

.fi-simple-main label,
.fi-simple-header-heading,
.fi-simple-header-subheading {
    color:var(--dc-text) !important;
}

@media(max-width:768px) {
    .fi-main{padding-inline:12px !important}
    .fi-section,.fi-ta-ctn,.fi-wi-stats-overview-stat{border-radius:13px !important}
}

/* تکمیل تم چندرنگ و کاهش سفیدی */

.fi-topbar,
.fi-topbar nav {
    background:linear-gradient(90deg,#ffffff 0%,#f3fafd 55%,#fff9ee 100%) !important;
}

/* کارت خوش‌آمدگویی */
.fi-wi-account {
    background:linear-gradient(135deg,#eef9fc 0%,#fff8e9 100%) !important;
    border-right:5px solid var(--dc-sky) !important;
}

/* کارت‌های آماری با رنگ‌های پاستلی */
.fi-wi-stats-overview-stats-ctn > :nth-child(4n+1) .fi-wi-stats-overview-stat {
    background:linear-gradient(145deg,#fffaf0,#fff3d8) !important;
    border-top:5px solid var(--dc-orange) !important;
}

.fi-wi-stats-overview-stats-ctn > :nth-child(4n+2) .fi-wi-stats-overview-stat {
    background:linear-gradient(145deg,#f3fbfe,#e3f5fb) !important;
    border-top:5px solid var(--dc-sky) !important;
}

.fi-wi-stats-overview-stats-ctn > :nth-child(4n+3) .fi-wi-stats-overview-stat {
    background:linear-gradient(145deg,#f1fbf8,#dff5ee) !important;
    border-top:5px solid var(--dc-teal) !important;
}

.fi-wi-stats-overview-stats-ctn > :nth-child(4n+4) .fi-wi-stats-overview-stat {
    background:linear-gradient(145deg,#f8f6ff,#ece8ff) !important;
    border-top:5px solid #7668c9 !important;
}

/* اگر کارت‌ها مستقیماً فرزند Grid باشند */
.fi-wi-stats-overview-stats-ctn > :nth-child(4n+1) {
    --card-accent:#f5a623;
}

.fi-wi-stats-overview-stats-ctn > :nth-child(4n+2) {
    --card-accent:#3aa6c9;
}

.fi-wi-stats-overview-stats-ctn > :nth-child(4n+3) {
    --card-accent:#25a795;
}

.fi-wi-stats-overview-stats-ctn > :nth-child(4n+4) {
    --card-accent:#7668c9;
}

/* سکشن‌ها و جدول‌ها */
.fi-section {
    background:linear-gradient(145deg,#ffffff,#f7fbfd) !important;
}

.fi-ta-ctn {
    background:#f8fbfd !important;
}

.fi-ta-header {
    background:linear-gradient(90deg,#e8f4f8,#fff5e4) !important;
}

/* عنوان و اعداد */
.fi-wi-stats-overview-stat-value {
    color:var(--dc-navy) !important;
    font-weight:900 !important;
}

.fi-wi-stats-overview-stat-label {
    color:#36586d !important;
    font-weight:700 !important;
}

/* رنگ آرام‌تر پس‌زمینه اصلی */
.fi-main {
    background:
        radial-gradient(circle at 10% 10%,rgba(58,166,201,.14),transparent 28%),
        radial-gradient(circle at 88% 18%,rgba(245,166,35,.11),transparent 25%),
        linear-gradient(135deg,#eef6fa 0%,#f8fbfc 50%,#fff9ef 100%) !important;
}

/* منوی سرمه‌ای تیره‌تر و تفکیک گزینه‌ها */
.fi-sidebar,
.fi-sidebar-nav,
.fi-sidebar-header,
aside.fi-sidebar {
    background:linear-gradient(180deg,#102a40 0%,#081827 100%) !important;
}

.fi-sidebar .fi-sidebar-item {
    border-bottom:1px solid rgba(255,255,255,.13) !important;
    padding-bottom:4px !important;
    margin-bottom:4px !important;
}

.fi-sidebar .fi-sidebar-item:last-child {
    border-bottom:0 !important;
}

.fi-sidebar .fi-sidebar-item-button {
    min-height:42px !important;
    padding-inline:12px !important;
}

/* واضح‌سازی گزینه فعال و Hover منوی کناری */
.fi-sidebar-item > .fi-sidebar-item-btn {
    transition: background-color .18s ease, color .18s ease, transform .18s ease !important;
}

.fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:hover {
    background: rgba(255, 255, 255, .13) !important;
    transform: translateX(-3px);
}

.fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:hover,
.fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:hover .fi-sidebar-item-label,
.fi-sidebar-item:not(.fi-active) > .fi-sidebar-item-btn:hover svg {
    color: #ffffff !important;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.fi-sidebar-item > .fi-sidebar-item-btn[aria-current="page"] {
    background: linear-gradient(135deg, #f5a623, #ffba42) !important;
    box-shadow: 0 5px 14px rgba(245, 166, 35, .28) !important;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn .fi-sidebar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn svg,
.fi-sidebar-item > .fi-sidebar-item-btn[aria-current="page"],
.fi-sidebar-item > .fi-sidebar-item-btn[aria-current="page"] .fi-sidebar-item-label,
.fi-sidebar-item > .fi-sidebar-item-btn[aria-current="page"] svg {
    color: #102f46 !important;
    font-weight: 900 !important;
}

/* Role identity banner */
.dc-role-banner {
    margin: 0 0 1rem 0;
    padding: 0.8rem 1rem;
    border-radius: 0.75rem;
    font-weight: 700;
    font-size: 0.95rem;
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.dc-role-student {
    background: #eff6ff;
    color: #1d4ed8;
}

.dc-role-teacher {
    background: #ecfdf5;
    color: #047857;
}

.dc-role-manager {
    background: #fff7ed;
    color: #c2410c;
}

.dc-role-user {
    background: #f8fafc;
    color: #475569;
}
