@font-face {
    font-family: "YekanBakh";
    src: url("./fonts/YekanBakh-Thin.woff2") format("woff2");
    font-weight: 100;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "YekanBakh";
    src: url("./fonts/YekanBakh-Light.woff2") format("woff2");
    font-weight: 300;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "YekanBakh";
    src: url("./fonts/YekanBakh-Regular.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "YekanBakh";
    src: url("./fonts/YekanBakh-SemiBold.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "YekanBakh";
    src: url("./fonts/YekanBakh-Bold.woff2") format("woff2");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "YekanBakh";
    src: url("./fonts/YekanBakh-ExtraBold.woff2") format("woff2");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "YekanBakh";
    src: url("./fonts/YekanBakh-Black.woff2") format("woff2");
    font-weight: 900;
    font-style: normal;
    font-display: swap;
}
@font-face {
    font-family: "YekanBakh";
    src: url("./fonts/YekanBakh-ExtraBlack.woff2") format("woff2");
    font-weight: 950;
    font-style: normal;
    font-display: swap;
}

/* ============================================
   🌙 DARK MODE (پیش‌فرض)
   ============================================ */
:root {
    /* Colors - Dark Mode */
    --bg: #0f172a;
    --bg-gradient-1: #1f2937;
    --bg-gradient-2: rgba(15, 118, 110, 0.15);
    --panel: #111827;
    --card: #1f2937;
    --card-alpha: rgba(15, 23, 42, 0.65);
    --border: #243041;
    --border-light: rgba(148, 163, 184, 0.12);
    --text: #e2e8f0;
    --muted: #94a3b8;
    --accent: #eab308;
    --accent-strong: #ca8a04;
    --accent-alpha: rgba(234, 179, 8, 0.1);
    --danger: #ef4444;
    --success: #22c55e;
    --warning: #f59e0b;
    --info: #3b82f6;
    
    /* Fonts */
    --font-body: "YekanBakh", "Segoe UI", Tahoma, Arial, sans-serif;
    --font-display: "YekanBakh", "Segoe UI", Tahoma, Arial, sans-serif;
    
    /* Transitions */
    --transition-fast: 0.15s ease;
    --transition-normal: 0.2s ease;
    --transition-slow: 0.3s ease;
}

/* ============================================
   ☀️ LIGHT MODE
   ============================================ */
[data-theme="light"] {
    --bg: #f8fafc;
    --bg-gradient-1: #e2e8f0;
    --bg-gradient-2: rgba(249, 115, 22, 0.08);
    --panel: #ffffff;
    --card: #ffffff;
    --card-alpha: rgba(255, 255, 255, 0.9);
    --border: #e2e8f0;
    --border-light: rgba(71, 85, 105, 0.15);
    --text: #1e293b;
    --muted: #334155;
    --accent: #f97316;
    --accent-strong: #ea580c;
    --accent-alpha: rgba(249, 115, 22, 0.1);
}

[data-theme="light"] body {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

[data-theme="light"] .neo-sidebar {
    background: rgba(255, 255, 255, 0.95);
    border-left-color: var(--border);
}

[data-theme="light"] .neo-header {
    background: rgba(255, 255, 255, 0.85);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .neo-card,
[data-theme="light"] .neo-lead-card {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(71, 85, 105, 0.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .neo-input,
[data-theme="light"] .neo-select {
    background: rgba(248, 250, 252, 0.9);
    border-color: rgba(71, 85, 105, 0.2);
    color: var(--text);
}

[data-theme="light"] .neo-jdp {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(71, 85, 105, 0.2);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .neo-table tbody tr:nth-child(even) {
    background: rgba(248, 250, 252, 0.5);
}

[data-theme="light"] .neo-button.secondary {
    background: rgba(71, 85, 105, 0.1);
    border-color: rgba(71, 85, 105, 0.2);
}

[data-theme="light"] .neo-auth-card {
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Light Mode - Text Readability Fix */
[data-theme="light"] .neo-muted,
[data-theme="light"] .neo-label,
[data-theme="light"] .neo-help,
[data-theme="light"] .neo-form-field label {
    color: #374151;
}

[data-theme="light"] .neo-section-title,
[data-theme="light"] .neo-form-title {
    color: #1f2937;
}

[data-theme="light"] .neo-nav-item {
    color: #374151;
}

[data-theme="light"] .neo-nav-item:hover,
[data-theme="light"] .neo-nav-item.active {
    color: var(--accent);
}

[data-theme="light"] .neo-pill {
    background: rgba(249, 115, 22, 0.15);
    color: #ea580c;
}

[data-theme="light"] .neo-badge {
    background: rgba(30, 41, 59, 0.1);
    color: #374151;
}

[data-theme="light"] .neo-badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #166534;
}

[data-theme="light"] .neo-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #dc2626;
}

[data-theme="light"] .neo-table th {
    background: rgba(30, 41, 59, 0.08);
    color: #1f2937;
}

[data-theme="light"] .neo-table td {
    color: #374151;
}

[data-theme="light"] .neo-alert {
    background: rgba(239, 68, 68, 0.1);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.2);
}

[data-theme="light"] .neo-modal-overlay {
    background: rgba(30, 41, 59, 0.5);
}

[data-theme="light"] .neo-modal {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .neo-modal-header {
    border-bottom-color: rgba(71, 85, 105, 0.15);
    color: #1f2937;
}

[data-theme="light"] .neo-empty-title,
[data-theme="light"] .neo-empty-text {
    color: #374151;
}

[data-theme="light"] .neo-stat-value {
    color: #1f2937;
}

[data-theme="light"] .neo-stat-label {
    color: #64748b;
}

/* ============================================
   🔧 BASE STYLES
   ============================================ */
* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--font-body);
    line-height: 1.7;
    letter-spacing: -0.1px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background: radial-gradient(1200px 700px at 95% -10%, var(--bg-gradient-1) 0%, rgba(15, 23, 42, 0) 60%),
        radial-gradient(900px 600px at -5% 10%, var(--bg-gradient-2) 0%, rgba(15, 23, 42, 0) 55%),
        var(--bg);
    color: var(--text);
    transition: background var(--transition-slow), color var(--transition-slow);
}

button,
input,
select,
textarea,
option {
    font-family: var(--font-body);
}

/* ============================================
   🅰️ TYPOGRAPHY (YekanBakh weights)
   ============================================ */
.neo-logo-text {
    font-weight: 800;
}

.neo-section-title,
.neo-form-title,
.neo-header,
.neo-card h1,
.neo-card h2,
.neo-card h3 {
    font-weight: 700;
    font-family: var(--font-display);
}

.neo-stat-value {
    font-weight: 800;
    font-family: var(--font-display);
}

.neo-pill,
.neo-badge,
.neo-label,
.neo-button,
.neo-page-btn,
.neo-card-link,
.neo-tab,
.neo-table-action,
.neo-theme-toggle,
.neo-nav-item.active {
    font-weight: 600;
}

a {
    color: inherit;
    text-decoration: none;
}

/* ============================================
   🎛️ THEME TOGGLE
   ============================================ */
.neo-theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--accent-alpha);
    border: 1px solid transparent;
    color: var(--accent);
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 16px;
}

.neo-theme-toggle:hover {
    background: var(--accent);
    color: var(--bg);
    transform: scale(1.05);
}

/* ============================================
   📐 LAYOUT
   ============================================ */
.neo-app {
    display: flex;
    height: 100%;
}

.neo-sidebar {
    width: 260px;
    background: rgba(15, 23, 42, 0.95);
    border-left: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    transition: background var(--transition-slow), border-color var(--transition-slow);
}

.neo-sidebar header {
    padding: 20px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 12px;
}

.neo-logo {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    overflow: hidden;
    display: grid;
    place-items: center;
}

.neo-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neo-logo-text {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--accent-alpha);
    display: grid;
    place-items: center;
    color: var(--accent);
    font-weight: 700;
    font-family: var(--font-display);
}

.neo-sidebar nav {
    padding: 14px;
    overflow-y: auto;
    flex: 1;
}

.neo-sidebar nav::-webkit-scrollbar {
    width: 6px;
}

.neo-sidebar nav::-webkit-scrollbar-track {
    background: transparent;
}

.neo-sidebar nav::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 3px;
}

