:root { --primary-color:#FF6B00; --secondary-color:#FF8C38; }
/* ===== استایل‌های اسپلش اسکرین ===== */
#splashScreen {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--primary-color, #FF6B00), var(--secondary-color, #FF8C38));
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}
#splashScreen.hide {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}
.splash-content {
    text-align: center;
    color: white;
    padding: 40px;
    max-width: 500px;
    width: 90%;
}
.splash-logo-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 40px;
    background: white;
    padding: 18px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
    margin-bottom: 22px;
    animation: splashFloat 3s ease-in-out infinite;
    display: inline-block;
}
@keyframes splashFloat {
    0%, 100% { transform: translateY(0px) scale(1); }
    50% { transform: translateY(-15px) scale(1.05); }
}
.splash-title {
    font-size: 32px;
    font-weight: 900;
    margin-bottom: 5px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.2);
}
.splash-subtitle {
    font-size: 16px;
    color: #FFD700;
    margin-bottom: 25px;
    font-weight: 500;
}
.splash-divider {
    width: 60px;
    height: 3px;
    background: #FFD700;
    margin: 0 auto 25px;
    border-radius: 3px;
}
.splash-status {
    font-size: 14px;
    margin-bottom: 15px;
    opacity: 0.9;
    min-height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}
.splash-progress-container {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.25);
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}
.splash-progress-bar {
    height: 100%;
    width: 0%;
    background: linear-gradient(90deg, #FFD700, #FFF5ED);
    border-radius: 10px;
    transition: width 0.3s ease;
}
.splash-percent {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
}
.splash-icons {
    font-size: 24px;
    letter-spacing: 8px;
    opacity: 0.6;
    margin-top: 10px;
}
.splash-version {
    font-size: 12px;
    opacity: 0.5;
    margin-top: 20px;
}
.splash-loader {
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: splashSpin 0.8s ease-in-out infinite;
    vertical-align: middle;
}
@keyframes splashSpin {
    to { transform: rotate(360deg); }
}

/* ===== استایل‌های عمومی ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Vazirmatn', sans-serif;
    direction: rtl;
    background: #FFF5ED;
    min-height: 100vh;
}
.exit-btn {
    position: fixed;
    bottom: 25px;
    right: 25px;
    z-index: 9999;
    background: linear-gradient(135deg, #DC3545, #FF6B6B);
    color: white;
    border: none;
    border-radius: 50px;
    padding: 14px 28px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    box-shadow: 0 6px 25px rgba(220, 53, 69, 0.45);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    gap: 12px;
}
.exit-btn:hover { transform: scale(1.05) translateY(-3px); box-shadow: 0 10px 40px rgba(220, 53, 69, 0.55); }
.exit-btn i { font-size: 20px; }

/* ===== صفحه لاگین ===== */
#loginPage {
    min-height: 100vh;
    display: none;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #FFF5ED 0%, #FFE8D6 50%, #FFD4B5 100%);
    position: relative;
    overflow: hidden;
}
#loginPage.show {
    display: flex !important;
}
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    z-index: 10;
}
.login-box {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(20px);
    border-radius: 45px;
    padding: 55px 50px 45px;
    max-width: 460px;
    width: 100%;
    box-shadow: 0 25px 70px rgba(255, 107, 0, 0.18);
    animation: slideUp 0.9s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}
