/* ============================================================
   STARTUP DOCUMENTS CLEARING — Premium UI Redesign v4.0
   Redesign: Professional SaaS, Bento Grid, Glassmorphism
   ============================================================ */

/* ─── Design Tokens ──────────────────────────────────────── */
:root {
    /* Brand - Modern Vibrant Blue */
    --brand-primary:    #4f46e5; /* Indigo-600 */
    --brand-hover:      #4338ca;
    --brand-dark:       #3730a3;
    --brand-light:      #eef2ff;
    --brand-glow:       rgba(79, 70, 229, 0.25);
    
    /* Accent Colors */
    --accent-purple:    #8b5cf6;
    --accent-cyan:      #06b6d4;
    --accent-pink:      #ec4899;
    --accent-amber:     #f59e0b;

    /* Sidebar - Sleek Dark */
    --sidebar-bg:       #0f172a;
    --sidebar-bg2:      #1e293b;
    --sidebar-border:   rgba(255,255,255,0.06);
    --sidebar-text:     #cbd5e1;
    --sidebar-text-act: #ffffff;
    --sidebar-active-bg: rgba(79, 70, 229, 0.15);

    /* Surface & Backgrounds */
    --bg-page:          #f8fafc;
    --bg-card:          #ffffff;
    --bg-glass:         rgba(255, 255, 255, 0.7);
    --border-light:     #e2e8f0;
    --border-glass:     rgba(255, 255, 255, 0.3);

    /* Text */
    --text-primary:     #0f172a;
    --text-dark:        #1e293b;
    --text-secondary:   #475569;
    --text-muted:       #94a3b8;
    --text-light:       #f8fafc;

    /* Status Colors */
    --success:          #10b981;
    --success-bg:       #ecfdf5;
    --success-text:     #065f46;
    --warning:          #f59e0b;
    --warning-bg:       #fffbeb;
    --warning-text:     #92400e;
    --danger:           #ef4444;
    --danger-bg:        #fef2f2;
    --danger-text:      #991b1b;
    --info:             #3b82f6;
    --info-bg:          #eff6ff;
    --info-text:        #1d4ed8;

    /* Shape */
    --radius-sm:    10px;
    --radius-md:    14px;
    --radius-lg:    18px;
    --radius-xl:    24px;
    --radius-2xl:   32px;
    --card-radius:  24px;

    /* Shadows - Layered Soft Shadows */
    --shadow-xs:    0 1px 2px rgba(0,0,0,0.05);
    --shadow-sm:    0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-md:    0 10px 15px -3px rgba(0,0,0,0.08), 0 4px 6px -2px rgba(0,0,0,0.04);
    --shadow-lg:    0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl:    0 25px 50px -12px rgba(0,0,0,0.15);
    
    /* Animation */
    --transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Base ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body, .main, .content {
    background-color: var(--bg-page) !important;
    font-family: 'Outfit', 'Inter', system-ui, -apple-system, sans-serif !important;
    color: var(--text-primary) !important;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Outfit', sans-serif !important;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    letter-spacing: -0.03em;
}

a { transition: var(--transition-fast); text-decoration: none !important; color: var(--brand-primary); }
a:hover { color: var(--brand-hover); }

/* ─── Layout Wrapper ─────────────────────────────────────── */
.wrapper {
    display: flex;
    min-height: 100vh;
}

.main {
    min-width: 0;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.content {
    flex: 1 1 auto;
}

/* ─── SIDEBAR ────────────────────────────────────────────── */
.sidebar {
    background: var(--sidebar-bg) !important;
    border-right: 1px solid var(--sidebar-border) !important;
    transition: var(--transition-smooth) !important;
    box-shadow: 10px 0 30px rgba(0,0,0,0.1) !important;
}

.sidebar-content { 
    background: transparent !important; 
    display: flex;
    flex-direction: column;
}

.sidebar-brand-container {
    padding: 30px 24px !important;
}

.sidebar-brand-text {
    font-size: 1.1rem !important;
    font-weight: 800 !important;
    color: #ffffff !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase;
}

.sidebar-user-profile {
    background: rgba(255, 255, 255, 0.05) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    margin: 0 16px 24px !important;
    transition: var(--transition-fast);
}

.sidebar-user-profile h6 {
    color: #ffffff !important;
    font-size: 0.95rem !important;
    letter-spacing: 0.01em;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.sidebar-user-profile p {
    color: #cbd5e1 !important;
    opacity: 1 !important;
    font-weight: 500;
}

.sidebar-link {
    padding: 12px 20px !important;
    border-radius: 12px !important;
    color: var(--sidebar-text) !important;
    font-weight: 500 !important;
    margin: 4px 16px !important;
    display: flex !important;
    align-items: center !important;
    transition: var(--transition-fast) !important;
}

.sidebar-link i {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    transition: var(--transition-fast);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #fff !important;
    transform: translateX(5px);
}

.sidebar-link:hover i {
    opacity: 1;
    color: var(--brand-primary);
}

.sidebar-item.active > .sidebar-link {
    background: linear-gradient(90deg, var(--brand-primary) 0%, #6366f1 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 20px rgba(79, 70, 229, 0.4) !important;
}

.sidebar-item.active > .sidebar-link i {
    opacity: 1;
}

.sidebar-header {
    margin-top: 24px;
    margin-bottom: 8px;
    color: rgba(255,255,255,0.3) !important;
}

/* ─── BUTTON ENHANCEMENTS ───────────────────────────────── */
.btn-white {
    background: #ffffff !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-light) !important;
}

.btn-white:hover {
    background: var(--bg-page) !important;
    border-color: var(--text-muted) !important;
    transform: translateY(-1px);
}

.btn-primary {
    color: #ffffff !important; /* Ensure white text on primary */
}


/* ─── TOP NAVBAR ─────────────────────────────────────────── */
.navbar {
    background: rgba(255, 255, 255, 0.8) !important;
    backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid var(--border-light) !important;
    padding: 1rem 2rem !important;
    position: sticky;
    top: 0;
    z-index: 999;
}

/* ─── CARDS & GLASSMORPHISM ─────────────────────────────── */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-light) !important;
    border-radius: var(--card-radius) !important;
    box-shadow: var(--shadow-sm) !important;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--shadow-lg) !important;
    transform: translateY(-5px);
    border-color: var(--brand-primary) !important;
}

.stat-value {
    font-size: 2.2rem !important;
    font-weight: 800 !important;
    letter-spacing: -0.04em;
    color: var(--text-primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.75rem !important;
    font-weight: 700 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-muted);
}


.glass-card {
    background: var(--bg-glass) !important;
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-glass) !important;
    box-shadow: var(--shadow-lg) !important;
}

