/* ====================================
   Extra Eye - Partner Panel
   Dark Navy Theme with Vazirmatn Font
   ==================================== */

/* CSS Variables - HomayTech Color Palette */
:root {
    /* HomayTech Primary Colors */
    --primary-900: #1A2530;
    /* Dark Background */
    --primary-800: #2A3540;
    /* Slightly lighter */
    --primary-700: #3E4A54;
    /* Primary Dark */
    --primary-600: #596773;
    /* Primary */
    --primary-500: #6A7580;
    --primary-400: #7B858F;
    --primary-300: #8C959E;
    --primary-200: #9DA5AD;
    --primary-100: #AEB5BC;

    /* HomayTech Accent Colors - Blue */
    --accent-gradient: linear-gradient(135deg, #8FBFF0 0%, #6EA6E8 50%, #5890D0 100%);
    --accent-primary: #6EA6E8;
    /* Accent */
    --accent-secondary: #5890D0;
    /* Accent Dark */
    --accent-light: #8FBFF0;
    /* Accent Light */
    --accent-cyan: #6EA6E8;
    --accent-emerald: #22C55E;
    /* Success */
    --accent-amber: #F59E0B;
    /* Warning */
    --accent-rose: #EF4444;
    /* Error */

    /* HomayTech Text Colors */
    --text-primary: #FFFFFF;
    --text-secondary: rgba(255, 255, 255, 0.8);
    --text-muted: rgba(255, 255, 255, 0.6);

    /* Light mode text (for reference) */
    --text-light-primary: #1A2530;
    --text-light-secondary: rgba(26, 37, 48, 0.7);

    /* HomayTech Background Colors */
    --bg-body: var(--primary-900);
    --bg-card: rgba(62, 74, 84, 0.4);
    /* Dark Mode Card */
    --bg-card-hover: rgba(62, 74, 84, 0.6);
    --bg-input: rgba(62, 74, 84, 0.5);
    --bg-input-focus: rgba(62, 74, 84, 0.7);

    /* HomayTech Border Colors */
    --border-subtle: rgba(255, 255, 255, 0.1);
    --border-medium: rgba(255, 255, 255, 0.15);
    --border-strong: rgba(255, 255, 255, 0.2);

    /* HomayTech Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.2);
    --shadow-lg: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* Card Shadow Dark */
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.4), 0 8px 10px -6px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 4px 12px rgba(110, 166, 232, 0.3);
    /* Accent Shadow */
    --shadow-light: 0 4px 15px rgba(0, 0, 0, 0.08);
    /* Card Shadow Light */

    /* HomayTech Gradients */
    --primary-gradient: linear-gradient(135deg, #596773 0%, #3E4A54 100%);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 300ms ease;
    --transition-slow: 500ms ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Spacing */
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing-md: 16px;
    --spacing-lg: 24px;
    --spacing-xl: 32px;
    --spacing-2xl: 48px;
}

/* Reset & Base */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 14px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Vazirmatn', system-ui, -apple-system, sans-serif;
    background: var(--bg-body);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 700;
    line-height: 1.3;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1rem;
}

h6 {
    font-size: 0.875rem;
}

p {
    color: var(--text-secondary);
}

a {
    color: var(--accent-light);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--accent-primary);
}

/* ====================================
   Buttons
   ==================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md) var(--spacing-xl);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-normal);
    text-decoration: none;
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: var(--shadow-md), 0 0 20px rgba(110, 166, 232, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(110, 166, 232, 0.4);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-strong);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-primary);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.btn-danger:hover {
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.4);
    transform: translateY(-2px);
}

.btn-sm {
    padding: var(--spacing-sm) var(--spacing-md);
    font-size: 0.875rem;
}

.btn-lg {
    padding: var(--spacing-lg) var(--spacing-2xl);
    font-size: 1.125rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
}

/* ====================================
   Form Controls
   ==================================== */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: var(--spacing-md);
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.form-control:focus {
    outline: none;
    background: var(--bg-input-focus);
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px rgba(110, 166, 232, 0.2);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.is-invalid {
    border-color: var(--accent-rose);
}

.invalid-feedback {
    display: block;
    margin-top: var(--spacing-xs);
    font-size: 0.85rem;
    color: var(--accent-rose);
}

/* OTP Input Boxes */
.otp-container {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    direction: ltr;
}

.otp-input {
    width: 55px;
    height: 65px;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 700;
    font-family: 'Vazirmatn', monospace;
    background: var(--bg-input);
    border: 2px solid var(--border-medium);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.otp-input:focus {
    outline: none;
    border-color: var(--accent-primary);
    background: var(--bg-input-focus);
    box-shadow: 0 0 0 3px rgba(110, 166, 232, 0.2), 0 0 20px rgba(110, 166, 232, 0.1);
    transform: scale(1.05);
}

.otp-input.filled {
    border-color: var(--accent-emerald);
    background: rgba(16, 185, 129, 0.1);
}

/* ====================================
   Cards
   ==================================== */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-lg);
}

