/* ==================================================
   ROBOGOLD - Main Stylesheet
   شامل: متغیرها، ریست، اسکرول‌بار، سایدبار، هدر/فوتر موبایل،
   Breadcrumb، بج‌ها، دکمه‌ها، صفحه‌بندی، Tooltip، bn-num/bn-b
   + کل دارک مود سراسری + استایل‌های یکپارچه
   ================================================== */

/* ========== RESET & VARIABLES ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body, button, input, select, textarea {
    font-family: 'Vazirmatn', 'Tahoma', sans-serif;
}

a:link,
a:visited,
a:hover,
a:active {
    text-decoration: none;
}

:root {
    --bg: linear-gradient(135deg, #f5f7ff 0%, #eef2fa 100%);
    --card-bg: #ffffff;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
    --border: #edf2f7;
    --primary-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --primary-light: #667eea;
    --accent-glow: rgba(102, 126, 234, 0.15);
    --danger-bg: #fee8e8;
    --danger-text: #e53e3e;
    --success-bg: #e3fcec;
    --success-text: #20b06e;
    --hover-bg: #f1f5f9;
    --sidebar-bg: rgba(255, 255, 255, 0.98);
    --header-bg: #ffffff;
    --scrollbar-track: #f1f1f1;
    --scrollbar-thumb: #c1c1c1;
}

body.dark {
    --bg: linear-gradient(135deg, #0f172a 0%, #1a2332 100%);
    --card-bg: #1e293b;
    --text-primary: #cbd5e1;
    --text-secondary: #94a3b8;
    --border: #334155;
    --primary-light: #a78bfa;
    --accent-glow: rgba(167, 139, 250, 0.15);
    --danger-bg: rgba(239, 68, 68, 0.12);
    --danger-text: #f87171;
    --success-bg: rgba(34, 197, 94, 0.12);
    --success-text: #4ade80;
    --hover-bg: rgba(51, 65, 85, 0.5);
    --sidebar-bg: #0f172a;
    --header-bg: #1e293b;
    --scrollbar-track: #1e293b;
    --scrollbar-thumb: #475569;
}

body {
    background: var(--bg);
    min-height: 100vh;
    overflow-x: auto;
    color: var(--text-primary);
}

/* ========== SCROLLBAR ========== */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: var(--scrollbar-track);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb {
    background: var(--scrollbar-thumb);
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover {
    background: #667eea;
}

body.dark ::-webkit-scrollbar-thumb:hover {
    background: #6366f1;
}

/* ========== قاعده سراسری: آخرین آیتم فاصله اضافه نداشته باشد ========== */
.main-content > *:last-child {
    margin-bottom: 0 !important;
}

/* ========== MAIN CONTENT LAYOUT ========== */
.main-content {
    margin-right: 260px;
    padding: 24px 24px 28px 24px;
    min-height: 100vh;
    overflow-x: visible;
    width: auto;
    position: relative;
    z-index: 1;
}

.desktop-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    margin-bottom: 25px;
    flex-direction: row-reverse;
}

.desktop-header .logo {
    font-size: 24px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.desktop-header .date-box {
    background: rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(4px);
    padding: 8px 20px;
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    border: 1px solid rgba(0, 0, 0, 0.03);
}

body.dark .desktop-header .date-box {
    background: #1e293b;
    border-color: #334155;
}

/* ========== SIDEBAR ========== */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 260px;
    height: 100%;
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.05);
    border-left: 1px solid var(--border);
    z-index: 1001;
    transition: all 0.3s ease;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.sidebar::-webkit-scrollbar {
    width: 4px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 10px;
}

.sidebar .sidebar-header {
    padding: 20px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.avatar {
    width: 70px;
    height: 70px;
    background: var(--primary-gradient);
    border-radius: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
}

.avatar i {
    font-size: 32px;
    color: white;
}

.sidebar-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-primary);
}

.sidebar-header p {
    font-size: 11px;
    color: var(--text-secondary);
}