.card-header {
    background: transparent !important;
    border-bottom: 1px solid var(--border-light) !important;
    padding: 20px 24px !important;
}

.card-title {
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    letter-spacing: -0.02em;
}

/* ─── BENTO GRID UTILITIES ──────────────────────────────── */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

/* ─── BUTTONS ────────────────────────────────────────────── */
.btn {
    border-radius: var(--radius-md) !important;
    font-weight: 600 !important;
    padding: 10px 20px !important;
    transition: var(--transition-smooth) !important;
}

.btn-primary {
    background: var(--brand-primary) !important;
    border: none !important;
    box-shadow: 0 4px 14px var(--brand-glow) !important;
}

.btn-primary:hover {
    background: var(--brand-hover) !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px var(--brand-glow) !important;
}

/* ─── TABLES ─────────────────────────────────────────────── */
.table-container {
    background: #fff;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.table {
    margin-bottom: 0 !important;
}

.table thead th {
    background: var(--bg-page) !important;
    padding: 16px 24px !important;
    font-size: 0.75rem !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary) !important;
    border-bottom: 1px solid var(--border-light) !important;
}

.table tbody td {
    padding: 16px 24px !important;
    border-bottom: 1px solid var(--bg-page) !important;
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: var(--brand-light) !important;
}

/* ─── FORMS ──────────────────────────────────────────────── */
.form-control {
    border-radius: var(--radius-md) !important;
    padding: 12px 16px !important;
    border: 1px solid var(--border-light) !important;
    background: var(--bg-page) !important;
    transition: var(--transition-fast) !important;
}

.form-control:focus {
    background: #fff !important;
    border-color: var(--brand-primary) !important;
    box-shadow: 0 0 0 4px var(--brand-glow) !important;
}

/* ─── AUTH PAGES ─────────────────────────────────────────── */
.auth-bg {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    width: 100%;
    max-width: 450px;
}

/* ─── BADGES ─────────────────────────────────────────────── */
.badge {
    padding: 6px 12px !important;
    border-radius: 30px !important;
    font-weight: 600 !important;
}

/* ─── SCROLLBAR ──────────────────────────────────────────── */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 10px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ─── DASHBOARD COMPACT TUNING ─────────────────────────── */
/* Reduce bulkiness introduced by global premium paddings */
.content {
    padding: 1rem 1.25rem 0.75rem !important;
}

@media (min-width: 992px) {
    .content {
        padding: 1.25rem 1.5rem 1rem !important;
    }
}

.card-header {
    padding: 14px 18px !important;
}

.card-body {
    padding: 14px 18px !important;
}

.sidebar-brand-container {
    padding: 18px 16px !important;
}

.sidebar-link {
    padding: 9px 12px !important;
    margin: 3px 10px !important;
}

.sidebar-header {
    margin-top: 14px;
    margin-bottom: 6px;
}

/* Restore icon button sizing (was overridden by global .btn padding) */
.btn.btn-icon {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 8px !important;
    line-height: 1 !important;
}

.btn.btn-icon svg,
.btn.btn-icon i {
    width: 15px !important;
    height: 15px !important;
}
