/* style.css - استایل کامل سامانه رهگام پلاس (نسخه نهایی + فوتر و چت آنلاین) */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Vazirmatn', sans-serif;
}

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary: #8b5cf6;
    --accent: #ec4899;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --dark: #0f172a;
    --light-bg: #f8fafc;
    --card-bg: rgba(15, 23, 42, 0.85);
    --border-glow: rgba(99, 102, 241, 0.3);
    --text-main: #ffffff;
    --text-dim: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
    --shadow-neo: 12px 12px 24px rgba(0, 0, 0, 0.4), -8px -8px 16px rgba(255, 255, 255, 0.05);
    --shadow-glow: 0 0 20px rgba(99, 102, 241, 0.4);
    --shadow-glow-blue: 0 0 20px rgba(99, 102, 241, 0.3);
    --radius: 20px;
    --radius-sm: 14px;
    --transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --glass: rgba(15, 23, 42, 0.92);
    --glass-border: rgba(255, 255, 255, 0.08);
}

body.light {
    --dark: #ffffff;
    --light-bg: #f8fafc;
    --card-bg: rgba(255, 255, 255, 0.98);
    --text-main: #0f172a;
    --text-dim: rgba(15, 23, 42, 0.7);
    --text-muted: rgba(15, 23, 42, 0.5);
    --shadow-neo: 12px 12px 24px rgba(0, 0, 0, 0.08), -8px -8px 16px rgba(255, 255, 255, 0.9);
    --glass: rgba(255, 255, 255, 0.98);
    --glass-border: rgba(15, 23, 42, 0.08);
}

body.light .sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-left: 1px solid rgba(0, 0, 0, 0.08);
}

body.light .nav-links a {
    color: var(--text-dim);
}

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

body.light .search-box,
body.light .theme-toggle,
body.light .ticker-wrapper {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.08);
}

body.light .stat-card,
body.light .service-card,
body.light .taskboard,
body.light .admin-section,
body.light .timeline-status {
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

body.light .form-group input,
body.light .form-group select,
body.light .form-group textarea {
    background: #f5f5f5;
    border: 1px solid #ddd;
    color: #1a1a2e;
}

body.light .modal-card {
    background: rgba(255, 255, 255, 0.98);
}

body.light .tracking-card {
    background: #f9f9f9;
}

body {
    background: radial-gradient(ellipse at 20% 30%, #0f172a, #020617);
    color: var(--text-main);
    min-height: 100vh;
    font-weight: 500;
    line-height: 1.6;
}

body.light {
    background: linear-gradient(135deg, #f0f4f8 0%, #e0e7ff 50%, #f3e8ff 100%);
}

/* ===== Typography Enhancements ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.5px;
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 1rem; }

p {
    line-height: 1.7;
    letter-spacing: 0.3px;
}

/* نورهای متحرک */
.glow-spot {
    position: fixed;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15), transparent);
    pointer-events: none;
    z-index: 0;
    animation: floatGlow 15s infinite alternate;
}

.glow-spot:nth-child(1) {
    top: 10%;
    left: -5%;
    animation-duration: 20s;
}

.glow-spot:nth-child(2) {
    bottom: 20%;
    right: -5%;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.1), transparent);
    animation-duration: 25s;
}

@keyframes floatGlow {
    0% {
        transform: translate(0, 0) scale(1);
        opacity: 0.5;
    }
    100% {
        transform: translate(5%, 5%) scale(1.3);
        opacity: 0.2;
    }
}

.app-wrapper {
    display: flex;
    position: relative;
    z-index: 1;
}

/* سایدبار */
.sidebar {
    width: 280px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-left: 1px solid var(--glass-border);
    padding: 30px 20px;
    height: 100vh;
    position: sticky;
    top: 0;
    transition: var(--transition);
    z-index: 100;
}

.logo-area {
    text-align: center;
    margin-bottom: 50px;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 2rem;
    box-shadow: var(--shadow-neo);
    animation: borderPulse 3s infinite;
}

@keyframes borderPulse {
    0%,
    100% {
        box-shadow: var(--shadow-neo);
    }
    50% {
        box-shadow: var(--shadow-glow);
    }
}