.neo-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--muted);
    cursor: pointer;
    transition: all var(--transition-normal);
}

.neo-nav-item i {
    width: 20px;
    text-align: center;
}

.neo-nav-item.active,
.neo-nav-item:hover {
    background: var(--accent-alpha);
    color: var(--accent);
}

.neo-nav-item.active {
    font-weight: 600;
}

.neo-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.neo-header {
    height: 64px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: rgba(15, 23, 42, 0.7);
    backdrop-filter: blur(6px);
    font-family: var(--font-display);
    box-shadow: 0 10px 24px rgba(2, 6, 23, 0.35);
    transition: background var(--transition-slow), box-shadow var(--transition-slow);
}

.neo-header-right {
    display: flex;
    align-items: center;
    gap: 12px;
}

.neo-content {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

/* ============================================
   🍞 BREADCRUMB
   ============================================ */
.neo-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 16px;
}

.neo-breadcrumb a {
    color: var(--muted);
    transition: color var(--transition-fast);
}

.neo-breadcrumb a:hover {
    color: var(--accent);
}

.neo-breadcrumb-current {
    color: var(--text);
    font-weight: 600;
}

.neo-breadcrumb-separator {
    color: var(--border);
}

/* ============================================
   🎴 CARDS
   ============================================ */
.neo-card {
    background: var(--card-alpha);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.35);
    transition: all var(--transition-normal);
}