.sidebar-header .logo-img {
    max-width: 45px;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

.menu-item {
    padding: 12px 18px;
    margin: 4px 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    border-radius: 14px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.menu-item:hover {
    background: var(--hover-bg);
    color: #667eea;
    transform: translateX(-4px);
}

.menu-item:hover i {
    transform: scale(1.15);
    color: #667eea;
}

.menu-item i {
    transition: all 0.25s ease;
    font-size: 15px;
}

.menu-item.active {
    background: var(--primary-gradient);
    color: white;
}

.menu-item.active:hover {
    transform: none;
}

.menu-item.active i {
    color: white;
}

.menu-badge {
    background: var(--success-bg);
    color: var(--success-text);
    padding: 2px 10px;
    border-radius: 30px;
    font-size: 11px;
    font-weight: 600;
    margin-right: auto;
}

.menu-badge.danger {
    background: var(--danger-bg);
    color: var(--danger-text);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 8px 12px;
    padding: 10px 12px;
    background: var(--hover-bg);
    border-radius: 14px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 13px;
    font-weight: 500;
}

.logout-btn {
    margin: 20px 12px;
    background: var(--danger-bg);
    border: 1px solid var(--border);
    padding: 10px;
    border-radius: 14px;
    color: var(--danger-text);
    cursor: pointer;
    width: calc(100% - 24px);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.25s ease;
}

.logout-btn:hover {
    background: var(--danger-text);
    color: white;
}

body.dark .menu-item:hover {
    color: #a78bfa;
}

body.dark .menu-item:hover i {
    color: #a78bfa;
}

/* ==================================================
   SIDEBAR & TOGGLE
   ================================================== */
.sidebar {
    position: fixed;
    right: 0;
    top: 0;
    width: 260px;
    height: 100%;
    background: var(--sidebar-bg);
    backdrop-filter: blur(10px);
    box-shadow: -4px 0 20px rgba(0, 0, 0, 0.05);
    border-left: 1px solid var(--border);
    z-index: 1001;
    transition: width 0.3s ease, right 0.3s ease;
    overflow: visible !important; /* اجازه میده دکمه بیرون بزنه */
}

/* کانتینر اسکرول داخلی */
.sidebar-scroll {
    height: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    padding-bottom: 20px;
    scrollbar-width: thin;
    scrollbar-color: rgba(102, 126, 234, 0.3) transparent;
}

.sidebar-scroll::-webkit-scrollbar {
    width: 4px;
}

.sidebar-scroll::-webkit-scrollbar-thumb {
    background: rgba(102, 126, 234, 0.3);
    border-radius: 10px;
}

/* استایل دکمه */
/* انیمیشن پالس (ضربان) */
@keyframes pulse-ring {
    0% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

.sidebar-toggle {
    position: absolute;
    top: 88px; 
    left: -15px;
    transform: translateY(-50%); 
    width: 30px;
    height: 30px;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-secondary);
    box-shadow: -2px 2px 5px rgba(0,0,0,0.05);
    z-index: 10;
    transition: all 0.3s ease;
    animation: pulse-ring 2s infinite;
}

.sidebar-toggle:hover {
    animation: none;
    color: #667eea;
    border-color: #667eea;
    transform: translateY(-50%) scale(1.1);
    box-shadow: -2px 2px 12px rgba(102, 126, 234, 0.3);
}

.sidebar.collapsed {
    width: 80px;
}

.sidebar.collapsed .sidebar-header h3,
.sidebar.collapsed .sidebar-header p,
.sidebar.collapsed .menu-item span,
.sidebar.collapsed .menu-badge,
.sidebar.collapsed .theme-toggle span,
.sidebar.collapsed .logout-btn span {
    display: none;
}

.sidebar.collapsed .menu-item,
.sidebar.collapsed .theme-toggle,
.sidebar.collapsed .logout-btn {
    justify-content: center;
    padding: 12px;
    margin: 4px 8px;
}

.sidebar.collapsed .menu-item i {
    font-size: 18px;
    margin: 0;
}

.sidebar.collapsed .theme-toggle {
    justify-content: center;
}

.sidebar.collapsed .theme-toggle i {
    margin: 0;
}

.sidebar.collapsed .logout-btn {
    width: calc(100% - 16px);
    padding: 10px;
}

.sidebar.collapsed .sidebar-toggle {
    left: -15px; 
    transform: translateY(-50%);
}

.sidebar.collapsed .sidebar-toggle:hover {
    transform: translateY(-50%) scale(1.1);
}

.sidebar.collapsed .sidebar-toggle i {
    transform: rotate(180deg);
}

body.dark .sidebar.collapsed .sidebar-header {
    border-bottom-color: transparent;
}

.main-content {
    transition: margin-right 0.3s ease;
}
.main-content.sidebar-collapsed {
    margin-right: 80px;
}

/* ==================================================
   FIX MOBILE SIDEBAR LAYOUT (رفع فاصله اضافی در موبایل)
   ================================================== */
@media (max-width: 768px) {
    .main-content.sidebar-collapsed {
        margin-right: 0 !important;
    }

    .sidebar, .sidebar.collapsed {
        width: 260px !important; /* عرض ثابت و کامل */
        right: -260px !important; /* کاملاً خارج از صفحه */
        transition: right 0.3s ease !important;
    }

    .sidebar.open {
        right: 0 !important;
    }

    .sidebar.collapsed .sidebar-header h3,
    .sidebar.collapsed .sidebar-header p,
    .sidebar.collapsed .menu-item span,
    .sidebar.collapsed .menu-badge,
    .sidebar.collapsed .theme-toggle span,
    .sidebar.collapsed .logout-btn span {
        display: inline-block !important;
        opacity: 1 !important;
        visibility: visible !important;
    }

    .sidebar.collapsed .menu-item,
    .sidebar.collapsed .theme-toggle,
    .sidebar.collapsed .logout-btn {
        justify-content: flex-start !important;
        padding: 12px 18px !important;
        margin: 4px 12px !important;
    }

    .sidebar-toggle {
        display: none !important;
    }
}

/* ========== MOBILE HEADER ========== */
.mobile-header {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--header-bg);
    border-bottom: 1px solid var(--border);
    z-index: 1002;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
}

.mobile-header .menu-icon {
    font-size: 20px;
    cursor: pointer;
    color: var(--text-primary);
}

.mobile-header .date-badge {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.03);
    backdrop-filter: blur(4px);
    padding: 4px 10px;
    border-radius: 40px;
    border: 1px solid rgba(0, 0, 0, 0.03);
    white-space: nowrap;
}

.mobile-header .logo {
    font-size: 18px;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.dark .mobile-header {
    background: #1e293b;
    border-bottom-color: #334155;
}

body.dark .mobile-header .menu-icon {
    color: #e2e8f0;
}

body.dark .mobile-header .logo {
    background: linear-gradient(135deg, #a78bfa, #c084fc);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

body.dark .mobile-header .date-badge {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.05);
    color: #e2e8f0;
}

/* ========== MOBILE BOTTOM NAV ========== */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 65px;
    background: var(--card-bg);
    border-top: 1px solid var(--border);
    z-index: 1002;
    justify-content: space-around;
    align-items: center;
    padding-bottom: env(safe-area-inset-bottom);
}

.mobile-bottom-nav .nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.25s ease;
}