.logo-area h2 {
    font-size: 1.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    flex: 1;
}

.nav-links li {
    margin-bottom: 12px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    color: var(--text-dim);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    font-weight: 500;
    position: relative;
    backdrop-filter: blur(5px);
}

.nav-links a:hover {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.2), transparent);
    color: var(--primary);
    transform: translateX(-8px);
}

.nav-links a.active {
    background: linear-gradient(90deg, rgba(255, 107, 53, 0.3), transparent);
    color: var(--primary);
    border-left: 3px solid var(--primary);
}

.nav-links a i {
    width: 24px;
    font-size: 1.2rem;
}

.nav-links a.finance-link {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(6, 182, 212, 0.1));
    border-right: 3px solid #10b981;
}

/* پروفایل */
.profile-card {
    margin-top: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: var(--radius);
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

.profile-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
}

.profile-avatar {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 1.8rem;
}

.profile-name {
    font-weight: 600;
    font-size: 0.95rem;
}

.profile-role {
    font-size: 0.7rem;
    opacity: 0.6;
}

.main-content {
    flex: 1;
    padding: 25px 35px 80px 35px;
    overflow-x: hidden;
}

/* هدر */
.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
}

.search-box {
    background: rgba(25, 25, 35, 0.8);
    backdrop-filter: blur(10px);
    padding: 12px 24px;
    border-radius: 50px;
    width: 350px;
    display: flex;
    align-items: center;
    gap: 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: var(--transition);
}

.search-box:focus-within {
    border-color: var(--primary);
    box-shadow: var(--shadow-glow);
}

.search-box input {
    background: transparent;
    border: none;
    outline: none;
    width: 100%;
    color: white;
}