.neo-card.accent {
    border-right: 4px solid var(--accent-color);
    background: linear-gradient(110deg, rgba(15, 23, 42, 0.7), rgba(15, 23, 42, 0.45));
}

.neo-card.accent-blue { --accent-color: #3b82f6; }
.neo-card.accent-indigo { --accent-color: #6366f1; }
.neo-card.accent-green { --accent-color: #22c55e; }
.neo-card.accent-yellow { --accent-color: #eab308; }
.neo-card.accent-orange { --accent-color: #f97316; }
.neo-card.accent-red { --accent-color: #ef4444; }
.neo-card.accent-pink { --accent-color: #ec4899; }
.neo-card.accent-purple { --accent-color: #a855f7; }

.neo-lead-card {
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.6);
    transition: all var(--transition-normal);
    position: relative;
}

/* ============================================
   👆 CLICKABLE & HOVER EFFECTS
   ============================================ */
.neo-clickable {
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
}

.neo-clickable::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    background: var(--accent-alpha);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.neo-clickable:hover::after {
    opacity: 1;
}

.neo-clickable:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(15, 23, 42, 0.4);
}

.neo-clickable:active {
    transform: translateY(0);
}

.neo-lead-card:hover {
    border-color: rgba(234, 179, 8, 0.4);
    transform: translateY(-2px);
}

.neo-card-link {
    position: absolute;
    top: 12px;
    left: 12px;
    border: 1px solid rgba(148, 163, 184, 0.3);
    background: rgba(15, 23, 42, 0.7);
    color: var(--text);
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 11px;
    transition: all var(--transition-fast);
}

.neo-card-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* ============================================
   📊 GRID
   ============================================ */
.neo-grid {
    display: grid;
    gap: 16px;
}

.neo-grid.cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.neo-grid.cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.neo-grid.cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.neo-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 14px;
}

/* ============================================
   🔘 BUTTONS
   ============================================ */
.neo-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-strong), var(--accent));
    color: #111827;
    padding: 10px 14px;
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.neo-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.25);
    filter: saturate(1.08);
}

.neo-button:active {
    transform: translateY(0);
}

.neo-button.secondary {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

.neo-button.secondary:hover {
    background: rgba(148, 163, 184, 0.25);
}

.neo-button.danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.5);
}