.mobile-bottom-nav a.nav-item {
    text-decoration: none;
    color: inherit;
}

.mobile-bottom-nav .nav-item i {
    font-size: 20px;
}

.mobile-bottom-nav .nav-item span {
    font-size: 10px;
    font-weight: 600;
}

.mobile-bottom-nav .nav-item.active {
    color: #667eea;
    background: var(--hover-bg);
}

body.dark .mobile-bottom-nav {
    background: #1e293b;
    border-top-color: #334155;
}

body.dark .mobile-bottom-nav .nav-item {
    color: #94a3b8;
}

body.dark .mobile-bottom-nav .nav-item.active {
    color: #a78bfa;
    background: rgba(129, 140, 248, 0.15);
}

body.dark .mobile-bottom-nav .nav-item:hover {
    background: rgba(129, 140, 248, 0.08);
}

/* ========== BREADCRUMB BAR ========== */
.breadcrumb-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 16px 0 20px 0 !important;
    padding: 0;
    direction: rtl;
    line-height: 1;
}

.breadcrumb-bar .breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    padding: 0;
    min-width: 0;
    flex: 1;
}

.breadcrumb-bar .bc-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: #ffffff;
    color: #64748b;
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease;
    flex-shrink: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    position: relative;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
}

.breadcrumb-bar .bc-pill i {
    font-size: 11px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: color 0.25s ease;
    line-height: 1;
}

.breadcrumb-bar .bc-pill span {
    line-height: 1;
}

.breadcrumb-bar a.bc-pill:hover {
    background: #f8fafc;
    color: #475569;
    border-color: rgba(148, 163, 184, 0.3);
}

.breadcrumb-bar a.bc-pill:hover i {
    color: #64748b;
}

.breadcrumb-bar .bc-pulse {
    animation: bcPulse 2.5s ease-in-out infinite;
    animation-delay: 0.5s;
}