.theme-toggle {
    background: rgba(25, 25, 35, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    padding: 12px;
    border-radius: 50%;
    cursor: pointer;
    width: 45px;
    height: 45px;
    transition: var(--transition);
}

.theme-toggle:hover {
    border-color: var(--primary);
    transform: rotate(20deg);
}

.current-user-badge {
    background: rgba(255, 107, 53, 0.2);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.8rem;
}

/* دکمه‌ها */
.btn-primary-small {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-success-small {
    background: linear-gradient(135deg, #00c853, #00a844);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-danger-small {
    background: linear-gradient(135deg, #ff4757, #e8413c);
    color: white;
    border: none;
    padding: 10px 24px;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

.btn-submit {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    border: none;
    padding: 15px 28px;
    border-radius: 50px;
    width: 100%;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary-small:hover,
.btn-success-small:hover,
.btn-danger-small:hover,
.btn-submit:hover {
    transform: translateY(-3px);
    filter: brightness(1.05);
    box-shadow: var(--shadow-glow);
}

/* نوار تیتر */
.ticker-wrapper {
    background: rgba(25, 25, 35, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    margin-bottom: 30px;
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.ticker {
    display: flex;
    align-items: center;
    padding: 8px 20px;
}

.ticker-label {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    padding: 5px 18px;
    border-radius: 50px;
    font-size: 0.8rem;
    margin-left: 20px;
    white-space: nowrap;
}

.ticker-content {
    flex: 1;
    overflow: hidden;
    height: 40px;
}

.ticker-items {
    display: flex;
    animation: tickerScroll 20s linear infinite;
    white-space: nowrap;
}

@keyframes tickerScroll {
    0% {
        transform: translateX(100%);
    }
    100% {
        transform: translateX(-100%);
    }
}

.ticker-item {
    display: inline-block;
    padding: 0 30px;
}

.ticker-controls {
    display: flex;
    gap: 5px;
    margin-right: 10px;
}

.ticker-btn {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
}

/* اطلاعیه */
.announcement-bar {
    padding: 12px 20px;
    text-align: center;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.announcement-bar.success {
    background: var(--success);
}

.announcement-bar.info {
    background: var(--primary);
}

.announcement-bar.warning {
    background: var(--warning);
}

.announcement-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
}

/* بخش قهرمان */
.hero-section {
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.15), rgba(0, 210, 255, 0.1));
    border-radius: 35px;
    padding: 40px;
    margin-bottom: 35px;
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
}

.hero-section::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 60%;
    height: 200%;
    background: radial-gradient(ellipse, rgba(255, 107, 53, 0.1), transparent);
    transform: rotate(25deg);
}

/* تقویم */
.calendar-modern {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 25px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 28px;
    padding: 25px;
}

.calendar-main {
    text-align: center;
}

.calendar-date-large {
    font-size: 3.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
}

.calendar-date-details {
    display: flex;
    justify-content: center;
    gap: 15px;
    font-size: 1rem;
    opacity: 0.8;
}

.calendar-events-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.calendar-event-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
    cursor: pointer;
}

.calendar-event-item:hover {
    background: rgba(255, 107, 53, 0.2);
    transform: translateY(-3px);
}

.calendar-event-item i {
    font-size: 1.8rem;
    color: var(--primary);
}

.calendar-event-item strong {
    display: block;
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.calendar-event-item div div {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* تایم‌لاین */
.timeline-status {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 35px;
    padding: 30px;
    margin-bottom: 35px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.timeline-title-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    font-weight: 600;
}

.timeline-track {
    display: flex;
    justify-content: space-between;
    margin-top: 30px;
    position: relative;
    flex-wrap: wrap;
    gap: 15px;
}

.timeline-track::before {
    content: '';
    position: absolute;
    top: 25px;
    left: 10%;
    right: 10%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--secondary), var(--primary));
    border-radius: 3px;
}

.timeline-node {
    text-align: center;
    position: relative;
    z-index: 1;
    background: rgba(25, 25, 35, 0.8);
    padding: 12px;
    border-radius: 20px;
    min-width: 100px;
    transition: var(--transition);
    cursor: pointer;
}

.timeline-node:hover {
    transform: translateY(-5px);
    background: rgba(255, 107, 53, 0.2);
}

.timeline-node .node-dot {
    width: 16px;
    height: 16px;
    background: var(--text-muted);
    border-radius: 50%;
    margin: 0 auto 10px;
    transition: var(--transition);
}

.timeline-node.active .node-dot {
    background: var(--primary);
    width: 20px;
    height: 20px;
    box-shadow: var(--shadow-glow);
}

.timeline-node.completed .node-dot {
    background: var(--success);
}

.node-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 5px;
}

.node-date {
    font-size: 0.7rem;
    opacity: 0.7;
}

/* آمار */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-radius: 25px;
    padding: 25px;
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

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

.stat-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(255, 107, 53, 0.2), rgba(0, 210, 255, 0.1));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
}

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

.service-card {
    background: var(--glass);
    backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 28px;
    padding: 35px 25px;
    text-align: center;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.service-card::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transform: scaleX(0);
    transition: transform 0.5s;
}

.service-card:hover::before {
    transform: scaleX(1);
}

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

.service-card i {
    font-size: 3.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 20px;
}

.service-card h4 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.service-card p {
    font-size: 0.85rem;
    opacity: 0.7;
}

.service-card .service-price {
    margin-top: 18px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--success);
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.service-card .service-price i {
    font-size: 1rem;
    background: none;
    -webkit-text-fill-color: var(--success);
    margin: 0;
}

/* فیلتر */
.filter-sort-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filter-select {
    background: var(--glass);
    border: 1px solid var(--glass-border);
    padding: 10px 18px;
    border-radius: 50px;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
}

.filter-select:hover {
    border-color: var(--primary);
}

/* کارت پیگیری */
.tracking-card {
    background: rgba(0, 0, 0, 0.03);
    padding: 18px;
    border-radius: 16px;
    margin-bottom: 14px;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.tracking-card:hover {
    transform: translateX(-8px);
    background: rgba(0, 0, 0, 0.06);
    border-color: var(--primary);
}

.tracking-code-clickable {
    cursor: pointer;
    transition: var(--transition);
}

.tracking-code-clickable:hover {
    color: var(--primary);
    text-decoration: underline;
}

/* وضعیت‌ها */
.status-badge {
    padding: 5px 14px;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 600;
}

.status-approved {
    background: rgba(0, 200, 83, 0.2);
    color: #00c853;
}

.status-pending {
    background: rgba(255, 193, 7, 0.2);
    color: #ffc107;
}

.status-progress {
    background: rgba(255, 107, 53, 0.2);
    color: #ff6b35;
}

.status-rejected {
    background: rgba(255, 71, 87, 0.2);
    color: #ff4757;
}

/* کارتابل */
.taskboard {
    background: var(--glass);
    backdrop-filter: blur(10px);
    border-radius: 28px;
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid var(--glass-border);
}

.taskboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.taskboard-count {
    background: var(--primary);
    padding: 2px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
}

.task-item {
    background: rgba(255, 255, 255, 0.03);
    border-radius: 20px;
    padding: 15px;
    margin-bottom: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    transition: var(--transition);
}

.task-item:hover {
    background: rgba(255, 107, 53, 0.1);
    transform: translateX(-5px);
}

.task-info {
    flex: 1;
}

.task-name {
    font-weight: 500;
    margin-bottom: 5px;
}

.task-code {
    font-size: 0.75rem;
    opacity: 0.6;
    font-family: monospace;
}

/* دکمه اکشن */
.action-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    padding: 8px;
    border-radius: 12px;
    transition: var(--transition);
}

.action-btn.approve {
    color: #00c853;
}

.action-btn.reject {
    color: #ff4757;
}

.action-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: scale(1.1);
}