.card-glass {
    background: rgba(15, 22, 41, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.card-header {
    margin-bottom: var(--spacing-lg);
    padding-bottom: var(--spacing-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ====================================
   Landing Page
   ==================================== */
/* ====================================
   Landing Page Styles (Removed)
   ==================================== */

/* Animated Background (Used in Auth Pages) */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 0;
    overflow: hidden;
}

.bg-animation::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background:
        radial-gradient(ellipse at 20% 30%, rgba(110, 166, 232, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(88, 144, 208, 0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 50% 50%, rgba(110, 166, 232, 0.08) 0%, transparent 40%);
    animation: bgPulse 20s ease-in-out infinite;
}

@keyframes bgPulse {

    0%,
    100% {
        transform: translate(0, 0) rotate(0deg);
    }

    25% {
        transform: translate(-5%, 5%) rotate(2deg);
    }

    50% {
        transform: translate(5%, -5%) rotate(-2deg);
    }

    75% {
        transform: translate(-3%, -3%) rotate(1deg);
    }
}

/* Floating Orbs */
.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.6;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: var(--accent-primary);
    top: -100px;
    right: -100px;
    animation-delay: 0s;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: var(--accent-secondary);
    bottom: -100px;
    left: -100px;
    animation-delay: -5s;
}

.orb-3 {
    width: 200px;
    height: 200px;
    background: var(--accent-cyan);
    top: 50%;
    left: 50%;
    animation-delay: -10s;
}

@keyframes float {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(30px, -30px);
    }

    50% {
        transform: translate(-20px, 20px);
    }

    75% {
        transform: translate(-30px, -20px);
    }
}

/* Grid Pattern Overlay */
.grid-pattern {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.5;
}

/* ====================================
   Auth Pages
   ==================================== */
.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.auth-card {
    width: 100%;
    max-width: 450px;
    background: rgba(15, 22, 41, 0.85);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-xl);
    padding: var(--spacing-2xl);
    backdrop-filter: blur(20px);
    box-shadow: var(--shadow-xl);
    animation: fadeInUp 0.6s ease-out;
    position: relative;
    z-index: 1;
}

.auth-header {
    text-align: center;
    margin-bottom: var(--spacing-2xl);
}

.auth-logo {
    width: 80px;
    height: 80px;
    background: var(--accent-gradient);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--spacing-lg);
    box-shadow: 0 0 40px rgba(110, 166, 232, 0.4);
}

.auth-logo svg {
    width: 45px;
    height: 45px;
    fill: white;
}

.auth-title {
    font-size: 1.75rem;
    margin-bottom: var(--spacing-sm);
}

.auth-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* Mobile Number Display */
.mobile-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-md);
    background: var(--bg-input);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    direction: ltr;
}

.mobile-display .number {
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: 1px;
}

.mobile-display .change-btn {
    font-size: 0.85rem;
    color: var(--accent-light);
    cursor: pointer;
    transition: color var(--transition-fast);
}

.mobile-display .change-btn:hover {
    color: var(--accent-primary);
}

/* Timer */
.otp-timer {
    text-align: center;
    margin-top: var(--spacing-lg);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.otp-timer .time {
    font-weight: 700;
    color: var(--accent-light);
    font-size: 1.1rem;
}

.otp-timer.expired .time {
    color: var(--accent-rose);
}

.resend-btn {
    margin-top: var(--spacing-md);
    color: var(--accent-primary);
    cursor: pointer;
    font-weight: 500;
    transition: color var(--transition-fast);
}

.resend-btn:hover {
    color: var(--accent-light);
}

.resend-btn:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}

/* ====================================
   Dashboard Layout
   ==================================== */