@keyframes bcPulse {
    0%, 100% { background: #ffffff; }
    50%      { background: rgba(255, 255, 255, 0.15); }
}

.breadcrumb-bar .separator {
    display: inline-flex;
    align-items: center;
    color: #cbd5e1;
    font-size: 9px;
    flex-shrink: 0;
    opacity: 0.9;
    line-height: 1;
}

.btn-back-breadcrumb {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
    border-radius: 30px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    text-decoration: none;
    transition: all 0.25s ease;
    flex-shrink: 0;
    white-space: nowrap;
    box-sizing: border-box;
}

.btn-back-breadcrumb i {
    font-size: 11px;
    transition: transform 0.25s ease;
    line-height: 1;
}

.btn-back-breadcrumb:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.btn-back-breadcrumb:hover i {
    transform: translateX(3px);
}

.breadcrumb-bar .breadcrumb > *:not(.bc-pulse),
.breadcrumb-bar .btn-back-breadcrumb {
    opacity: 0;
    animation: bcItemIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.breadcrumb-bar .breadcrumb > *:nth-child(1) { animation-delay: 0.10s; }
.breadcrumb-bar .breadcrumb > *:nth-child(2) { animation-delay: 0.22s; }
.breadcrumb-bar .btn-back-breadcrumb       { animation-delay: 0.50s; }

.breadcrumb-bar .breadcrumb > .bc-pulse {
    animation:
        bcItemIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.34s both,
        bcPulse 2.5s ease-in-out 1.5s infinite;
}

@keyframes bcItemIn {
    0% {
        opacity: 0;
        transform: translateX(20px) scale(0.9);
    }
    100% {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

body.dark .breadcrumb-bar .bc-pill {
    background: #1e293b;
    color: #94a3b8;
    border-color: rgba(255, 255, 255, 0.06);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

body.dark .breadcrumb-bar .bc-pill i {
    color: #64748b;
}

body.dark .breadcrumb-bar a.bc-pill:hover {
    background: #273449;
    color: #cbd5e1;
    border-color: rgba(255, 255, 255, 0.1);
}

body.dark .breadcrumb-bar a.bc-pill:hover i {
    color: #94a3b8;
}

body.dark .breadcrumb-bar .bc-pulse {
    animation-name: bcPulseDark;
}

@keyframes bcPulseDark {
    0%, 100% { background: #1e293b; }
    50%      { background: rgba(30, 41, 59, 0.15); }
}

body.dark .breadcrumb-bar .breadcrumb > .bc-pulse {
    animation:
        bcItemIn 0.55s cubic-bezier(0.34, 1.56, 0.64, 1) 0.34s both,
        bcPulseDark 2.5s ease-in-out 1.5s infinite;
}

body.dark .breadcrumb-bar .separator {
    color: #475569;
}

body.dark .btn-back-breadcrumb {
    background: rgba(129, 140, 248, 0.12);
    color: #a78bfa;
    border-color: rgba(129, 140, 248, 0.25);
}

body.dark .btn-back-breadcrumb:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

@media (max-width: 640px) {
    .breadcrumb-bar {
        margin: 0 0 12px 0 !important;
        padding: 0 !important;
    }

    .breadcrumb-bar {
        margin-top: -8px !important;
    }

    .breadcrumb-bar .breadcrumb {
        gap: 5px;
    }

    .breadcrumb-bar .bc-pill {
        padding: 6px 11px;
        font-size: 11px;
        gap: 5px;
    }

    .breadcrumb-bar .bc-pill i {
        font-size: 10px;
    }

    .breadcrumb-bar .separator {
        font-size: 8px;
    }
}

/* ========== BADGES - وضعیت حساب ========== */
.badge-success {
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    display: inline-flex;
    white-space: nowrap;
    font-weight: 600;
    align-items: center;
    gap: 4px;
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    display: inline-flex;
    white-space: nowrap;
    font-weight: 600;
    align-items: center;
    gap: 4px;
}

.badge-paid {
    background: rgba(34, 197, 94, 0.15);
    color: #22c55e;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    display: inline-flex;
    white-space: nowrap;
    font-weight: 600;
    align-items: center;
    gap: 4px;
}

.badge-unpaid {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    display: inline-flex;
    white-space: nowrap;
    font-weight: 600;
    align-items: center;
    gap: 4px;
}

.badge-audited {
    background: rgba(102, 126, 234, 0.13);
    color: #667eea;
    padding: 4px 10px;
    border-radius: 30px;
    font-size: 11px;
    display: inline-flex;
    white-space: nowrap;
    font-weight: 600;
    align-items: center;
    gap: 4px;
}

body.dark .badge-success {
    background: rgba(129, 140, 248, 0.12);
    color: #a78bfa;
}

body.dark .badge-warning {
    background: rgba(245, 158, 11, 0.2);
    color: #fbbf24;
}

body.dark .badge-paid {
    background: rgba(34, 197, 94, 0.2);
    color: #4ade80;
}

body.dark .badge-unpaid {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
}

body.dark .badge-audited {
    background: rgba(129, 140, 248, 0.2);
    color: #a78bfa;
}

/* ========== BTN DETAIL ========== */
.btn-detail {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-detail:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
}

body.dark .btn-detail {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

body.dark .btn-detail:hover {
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

/* ========== PAGINATION ========== */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 32px;
    height: 32px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s ease;
}

.pagination a {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border: 1px solid rgba(102, 126, 234, 0.2);
}

.pagination a:hover {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    border-color: transparent;
}

.pagination .active span {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.pagination .disabled span {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-secondary);
    cursor: not-allowed;
}

body.dark .pagination a {
    background: rgba(129, 140, 248, 0.12);
    color: #a78bfa;
    border-color: rgba(129, 140, 248, 0.25);
}

body.dark .pagination a:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

body.dark .pagination .active span {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

body.dark .pagination .disabled span {
    background: rgba(255, 255, 255, 0.05);
    color: #64748b;
}

/* ========== EMPTY STATE ========== */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-secondary);
}

.empty-state i {
    font-size: 44px;
    margin-bottom: 12px;
    opacity: 0.5;
    color: #667eea;
}

body.dark .empty-state i {
    color: #a78bfa;
    opacity: 0.4;
}

/* ========== INPUT WRAPPER (LOGIN) ========== */
.input-wrapper {
    position: relative;
    border-bottom: 2px solid var(--border);
    transition: all 0.2s;
}

.input-wrapper:focus-within {
    border-bottom-color: var(--primary-light);
}

.input-wrapper input {
    width: 100%;
    padding: 10px 0 6px 0;
    border: none;
    background: transparent;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
}

.input-wrapper label {
    position: absolute;
    right: 0;
    top: 10px;
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    pointer-events: none;
    transition: 0.2s ease all;
}

.input-wrapper.active label,
.input-wrapper.has-value label {
    top: -10px;
    font-size: 10px;
    color: var(--primary-light);
}

/* ========== LOGO STYLES ========== */
.form-logo .logo-img {
    max-width: 75px;
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 18px;
    margin-bottom: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.form-logo .logo-img:hover {
    transform: scale(1.02);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* ========== DARK MODE TOGGLE BUTTON ========== */
.dark-toggle {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    background: var(--card-bg);
    border: 1px solid var(--border);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: var(--primary-light);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.dark-toggle:hover {
    transform: scale(1.1);
    background: var(--primary-light);
    color: white;
}

/* ========== BANNER NUMBER & B ========== */
.bn-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #4a90d9;
    color: white;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

.bn-b {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #e91e63;
    color: white;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
    vertical-align: middle;
}

/* ========== DARK MODE - GLOBAL ELEMENTS ========== */
body.dark h1,
body.dark h2,
body.dark h3,
body.dark h4,
body.dark h5,
body.dark h6 {
    color: var(--text-primary);
}

body.dark input:not([type="checkbox"]):not([type="radio"]):not(.search-bar-input),
body.dark textarea,
body.dark select {
    background: #0f172a !important;
    border-color: var(--border) !important;
    color: var(--text-primary) !important;
}

body.dark input::placeholder,
body.dark textarea::placeholder {
    color: #64748b !important;
    opacity: 1;
}

body.dark input:focus,
body.dark textarea:focus,
body.dark select:focus {
    border-color: var(--primary-light) !important;
    box-shadow: 0 0 0 3px rgba(167, 139, 250, 0.15) !important;
    outline: none;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .desktop-header {
        display: none;
    }

    .mobile-header {
        display: flex;
    }

    .mobile-bottom-nav {
        display: flex;
    }

    .sidebar {
        right: -260px;
        transition: right 0.3s ease;
        z-index: 1003;
    }

    .sidebar.open {
        right: 0;
    }

    .main-content {
        margin-right: 0;
        padding: 84px 16px 88px 16px !important;
    }
}

/* ========== REDUCED MOTION ========== */
@media (prefers-reduced-motion: reduce) {
    .breadcrumb-bar,
    .breadcrumb-bar:hover,
    .menu-item,
    .menu-item:hover,
    .menu-item i,
    .btn-back-breadcrumb,
    .btn-detail {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* ========== SEARCH SECTIONS ========== */
.search-section {
    padding: 4px 0;
    border-bottom: 1px solid var(--border);
}

.search-section:last-child {
    border-bottom: none;
}

.search-section-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--text-secondary);
    padding: 8px 14px 4px;
    display: flex;
    align-items: center;
    gap: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.search-section-title i {
    color: #667eea;
    font-size: 12px;
}

body.dark .search-section-title i {
    color: #a78bfa;
}

.search-no-result {
    padding: 24px 20px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.search-no-result i {
    font-size: 24px;
    opacity: 0.4;
    color: #667eea;
}

body.dark .search-no-result i {
    color: #a78bfa;
}

/* ========== SEARCH BAR ========== */
.search-bar {
    position: sticky;
    top: 0;
    z-index: 99;
    margin-bottom: 16px;
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--card-bg);
    border: 1.5px solid var(--border);
    border-radius: 40px;
    padding: 6px 8px;
    transition: all 0.3s cubic-bezier(0.2, 0.9, 0.4, 1.1);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.02);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.search-bar:hover {
    border-color: rgba(102, 126, 234, 0.3);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}

.search-bar:focus-within {
    border-color: rgba(102, 126, 234, 0.7);
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15);
}

body.dark .search-bar {
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
    background: rgba(30, 41, 59, 0.95);
}

body.dark .search-bar:focus-within {
    border-color: rgba(167, 139, 250, 0.6);
    box-shadow: 0 4px 20px rgba(167, 139, 250, 0.18);
}

.search-bar-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(102, 126, 234, 0.25);
    transition: all 0.3s ease;
    margin-right: 6px;
}

.search-bar:focus-within .search-bar-icon {
    transform: scale(1.08) rotate(-5deg);
}

body.dark .search-bar-icon {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
}

.search-bar-input {
    flex: 1;
    padding: 10px 8px;
    border: none !important;
    background: transparent !important;
    background-color: transparent !important;
    color: var(--text-primary) !important;
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    outline: none !important;
    box-shadow: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    border-radius: 40px !important;
}

body.dark .search-bar-input,
body.dark input.search-bar-input,
body.dark .search-bar-input:focus {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
}

.search-bar-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.7;
}

.search-bar-results {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 1000;
}

@media (max-width: 768px) {
    .search-bar {
        padding: 4px;
    }

    .search-bar-icon {
        width: 32px;
        height: 32px;
        font-size: 13px;
        margin-right: 4px;
    }

    .search-bar-input {
        padding: 10px 6px;
        font-size: 13px;
    }
}

/* ========== SEARCH DROPDOWN ========== */
.search-results-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    left: 0;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 15px 40px -10px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    padding: 6px;
    animation: dropdownFadeIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes dropdownFadeIn {
    from {
        opacity: 0;
        transform: translateY(-8px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.search-result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 14px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 10px;
    margin: 2px;
    font-size: 13px;
    font-weight: 500;
}

.search-result-item:hover {
    background: rgba(102, 126, 234, 0.08);
    transform: translateX(-3px);
}

body.dark .search-result-item:hover {
    background: rgba(129, 140, 248, 0.1);
}

.search-result-item small {
    color: var(--text-secondary);
    background: rgba(102, 126, 234, 0.1);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

body.dark .search-result-item small {
    background: rgba(129, 140, 248, 0.15);
    color: #a78bfa;
}

/* ========== رنگ آیکون‌های هدر کارت‌ها ========== */
.card-header h3 i,
.info-card-header h3 i,
.user-card-header h3 i,
.chart-card h4 i,
.chart-box h4 i,
.admins-card-header h3 i,
.admins-section-header h3 i {
    color: #667eea;
}

body.dark .card-header h3 i,
body.dark .info-card-header h3 i,
body.dark .user-card-header h3 i,
body.dark .chart-card h4 i,
body.dark .chart-box h4 i,
body.dark .admins-card-header h3 i,
body.dark .admins-section-header h3 i {
    color: #a78bfa;
}

/* آیکون آتش نارنجی */
h3 i.fa-fire,
h4 i.fa-fire {
    color: #667eea !important;
}

body.dark h3 i.fa-fire,
body.dark h4 i.fa-fire {
    color: #667eea !important;
}

/* ==================================================
   دکمه راهنما - دسکتاپ
   ================================================== */
.desktop-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.help-btn-desktop {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 40px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.help-btn-desktop i {
    font-size: 15px;
    color: #667eea;
    transition: all 0.3s ease;
}

.help-btn-desktop:hover {
    background: var(--primary-gradient);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

.help-btn-desktop:hover i {
    color: white;
    transform: rotate(15deg);
}

body.dark .help-btn-desktop {
    background: #1e293b;
    border-color: #334155;
    color: #cbd5e1;
}

body.dark .help-btn-desktop i {
    color: #a78bfa;
}

body.dark .help-btn-desktop:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

body.dark .help-btn-desktop:hover i {
    color: white;
}

/* ==================================================
   دکمه راهنما - موبایل (فقط آیکون)
   ================================================== */
.mobile-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.help-btn-mobile {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
    border-radius: 50%;
    text-decoration: none;
    transition: all 0.25s ease;
    font-size: 16px;
    flex-shrink: 0;
}

.help-btn-mobile:hover {
    background: var(--primary-gradient);
    color: white;
    transform: scale(1.08);
}

body.dark .help-btn-mobile {
    background: rgba(129, 140, 248, 0.15);
    color: #a78bfa;
}

body.dark .help-btn-mobile:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    color: white;
}

/* ==================================================
   دکمه دارک مود - دسکتاپ (آیکون تنها، کنار لوگو)
   ================================================== */
.desktop-header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.desktop-dark-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    padding: 0;
}

.desktop-dark-btn i {
    color: #667eea;
    transition: all 0.3s ease;
}

.desktop-dark-btn:hover {
    background: var(--primary-gradient);
    border-color: transparent;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 15px rgba(102, 126, 234, 0.3);
}

.desktop-dark-btn:hover i {
    color: white;
    transform: rotate(-15deg);
}

body.dark .desktop-dark-btn {
    background: #1e293b;
    border-color: #334155;
}

body.dark .desktop-dark-btn i {
    color: #a78bfa;
}

body.dark .desktop-dark-btn:hover {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
}

body.dark .desktop-dark-btn:hover i {
    color: white;
}

/* ========== REDUCED MOTION (سراسری) ========== */
@media (prefers-reduced-motion: reduce) {
    .search-results-dropdown,
    .search-result-item,
    .search-bar,
    .search-bar-icon,
    .search-bar-input,
    .group-card,
    .shot-card,
    .calc-card,
    .chart-box,
    .user-card {
        transition: none !important;
        animation: none !important;
        transform: none !important;
    }
}

/* ==================================================
   UNIFIED TABLES (جداول یکپارچه)
   ================================================== */
.table-wrapper,
.desktop-table-wrapper,
.shots-table-wrapper,
.balance-table-wrapper {
    overflow-x: auto !important;
    overflow-y: visible !important;
    width: 100%;
    -webkit-overflow-scrolling: touch;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--card-bg);
}

.data-table,
.groups-table,
.shots-table,
.balance-table,
.admins-table {
    width: 100%;
    border-collapse: separate !important;
    border-spacing: 0;
    min-width: 900px;
    border-radius: 12px;
    overflow: hidden !important;
}

.data-table th, .data-table td,
.groups-table th, .groups-table td,
.shots-table th, .shots-table td,
.balance-table th, .balance-table td,
.admins-table th, .admins-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
    white-space: nowrap;
}

.data-table th,
.groups-table th,
.shots-table th,
.balance-table th,
.admins-table th {
    background: rgba(102, 126, 234, 0.05);
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1.5px solid rgba(102, 126, 234, 0.2);
}

.data-table td,
.groups-table td,
.shots-table td,
.balance-table td,
.admins-table td {
    font-size: 12px;
    font-weight: normal;
    color: var(--text-primary);
}

.data-table tbody tr:last-child td,
.groups-table tbody tr:last-child td,
.shots-table tbody tr:last-child td,
.balance-table tbody tr:last-child td,
.admins-table tbody tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr,
.groups-table tbody tr,
.shots-table tbody tr,
.balance-table tbody tr,
.admins-table tbody tr {
    transition: background 0.2s ease, box-shadow 0.2s ease;
}

.data-table tbody tr:hover,
.groups-table tbody tr:hover,
.shots-table tbody tr:hover,
.balance-table tbody tr:hover,
.admins-table tbody tr:hover {
    background: rgba(102, 126, 234, 0.04);
    box-shadow: inset 3px 0 0 #667eea;
}

body.dark .data-table th,
body.dark .groups-table th,
body.dark .shots-table th,
body.dark .balance-table th,
body.dark .admins-table th {
    background: rgba(129, 140, 248, 0.1);
}

body.dark .data-table tbody tr:hover,
body.dark .groups-table tbody tr:hover,
body.dark .shots-table tbody tr:hover,
body.dark .balance-table tbody tr:hover,
body.dark .admins-table tbody tr:hover {
    background: rgba(129, 140, 248, 0.06);
    box-shadow: inset 3px 0 0 #a78bfa;
}

/* ==================================================
   UNIFIED BANNER VIEWS (نمایش یکدست ویو بنرها)
   ================================================== */
.banner-views {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: center;
    font-size: 12px;
}

.banner-view-item {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(102, 126, 234, 0.08);
    padding: 3px 10px;
    border-radius: 20px;
    color: var(--text-primary);
}

.banner-view-single {
    color: var(--text-primary);
}

body.dark .banner-view-item {
    background: rgba(129, 140, 248, 0.12);
}

/* ==================================================
   UNIFIED TOOLTIPS & MEDIAS (تولتیپ‌ها و رسانه‌ها)
   ================================================== */
.media-cell {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    position: relative;
}

.media-tag-small {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: rgba(34, 197, 94, 0.1);
    color: #16a34a;
    padding: 3px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    direction: ltr;
    white-space: nowrap;
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: all 0.2s ease;
}

.media-more-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 22px;
    padding: 0 6px;
    border-radius: 12px;
    background: rgba(102, 126, 234, 0.15);
    color: #667eea;
    font-size: 11px;
    font-weight: 800;
    cursor: pointer;
    position: relative;
}

.media-tooltip {
    position: fixed !important;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.2);
    z-index: 99999 !important;
    padding: 6px;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    direction: ltr;
    text-align: left;
}

.media-more-badge:hover .media-tooltip,
.media-more-badge:hover ~ .media-tooltip {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.media-tooltip-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-primary);
    direction: ltr;
    text-align: left;
    white-space: nowrap;
    transition: background 0.2s ease;
    user-select: text;
    -webkit-user-select: text;
    cursor: text;
}

.media-tooltip-item.name-item {
    direction: rtl;
    text-align: right;
    font-family: 'Vazirmatn', sans-serif;
}

.media-tooltip-item:hover {
    background: rgba(102, 126, 234, 0.08);
}

body.dark .media-tag-small {
    background: rgba(34, 197, 94, 0.15);
    color: #4ade80;
}
body.dark .media-more-badge {
    background: rgba(129, 140, 248, 0.2);
    color: #a78bfa;
}
body.dark .media-tooltip {
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.5);
}
body.dark .media-tooltip-item:hover {
    background: rgba(129, 140, 248, 0.1);
}

.media-tooltip-item i {
    font-size: 11px;
    color: #22c55e;
}
.media-tooltip-item i.fa-user { color: #8b5cf6; }
.media-tooltip-item i.fa-university,
.media-tooltip-item i.fa-credit-card { color: #667eea; }
.media-tooltip-item i.fa-comment-dots { color: #22c55e; }

body.dark .media-tooltip-item i { color: #4ade80; }
body.dark .media-tooltip-item i.fa-user { color: #a78bfa; }
body.dark .media-tooltip-item i.fa-university,
body.dark .media-tooltip-item i.fa-credit-card { color: #a78bfa; }

/* ==================================================
   FLOATING TOOLTIP (برای main.js - تولتیپ شناور)
   ================================================== */
.media-more-badge .media-tooltip {
    display: none !important; 
}

.media-tooltip-floating {
    position: fixed;
    z-index: 999999;
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 8px 12px;
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 600;
    direction: ltr;
    text-align: left;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.15s ease;
}

body.dark .media-tooltip-floating {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

/* ==================================================
   UNIFIED STATUS TOGGLES (سوییچ‌های وضعیت یکپارچه)
   ================================================== */

/* ---------- VARIZ TOGGLE (سبز) ---------- */
.variz-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    direction: rtl;
}

.variz-toggle-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.25s ease;
    white-space: nowrap;
}

.variz-toggle-label.paid {
    color: #22c55e;
}

body.dark .variz-toggle-label.paid {
    color: #4ade80;
}

.variz-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.variz-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.variz-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: background 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark .variz-toggle-slider {
    background: #475569;
}

.variz-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.variz-toggle-input:checked + .variz-toggle-slider {
    background: #22c55e;
}

body.dark .variz-toggle-input:checked + .variz-toggle-slider {
    background: #16a34a;
}

.variz-toggle-input:checked + .variz-toggle-slider::before {
    transform: translateX(22px);
}

.variz-toggle-input:disabled + .variz-toggle-slider {
    opacity: 0.6;
    cursor: wait;
}

.variz-toggle-input:focus-visible + .variz-toggle-slider {
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.2);
}

/* ---------- HESABRASI TOGGLE (بنفش) ---------- */
.hesabrasi-toggle-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    justify-content: center;
    direction: rtl;
}

.hesabrasi-toggle-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-secondary);
    transition: color 0.25s ease;
    white-space: nowrap;
}

.hesabrasi-toggle-label.done {
    color: #8b5cf6;
}

body.dark .hesabrasi-toggle-label.done {
    color: #a78bfa;
}

.hesabrasi-toggle {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
    flex-shrink: 0;
    cursor: pointer;
}

.hesabrasi-toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.hesabrasi-toggle-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #cbd5e1;
    border-radius: 24px;
    transition: background 0.3s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

body.dark .hesabrasi-toggle-slider {
    background: #475569;
}

.hesabrasi-toggle-slider::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    top: 3px;
    background: #ffffff;
    border-radius: 50%;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
}

.hesabrasi-toggle-input:checked + .hesabrasi-toggle-slider {
    background: #8b5cf6;
}

body.dark .hesabrasi-toggle-input:checked + .hesabrasi-toggle-slider {
    background: #7c3aed;
}

.hesabrasi-toggle-input:checked + .hesabrasi-toggle-slider::before {
    transform: translateX(22px);
}

.hesabrasi-toggle-input:disabled + .hesabrasi-toggle-slider {
    opacity: 0.6;
    cursor: wait;
}

.hesabrasi-toggle-input:focus-visible + .hesabrasi-toggle-slider {
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.2);
}

/* ---------- ریسپانسیو موبایل برای سوییچ‌های داخل کارت ---------- */
@media (max-width: 768px) {
    .shot-card-footer .variz-toggle-wrapper,
    .shot-card-footer .hesabrasi-toggle-wrapper {
        flex-shrink: 0;
        gap: 5px;
    }

    .shot-card-footer .variz-toggle-label,
    .shot-card-footer .hesabrasi-toggle-label {
        font-size: 10px;
    }

    .shot-card-footer .variz-toggle,
    .shot-card-footer .hesabrasi-toggle {
        width: 38px;
        height: 22px;
    }

    .shot-card-footer .variz-toggle-slider::before,
    .shot-card-footer .hesabrasi-toggle-slider::before {
        width: 16px;
        height: 16px;
        left: 3px;
        top: 3px;
    }

    .shot-card-footer .variz-toggle-input:checked + .variz-toggle-slider::before,
    .shot-card-footer .hesabrasi-toggle-input:checked + .hesabrasi-toggle-slider::before {
        transform: translateX(16px);
    }
}

/* ==========================================================
   Global Button System (استاندارد سراسری دکمه‌ها)
   ========================================================== */

/* پایه مشترک تمام دکمه‌ها */
.btn-base {
    padding: 8px 18px !important;
    height: auto !important;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-family: inherit;
    box-sizing: border-box;
    text-decoration: none;
    border: none;
}

.btn-base:hover {
    transform: translateY(-1px);
}

/* دکمه کوچک برای استفاده در جدول‌ها و فضاهای فشرده */
.btn-base.btn-sm {
    padding: 4px 12px !important;
    font-size: 11px !important;
    height: auto !important;
}

/* ۱. دکمه اصلی (بنفش - گرادیانت ربوگلد) */
.btn-primary-custom, 
.btn-base.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}
.btn-primary-custom:hover, 
.btn-base.primary:hover {
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

/* ۲. دکمه آبی (سراسری) */
.btn-base.btn-blue {
    background: linear-gradient(135deg, #3b82f6, #2563eb) !important;
    color: #ffffff !important;
    border: none !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3) !important;
}
.btn-base.btn-blue:hover {
    background: linear-gradient(135deg, #2563eb, #1d4ed8) !important;
    box-shadow: 0 6px 18px rgba(59, 130, 246, 0.45) !important;
}

body.dark .btn-base.btn-blue {
    background: linear-gradient(135deg, #3b82f6, #1d4ed8) !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25) !important;
}

/* ۳. دکمه سبز (موفقیت / تایید) */
.btn-success, 
.btn-base.btn-success {
    background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.3);
}
.btn-success:hover, 
.btn-base.btn-success:hover {
    box-shadow: 0 6px 16px rgba(34, 197, 94, 0.4);
}

/* ۴. دکمه قرمز (خطا / حذف) */
.btn-danger, 
.btn-base.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%) !important;
    color: #ffffff !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}
.btn-danger:hover, 
.btn-base.btn-danger:hover {
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4);
}

/* ۵. دکمه سفید / روشن (خنثی و شیک مثل ریست) */
.btn-light, 
.btn-base.btn-light {
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%) !important;
    color: #475569 !important;
    border: 1px solid #cbd5e1 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05), 0 1px 3px rgba(0, 0, 0, 0.05);
}
.btn-light:hover, 
.btn-base.btn-light:hover {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%) !important;
    border-color: #94a3b8 !important;
    color: #1e293b !important;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08), 0 2px 4px rgba(0, 0, 0, 0.05);
}