/* بخش مدیریت */
.admin-section {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 24px;
    padding: 20px;
    margin-bottom: 20px;
}

.admin-compact-card {
    background: rgba(255, 255, 255, 0.08);
    padding: 12px 16px;
    border-radius: 16px;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    transition: var(--transition);
}

.admin-compact-card:hover {
    background: rgba(255, 107, 53, 0.15);
    transform: translateX(-5px);
}

/* قوانین */
.rules-box {
    background: rgba(255, 193, 7, 0.1);
    border-right: 4px solid var(--warning);
    padding: 15px;
    border-radius: 16px;
    margin: 15px 0;
    line-height: 1.7;
    font-size: 0.9rem;
}

/* آپلود فایل */
.upload-area {
    border: 2px dashed var(--primary);
    border-radius: 20px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 107, 53, 0.05);
}

.upload-area:hover {
    background: rgba(255, 107, 53, 0.15);
    border-color: var(--secondary);
    transform: scale(1.02);
}

.upload-area.dragover {
    background: rgba(255, 107, 53, 0.2);
    border-color: var(--success);
}

/* مودال لاگین */
.role-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    background: rgba(0, 0, 0, 0.2);
    padding: 6px;
    border-radius: 50px;
}

.role-tab {
    flex: 1;
    text-align: center;
    padding: 12px;
    cursor: pointer;
    border-radius: 40px;
    transition: var(--transition);
    font-weight: 600;
}

.role-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: var(--shadow-glow);
}

/* فرم‌ها */
.form-group {
    margin-bottom: 22px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    color: white;
    font-size: 0.95rem;
    transition: var(--transition);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--primary);
    outline: none;
    box-shadow: var(--shadow-glow);
}

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

/* مودال‌ها */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(15px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 12px;
    box-sizing: border-box;
}

.modal.open {
    display: flex !important;
}

.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    z-index: 999;
    backdrop-filter: blur(2px);
}

.sidebar-overlay.open {
    display: block;
}

.modal-card {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 35px;
    width: 90%;
    max-width: 560px;
    padding: 40px;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
    animation: modalSlide 0.4s ease;
}

.modal-card.large {
    max-width: 700px;
}

@keyframes modalSlide {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    left: 20px;
    top: 20px;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}

.modal-close:hover {
    background: rgba(255, 71, 87, 0.3);
    transform: rotate(90deg);
}

/* راهنما */
.help-section {
    background: var(--glass);
    border-radius: 32px;
    padding: 32px;
    margin-top: 20px;
}

.faq-item {
    margin-bottom: 24px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 16px;
    cursor: pointer;
    transition: var(--transition);
}

.faq-item:hover {
    background: rgba(255, 107, 53, 0.1);
}

.faq-question {
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
    margin-top: 8px;
    opacity: 0.8;
    font-size: 0.9rem;
}

.faq-item.open .faq-answer {
    max-height: 300px;
}