.dashboard-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: var(--bg-card);
    border-left: 1px solid var(--border-subtle);
    padding: var(--spacing-xl);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    padding-bottom: var(--spacing-xl);
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: var(--spacing-xl);
}

.sidebar-logo {
    width: 45px;
    height: 45px;
    background: var(--accent-gradient);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(110, 166, 232, 0.3);
}

.sidebar-logo svg {
    width: 25px;
    height: 25px;
    fill: white;
}

.sidebar-title {
    font-size: 1.25rem;
    font-weight: 700;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding-bottom: var(--spacing-md);
}

/* Navigation Sections */
.nav-section {
    margin-bottom: var(--spacing-xs);
}

.nav-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--spacing-sm) var(--spacing-md);
    color: var(--text-muted);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-fast);
    user-select: none;
}

.nav-section-title:hover {
    color: var(--text-secondary);
}

.nav-section-title .section-arrow {
    width: 16px;
    height: 16px;
    stroke: currentColor;
    fill: none;
    transition: transform var(--transition-fast);
}

.nav-section-title.collapsed .section-arrow {
    transform: rotate(-90deg);
}

.nav-section-items {
    overflow: hidden;
    transition: max-height var(--transition-normal);
    max-height: 500px;
}

.nav-section-items.collapsed {
    max-height: 0;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    font-size: 0.95rem;
    color: var(--text-secondary);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-sm);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.nav-item:hover {
    background: rgba(110, 166, 232, 0.1);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 0 20px rgba(110, 166, 232, 0.3);
}

.nav-item svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
}

.sidebar-footer {
    padding-top: var(--spacing-xl);
    border-top: 1px solid var(--border-subtle);
}

.user-info {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.user-avatar {
    width: 45px;
    height: 45px;
    background: var(--primary-600);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: var(--accent-light);
}

.user-details {
    flex: 1;
}

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

.user-role {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-right: 280px;
    padding: var(--spacing-xl);
    min-height: 100vh;
}

.page-header {
    margin-bottom: var(--spacing-lg);
}

.page-title {
    font-size: 1.4rem;
    margin-bottom: var(--spacing-xs);
}

.page-description {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    transition: all var(--transition-normal);
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--border-medium);
    box-shadow: var(--shadow-md);
}

.stat-icon {
    width: 45px;
    height: 45px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon svg {
    width: 22px;
    height: 22px;
    stroke: white;
    fill: none;
}

.stat-icon.purple {
    background: linear-gradient(135deg, #6EA6E8 0%, #5890D0 100%);
}

.stat-icon.green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.stat-icon.blue {
    background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
}

.stat-icon.amber {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
}

.stat-value {
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 2px;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Tables */
.table-wrapper {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    overflow: hidden;
}

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--spacing-lg);
    border-bottom: 1px solid var(--border-subtle);
}

.table-title {
    font-size: 1.1rem;
    font-weight: 600;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: var(--spacing-md) var(--spacing-lg);
    text-align: right;
}

th {
    font-weight: 600;
    color: var(--text-secondary);
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}

td {
    border-bottom: 1px solid var(--border-subtle);
}

tr:last-child td {
    border-bottom: none;
}

tr:hover td {
    background: rgba(110, 166, 232, 0.05);
}

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: var(--radius-full);
}

