/* Freelance CRM - Modern UI - Light & Dark Themes - Font Awesome Only */

:root {
    /* Dark - Modern, soft, not pure black */
    --ink: #0E0F12;
    --ink-soft: #15171C;
    --surface: #181B22;
    --surface-raised: #1F232E;
    --surface-hover: #262B38;
    --surface-active: #2D3343;
    --hairline: #242836;
    --hairline-strong: #2E3446;
    --text: #E8EAF0;
    --text-soft: #C2C6D1;
    --muted: #8B90A0;
    --muted-2: #6B7080;
    
    /* Brand - Vibrant */
    --signal: #FF5A1F;
    --signal-hover: #FF7440;
    --signal-soft: rgba(255,90,31,0.12);
    --wave: #2DD4BF;
    --wave-soft: rgba(45,212,191,0.12);
    --info: #60A5FA;
    --info-soft: rgba(96,165,250,0.12);
    --warning: #FBBF24;
    --warning-soft: rgba(251,191,36,0.12);
    --danger: #F87171;
    --danger-soft: rgba(248,113,113,0.12);
    --success: #34D399;
    --purple: #A78BFA;
    --purple-soft: rgba(167,139,250,0.12);

    /* Layout */
    --font-display: 'Vazirmatn', -apple-system, sans-serif;
    --font-body: 'Vazirmatn', -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, monospace;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --sidebar-width: 300px;
    --sidebar-collapsed-width: 80px;
    --topbar-height: 68px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.2), 0 1px 2px rgba(0,0,0,0.15);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.25), 0 2px 6px rgba(0,0,0,0.15);
    --shadow-lg: 0 16px 32px rgba(0,0,0,0.35), 0 8px 16px rgba(0,0,0,0.2);
}

/* Light - Modern, colorful, soft - NOT just inverted */
[data-theme="light"] {
    --ink: #F8FAFC;
    --ink-soft: #F1F5F9;
    --surface: #FFFFFF;
    --surface-raised: #F8FAFC;
    --surface-hover: #F1F5F9;
    --surface-active: #E2E8F0;
    --hairline: #E2E8F0;
    --hairline-strong: #CBD5E1;
    --text: #0F172A;
    --text-soft: #334155;
    --muted: #64748B;
    --muted-2: #94A3B8;
    
    /* Light theme - more colorful, vibrant */
    --signal: #6366F1;
    --signal-hover: #4F46E5;
    --signal-soft: rgba(99,102,241,0.1);
    --wave: #06B6D4;
    --wave-soft: rgba(6,182,214,0.1);
    --info: #0EA5E9;
    --info-soft: rgba(14,165,233,0.1);
    --warning: #F59E0B;
    --warning-soft: rgba(245,158,11,0.1);
    --danger: #EF4444;
    --danger-soft: rgba(239,68,68,0.1);
    --success: #10B981;
    --purple: #8B5CF6;
    --purple-soft: rgba(139,92,246,0.1);
    
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.08), 0 1px 2px rgba(15,23,42,0.06);
    --shadow-md: 0 4px 12px rgba(15,23,42,0.08), 0 2px 6px rgba(15,23,42,0.04);
    --shadow-lg: 0 16px 32px rgba(15,23,42,0.12), 0 8px 16px rgba(15,23,42,0.06);
}

/* Base */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    background: var(--ink);
    color: var(--text);
    font-family: var(--font-body);
    direction: rtl;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    transition: background .3s ease, color .3s ease;
    line-height: 1.6;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

::selection { background: var(--signal); color: #fff; }
:focus-visible { outline: 2px solid var(--signal); outline-offset: 2px; border-radius: 4px; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--hairline-strong); border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Reusable */
.badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 600;
    background: var(--surface-raised); border: 1px solid var(--hairline); color: var(--muted);
    letter-spacing: .02em;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .5; } }
.badge-new { background: var(--signal); color: #fff; font-size: 9px; padding: 3px 7px; border-radius: 99px; font-weight: 700; letter-spacing: .05em; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 18px; border-radius: var(--radius-md); border: 1px solid transparent;
    font-family: var(--font-body); font-size: 14px; font-weight: 600; cursor: pointer;
    transition: all .2s ease; white-space: nowrap; user-select: none; position: relative; overflow: hidden;
}
.btn:active { transform: scale(0.97); }
.btn-primary { background: var(--signal); color: #fff; box-shadow: 0 2px 8px var(--signal-soft); }
.btn-primary:hover { background: var(--signal-hover); transform: translateY(-1px); box-shadow: 0 4px 12px var(--signal-soft); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--hairline); }
.btn-secondary:hover { background: var(--surface-hover); border-color: var(--hairline-strong); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--muted); border-color: transparent; }
.btn-ghost:hover { background: var(--surface-raised); color: var(--text); }
.btn-danger { background: var(--danger); color: #fff; box-shadow: 0 2px 8px var(--danger-soft); }
.btn-danger:hover { filter: brightness(1.1); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: var(--radius-sm); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none !important; }

.card {
    background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg);
    padding: 22px; transition: all .3s ease; position: relative; overflow: hidden;
}
.card:hover { border-color: var(--hairline-strong); }
[data-theme="light"] .card { box-shadow: var(--shadow-sm); }
[data-theme="light"] .card:hover { box-shadow: var(--shadow-md); }

.input, select.input, textarea.input {
    width: 100%; padding: 11px 14px; border-radius: var(--radius-md);
    border: 1px solid var(--hairline); background: var(--surface); color: var(--text);
    font-family: var(--font-body); font-size: 14px; transition: all .2s ease;
}
.input:hover { border-color: var(--hairline-strong); }
.input:focus { border-color: var(--signal); outline: none; box-shadow: 0 0 0 3px var(--signal-soft); background: var(--surface); }
label.field-label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 7px; font-weight: 600; letter-spacing: .02em; }
.field { margin-bottom: 18px; }

.table { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.table th { text-align: right; color: var(--muted); font-weight: 600; font-size: 11.5px; padding: 12px 14px; border-bottom: 1px solid var(--hairline); text-transform: uppercase; letter-spacing: .05em; }
.table td { padding: 14px; border-bottom: 1px solid var(--hairline); transition: background .15s; }
.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface-raised); }
.table th:first-child, .table td:first-child { border-radius: 0; }

.status-pill { font-size: 11px; font-weight: 600; padding: 4px 10px; border-radius: 999px; display: inline-flex; align-items: center; gap: 5px; letter-spacing: .02em; }

.mono { font-family: var(--font-mono); direction: ltr; unicode-bidi: plaintext; }

/* Timeline */
.timeline-rule { position: relative; height: 34px; width: 100%; overflow: hidden; opacity: .6; }
.timeline-rule svg { width: 100%; height: 100%; display: block; }
.timeline-rule .tick { stroke: var(--hairline-strong); stroke-width: 1; }
.timeline-rule .tick.major { stroke: var(--muted); }
.timeline-rule .playhead { fill: var(--signal); }