.neo-button.danger:hover {
    background: rgba(239, 68, 68, 0.3);
}

.neo-button.sm {
    padding: 6px 10px;
    font-size: 11px;
}

/* Button Loading State */
.neo-button.loading {
    color: transparent;
    pointer-events: none;
}

.neo-button.loading::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    top: 50%;
    left: 50%;
    margin-left: -8px;
    margin-top: -8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: currentColor;
    border-radius: 50%;
    animation: neo-spin 0.6s linear infinite;
}

/* ============================================
   📝 FORMS
   ============================================ */
.neo-form {
    display: grid;
    gap: 16px;
}

.neo-form-section {
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 14px;
    background: rgba(15, 23, 42, 0.55);
}

.neo-form-title {
    font-weight: 700;
    margin-bottom: 10px;
}

.neo-form-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.neo-form-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.neo-label {
    font-size: 12px;
    color: var(--muted);
}

/* Required Field Indicator */
.neo-label.required::after {
    content: ' *';
    color: var(--danger);
    font-weight: 700;
}

.neo-help {
    font-size: 11px;
    color: var(--muted);
}

.neo-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: flex-end;
}

.neo-inline {
    display: flex;
    gap: 8px;
    align-items: center;
    flex-wrap: wrap;
}

/* ============================================
   📥 INPUTS
   ============================================ */
.neo-input,
.neo-select,
.neo-textarea {
    background: rgba(15, 23, 42, 0.75);
    border: 1px solid rgba(148, 163, 184, 0.25);
    color: var(--text);
    padding: 10px 12px;
    border-radius: 10px;
    min-width: 160px;
    font-size: 13px;
    font-family: var(--font-body);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast);
}

.neo-textarea {
    min-height: 100px;
    resize: vertical;
}

.neo-select-sm {
    padding: 8px 10px;
    min-width: 140px;
    font-size: 12px;
}

.neo-input:focus,
.neo-select:focus,
.neo-textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(234, 179, 8, 0.2);
}

.neo-input[readonly],
.neo-select[readonly],
.neo-input:disabled,
.neo-select:disabled,
.neo-input.neo-input-locked,
.neo-select.neo-input-locked {
    opacity: 0.75;
    cursor: not-allowed;
    background: var(--input-readonly-bg);
    pointer-events: none;
}

/* Locked field indicator */
.neo-input-locked-wrapper {
    position: relative;
}

.neo-input-locked-wrapper::after {
    content: '\f023'; /* Font Awesome lock icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    font-size: 11px;
    pointer-events: none;
}

/* Lock icon tooltip */
.neo-input-locked-wrapper[title]::before {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--card);
    color: var(--text);
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
    z-index: 10;
}

.neo-input-locked-wrapper:hover::before {
    opacity: 1;
}

/* Input States */
.neo-input.success,
.neo-select.success {
    border-color: var(--success);
}

.neo-input.success:focus,
.neo-select.success:focus {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.2);
}

.neo-input.error,
.neo-select.error {
    border-color: var(--danger);
}

.neo-input.error:focus,
.neo-select.error:focus {
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

/* Field Messages */
.neo-field-error {
    font-size: 11px;
    color: #fecaca;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.neo-field-error::before {
    content: '⚠';
}

.neo-field-success {
    font-size: 11px;
    color: #86efac;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.neo-field-success::before {
    content: '✓';
}

/* Input with Icon */
.neo-input-group {
    position: relative;
}

.neo-input-icon {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.neo-input-group .neo-input {
    padding-right: 36px;
}

/* ============================================
   🔖 BADGES
   ============================================ */
.neo-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 700;
    background: rgba(148, 163, 184, 0.15);
    color: var(--text);
}

.neo-badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: #86efac;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.neo-badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: #fecaca;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.neo-badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: #fcd34d;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.neo-badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.neo-badge-neutral {
    background: rgba(148, 163, 184, 0.15);
    color: var(--text);
    border: 1px solid rgba(148, 163, 184, 0.3);
}

