:root {
    --primary: #102A43;
    --primary-light: #1E4A73;
    --primary-dark: #0F172A;
    --accent: #D4A017;
    --accent-hot: #F97316;
    --success: #4CAF50;
    --danger: #F44336;
    --warning: #FFC107;
    --info: #00BCD4;
    --void: #05070d;
    --void-soft: #0b1020;
    --panel: #0f1628;
    --panel-soft: #131c31;
    --panel-border: rgba(255,255,255,0.08);
    --text-main: #edf3fb;
    --text-muted: rgba(226, 233, 245, 0.68);
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    background:
        radial-gradient(circle at top, rgba(30, 74, 115, 0.16), transparent 28%),
        linear-gradient(180deg, #05070d 0%, #0b1020 45%, #0d1326 100%);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 9999;
}

a { color: #dce7f8; }

h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: #f5f8fc;
}

.navbar, .btn, .section-label, .eyebrow, .hero-stat-label, .hero-stat-value {
    font-family: 'Space Mono', monospace;
}

.btn {
    border-radius: 8px;
    letter-spacing: 0.04em;
    font-size: 0.9rem;
}

.btn-primary {
    background-color: var(--primary);
    border-color: var(--primary);
}

.btn-primary:hover {
    background-color: var(--primary-dark);
    border-color: var(--primary-dark);
}

.btn-warning {
    background: linear-gradient(135deg, var(--accent) 0%, var(--accent-hot) 100%);
    border-color: transparent;
}

.bg-primary {
    background: rgba(8, 16, 25, 0.84) !important;
}

.navbar {
    background: rgba(8, 16, 25, 0.84) !important;
    backdrop-filter: blur(22px);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    box-shadow: 0 14px 40px rgba(0,0,0,0.18);
}

.navbar::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(212,160,23,0.65), transparent);
    opacity: 0.65;
}

.nav-link {
    text-transform: uppercase;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    color: rgba(235, 243, 251, 0.74) !important;
}

.nav-link:hover {
    color: #ffffff !important;
}

.status-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-lead { background-color: #E3F2FD; color: #1565C0; }
.status-estimatesent { background-color: #FFF3E0; color: #E65100; }
.status-approved { background-color: #E8F5E9; color: #2E7D32; }
.status-scheduled { background-color: #F3E5F5; color: #6A1B9A; }
.status-checkedin { background-color: #E0F7FA; color: #00838F; }
.status-inprogress { background-color: #FFF8E1; color: #F57F17; }
.status-qualitycheck { background-color: #FCE4EC; color: #AD1457; }
.status-completed { background-color: #E8F5E9; color: #1B5E20; }
.status-invoiced { background-color: #EDE7F6; color: #4527A0; }
.status-closed { background-color: #ECEFF1; color: #546E7A; }

.status-draft { background-color: #ECEFF1; color: #546E7A; }
.status-sent { background-color: #E3F2FD; color: #1565C0; }
.status-paid { background-color: #E8F5E9; color: #1B5E20; }
.status-partiallypaid { background-color: #FFF8E1; color: #F57F17; }
.status-overdue { background-color: #FFEBEE; color: #C62828; }
.status-void { background-color: #ECEFF1; color: #90A4AE; }

.stat-card {
    background: linear-gradient(180deg, rgba(15,22,40,0.95), rgba(20,29,49,0.95));
    border-radius: 14px;
    padding: 1.25rem;
    box-shadow: 0 10px 28px rgba(0,0,0,.18);
    border-left: 4px solid var(--accent);
    border: 1px solid var(--panel-border);
}

.stat-card .stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #fff;
}

.stat-card .stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.clickable-row { cursor: pointer; }
.clickable-row:hover { background-color: rgba(255,255,255,0.04); }

.loading-spinner {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 2rem;
}

.navbar-logo { height: 40px; width: auto; }
.sidebar-logo { height: 32px; width: auto; }
.hero-logo { height: 156px; width: auto; filter: drop-shadow(0 18px 32px rgba(0,0,0,.18)); }
.login-logo { height: 80px; width: auto; }
.footer-logo { height: 36px; width: auto; }

.page-shell {
    padding: 0 0 5rem;
    position: relative;
}

.page-hero {
    background:
        radial-gradient(circle at top right, rgba(212,160,23,0.12), transparent 22%),
        radial-gradient(circle at top, rgba(27,81,129,0.35), transparent 36%),
        linear-gradient(145deg, #05070d 0%, #0F172A 42%, #102A43 100%);
    color: white;
    padding: 7rem 0 4rem;
    position: relative;
    overflow: hidden;
}

.page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(212,160,23,0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(212,160,23,0.05) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 72% 60% at 50% 35%, black 20%, transparent 80%);
    pointer-events: none;
}

.page-hero-content {
    position: relative;
    z-index: 1;
    max-width: 860px;
}

.page-hero h1 {
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.05;
    margin-bottom: 1rem;
}

.page-hero p {
    font-size: 1.08rem;
    color: rgba(255,255,255,0.78);
    max-width: 680px;
}

.page-section {
    margin-top: -2.5rem;
    position: relative;
    z-index: 2;
}

.content-card {
    background: linear-gradient(180deg, rgba(11,16,32,0.92) 0%, rgba(13,19,38,0.95) 100%);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 22px;
    box-shadow: 0 18px 44px rgba(0,0,0,0.28), inset 0 1px 0 rgba(255,255,255,0.03);
    padding: 2rem;
}

.page-shell .text-muted,
.content-card .text-muted,
.content-card p {
    color: var(--text-muted) !important;
}