/* نوتیفیکیشن */
.toast-notification {
    position: fixed;
    bottom: 30px;
    left: 30px;
    background: var(--glass);
    backdrop-filter: blur(15px);
    border-left: 4px solid var(--primary);
    border-radius: 16px;
    padding: 14px 24px;
    z-index: 3000;
    animation: slideRight 0.3s ease;
    box-shadow: var(--shadow-neo);
}

.toast-notification.error {
    border-left-color: var(--danger);
}

.toast-notification.warning {
    border-left-color: var(--warning);
}

.toast-notification.success {
    border-left-color: var(--success);
}

@keyframes slideRight {
    from {
        transform: translateX(-100px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* لودینگ */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary);
    animation: spin 0.8s linear infinite;
}

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

/* اسکرول بار */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--secondary);
}

/* انیمیشن fadeInUp */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==================== فوتر (جدید) ==================== */
.main-footer {
    background: var(--glass);
    backdrop-filter: blur(20px);
    border-top: 1px solid var(--glass-border);
    padding: 60px 35px 20px;
    margin-top: 60px;
    position: relative;
    z-index: 10;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: var(--text-main);
    font-size: 1.2rem;
    margin-bottom: 20px;
    position: relative;
    padding-bottom: 10px;
}

.footer-col h4::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    width: 40px;
    height: 3px;
    background: var(--primary);
    border-radius: 2px;
}

.footer-col p {
    color: var(--text-dim);
    line-height: 1.8;
    font-size: 0.95rem;
}

.footer-links {
    list-style: none;
}

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

.footer-links a {
    color: var(--text-dim);
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--primary);
    transform: translateX(-5px);
}

.contact-info {
    list-style: none;
}

.contact-info li {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-dim);
    align-items: flex-start;
}

.contact-info i {
    color: var(--primary-light);
    font-size: 1.2rem;
    margin-top: 4px;
}

.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-links a {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: grid;
    place-items: center;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    border: 1px solid var(--glass-border);
}

.social-links a:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: translateY(-3px);
    box-shadow: var(--shadow-glow);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ==================== اینماد ==================== */
.enamad-box {
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 16px;
    display: inline-block;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}

.enamad-box:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-glow);
}

.enamad-box img {
    width: 90px;
    height: auto;
}

/* ==================== چت آنلاین ==================== */
.chat-widget {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    box-shadow: var(--shadow-glow);
    cursor: pointer;
    z-index: 999;
    transition: var(--transition);
    animation: pulse-chat 2s infinite;
}

.chat-widget:hover {
    transform: scale(1.1) rotate(-10deg);
    animation: none;
}

@keyframes pulse-chat {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

/* ==================== منوی پایین ==================== */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--glass);
    backdrop-filter: blur(20px);
    display: none;
    justify-content: space-around;
    align-items: center;
    padding: 8px 15px;
    border-top: 1px solid var(--glass-border);
    z-index: 1000;
}

.nav-item-bottom {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: var(--transition);
    color: var(--text-muted);
}

.nav-item-bottom i {
    font-size: 1.3rem;
}

.nav-item-bottom span {
    font-size: 0.7rem;
}

.nav-item-bottom.active {
    color: var(--primary);
    background: rgba(255, 107, 53, 0.15);
}

.nav-item-bottom:hover {
    color: var(--primary);
    transform: translateY(-3px);
}