.login-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color, #FF6B00), var(--secondary-color, #FF8C38), #FFD700, var(--secondary-color, #FF8C38), var(--primary-color, #FF6B00));
    background-size: 300% 100%;
    animation: gradientMove 4s ease-in-out infinite;
}
@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(60px) scale(0.94); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(25px); }
    to { opacity: 1; transform: translateY(0); }
}
.login-header { text-align: center; margin-bottom: 38px; }
.login-logo-img {
    width: 140px;
    height: 140px;
    object-fit: contain;
    border-radius: 40px;
    background: white;
    padding: 18px;
    box-shadow: 0 10px 40px rgba(255, 107, 0, 0.2);
    margin-bottom: 22px;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: logoFloat 4s ease-in-out infinite;
    display: inline-block;
}
@keyframes logoFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
}
.login-header h1 {
    font-size: 32px;
    font-weight: 900;
    color: #2C1810;
    margin-bottom: 6px;
}
.login-header h1::before {
    content: '';
    display: inline-block;
    width: 4px;
    height: 26px;
    background: linear-gradient(180deg, var(--primary-color, #FF6B00), var(--secondary-color, #FF8C38));
    margin-left: 12px;
    vertical-align: middle;
    border-radius: 3px;
}
.login-subtitle { color: var(--primary-color, #FF6B00); font-weight: 700; font-size: 14px; letter-spacing: 3px; opacity: 0.85; }
.login-divider {
    width: 70px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color, #FF6B00), #FFD700);
    margin: 16px auto 0;
    border-radius: 3px;
}
.login-form .form-group { margin-bottom: 24px; }
.login-form label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}
.login-form label i { color: var(--primary-color, #FF6B00); margin-left: 8px; width: 20px; }
.login-form input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #E8E0D8;
    border-radius: 18px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #F8F5F2;
    color: #2C1810;
}
.login-form input:focus {
    outline: none;
    border-color: var(--primary-color, #FF6B00);
    box-shadow: 0 0 0 5px rgba(255, 107, 0, 0.08);
    background: white;
    transform: translateY(-2px);
}
.login-form input::placeholder { color: #B0A89E; }
.password-wrapper { position: relative; }
.password-wrapper input { padding-left: 55px; }
.toggle-password {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    font-size: 20px;
    padding: 5px;
    transition: all 0.3s ease;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.toggle-password:hover { color: var(--primary-color, #FF6B00); background: rgba(255, 107, 0, 0.08); }
.login-btn {
    width: 100%;
    padding: 17px;
    border: none;
    border-radius: 18px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 19px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    background: linear-gradient(135deg, var(--primary-color, #FF6B00), var(--secondary-color, #FF8C38));
    color: white;
    box-shadow: 0 6px 25px rgba(255, 107, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    position: relative;
    overflow: hidden;
}
.login-btn::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.08), transparent);
    transform: rotate(45deg);
    transition: all 0.6s ease;
}
.login-btn:hover::after { left: 100%; }
.login-btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 45px rgba(255, 107, 0, 0.45);
}
.login-btn:active { transform: scale(0.97); }
.login-btn:disabled { opacity: 0.7; cursor: not-allowed; }
.login-message {
    margin-top: 16px;
    text-align: center;
    font-size: 14px;
    padding: 14px 18px;
    border-radius: 14px;
    display: none;
    animation: fadeIn 0.3s ease;
}
.login-message.error {
    display: block;
    background: #FEE2E2;
    color: #DC2626;
    border: 1px solid #FECACA;
}
.login-message.success {
    display: block;
    background: #D1FAE5;
    color: #065F46;
    border: 1px solid #A7F3D0;
}
.login-footer {
    margin-top: 32px;
    text-align: center;
    color: #ccc;
    font-size: 13px;
    border-top: 1px solid #f0f0f0;
    padding-top: 22px;
}
.loading-spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 0.8s ease-in-out infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.decoration {
    position: fixed;
    font-size: 60px;
    opacity: 0.07;
    animation: float 8s ease-in-out infinite;
    user-select: none;
    pointer-events: none;
}
.decoration-1 { top: 10%; left: 5%; animation-delay: 0s; font-size: 85px; }
.decoration-2 { bottom: 15%; right: 5%; animation-delay: 2s; font-size: 75px; }
.decoration-3 { top: 20%; right: 10%; animation-delay: 4s; font-size: 95px; }
.decoration-4 { bottom: 25%; left: 8%; animation-delay: 1s; font-size: 80px; }
.decoration-5 { top: 50%; left: 3%; animation-delay: 3s; font-size: 55px; }
.decoration-6 { top: 40%; right: 3%; animation-delay: 5s; font-size: 60px; }
@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    25% { transform: translateY(-25px) rotate(6deg); }
    75% { transform: translateY(18px) rotate(-6deg); }
}

/* ===== صفحه اصلی ===== */
#mainPage { display: none; }
#mainPage.show { display: block !important; }
.header {
    background: linear-gradient(135deg, var(--primary-color, #FF6B00), var(--secondary-color, #FF8C38));
    padding: 16px 45px;
    box-shadow: 0 6px 30px rgba(255, 107, 0, 0.35);
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.header-title {
    display: flex;
    align-items: center;
    gap: 18px;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 25px;
    flex-wrap: wrap;
}
.header-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    border-radius: 16px;
    background: white;
    padding: 6px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    animation: logoFloat 3s ease-in-out infinite;
}
.header-title h1 {
    color: white;
    font-size: 28px;
    font-weight: 900;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    margin: 0;
}
.header-slogan {
    color: #FFD700;
    font-size: 13px;
    display: block;
    margin-top: 3px;
    font-weight: 400;
}
.header-time {
    color: white;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.15);
    padding: 9px 25px;
    border-radius: 50px;
    backdrop-filter: blur(12px);
    font-weight: 500;
    direction: ltr;
    text-align: center;
    min-width: 220px;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.user-section {
    display: flex;
    align-items: center;
    gap: 12px;
}
.user-badge {
    color: white;
    font-weight: 700;
    font-size: 14px;
    background: rgba(255, 255, 255, 0.2);
    padding: 7px 18px;
    border-radius: 50px;
    backdrop-filter: blur(12px);
    white-space: nowrap;
    border: 1px solid rgba(255, 255, 255, 0.08);
}
.role-badge {
    color: white;
    font-weight: 700;
    font-size: 13px;
    background: rgba(255, 215, 0, 0.25);
    padding: 6px 16px;
    border-radius: 50px;
    backdrop-filter: blur(10px);
    white-space: nowrap;
    border: 1px solid rgba(255, 215, 0, 0.2);
}
.logout-btn {
    background: rgba(255, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 7px 18px;
    border-radius: 50px;
    cursor: pointer;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 14px;
    transition: all 0.3s ease;
    white-space: nowrap;
}
.logout-btn:hover { background: rgba(255, 0, 0, 0.4); transform: scale(1.05); }
.navbar {
    background: white;
    padding: 10px 35px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.06);
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    position: sticky;
    top: 76px;
    z-index: 999;
    border-bottom: 3px solid var(--primary-color, #FF6B00);
}
.nav-item {
    padding: 10px 20px;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 700;
    color: #555;
    border: none;
    background: transparent;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.nav-item:hover {
    background: var(--primary-color, #FF6B00);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 0, 0.35);
}
.nav-item.active {
    background: var(--primary-color, #FF6B00);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 107, 0, 0.3);
}
.main-content {
    padding: 25px 30px;
    max-width: 1440px;
    margin: 0 auto;
}

/* ===== کارت‌های آماری ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 22px;
    margin-bottom: 35px;
}
.stat-card {
    background: white;
    padding: 28px;
    border-radius: 25px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.05);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    cursor: pointer;
    border: 2px solid transparent;
}
.stat-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 45px rgba(255, 107, 0, 0.15);
    border-color: var(--primary-color, #FF6B00);
}
.stat-card .icon { font-size: 45px; margin-bottom: 12px; }
.stat-card .number { font-size: 36px; font-weight: 900; color: var(--primary-color, #FF6B00); }
.stat-card .label { color: #888; font-size: 15px; margin-top: 6px; }

/* ===== دکمه‌های سریع ===== */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 35px;
}
.quick-btn {
    padding: 16px 22px;
    border: none;
    border-radius: 18px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: white;
    background: linear-gradient(135deg, var(--primary-color, #FF6B00), var(--secondary-color, #FF8C38));
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.25);
}
.quick-btn:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 10px 35px rgba(255, 107, 0, 0.4);
}
.quick-btn:active { transform: scale(0.95); }
.quick-btn.green { background: linear-gradient(135deg, #28A745, #34CE57); }
.quick-btn.orange { background: linear-gradient(135deg, #FFC107, #FFA000); }
.quick-btn.blue { background: linear-gradient(135deg, #17A2B8, #0DCAF0); }
.quick-btn.purple { background: linear-gradient(135deg, #6F42C1, #9B59B6); }
.quick-btn.red { background: linear-gradient(135deg, #DC3545, #FF6B6B); }

/* ===== بخش‌ها ===== */
.section { display: none; animation: fadeIn 0.5s ease; }
.section.active { display: block; }
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 22px;
    flex-wrap: wrap;
    gap: 12px;
}
.section-title {
    font-size: 24px;
    font-weight: 900;
    color: #2C1810;
}
.section-title i { color: var(--primary-color, #FF6B00); margin-left: 12px; }

/* ===== جداول ===== */
.table-container {
    background: white;
    border-radius: 25px;
    overflow: hidden;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.05);
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    font-family: 'Vazirmatn', sans-serif;
    min-width: 650px;
}
thead {
    background: linear-gradient(135deg, var(--primary-color, #FF6B00), var(--secondary-color, #FF8C38));
    color: white;
}
th { padding: 16px 22px; text-align: right; font-weight: 700; font-size: 14px; white-space: nowrap; }
td { padding: 14px 22px; border-bottom: 1px solid #f0f0f0; font-size: 14px; }
tr:hover { background: #FFF8F2; }

/* ===== بج‌ها ===== */
.badge {
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    display: inline-block;
}
.badge-success { background: #D4EDDA; color: #155724; }
.badge-danger { background: #F8D7DA; color: #721C24; }
.badge-warning { background: #FFF3CD; color: #856404; }
.badge-info { background: #D1ECF1; color: #0C5460; }
.badge-secondary { background: #E2E3E5; color: #383D41; }

/* ===== دکمه‌های داخل جدول ===== */
td .quick-btn {
    padding: 6px 12px;
    font-size: 12px;
    box-shadow: none;
    border-radius: 10px;
    min-width: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin: 2px;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}
td .quick-btn:hover { transform: scale(1.12); }
td .quick-btn i { font-size: 13px; color: white; }
td .quick-btn.delete { background: #DC3545; }
td .quick-btn.delete:hover { background: #c82333; }
td .quick-btn.edit { background: #FFC107; }
td .quick-btn.edit:hover { background: #e0a800; }
td .quick-btn.pdf { background: #6F42C1; }
td .quick-btn.pdf:hover { background: #5a32a3; }
td .quick-btn.blue { background: #17A2B8; }
td .quick-btn.blue:hover { background: #138496; }

/* ===== بخش جستجو ===== */
.search-section {
    background: white;
    padding: 18px 25px;
    border-radius: 20px;
    box-shadow: 0 3px 15px rgba(0, 0, 0, 0.04);
    margin-bottom: 18px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.search-section label {
    font-weight: 700;
    font-size: 15px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 8px;
}
.search-section label i { color: var(--primary-color, #FF6B00); }
.search-section input {
    flex: 1;
    padding: 10px 18px;
    border: 2px solid #e8e0d8;
    border-radius: 14px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    min-width: 160px;
    transition: all 0.3s ease;
    background: #f8f5f2;
}
.search-section input:focus {
    outline: none;
    border-color: var(--primary-color, #FF6B00);
    box-shadow: 0 0 0 4px rgba(255, 107, 0, 0.06);
    background: white;
}
.search-section .hint {
    font-size: 13px;
    color: #999;
    margin-right: auto;
}

/* ===== مودال ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 2000;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
}
.modal.active { display: flex; animation: fadeIn 0.3s ease; }
.modal-content {
    background: white;
    padding: 40px 45px;
    border-radius: 35px;
    max-width: 540px;
    width: 92%;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.3);
}
.modal-title {
    font-size: 24px;
    font-weight: 900;
    color: #2C1810;
    margin-bottom: 28px;
    text-align: center;
}
.modal-title i { color: var(--primary-color, #FF6B00); margin-left: 12px; }
.form-group { margin-bottom: 20px; }
.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 7px;
    color: #333;
    font-size: 14px;
}
.form-group label i { color: var(--primary-color, #FF6B00); margin-left: 8px; }
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e8e0d8;
    border-radius: 14px;
    font-family: 'Vazirmatn', sans-serif;
    font-size: 15px;
    transition: all 0.3s ease;
    background: #f8f5f2;
    color: #2C1810;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color, #FF6B00);
    box-shadow: 0 0 0 5px rgba(255, 107, 0, 0.06);
    background: white;
}
.form-group textarea {
    resize: vertical;
    min-height: 60px;
}
.form-actions {
    display: flex;
    gap: 14px;
    margin-top: 28px;
}
.form-actions button {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 14px;
    font-family: 'Vazirmatn', sans-serif;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.form-actions .btn-submit {
    background: linear-gradient(135deg, var(--primary-color, #FF6B00), var(--secondary-color, #FF8C38));
    color: white;
    box-shadow: 0 5px 20px rgba(255, 107, 0, 0.25);
}
.form-actions .btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 35px rgba(255, 107, 0, 0.4);
}
.form-actions .btn-cancel {
    background: #e8e0d8;
    color: #555;
}
.form-actions .btn-cancel:hover { background: #ddd5cd; }

/* ===== رویدادها ===== */
.events-box {
    background: white;
    border-radius: 25px;
    padding: 24px 28px;
    box-shadow: 0 6px 25px rgba(0, 0, 0, 0.05);
    margin-top: 25px;
}
.events-box h3 {
    margin-bottom: 16px;
    color: #2C1810;
    font-size: 17px;
}
.events-box h3 i { color: var(--primary-color, #FF6B00); }
.event-item {
    padding: 12px 18px;
    border-radius: 14px;
    background: #f8f5f2;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: all 0.3s ease;
}
.event-item:hover {
    background: #FFF0E6;
    transform: translateX(-6px);
}
.event-item .event-icon { font-size: 20px; }
.event-item .event-text { flex: 1; font-size: 14px; }

/* ===== کارت‌ها ===== */
.card {
    background: white;
    padding: 25px;
    border-radius: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.staff-attendance-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

/* ===== اسکرول بار ===== */
::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: #f1f1f1; border-radius: 10px; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-color, #FF6B00), var(--secondary-color, #FF8C38));
    border-radius: 10px;
}
::-webkit-scrollbar-thumb:hover { background: var(--primary-color, #FF6B00); }

/* ===== ریسپانسیو ===== */
@media (max-width: 768px) {
    .header { flex-direction: column; padding: 12px 18px; }
    .header-left { width: 100%; justify-content: center; flex-wrap: wrap; }
    .header-time { font-size: 13px; padding: 7px 16px; min-width: 160px; }
    .navbar { top: 115px; padding: 8px 12px; justify-content: center; }
    .nav-item { font-size: 12px; padding: 6px 12px; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
    .stat-card { padding: 20px; }
    .stat-card .number { font-size: 26px; }
    .quick-actions { grid-template-columns: 1fr 1fr; }
    .modal-content { padding: 28px; }
    .login-box { padding: 35px 25px; border-radius: 30px; }
    .login-logo-img { width: 110px; height: 110px; }
    .login-header h1 { font-size: 24px; }
    .exit-btn { bottom: 12px; right: 12px; padding: 11px 20px; font-size: 13px; }
    .role-badge { font-size: 11px; padding: 4px 12px; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .quick-actions { grid-template-columns: 1fr; }
    .header-title h1 { font-size: 18px; }
    .header-logo { width: 40px; height: 40px; }
    .login-box { padding: 22px 16px; }
    .login-logo-img { width: 85px; height: 85px; }
    .exit-btn { bottom: 10px; right: 10px; padding: 9px 16px; font-size: 12px; }
    .role-badge { font-size: 10px; padding: 3px 10px; }
}

/* ===== Mobile App UI ===== */
.mobile-app-bar,.mobile-bottom-nav{display:none}
@media (max-width: 768px){
  body{background:#f8f9fb;padding-bottom:82px}
  #mainPage{min-height:100vh}
  .header,.navbar{display:none!important}
  .mobile-app-bar{position:sticky;top:0;z-index:1000;display:flex!important;align-items:center;justify-content:space-between;padding:12px 16px;background:rgba(255,255,255,.94);backdrop-filter:blur(18px);border-bottom:1px solid #eee;box-shadow:0 4px 18px rgba(44,24,16,.06)}
  .mobile-brand{display:flex;align-items:center;gap:10px}.mobile-brand-mark{width:42px;height:42px;border-radius:14px;display:grid;place-items:center;background:linear-gradient(135deg,var(--primary-color, #FF6B00),var(--secondary-color, #FF8C38));font-size:22px;box-shadow:0 7px 20px rgba(255,107,0,.2)}
  .mobile-brand strong{display:block;color:#2C1810;font-size:15px}.mobile-brand small{display:block;color:#8b817c;font-size:11px;margin-top:2px}.mobile-logout{border:0;background:#fff1e7;color:#d95700;width:40px;height:40px;border-radius:13px;font-size:17px}
  .main-content{padding:14px 12px 24px;max-width:none}.section{animation:none}.section-title{font-size:20px}.section-header{gap:12px;margin-bottom:14px}.section-header>div{width:100%}.section-header .quick-btn{flex:1}
  .stats-grid{grid-template-columns:1fr 1fr!important;gap:10px}.stat-card{padding:16px 12px;border-radius:18px;min-height:110px}.stat-card:hover{transform:none}.stat-card h3{font-size:12px}.stat-card .number{font-size:25px}.stat-card .icon{width:40px;height:40px;font-size:18px}
  .quick-actions{grid-template-columns:1fr 1fr;gap:9px}.quick-btn{min-height:46px;padding:10px 12px;font-size:12px;border-radius:13px}
  .events-box,.search-section,.table-container,.form-card,.content-card{border-radius:18px}.events-box{padding:16px}.events-box h3{font-size:15px}
  .search-section{display:grid;grid-template-columns:1fr auto;gap:8px;padding:12px}.search-section label{grid-column:1/-1}.search-section input{min-width:0}.search-section .quick-btn{white-space:nowrap}
  .table-container{overflow:auto;background:#fff;box-shadow:0 7px 25px rgba(44,24,16,.05)} table{min-width:720px;font-size:12px}th,td{padding:9px 8px}
  .modal-content{width:94%;max-height:88vh;border-radius:22px;padding:18px}.modal-content h3{font-size:18px}
  .mobile-bottom-nav{position:fixed;bottom:10px;left:10px;right:10px;z-index:5000;display:grid!important;grid-auto-flow:column;grid-auto-columns:1fr;gap:3px;padding:7px;background:rgba(255,255,255,.96);backdrop-filter:blur(18px);border:1px solid #eee;border-radius:20px;box-shadow:0 12px 40px rgba(44,24,16,.15)}
  .mobile-nav-item{border:0;background:transparent;color:#9b928c;border-radius:14px;min-height:56px;font-family:inherit;font-size:10px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:5px}.mobile-nav-item i{font-size:18px}.mobile-nav-item.active{color:var(--primary-color, #FF6B00);background:#FFF3E9;font-weight:700}
  .exit-btn{display:none!important}.login-box{border-radius:28px;padding:32px 22px}.login-logo-img{width:100px;height:100px}.login-header h1{font-size:22px}.login-container{padding:14px}.form-group input,.form-group select,.form-group textarea{font-size:16px}
}
@media (max-width:380px){.stats-grid{grid-template-columns:1fr!important}.quick-actions{grid-template-columns:1fr}.mobile-nav-item{font-size:9px}}

/* ===== داشبورد مالی ===== */
.financial-dashboard{margin-bottom:20px}
.financial-dashboard-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:14px}
.financial-dashboard-head h3{margin:0;font-size:19px}.financial-dashboard-head h3 i{color:var(--primary-color, #FF6B00);margin-left:7px}.financial-dashboard-head p{margin:5px 0 0;color:#888;font-size:12px}
.financial-summary-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:16px}
.financial-card{background:#fff;border:1px solid #eee;border-radius:16px;padding:17px;box-shadow:0 3px 12px rgba(0,0,0,.05);position:relative;overflow:hidden}
.financial-card:before{content:"";position:absolute;right:0;top:0;bottom:0;width:4px;background:var(--card-color,var(--primary-color, #FF6B00))}
.financial-card-label{font-size:12px;color:#777}.financial-card-value{font-size:21px;font-weight:800;margin-top:8px;direction:rtl}.financial-card-meta{font-size:11px;color:#999;margin-top:5px}
.financial-grid-2{display:grid;grid-template-columns:1.35fr .9fr;gap:14px;margin-bottom:14px}
.financial-panel{background:#fff;border:1px solid #eee;border-radius:16px;padding:16px;box-shadow:0 3px 12px rgba(0,0,0,.04);min-height:190px}
.financial-panel-title{display:flex;justify-content:space-between;align-items:center;font-weight:700;font-size:13px;margin-bottom:14px}.financial-panel-title i{color:var(--primary-color, #FF6B00);margin-left:6px}
.monthly-financial-chart{display:grid;grid-template-columns:repeat(6,1fr);gap:10px;align-items:end;height:145px;border-bottom:1px solid #eee;padding:0 4px 5px}
.chart-month{display:flex;flex-direction:column;align-items:center;justify-content:flex-end;height:100%;gap:5px}.chart-bars{display:flex;align-items:flex-end;justify-content:center;gap:4px;height:105px;width:100%}.chart-bar{width:14px;min-height:2px;border-radius:6px 6px 0 0}.chart-income{background:#198754}.chart-expense{background:#dc3545}.chart-label{font-size:10px;color:#777}.chart-legend{font-size:10px;color:#777;margin-top:8px}.chart-legend span{margin-left:12px}.chart-dot{display:inline-block;width:8px;height:8px;border-radius:50%;margin-left:4px}.chart-dot.income{background:#198754}.chart-dot.expense{background:#dc3545}
.financial-account-row{display:flex;justify-content:space-between;gap:10px;padding:10px 0;border-bottom:1px solid #f0f0f0}.financial-account-row:last-child{border-bottom:0}.financial-account-name{font-weight:600;font-size:12px}.financial-account-type{font-size:10px;color:#999}.financial-account-balance{font-weight:800;font-size:13px}.financial-empty{padding:22px;text-align:center;color:#aaa;font-size:12px}
.financial-list-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid #f1f1f1}.financial-list-row:last-child{border-bottom:0}.financial-list-main{min-width:0}.financial-list-title{font-size:12px;font-weight:700;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.financial-list-sub{font-size:10px;color:#999;margin-top:3px}.financial-list-amount{font-weight:800;font-size:12px;white-space:nowrap}.financial-list-amount.income{color:#198754}.financial-list-amount.overdue{color:#dc3545}
@media(max-width:900px){.financial-summary-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.financial-grid-2{grid-template-columns:1fr}.monthly-financial-chart{grid-template-columns:repeat(6,1fr)}}
@media(max-width:520px){.financial-dashboard-head{align-items:flex-start}.financial-dashboard-head .quick-btn{padding:8px 10px}.financial-summary-grid{gap:8px}.financial-card{padding:13px}.financial-card-value{font-size:16px}.financial-panel{padding:12px}.monthly-financial-chart{gap:5px}.chart-bar{width:9px}.chart-month:nth-child(-n+2){display:none}}


/* ===== حسابداری نسخه 6 ===== */
.financial-quick-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:0 0 16px}.financial-mini-card{background:#fff;border:1px solid #eee;border-radius:14px;padding:14px;box-shadow:0 3px 12px rgba(0,0,0,.04);display:flex;justify-content:space-between;gap:12px;align-items:center}.financial-mini-card span{font-size:12px;color:#777}.financial-mini-card strong{font-size:14px}.badge-warning{background:#fff3cd;color:#856404}.badge-secondary{background:#e9ecef;color:#495057}.badge-info{background:#cff4fc;color:#055160}@media(max-width:520px){.financial-quick-grid{grid-template-columns:1fr}.financial-mini-card{padding:11px}}


/* =========================================================
   MOBILE UI v7 — Desktop theme, mobile layout
   فقط در عرض موبایل فعال است و ظاهر Desktop را تغییر نمی‌دهد.
   ========================================================= */
@media (max-width: 768px) {
    :root {
        --brand: var(--primary-color, #FF6B00);
        --brand-light: #FFF3E9;
        --brand-dark: #D95700;
        --ink: #2C1810;
        --muted: #8B817C;
        --surface: #FFFFFF;
        --page: #FFF9F5;
        --border: #F0E7E1;
    }

    html, body {
        width: 100%;
        min-width: 0;
        overflow-x: hidden;
    }

    body {
        background: var(--page);
        padding-bottom: 96px !important;
    }

    #mainPage {
        min-height: 100vh;
        background: var(--page);
    }

    /* Login همیشه فقط Login UI خودش را نشان می‌دهد؛ هیچ nav موبایلی روی آن نمی‌آید. */
    #loginPage {
        min-height: 100vh;
    }

    .header,
    .navbar {
        display: none !important;
    }

    .mobile-app-bar {
        position: sticky;
        top: 0;
        z-index: 3000;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        min-height: 68px;
        padding: 10px 14px;
        background: rgba(255,255,255,.97);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 4px 18px rgba(44,24,16,.08);
        direction: rtl;
    }

    .mobile-header-brand {
        display: flex;
        align-items: center;
        min-width: 0;
        gap: 10px;
    }

    .mobile-header-brand img,
    .mobile-header-fallback {
        width: 44px;
        height: 44px;
        flex: 0 0 44px;
        border-radius: 13px;
        object-fit: cover;
        border: 1px solid #F3E5DB;
        background: #fff;
        box-shadow: 0 4px 12px rgba(255,107,0,.12);
    }

    .mobile-header-fallback {
        display: none;
        place-items: center;
        font-size: 22px;
    }

    .mobile-header-text {
        min-width: 0;
        line-height: 1.35;
    }

    .mobile-header-text strong {
        display: block;
        color: var(--ink);
        font-size: 14px;
        font-weight: 900;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 190px;
    }

    .mobile-header-text small {
        display: block;
        color: var(--muted);
        font-size: 10px;
        margin-top: 2px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 190px;
    }

    .mobile-header-actions {
        display: flex;
        align-items: center;
        gap: 7px;
        flex: 0 0 auto;
    }

    .mobile-header-time {
        direction: rtl;
        color: var(--brand-dark);
        background: var(--brand-light);
        border: 1px solid #FFE0CA;
        border-radius: 11px;
        padding: 7px 8px;
        font-size: 10px;
        font-weight: 800;
    }

    .mobile-logout-btn {
        width: 40px;
        height: 40px;
        border: 1px solid #FFE0CA;
        border-radius: 12px;
        background: #FFF3E9;
        color: var(--brand-dark);
        cursor: pointer;
        font-size: 15px;
    }

    .main-content {
        width: 100%;
        max-width: none;
        padding: 14px 12px 24px !important;
        margin: 0;
        box-sizing: border-box;
    }

    .section {
        width: 100%;
        animation: none !important;
    }

    .section-header {
        align-items: stretch !important;
        margin-bottom: 14px !important;
    }

    .section-title {
        font-size: 19px !important;
        line-height: 1.5;
    }

    .section-header > div {
        width: 100% !important;
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px !important;
    }

    .section-header .quick-btn {
        width: 100%;
        min-height: 46px;
    }

    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 9px !important;
        margin-bottom: 14px;
    }

    .stat-card {
        min-width: 0;
        min-height: 108px;
        padding: 14px 11px !important;
        border-radius: 17px !important;
    }

    .stat-card .number {
        font-size: 23px !important;
    }

    .stat-card h3 {
        font-size: 11px !important;
        line-height: 1.5;
    }

    .stat-card .icon {
        width: 38px !important;
        height: 38px !important;
        font-size: 16px !important;
    }

    .quick-actions {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .quick-btn {
        min-height: 46px;
        padding: 9px 10px !important;
        border-radius: 12px !important;
        font-size: 11px !important;
        white-space: normal;
    }

    .events-box,
    .search-section,
    .table-container,
    .form-card,
    .content-card,
    .financial-panel,
    .financial-card {
        border-radius: 16px !important;
    }

    .search-section {
        grid-template-columns: 1fr auto !important;
        padding: 11px !important;
        gap: 7px !important;
    }

    .search-section label {
        grid-column: 1 / -1;
    }

    .search-section input {
        min-width: 0 !important;
        width: 100%;
        box-sizing: border-box;
    }

    .table-container {
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    table {
        min-width: 720px;
        font-size: 11px !important;
    }

    th, td {
        padding: 8px 7px !important;
        white-space: nowrap;
    }

    .modal-content {
        width: calc(100% - 24px) !important;
        max-width: none !important;
        max-height: calc(100vh - 32px) !important;
        overflow-y: auto;
        border-radius: 20px !important;
        padding: 18px !important;
        box-sizing: border-box;
    }

    .modal-content .form-grid {
        grid-template-columns: 1fr !important;
    }

    .modal-content input,
    .modal-content select,
    .modal-content textarea,
    .form-group input,
    .form-group select,
    .form-group textarea {
        font-size: 16px !important;
        min-height: 44px;
    }

    /* داشبورد مالی دقیقاً از رنگ و کارت‌های Desktop استفاده می‌کند. */
    .financial-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .financial-grid-2 {
        grid-template-columns: 1fr !important;
        gap: 10px !important;
    }

    .financial-card {
        padding: 12px !important;
    }

    .financial-card-value {
        font-size: 16px !important;
    }

    .financial-panel {
        padding: 12px !important;
    }

    .financial-quick-grid {
        grid-template-columns: 1fr !important;
    }

    /* نوار پایین: همان هویت رنگی Desktop، فقط کنترل‌ها برای انگشت بزرگ‌تر شده‌اند. */
    .mobile-bottom-nav {
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: max(10px, env(safe-area-inset-bottom));
        z-index: 4000;
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: 1fr;
        gap: 3px;
        padding: 7px;
        background: rgba(255,255,255,.98);
        border: 1px solid var(--border);
        border-radius: 20px;
        box-shadow: 0 10px 34px rgba(44,24,16,.16);
        backdrop-filter: blur(16px);
        direction: rtl;
    }

    .mobile-nav-item {
        min-width: 0;
        min-height: 58px;
        padding: 5px 2px;
        border: 0;
        border-radius: 14px;
        background: transparent;
        color: #9B928C;
        font-family: inherit;
        font-size: 9px;
        font-weight: 500;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 5px;
        cursor: pointer;
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-nav-item i {
        font-size: 18px;
    }

    .mobile-nav-item.active {
        color: var(--brand);
        background: var(--brand-light);
        font-weight: 900;
    }

    .mobile-nav-item:active {
        transform: scale(.96);
    }

    .exit-btn {
        display: none !important;
    }
}

@media (max-width: 420px) {
    .mobile-header-time {
        display: none;
    }

    .mobile-header-text strong,
    .mobile-header-text small {
        max-width: 165px;
    }

    .section-header > div {
        grid-template-columns: 1fr 1fr;
    }

    .stats-grid {
        gap: 7px !important;
    }

    .stat-card {
        padding: 12px 9px !important;
    }

    .mobile-nav-item {
        min-height: 56px;
        font-size: 8px;
    }
}

@media (max-width: 360px) {
    .mobile-header-text strong,
    .mobile-header-text small {
        max-width: 135px;
    }

    .mobile-header-brand img,
    .mobile-header-fallback {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr !important;
    }

    .mobile-bottom-nav {
        left: 6px;
        right: 6px;
        bottom: 6px;
    }
}

/* ===== Mobile fixes v8: compact logo + accounting role separation ===== */
@media (max-width: 768px) {
  .mobile-app-bar { min-height: 58px; height: 58px; padding: 7px 12px; }
  .mobile-header-brand { gap: 8px; max-width: calc(100% - 82px); }
  .mobile-header-brand img,
  .mobile-header-fallback { width: 36px !important; height: 36px !important; flex: 0 0 36px !important; border-radius: 10px !important; padding: 0 !important; object-fit: contain !important; }
  .mobile-header-fallback { font-size: 18px !important; }
  .mobile-header-text strong { font-size: 12px; max-width: 145px; }
  .mobile-header-text small { font-size: 9px; max-width: 145px; }
  .mobile-header-actions { gap: 5px; }
  .mobile-header-time { padding: 5px 6px; font-size: 9px; border-radius: 9px; }
  .mobile-logout-btn { width: 34px; height: 34px; border-radius: 10px; font-size: 13px; }
  #payments .section-header > div { display:grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap:7px !important; width:100%; }
  #payments .section-header .quick-btn { min-height:44px; padding:8px 6px; font-size:11px; }
}
@media (max-width: 380px) {
  .mobile-header-brand img, .mobile-header-fallback { width:32px !important; height:32px !important; flex-basis:32px !important; }
  .mobile-header-text strong { max-width:125px; font-size:11px; }
  .mobile-header-text small { max-width:125px; }
}


/* v6.4 mobile accounting navigation hardening */
@media(max-width:768px){.mobile-bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important;grid-auto-flow:initial!important;grid-auto-columns:auto!important}.mobile-nav-item{width:100%!important;min-width:0!important}}
@media(max-width:420px){.mobile-bottom-nav{grid-template-columns:repeat(5,minmax(0,1fr))!important}.mobile-nav-item{font-size:8px!important}.mobile-nav-item i{font-size:17px!important}}


/* ===== Mobile UI v9: hamburger drawer - no bottom/all-sections navigation ===== */
.mobile-bottom-nav{display:none!important}
.mobile-menu-overlay,.mobile-menu-drawer{display:none}
@media (max-width:768px){
  body{padding-bottom:18px!important}
  .mobile-app-bar{position:sticky;top:0;z-index:6000;display:flex!important;align-items:center;gap:9px;justify-content:space-between;min-height:58px;height:58px;padding:7px 10px;background:rgba(255,255,255,.97);backdrop-filter:blur(18px);border-bottom:1px solid #eee;box-shadow:0 4px 18px rgba(44,24,16,.06)}
  .mobile-hamburger-btn{width:40px;height:40px;min-width:40px;border:1px solid #FFE0CA;border-radius:12px;background:#FFF3E9;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;cursor:pointer;flex:0 0 40px}
  .mobile-hamburger-btn span{display:block;width:18px;height:2px;border-radius:3px;background:var(--brand-dark,#2C1810);transition:.2s}
  .mobile-header-brand{flex:1;min-width:0;display:flex;align-items:center;gap:8px;max-width:none}
  .mobile-header-brand img,.mobile-header-fallback{width:36px!important;height:36px!important;flex:0 0 36px!important;border-radius:10px!important;object-fit:contain!important}
  .mobile-header-fallback{display:none;place-items:center;background:#FFF3E9;font-size:18px}
  .mobile-header-text{min-width:0}.mobile-header-text strong,.mobile-header-text small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
  .mobile-header-text strong{font-size:12px;max-width:150px}.mobile-header-text small{font-size:9px;max-width:150px;color:#8b817c;margin-top:2px}
  .mobile-header-actions{display:flex;align-items:center;gap:5px;flex:0 0 auto}.mobile-header-time{padding:5px 6px;font-size:9px;border-radius:9px;background:#fafafa}
  .mobile-logout-btn{width:34px!important;height:34px!important;border-radius:10px!important}
  .mobile-menu-overlay{position:fixed;inset:0;z-index:6990;background:rgba(20,12,8,.42);backdrop-filter:blur(2px);opacity:0;pointer-events:none;display:block!important;transition:opacity .22s ease}
  .mobile-menu-overlay.open{opacity:1;pointer-events:auto}
  .mobile-menu-drawer{position:fixed;top:0;right:0;bottom:0;z-index:7000;width:min(88vw,360px);background:#fff;display:flex!important;flex-direction:column;box-shadow:-14px 0 45px rgba(0,0,0,.18);transform:translateX(105%);transition:transform .24s ease;direction:rtl;overflow:hidden}
  .mobile-menu-drawer.open{transform:translateX(0)}
  .mobile-drawer-head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:18px 16px;border-bottom:1px solid #eee;background:linear-gradient(135deg,#fff8f2,#fff)}
  .mobile-drawer-head strong{display:block;font-size:17px;color:var(--brand-dark,#2C1810)}.mobile-drawer-head small{display:block;margin-top:3px;color:#8b817c;font-size:11px}
  .mobile-drawer-close{width:38px;height:38px;border:1px solid #eee;border-radius:12px;background:#fff;color:#777;font-size:16px}
  .mobile-drawer-list{padding:10px;overflow-y:auto;-webkit-overflow-scrolling:touch}
  .mobile-drawer-item{width:100%;min-height:52px;margin-bottom:6px;padding:10px 12px;border:1px solid transparent;border-radius:14px;background:#fff;color:#554b46;font-family:inherit;font-size:13px;font-weight:600;display:flex;align-items:center;gap:11px;text-align:right;cursor:pointer;-webkit-tap-highlight-color:transparent}
  .mobile-drawer-item i:first-child{width:24px;text-align:center;color:var(--brand,#FF6B00);font-size:17px}.mobile-drawer-item .arrow{margin-right:auto;color:#b0a6a0;font-size:11px}
  .mobile-drawer-item.active{background:#FFF3E9;border-color:#FFE0CA;color:var(--brand-dark,#2C1810);font-weight:900}.mobile-drawer-item:active{transform:scale(.985)}
  body.mobile-menu-open{overflow:hidden}
}
@media(max-width:380px){.mobile-header-text strong,.mobile-header-text small{max-width:120px}.mobile-menu-drawer{width:91vw}}


/* SMS UI consistency */
.sms-card .form-grid, .sms-settings-card{direction:rtl;}
.sms-card select, .sms-card input, .sms-card textarea, .sms-settings-card textarea{
  width:100%;
  border:1px solid var(--border,#eadfd7);
  border-radius:14px;
  padding:12px 14px;
  background:#fff;
  font-family:inherit;
  font-size:14px;
  box-sizing:border-box;
}
.sms-card select:focus, .sms-card input:focus, .sms-card textarea:focus, .sms-settings-card textarea:focus{
 outline:none;
 border-color:var(--brand,#ff6b00);
}
.sms-recipient-item{
 background:#fff;
 border:1px solid #eee;
 border-radius:14px;
 margin-bottom:8px;
 padding:12px!important;
}
@media(max-width:768px){
 #sms .section-header{margin-bottom:12px}
 #sms .card{padding:14px}
 #sms .form-grid{grid-template-columns:1fr!important}
 #sms .quick-btn{width:100%;min-height:46px}
 #sms textarea{min-height:110px}
}

/* ===== SMS / Survey v7.0.7 production UI ===== */
.sms-tabs{display:flex;gap:8px;flex-wrap:wrap;margin:0 0 14px}
.sms-tab{border:1px solid rgba(255,107,0,.18);background:#fff;border-radius:12px;padding:10px 18px;font-family:inherit;font-weight:700;cursor:pointer;color:#555}
.sms-tab.active{background:linear-gradient(135deg,var(--primary-color,#FF6B00),var(--secondary-color,#FF8C38));color:#fff;border-color:transparent;box-shadow:0 5px 18px rgba(255,107,0,.18)}
.sms-tab-panel{animation:fadeIn .2s ease}
.sms-receiver-group label,.survey-public-options label{display:flex;align-items:center;gap:7px;font-weight:600;cursor:pointer}
.sms-recipient-item{display:flex;gap:10px;align-items:center;padding:10px;border-bottom:1px solid #f0f0f0;cursor:pointer}
.sms-recipient-item:hover{background:#fff8f2}
.survey-question-builder{margin-top:12px;padding:14px;border:1px solid #eee}
.survey-builder-head,.survey-report-row,.survey-option-row{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.survey-type-lock{display:flex;align-items:center;gap:10px;margin-top:10px;flex-wrap:wrap}
.survey-type-lock span,.muted{font-size:12px;color:#888}
.survey-create-type{display:flex;gap:8px;margin-top:10px}
.survey-options{margin-top:10px;padding-top:10px;border-top:1px solid #eee}
.survey-option-row{margin-bottom:8px}
.survey-option-row input{flex:1}
.quick-btn.danger{background:#dc3545!important;color:#fff!important}
.survey-report-row{padding:12px 0;border-bottom:1px solid #eee}
.survey-kpis{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}
.survey-kpis span{background:#fff8f2;border-radius:10px;padding:8px 12px;font-weight:700}
.survey-report-question{padding:14px 0;border-top:1px solid #eee}
.survey-text-answer{background:#fafafa;border-radius:10px;padding:10px;margin:8px 0}
.survey-text-answer p{margin-top:6px;line-height:1.8;white-space:pre-wrap}
.survey-chart-row{margin:12px 0}.survey-chart-label{display:flex;justify-content:space-between;gap:10px;margin-bottom:5px}.survey-chart-track{height:12px;background:#eee;border-radius:20px;overflow:hidden}.survey-chart-bar{height:100%;background:linear-gradient(90deg,var(--primary-color,#FF6B00),var(--secondary-color,#FF8C38));border-radius:20px;min-width:0}
.public-survey-page{min-height:100vh;background:#FFF5ED;padding:24px;display:flex;align-items:center;justify-content:center;font-family:'Vazirmatn',sans-serif;direction:rtl}.public-survey-card{width:min(720px,100%);padding:24px}.public-survey-card h1{margin-bottom:8px}.survey-public-question{margin:18px 0}.survey-public-question>label{display:block;font-weight:800;margin-bottom:8px}.survey-public-question textarea{width:100%;min-height:120px;border:1px solid #ddd;border-radius:12px;padding:12px;font-family:inherit}.survey-public-options{display:grid;gap:9px}.survey-public-options label{background:#fafafa;border:1px solid #eee;border-radius:10px;padding:12px}
@media(max-width:600px){.sms-tabs{display:grid;grid-template-columns:1fr 1fr 1fr}.sms-tab{padding:9px 6px;font-size:13px}.survey-kpis{display:grid;grid-template-columns:1fr}.public-survey-page{padding:12px}.public-survey-card{padding:16px}}

.survey-link-box{display:flex;gap:10px;align-items:center;flex-wrap:wrap}.survey-link-box input{flex:1;min-width:240px;padding:11px 12px;border:1px solid #ddd;border-radius:10px;direction:ltr;text-align:left;background:#fafafa}.survey-success{text-align:center;padding:25px}.survey-success h3{margin-bottom:8px}

/* ===== Ravosh Survey Design System ===== */
.survey-options,.survey-question-builder,.survey-report-question{border-color:var(--border-color,#ececec)}
.survey-builder-head,.survey-report-row{background:var(--card-bg,#fff);border-radius:14px}
.survey-report-row{padding:16px;margin:10px 0;border:1px solid var(--border-color,#ececec);box-shadow:0 4px 14px rgba(0,0,0,.04)}
.survey-report-row strong{font-size:15px}
.survey-kpis{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.survey-kpis span{border:1px solid var(--border-color,#ececec);background:var(--surface,#fafafa);border-radius:12px;padding:11px 13px}
.survey-report-question{border:1px solid var(--border-color,#ececec);border-radius:14px;padding:16px;margin-top:14px;background:var(--card-bg,#fff)}
.survey-chart-track{background:#eee;border-radius:999px;height:10px}.survey-chart-bar{background:linear-gradient(90deg,var(--primary-color,#FF6B00),var(--secondary-color,#FF8C38));height:100%;border-radius:999px}
.survey-public-page{background:var(--page-bg,#f8f8f8)}
.public-survey-card{border:1px solid var(--border-color,#ececec);border-radius:18px;box-shadow:0 10px 30px rgba(0,0,0,.06)}
.survey-public-options label{transition:.18s ease;border:1px solid var(--border-color,#e8e8e8);background:var(--card-bg,#fff)}
.survey-public-options label:has(input:checked){border-color:var(--primary-color,#FF6B00);box-shadow:0 0 0 2px rgba(255,107,0,.08)}
.sms-recipient-row{display:flex;align-items:center;gap:10px;padding:11px 13px;border-bottom:1px solid #eee;cursor:pointer}
.sms-recipient-row:last-child{border-bottom:0}.empty-state{padding:18px;text-align:center;color:#888}
@media(max-width:768px){.survey-kpis{grid-template-columns:1fr}.survey-report-row{padding:13px}.public-survey-card{border-radius:14px}}
.public-survey-brand{font-size:13px;font-weight:800;color:var(--primary-color,#FF6B00);margin-bottom:8px;letter-spacing:.1px}.survey-public-question-text{font-size:18px;font-weight:800;line-height:1.9;margin:14px 0 18px}.public-survey-card .quick-btn{width:100%;margin-top:8px}