/* ============================================
   💊 PILLS & TABS
   ============================================ */
.neo-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--accent-alpha);
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.neo-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.neo-tab {
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text);
    padding: 8px 12px;
    border-radius: 10px;
    cursor: pointer;
    font-size: 13px;
    transition: all var(--transition-fast);
}

.neo-tab:hover {
    background: rgba(148, 163, 184, 0.2);
}

.neo-tab.active {
    background: var(--accent-alpha);
    border-color: rgba(234, 179, 8, 0.5);
    color: var(--accent);
    font-weight: 700;
}

/* ============================================
   🚨 ALERTS
   ============================================ */
.neo-alert {
    border: 1px solid rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.08);
    color: #fecaca;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 14px;
}

.neo-alert-success {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.08);
    color: #86efac;
}

.neo-alert-warning {
    border-color: rgba(245, 158, 11, 0.4);
    background: rgba(245, 158, 11, 0.08);
    color: #fcd34d;
}

.neo-alert-info {
    border-color: rgba(59, 130, 246, 0.4);
    background: rgba(59, 130, 246, 0.08);
    color: #93c5fd;
}

/* ============================================
   📊 TABLE
   ============================================ */
.neo-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.neo-table th,
.neo-table td {
    border-bottom: 1px solid rgba(148, 163, 184, 0.15);
    padding: 8px 6px;
    text-align: right;
}

.neo-table th {
    color: var(--muted);
    font-weight: 600;
}

.neo-table tbody tr:hover {
    background: rgba(148, 163, 184, 0.06);
}

.neo-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.35);
}

.neo-table-actions {
    display: flex;
    gap: 6px;
    align-items: center;
}

.neo-table-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    background: rgba(148, 163, 184, 0.1);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text);
    transition: all var(--transition-fast);
    cursor: pointer;
}

.neo-table-action:hover {
    background: var(--accent-alpha);
    border-color: var(--accent);
    color: var(--accent);
}

.neo-table-action.danger:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: var(--danger);
    color: var(--danger);
}

/* ============================================
   📑 PAGINATION
   ============================================ */
.neo-pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-top: 18px;
}

.neo-page-btn {
    background: rgba(30, 41, 59, 0.8);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text);
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    font-size: 12px;
    transition: all var(--transition-fast);
}

.neo-page-btn:hover {
    background: rgba(30, 41, 59, 1);
    border-color: var(--accent);
}

.neo-page-btn.active {
    background: #2563eb;
    border-color: #1d4ed8;
}

.neo-page-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================
   🔐 AUTH PAGES
   ============================================ */
.neo-auth {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
}

.neo-auth-card {
    width: 100%;
    max-width: 420px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.15);
    border-radius: 18px;
    padding: 28px;
    text-align: center;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.4);
    transition: all var(--transition-slow);
}

.neo-auth-logo {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin: 0 auto 16px;
    overflow: hidden;
}

.neo-auth-logo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.neo-auth-logo-text {
    width: 80px;
    height: 80px;
    border-radius: 16px;
    margin: 0 auto 16px;
    background: var(--accent-alpha);
    color: var(--accent);
    display: grid;
    place-items: center;
    font-family: var(--font-display);
    font-size: 32px;
    font-weight: 700;
}

.neo-auth-title {
    margin: 0;
    font-family: var(--font-display);
    font-size: 22px;
}

.neo-auth-subtitle {
    margin: 8px 0 20px;
    font-size: 13px;
}

.neo-auth-form {
    display: grid;
    gap: 12px;
    text-align: right;
    margin-bottom: 16px;
}

.neo-auth-status {
    min-height: 18px;
    font-size: 12px;
    color: var(--muted);
}

.neo-auth-error {
    color: #fecaca;
}

.neo-auth-success {
    color: #86efac;
}

.neo-auth-back {
    width: 100%;
    justify-content: center;
}

/* ============================================
   📅 JALALI DATEPICKER
   ============================================ */