.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-emerald);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.badge-danger {
    background: rgba(244, 63, 94, 0.15);
    color: var(--accent-rose);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: var(--spacing-sm);
    padding: var(--spacing-lg);
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 var(--spacing-md);
    background: var(--bg-input);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.pagination a:hover {
    background: var(--bg-input-focus);
    border-color: var(--accent-primary);
    color: var(--text-primary);
}

.pagination .active {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
}

/* Alerts */
.alert {
    padding: var(--spacing-md) var(--spacing-lg);
    border-radius: var(--radius-md);
    margin-bottom: var(--spacing-lg);
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.alert-success {
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    color: var(--accent-emerald);
}

.alert-error {
    background: rgba(244, 63, 94, 0.15);
    border: 1px solid rgba(244, 63, 94, 0.3);
    color: var(--accent-rose);
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid rgba(245, 158, 11, 0.3);
    color: var(--accent-amber);
}

/* Loading Spinner */
.spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--border-medium);
    border-top-color: var(--accent-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

.btn .spinner {
    width: 20px;
    height: 20px;
    border-width: 2px;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

.mt-sm {
    margin-top: var(--spacing-sm);
}

.mt-md {
    margin-top: var(--spacing-md);
}

.mt-lg {
    margin-top: var(--spacing-lg);
}

.mt-xl {
    margin-top: var(--spacing-xl);
}

.mb-sm {
    margin-bottom: var(--spacing-sm);
}

.mb-md {
    margin-bottom: var(--spacing-md);
}

.mb-lg {
    margin-bottom: var(--spacing-lg);
}

.mb-xl {
    margin-bottom: var(--spacing-xl);
}

.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 1024px) {
    .sidebar {
        width: 240px;
    }

    .main-content {
        margin-right: 240px;
    }

    .profile-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    html {
        font-size: 13px;
    }

    .sidebar {
        transform: translateX(100%);
        transition: transform var(--transition-normal);
        width: 280px;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .main-content {
        margin-right: 0;
        padding: var(--spacing-sm);
        padding-top: 60px;
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }

    .page-header {
        margin-bottom: var(--spacing-md);
    }

    .page-title {
        font-size: 1.3rem;
    }

    .page-description {
        font-size: 0.8rem;
    }

    .landing-header {
        padding: var(--spacing-sm);
    }

    .hero {
        padding-top: calc(60px + var(--spacing-lg));
        padding-left: var(--spacing-sm);
        padding-right: var(--spacing-sm);
    }

    .hero-title {
        font-size: 1.5rem;
    }

    .hero-description {
        font-size: 0.9rem;
    }

    .features {
        grid-template-columns: 1fr;
        padding: var(--spacing-md) var(--spacing-sm);
        gap: var(--spacing-md);
    }

    .feature-card {
        padding: var(--spacing-md);
    }

    .otp-input {
        width: 40px;
        height: 48px;
        font-size: 1.1rem;
    }

    .otp-container {
        gap: 6px;
    }

    .auth-card {
        padding: var(--spacing-md);
        margin: var(--spacing-xs);
        max-width: 100%;
    }

    .auth-logo {
        width: 55px;
        height: 55px;
    }

    .auth-logo svg {
        width: 30px;
        height: 30px;
    }

    .auth-title {
        font-size: 1.3rem;
    }

    .auth-subtitle {
        font-size: 0.85rem;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-sm);
    }

    .stat-card {
        padding: var(--spacing-sm);
        flex-direction: column;
        text-align: center;
        gap: var(--spacing-xs);
    }

    .stat-icon {
        width: 40px;
        height: 40px;
    }

    .stat-icon svg {
        width: 20px;
        height: 20px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .stat-label {
        font-size: 0.7rem;
    }

    .table-wrapper {
        overflow-x: auto;
        max-width: 100%;
    }

    table {
        min-width: 500px;
    }

    th,
    td {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8rem;
    }

    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.85rem;
    }

    .btn-lg {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.95rem;
    }

    .btn-sm {
        padding: 4px 10px;
        font-size: 0.8rem;
    }

    .card {
        padding: var(--spacing-md);
    }

    .card-header {
        padding-bottom: var(--spacing-sm);
        margin-bottom: var(--spacing-sm);
    }

    .card-title {
        font-size: 1rem;
    }

    .form-group {
        margin-bottom: var(--spacing-sm);
    }

    .form-label {
        font-size: 0.85rem;
        margin-bottom: 4px;
    }

    .form-control {
        padding: var(--spacing-sm);
        font-size: 0.9rem;
    }

    .profile-grid {
        grid-template-columns: 1fr !important;
        gap: var(--spacing-md);
    }

    .alert {
        padding: var(--spacing-sm);
        font-size: 0.85rem;
    }

    .badge {
        font-size: 0.7rem;
        padding: 2px 8px;
    }

    .table-header {
        padding: var(--spacing-sm);
        flex-direction: column;
        gap: var(--spacing-sm);
        align-items: stretch;
    }

    .table-title {
        font-size: 0.95rem;
    }

    .pagination {
        padding: var(--spacing-sm);
        gap: 4px;
    }

    .pagination a,
    .pagination span {
        min-width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    top: var(--spacing-sm);
    right: var(--spacing-sm);
    z-index: 100;
    width: 44px;
    height: 44px;
    background: var(--accent-gradient);
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-md);
}

.mobile-menu-toggle svg {
    stroke: white;
    width: 22px;
    height: 22px;
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
}

/* Sidebar Overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 45;
    backdrop-filter: blur(4px);
}

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

/* Safe Area for Mobile */
@supports (padding: env(safe-area-inset-bottom)) {
    .sidebar-footer {
        padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom));
    }

    .auth-page {
        padding-bottom: calc(var(--spacing-lg) + env(safe-area-inset-bottom));
    }

    .main-content {
        padding-bottom: calc(var(--spacing-md) + env(safe-area-inset-bottom));
    }
}