/* ==================== ریسپانسیو ==================== */
@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        right: -300px;
        height: 100vh;
        z-index: 1000;
        transition: right 0.3s;
        background: var(--glass);
        backdrop-filter: blur(20px);
        border-left: 1px solid var(--glass-border);
    }
    
    .sidebar.open {
        right: 0;
        box-shadow: -8px 0 32px rgba(0, 0, 0, 0.3);
    }
    
    .sidebar-toggle {
        display: flex;
        position: fixed;
        top: 15px;
        right: 15px;
        background: linear-gradient(135deg, var(--primary), var(--secondary));
        border: 1px solid rgba(255, 255, 255, 0.2);
        width: 45px;
        height: 45px;
        border-radius: 50%;
        align-items: center;
        justify-content: center;
        z-index: 101;
        cursor: pointer;
        color: white;
        font-size: 1.2rem;
        backdrop-filter: blur(10px);
        box-shadow: 0 4px 15px rgba(99, 102, 241, 0.3);
        transition: all 0.3s ease;
    }
    
    .sidebar-toggle:active {
        transform: scale(0.95);
        box-shadow: 0 2px 10px rgba(99, 102, 241, 0.2);
    }
    
    .main-content {
        padding: 80px 15px 80px 15px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        background: var(--glass);
        backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        border-radius: 18px;
    }

    .service-card {
        background: var(--glass);
        backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        border-radius: 18px;
    }
    
    .calendar-modern {
        grid-template-columns: 1fr;
    }
    
    .hero-section {
        padding: 25px;
        background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
        backdrop-filter: blur(20px);
        border-radius: 20px;
        border: 1px solid var(--glass-border);
    }
    
    .timeline-track {
        flex-wrap: wrap;
        gap: 15px;
    }
    
    .timeline-track::before {
        display: none;
    }
    
    .calendar-events-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-card {
        padding: 30px 20px;
        background: var(--glass);
        backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 20px;
    }
    
    .bottom-nav {
        display: flex;
        background: var(--glass);
        backdrop-filter: blur(20px);
        border-top: 1px solid var(--glass-border);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    }

    .nav-item-bottom {
        background: transparent;
        border: none;
        flex: 1;
        padding: 12px;
        border-radius: 14px;
        margin: 8px 4px;
        transition: all 0.3s ease;
    }

    .nav-item-bottom:hover,
    .nav-item-bottom.active {
        background: rgba(99, 102, 241, 0.2);
        border: 1px solid rgba(99, 102, 241, 0.3);
    }

    .task-item {
        background: var(--glass);
        backdrop-filter: blur(15px);
        border: 1px solid var(--glass-border);
        border-radius: 16px;
    }

    /* تنظیمات موبایل برای فوتر و چت آنلاین */
    .chat-widget {
        bottom: 90px !important; /* بالاتر از منوی پایین */
        left: 15px !important;
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .main-footer {
        padding-bottom: 90px !important; /* جلوگیری از رفتن متن زیر منوی پایین */
    }
}

@media (max-width: 480px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .calendar-date-large {
        font-size: 2rem;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* صفحه پرداخت کارت به کارت */
.payment-card-modern {
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 50%, #4c1d95 100%);
    border-radius: 20px;
    padding: 28px 24px;
    color: #fff;
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.12);
    margin-bottom: 8px;
}
.payment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}
.payment-chip {
    width: 44px;
    height: 32px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    border-radius: 6px;
}
.payment-card-number {
    font-family: 'Courier New', monospace;
    font-size: 1.35rem;
    letter-spacing: 3px;
    direction: ltr;
    text-align: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 12px;
    margin-bottom: 20px;
}
.payment-card-meta {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}
.payment-card-meta small {
    display: block;
    opacity: 0.65;
    font-size: 0.7rem;
    margin-bottom: 4px;
}
.payment-steps {
    background: rgba(99, 102, 241, 0.08);
    border-radius: 16px;
    padding: 16px 20px;
    border-right: 3px solid var(--primary, #6366f1);
}
.payment-steps h4 {
    margin-bottom: 10px;
    font-size: 0.95rem;
}
.payment-steps ol {
    padding-right: 20px;
    line-height: 1.9;
    font-size: 0.88rem;
    opacity: 0.9;
}

/* پروفایل کاربر */
.profile-modal-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin: 16px 0;
}
.profile-stat-box {
    background: rgba(99, 102, 241, 0.12);
    border-radius: 16px;
    padding: 14px;
    text-align: center;
}
.profile-stat-box strong {
    display: block;
    font-size: 1.4rem;
    color: var(--primary, #6366f1);
    margin-top: 4px;
}

/* راهنما و درباره ما */
.help-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.help-tab-btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 16px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    color: var(--text-primary, #f1f5f9);
    border-radius: 50px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.25s;
}
.help-tab-btn.active {
    background: linear-gradient(135deg, #6366f1, #8b5cf6);
    border-color: transparent;
    color: white;
}
.about-portal-card {
    background: linear-gradient(135deg, rgba(99,102,241,0.15), rgba(6,182,212,0.1));
    border-radius: 24px;
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid rgba(99,102,241,0.25);
}
.about-features {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.about-feature-item {
    background: rgba(255,255,255,0.06);
    border-radius: 16px;
    padding: 16px 12px;
    text-align: center;
    font-size: 0.85rem;
}
.about-feature-item i {
    font-size: 1.6rem;
    color: var(--primary, #6366f1);
    display: block;
    margin-bottom: 8px;
}

.admin-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
}

.admin-setting-btn {
    font-size: 0.8rem !important;
    padding: 10px 8px !important;
    min-height: 44px;
    white-space: normal;
    line-height: 1.4;
}

#customModal {
    z-index: 4000 !important;
}

#customModal .modal-card input,
#customModal .modal-card textarea,
#customModal .modal-card select {
    background: #1e293b;
    color: #f1f5f9;
    border: 1px solid #475569;
    border-radius: 10px;
}

.receipt-preview-wrap {
    margin-top: 14px;
    text-align: center;
}

.receipt-preview-thumb {
    max-width: 100%;
    max-height: 180px;
    border-radius: 12px;
    border: 2px solid rgba(99, 102, 241, 0.35);
    margin-bottom: 10px;
    cursor: pointer;
}

#viewReceiptModal {
    z-index: 5500 !important;
}