.neo-jdp {
    position: absolute;
    z-index: 9999;
    width: 260px;
    padding: 10px;
    border-radius: 14px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.2);
    box-shadow: 0 12px 30px rgba(2, 6, 23, 0.45);
    direction: rtl;
    font-size: 13px;
    transition: background var(--transition-slow);
}

.neo-jdp-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    gap: 6px;
}

.neo-jdp-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
}

.neo-jdp-nav {
    background: rgba(148, 163, 184, 0.15);
    border: 1px solid rgba(148, 163, 184, 0.2);
    color: var(--text);
    width: 28px;
    height: 28px;
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.neo-jdp-nav:hover {
    background: var(--accent-alpha);
    border-color: var(--accent);
    color: var(--accent);
}

.neo-jdp-week,
.neo-jdp-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
    text-align: center;
}

.neo-jdp-weekday {
    color: var(--muted);
    font-size: 11px;
    padding: 4px 0;
}

.neo-jdp-day {
    background: rgba(148, 163, 184, 0.08);
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text);
    padding: 6px 0;
    cursor: pointer;
    font-family: var(--font-body);
    transition: all var(--transition-fast);
}

.neo-jdp-day:hover {
    border-color: var(--accent);
    background: var(--accent-alpha);
}

.neo-jdp-day.today {
    border-color: var(--accent);
    color: var(--accent);
}

.neo-jdp-day.selected {
    background: var(--accent);
    color: #111827;
    font-weight: 700;
}

.neo-jdp-empty {
    height: 30px;
}

.neo-jdp-footer {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(148, 163, 184, 0.15);
}

.neo-jdp-today {
    width: 100%;
    background: var(--accent-alpha);
    border: 1px solid rgba(234, 179, 8, 0.3);
    color: var(--accent);
    padding: 6px;
    border-radius: 8px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.neo-jdp-today:hover {
    background: var(--accent);
    color: #111827;
}

/* ============================================
   ⏳ LOADING SPINNER
   ============================================ */
.neo-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 40px 20px;
}

.neo-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(148, 163, 184, 0.2);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: neo-spin 0.8s linear infinite;
}

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

.neo-loading-text {
    color: var(--muted);
    font-size: 13px;
}

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

/* ============================================
   📭 EMPTY STATE
   ============================================ */
.neo-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 60px 20px;
    text-align: center;
}

.neo-empty-icon {
    font-size: 48px;
    opacity: 0.3;
}

.neo-empty-title {
    font-size: 18px;
    font-weight: 700;
    font-family: var(--font-display);
}

.neo-empty-text {
    color: var(--muted);
    font-size: 13px;
    max-width: 400px;
}

/* ============================================
   🍞 TOAST NOTIFICATIONS
   ============================================ */
.neo-toast {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 12px;
    padding: 14px 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    opacity: 0;
    transition: all var(--transition-slow);
    min-width: 280px;
    max-width: 400px;
    text-align: center;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
}

.neo-toast-show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.neo-toast-success {
    border-right: 4px solid #22c55e;
    color: #86efac;
}

.neo-toast-error {
    border-right: 4px solid #ef4444;
    color: #fecaca;
}

.neo-toast-warning {
    border-right: 4px solid #f59e0b;
    color: #fcd34d;
}

.neo-toast-info {
    border-right: 4px solid #3b82f6;
    color: #93c5fd;
}