/* Touch Improvements */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
    }

    .nav-item {
        min-height: 44px;
    }

    .form-control {
        min-height: 44px;
        font-size: 16px;
        /* Prevent zoom on iOS */
    }

    .otp-input {
        font-size: 16px;
        /* Prevent zoom on iOS */
    }
}

/* Jalali Date Component */
.jalali-date {
    font-family: 'Vazirmatn', monospace;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* Extra Small Devices */
@media (max-width: 420px) {
    html {
        font-size: 12px;
    }

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

    .otp-input {
        width: 36px;
        height: 44px;
        font-size: 1rem;
    }

    .otp-container {
        gap: 4px;
    }

    .hero-title {
        font-size: 1.3rem;
    }

    .logo-text {
        font-size: 1.1rem;
    }

    .btn-lg {
        padding: var(--spacing-xs) var(--spacing-md);
    }

    .auth-card {
        padding: var(--spacing-sm);
    }

    .mobile-menu-toggle {
        width: 40px;
        height: 40px;
    }

    .mobile-menu-toggle svg {
        width: 20px;
        height: 20px;
    }
}
/* Wallet Section in Sidebar */
.wallet-section {
    padding: var(--spacing-sm);
    margin-bottom: var(--spacing-md);
    background: rgba(110, 166, 232, 0.1);
    border-radius: var(--radius-md);
    border: 1px solid rgba(110, 166, 232, 0.2);
    text-align: center;
}

.wallet-balance {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--accent-light);
    margin-bottom: var(--spacing-xs);
}

.wallet-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-sm);
}

.btn-increase-wallet {
    width: 100%;
    font-size: 0.8rem;
    padding: var(--spacing-xs);
}

/* Disabled Link Style */
.nav-item.disabled-link {
    cursor: default;
    opacity: 0.7;
}
.nav-item.disabled-link:hover {
    background: transparent;
    color: var(--text-secondary);
}

/* Modal Styles */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.7);
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}
.modal-overlay.show {
    display: flex;
}
.modal-content {
    background: var(--primary-800);
    width: 90%;
    max-width: 600px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-medium);
    padding: var(--spacing-xl);
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: var(--shadow-xl);
}
.modal-close {
    position: absolute;
    top: var(--spacing-md);
    left: var(--spacing-md);
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
}
.modal-title {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-md);
    text-align: center;
    color: var(--accent-light);
}

/* File Upload */
.file-upload-wrapper {
    position: relative;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-md);
    padding: var(--spacing-lg);
    text-align: center;
    cursor: pointer;
    transition: all var(--transition-fast);
}
.file-upload-wrapper:hover {
    border-color: var(--accent-primary);
    background: rgba(110, 166, 232, 0.05);
}
.file-upload-input {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    opacity: 0;
    cursor: pointer;
}

.badge-secondary {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text-secondary);
}

/* Chic Modal & Restriction Styles */
.modal-content.chic-mode {
    max-width: 800px;
    padding: var(--spacing-xl);
    background: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: visible; /* Try to avoid scroll */
}

.chic-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-md);
}

.chic-grid .full-width {
    grid-column: span 2;
}

.modal-title.chic-title {
    font-size: 1.8rem;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: var(--spacing-lg);
    font-weight: 800;
}

/* Restriction Popup */
.restriction-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: rgba(15, 23, 42, 0.9);
    padding: 30px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 0 50px rgba(0, 0, 0, 0.8);
    z-index: 300;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    min-width: 320px;
}

.restriction-popup.show {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.restriction-icon {
    width: 60px;
    height: 60px;
    background: rgba(239, 68, 68, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    color: var(--accent-rose);
}

.restriction-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    color: var(--text-primary);
}

.restriction-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.restriction-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 299;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(3px);
}

.restriction-overlay.show {
    opacity: 1;
    pointer-events: all;
}