body.dark .btn-light, 
body.dark .btn-base.btn-light {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%) !important;
    color: #cbd5e1 !important;
    border-color: #334155 !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}
body.dark .btn-light:hover, 
body.dark .btn-base.btn-light:hover {
    background: linear-gradient(135deg, #334155 0%, #1e293b 100%) !important;
    color: #ffffff !important;
    border-color: #475569 !important;
}

/* ۶. دکمه غیرفعال (Disabled) */
.btn-base:disabled, 
.btn-base.disabled {
    background: rgba(148, 163, 184, 0.15) !important;
    color: #94a3b8 !important;
    border: 1px solid var(--border) !important;
    box-shadow: none !important;
    cursor: not-allowed !important;
    transform: none !important;
}

body.dark .btn-base:disabled, 
body.dark .btn-base.disabled {
    background: rgba(148, 163, 184, 0.05) !important;
    color: #475569 !important;
    border-color: rgba(255, 255, 255, 0.05) !important;
}

/* ==========================================================
   تنظیمات رنگ آیکن و متن داخل دکمه‌ها
   ========================================================== */

.btn-base.btn-blue i,
.btn-base.btn-blue span,
.btn-base.primary i,
.btn-base.primary span,
.btn-blue i,
.btn-blue span,
.primary i,
.primary span {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

.btn-base.btn-light i,
.btn-base.btn-light span,
.btn-light i,
.btn-light span {
    color: inherit !important;
    -webkit-text-fill-color: inherit !important;
}

/* ==========================================================
   ROBOGOLD - Global Toast System (سیستم سراسری پیام‌های توست)
   ========================================================== */
.toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: #22c55e;
    color: #ffffff;
    padding: 14px 22px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 10px 30px rgba(34, 197, 94, 0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-family: inherit;
    direction: rtl;
    text-align: right;
    white-space: nowrap;
}

.toast.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* رنگ‌بندی وضعیت‌های مختلف توست */
.toast.error {
    background: #ef4444;
    box-shadow: 0 10px 30px rgba(239, 68, 68, 0.3);
}

.toast.hesabrasi {
    background: #8b5cf6;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

body.dark .toast.hesabrasi {
    background: #7c3aed;
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}

.toast i {
    color: #ffffff;
    font-size: 16px;
    flex-shrink: 0;
}

/* حالت ریسپانسیو موبایل */
@media (max-width: 768px) {
    .toast {
        bottom: 85px;
        max-width: calc(100vw - 24px);
        width: max-content;
        padding: 12px 18px;
        font-size: 12px;
        white-space: nowrap;
        text-align: center;
        box-sizing: border-box;
    }
}

/* ==========================================================
   CLOCK & MOBILE VISIBILITY UTILITIES
   ========================================================== */
.hide-on-mobile { display: inline; }
.show-only-mobile { display: none; }

/* مخفی کردن ساعت در گوشی‌های کوچک (زیر 320px) */
@media (max-width: 320px) {
    .hide-on-mobile { display: none !important; }
    .show-only-mobile { display: inline !important; }
}

#liveClock, #mobileLiveClock {
    display: inline-block; direction: ltr; unicode-bidi: embed; font-variant-numeric: tabular-nums; text-align: center;
}