/* Light mode toast */
[data-theme="light"] .neo-toast {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .neo-toast-success { color: #16a34a; }
[data-theme="light"] .neo-toast-error { color: #dc2626; }
[data-theme="light"] .neo-toast-warning { color: #d97706; }
[data-theme="light"] .neo-toast-info { color: #2563eb; }

/* ============================================
   🎛️ FILTER BAR
   ============================================ */
.neo-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

/* Active Filters */
.neo-active-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding: 12px;
    background: var(--accent-alpha);
    border: 1px solid rgba(234, 179, 8, 0.2);
    border-radius: 10px;
    margin-bottom: 16px;
}

.neo-active-filters-title {
    font-size: 12px;
    font-weight: 600;
    color: var(--accent);
}

.neo-active-filters-list {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    flex: 1;
}

.neo-filter-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    background: rgba(15, 23, 42, 0.7);
    border: 1px solid rgba(148, 163, 184, 0.3);
    border-radius: 6px;
    font-size: 11px;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.neo-filter-tag:hover {
    border-color: var(--danger);
    background: rgba(239, 68, 68, 0.1);
}

.neo-filter-tag-close {
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    color: var(--muted);
}

.neo-filter-tag:hover .neo-filter-tag-close {
    color: var(--danger);
}

/* ============================================
   📏 UTILITIES
   ============================================ */
.neo-muted { color: var(--muted); }
.neo-text-accent { color: var(--accent); }
.neo-text-danger { color: var(--danger); }
.neo-text-success { color: #86efac; }
.neo-text-warning { color: #fcd34d; }

.neo-section-title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: var(--font-display);
}

.neo-truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Focus States */
.neo-button:focus-visible,
.neo-input:focus-visible,
.neo-select:focus-visible,
.neo-nav-item:focus-visible,
a:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}

/* ============================================
   📱 RESPONSIVE
   ============================================ */
@media (max-width: 1024px) {
    .neo-sidebar {
        width: 220px;
    }
    .neo-grid.cols-4 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 768px) {
    .neo-app {
        flex-direction: column;
    }
    .neo-sidebar {
        width: 100%;
        border-left: none;
        border-bottom: 1px solid var(--border);
    }
    .neo-sidebar nav {
        display: flex;
        flex-wrap: wrap;
        gap: 4px;
        padding: 10px;
    }
    .neo-nav-item {
        padding: 8px 10px;
        font-size: 12px;
    }
    /* Mobile-first form controls */
    .neo-input,
    .neo-select,
    .neo-textarea,
    .neo-select-sm {
        min-width: 0;
        width: 100%;
    }
    /* Force single-column grids on mobile */
    .neo-card-grid,
    .neo-form-grid {
        grid-template-columns: 1fr;
    }
    /* Make tables scroll horizontally instead of breaking layout */
    .neo-table {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }
    /* Stack action buttons safely on small screens */
    .neo-form-actions {
        justify-content: stretch;
    }
    .neo-form-actions .neo-button {
        width: 100%;
    }
    .neo-grid.cols-2,
    .neo-grid.cols-3,
    .neo-grid.cols-4 {
        grid-template-columns: 1fr;
    }
    .neo-toast {
        min-width: auto;
        width: calc(100% - 32px);
        max-width: none;
        margin: 0 16px;
        left: 0;
        transform: translateY(-100px);
    }
    .neo-toast-show {
        transform: translateY(0);
    }
}

/* Skeleton Loading */
.neo-skeleton {
    background: linear-gradient(
        90deg,
        rgba(148, 163, 184, 0.1) 25%,
        rgba(148, 163, 184, 0.15) 50%,
        rgba(148, 163, 184, 0.1) 75%
    );
    background-size: 200% 100%;
    animation: neo-skeleton 1.5s ease-in-out infinite;
    border-radius: 8px;
}

.neo-skeleton-text {
    height: 14px;
    margin-bottom: 8px;
}

.neo-skeleton-title {
    height: 20px;
    width: 60%;
    margin-bottom: 12px;
}

.neo-skeleton-card {
    height: 120px;
}

@keyframes neo-skeleton {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   📋 ACTIVITY CARDS
   ============================================ */
.neo-activities-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.neo-activity-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px;
}

.neo-activity-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.neo-activity-body {
    padding: 4px 0;
}

.neo-activity-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding-top: 8px;
    border-top: 1px solid var(--border);
}

/* ============================================
   ❌ CLOSE BUTTON
   ============================================ */
.neo-close-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    z-index: 100;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--card);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.neo-close-btn:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
    transform: scale(1.05);
}

/* Header with close button */
.neo-header-with-close {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.neo-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.neo-back-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}