/* Compact form styles for modal */
.compact-form-group {
    margin-bottom: var(--spacing-sm);
}
.compact-form-group .form-label {
    font-size: 0.8rem;
    margin-bottom: 2px;
}
.compact-form-group .form-control {
    padding: 8px 12px;
    font-size: 0.9rem;
}
/* Address textarea adjustment */
.compact-form-group textarea.form-control {
    height: 60px;
    resize: none;
}

/* Success Modal Styles */
.success-modal-icon {
    width: 80px;
    height: 80px;
    background: rgba(16, 185, 129, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--accent-emerald);
    box-shadow: 0 0 30px rgba(16, 185, 129, 0.2);
    animation: successPulse 2s infinite;
}

@keyframes successPulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    70% { transform: scale(1.05); box-shadow: 0 0 0 20px rgba(16, 185, 129, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.success-modal-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--accent-emerald);
    margin-bottom: 10px;
    text-align: center;
}

.success-modal-message {
    text-align: center;
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 25px;
    font-size: 1rem;
}

/* Top Header & Notifications */
.app-header {
    display: flex;
    justify-content: flex-end; /* Right aligned */
    align-items: center;
    padding: var(--spacing-md) var(--spacing-xl);
    background: transparent; /* or var(--bg-card) if sticky */
    margin-bottom: var(--spacing-md);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
}

.notification-wrapper {
    position: relative;
}

.notification-btn {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 50%;
    width: 45px;
    height: 45px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.notification-btn:hover {
    color: var(--text-primary);
    border-color: var(--accent-primary);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--accent-rose);
    color: white;
    font-size: 0.7rem;
    font-weight: 700;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid var(--bg-body);
    animation: bounce 1s infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-3px); }
}

.notification-menu {
    position: absolute;
    top: 100%;
    left: 0; /* Changed from right:0 because of RTL, check direction */
    width: 300px;
    background: var(--bg-card);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    padding: var(--spacing-sm);
    z-index: 100;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

/* RTL adjustment: In RTL, left:0 aligns to the left edge (which is 'far side' usually). 
   But usually we want it aligned with the bell. 
   If dir=rtl, 'left: 0' puts it on the left side of the relative parent. 
   Let's use specific positioning based on LTR/RTL or just center it.
*/
html[dir="rtl"] .notification-menu {
    left: 0; 
    right: auto;
}

.notification-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(10px); /* Keep translation or reset? usually translateY(0) if starting from 10 */
    transform: translateY(5px);
}

.notification-header {
    padding: var(--spacing-sm) var(--spacing-md);
    font-weight: 700;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
    color: var(--text-primary);
}

.notification-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: var(--spacing-md);
    color: var(--text-secondary);
    text-decoration: none;
    transition: background 0.2s;
    border-radius: var(--radius-sm);
}

.notification-item:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.notification-icon {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(245, 158, 11, 0.1);
    color: var(--accent-amber);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.notification-content {
    flex: 1;
}

.notification-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.notification-time {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.empty-notifications {
    padding: var(--spacing-lg);
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* Admin Sidebar Menu/Submenu Better Separation */
.nav-section {
    margin-bottom: var(--spacing-sm);
}

.nav-section-title {
    display: flex;
    align-items: center;
    padding: 10px var(--spacing-md);
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
    border-radius: var(--radius-md);
    margin-bottom: 2px;
}

.nav-section-title:hover {
    background: var(--bg-card-hover);
    color: var(--text-primary);
}

.nav-section-title svg:first-child {
    width: 18px;
    height: 18px;
    margin-left: 8px;
    stroke: currentColor;
    fill: none;
}

.nav-section-items {
    padding-right: var(--spacing-md);
    border-right: 2px solid var(--border-subtle);
    margin-right: var(--spacing-md);
    margin-bottom: var(--spacing-sm);
}

.nav-section-items .nav-item {
    font-size: 0.85rem;
    padding: 8px var(--spacing-md);
    color: var(--text-muted);
}

.nav-section-items .nav-item:hover {
    color: var(--text-primary);
    background: rgba(255,255,255,0.03);
}

.nav-section-items .nav-item.active {
    color: var(--accent-primary);
    background: rgba(110, 166, 232, 0.08);
}

.nav-section-items.collapsed {
    display: none;
}

.nav-section-title.collapsed .section-arrow {
    transform: rotate(-90deg);
}

.section-arrow {
    width: 16px;
    height: 16px;
    margin-right: auto;
    stroke: currentColor;
    fill: none;
    transition: transform 0.2s ease;
}