#viewReceiptModal .modal-card {
    max-width: 640px;
}

.staff-taskboard-page,
.staff-taskboard-subtitle {
    margin-bottom: 16px;
}

.staff-taskboard-subtitle {
    opacity: 0.75;
    font-size: 0.9rem;
}

.staff-stats-row {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
    margin-bottom: 16px;
}

.staff-empty-board {
    text-align: center;
    padding: 40px 20px;
    background: rgba(99, 102, 241, 0.08);
    border-radius: 20px;
    border: 1px dashed rgba(99, 102, 241, 0.3);
}

.staff-empty-board i {
    font-size: 2.5rem;
    color: var(--primary, #6366f1);
    margin-bottom: 12px;
    display: block;
}

/* مودال مشاهده فیش */
#viewReceiptModal .receipt-view-img {
    max-width: 100%;
    max-height: 55vh;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* موبایل */
@media (max-width: 768px) {
    .toast-notification {
        bottom: 88px !important;
        left: 12px !important;
        right: 12px !important;
        max-width: calc(100% - 24px);
    }
    .main-content {
        padding: 16px 14px 90px !important;
    }
    .top-bar {
        flex-direction: column;
        align-items: stretch;
    }
    .search-box {
        width: 100% !important;
    }
    .hero-section {
        padding: 24px 18px !important;
        border-radius: 20px !important;
    }
    .calendar-modern {
        grid-template-columns: 1fr !important;
        padding: 18px !important;
    }
    .calendar-date-large {
        font-size: 2rem !important;
    }
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 12px !important;
    }
    .stat-card {
        padding: 16px !important;
        flex-direction: column;
        text-align: center;
    }
    .services-grid {
        grid-template-columns: 1fr !important;
    }
    .modal-card {
        width: 95% !important;
        padding: 24px 18px !important;
        border-radius: 20px !important;
    }
    .filter-sort-bar {
        flex-direction: column;
    }
    .filter-select {
        width: 100%;
    }
    .admin-compact-card {
        flex-direction: column;
        align-items: stretch !important;
    }
    .task-item {
        flex-direction: column;
        align-items: stretch !important;
    }
    .action-buttons {
        display: flex;
        flex-wrap: wrap;
        gap: 8px;
        margin-top: 10px;
    }
    .action-btn, .btn-primary-small, .btn-success-small, .btn-danger-small {
        min-height: 44px;
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
    }
    .bottom-nav {
        padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
        gap: 2px;
    }
    .nav-item-bottom {
        padding: 6px 4px;
        min-width: 0;
        flex: 1;
    }
    .nav-item-bottom span {
        font-size: 0.62rem;
    }
    .nav-item-bottom i {
        font-size: 1.1rem;
    }
    .profile-modal-stats {
        grid-template-columns: 1fr 1fr;
    }
    .trust-logo-container {
        bottom: 82px !important;
        z-index: 999;
    }
    .current-user-badge {
        font-size: 0.7rem;
        max-width: 140px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        cursor: pointer;
    }
}