/* ═══════════════════════════════════════════════════════════
   HR Executives — Design System
   Quiet Authority: premium, confident, elegant
   ═══════════════════════════════════════════════════════════ */

:root {
    --navy: #2d3655;
    --navy-light: #3d4a6e;
    --navy-dark: #1e2640;
    --purple: #a06aba;
    --purple-light: #b985d0;
    --purple-soft: rgba(160, 106, 186, 0.1);
    --purple-glow: rgba(160, 106, 186, 0.15);
    --blue: #5169d8;
    --blue-light: #6b80e5;
    --blue-soft: rgba(81, 105, 216, 0.08);
    --mint: #2d8a7e;
    --mint-light: #3aa898;
    --white: #ffffff;
    --bg: #f6f7fb;
    --bg-warm: #faf9fc;
    --border: #e8eaef;
    --border-light: #f0f1f5;
    --text: #2d3655;
    --text-secondary: #6b7294;
    --text-muted: #9da2b9;
    --shadow-sm: 0 1px 2px rgba(45, 54, 85, 0.04), 0 1px 4px rgba(45, 54, 85, 0.06);
    --shadow-md: 0 2px 8px rgba(45, 54, 85, 0.06), 0 4px 16px rgba(45, 54, 85, 0.04);
    --shadow-lg: 0 8px 32px rgba(45, 54, 85, 0.08), 0 16px 48px rgba(45, 54, 85, 0.04);
    --shadow-purple: 0 4px 16px rgba(160, 106, 186, 0.2);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --transition: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --sidebar-width: 260px;
    --topbar-height: 64px;
}

/* ── Reset & Base ──────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { font-size: 15px; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; }
body { font-family: 'Plus Jakarta Sans', -apple-system, sans-serif; color: var(--text); background: var(--white); line-height: 1.6; }
h1, h2, h3, h4, h5 { font-family: 'Sora', sans-serif; font-weight: 600; line-height: 1.3; }
a { color: var(--blue); text-decoration: none; }
input, select, textarea, button { font-family: inherit; font-size: inherit; }

/* ── Material Icons Config ─────────────────────────────── */
.material-symbols-rounded { font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24; vertical-align: middle; }

/* ═══════════════════════════════════════════════════════════
   LOGIN PAGE
   ═══════════════════════════════════════════════════════════ */
.login-body { background: var(--bg); }
.login-wrapper { display: flex; min-height: 100vh; }

.login-left {
    flex: 0 0 45%;
    background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy) 40%, #3b4878 100%);
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    position: relative; overflow: hidden;
    padding: 3rem;
}

.login-brand { text-align: center; z-index: 2; position: relative; }
.login-logo-icon {
    width: 72px; height: 72px;
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 20px;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
    animation: float 6s ease-in-out infinite;
}
.login-logo-icon .material-symbols-rounded { font-size: 36px; color: var(--purple-light); }
.login-brand h1 { font-size: 2rem; color: var(--white); letter-spacing: -0.5px; margin-bottom: 0.5rem; }
.login-tagline { color: rgba(255,255,255,0.6); font-size: 0.95rem; font-style: italic; letter-spacing: 0.5px; }

.login-decoration { position: absolute; inset: 0; overflow: hidden; }
.deco-circle { position: absolute; border-radius: 50%; border: 1px solid rgba(160, 106, 186, 0.15); }
.deco-1 { width: 400px; height: 400px; top: -100px; left: -100px; animation: spin 40s linear infinite; }
.deco-2 { width: 300px; height: 300px; bottom: -80px; right: -80px; border-color: rgba(81, 105, 216, 0.12); animation: spin 30s linear infinite reverse; }
.deco-3 { width: 200px; height: 200px; top: 40%; left: 60%; border-color: rgba(255,255,255,0.06); animation: spin 20s linear infinite; }

.login-right { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 3rem; }
.login-form-container { width: 100%; max-width: 380px; animation: fadeUp 0.6s ease-out; }
.login-form-container h2 { font-size: 1.6rem; margin-bottom: 0.35rem; }
.login-subtitle { color: var(--text-secondary); margin-bottom: 2rem; }
.login-footer { margin-top: auto; padding-top: 2rem; color: var(--text-muted); font-size: 0.8rem; }

.login-error {
    background: #fef2f2; border: 1px solid #fca5a5; color: #dc2626;
    padding: 0.75rem 1rem; border-radius: var(--radius-sm); margin-bottom: 1.25rem;
    font-size: 0.9rem; animation: shake 0.4s ease;
}

/* ── Form Elements ─────────────────────────────────────── */
.form-group { margin-bottom: 1.25rem; }
.form-group label { display: block; font-weight: 500; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--text); }
.form-group input, .form-group select, .form-group textarea {
    width: 100%; padding: 0.7rem 0.9rem;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--white);
    color: var(--text);
    transition: var(--transition);
    outline: none;
}
.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--purple);
    box-shadow: 0 0 0 3px var(--purple-soft);
}
.form-group input::placeholder { color: var(--text-muted); }
.form-group textarea { resize: vertical; min-height: 80px; }
.form-group select { cursor: pointer; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }

.password-wrapper { position: relative; }
.password-wrapper input { padding-right: 3rem; }
.password-toggle {
    position: absolute; right: 0.5rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 0.3rem;
    border-radius: 6px; transition: var(--transition);
}
.password-toggle:hover { color: var(--text-secondary); background: var(--bg); }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.65rem 1.25rem; border: none; border-radius: var(--radius-sm);
    font-weight: 600; font-size: 0.9rem; cursor: pointer;
    transition: var(--transition); text-decoration: none;
}
.btn-primary { background: var(--purple); color: white; }
.btn-primary:hover { background: var(--purple-light); box-shadow: var(--shadow-purple); transform: translateY(-1px); }
.btn-secondary { background: var(--blue-soft); color: var(--blue); }
.btn-secondary:hover { background: rgba(81, 105, 216, 0.15); }
.btn-outline { background: transparent; border: 1.5px solid var(--border); color: var(--text); }
.btn-outline:hover { border-color: var(--purple); color: var(--purple); }
.btn-ghost { background: transparent; color: var(--text-secondary); padding: 0.4rem 0.75rem; }
.btn-ghost:hover { background: var(--bg); color: var(--text); }
.btn-danger { background: #fef2f2; color: #dc2626; }
.btn-danger:hover { background: #fee2e2; }
.btn-success { background: rgba(45, 138, 126, 0.08); color: var(--mint); }
.btn-success:hover { background: rgba(45, 138, 126, 0.15); }
.btn-full { width: 100%; justify-content: center; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.85rem; }
.btn-xs { padding: 0.3rem 0.6rem; font-size: 0.8rem; }
.btn .material-symbols-rounded { font-size: 18px; }
.btn-loader { width: 18px; height: 18px; border: 2px solid rgba(255,255,255,0.3); border-top-color: white; border-radius: 50%; animation: spin 0.6s linear infinite; }

/* ═══════════════════════════════════════════════════════════
   APP LAYOUT
   ═══════════════════════════════════════════════════════════ */
.app-body { background: var(--bg); display: flex; min-height: 100vh; }

/* ── Sidebar ───────────────────────────────────────────── */
.sidebar {
    width: var(--sidebar-width); height: 100vh;
    background: var(--navy); color: rgba(255,255,255,0.8);
    display: flex; flex-direction: column;
    position: fixed; left: 0; top: 0; z-index: 100;
    transition: var(--transition);
}

.sidebar-header { padding: 1.25rem 1.25rem 0.75rem; }
.sidebar-logo { display: flex; align-items: center; gap: 0.75rem; }
.sidebar-logo-icon {
    width: 38px; height: 38px;
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.sidebar-logo-icon .material-symbols-rounded { font-size: 22px; color: var(--purple-light); }
.sidebar-brand-name { display: block; font-family: 'Sora', sans-serif; font-weight: 600; font-size: 0.95rem; color: white; }
.sidebar-brand-sub { display: block; font-size: 0.7rem; color: rgba(255,255,255,0.4); text-transform: uppercase; letter-spacing: 1px; }

.sidebar-nav { flex: 1; padding: 0.75rem 0; overflow-y: auto; }
.nav-section { padding: 0.5rem 1.25rem; }
.nav-section-label { display: block; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.3); margin-bottom: 0.5rem; font-weight: 600; }

.nav-item {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.6rem 0.85rem; margin-bottom: 2px;
    border-radius: var(--radius-sm); color: rgba(255,255,255,0.6);
    font-size: 0.9rem; font-weight: 500;
    transition: var(--transition); text-decoration: none;
}
.nav-item .material-symbols-rounded { font-size: 20px; opacity: 0.7; transition: var(--transition); }
.nav-item:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
.nav-item:hover .material-symbols-rounded { opacity: 1; }
.nav-item.active {
    background: rgba(160, 106, 186, 0.18);
    color: white;
}
.nav-item.active .material-symbols-rounded { opacity: 1; color: var(--purple-light); }

.sidebar-footer { padding: 1rem 1.25rem; border-top: 1px solid rgba(255,255,255,0.08); }
.sidebar-user { display: flex; align-items: center; gap: 0.65rem; }
.avatar {
    width: 36px; height: 36px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700; color: white;
    flex-shrink: 0; text-transform: uppercase;
}
.sidebar-user-info { flex: 1; min-width: 0; }
.sidebar-user-name { display: block; font-size: 0.85rem; font-weight: 600; color: white; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user-caps { display: block; font-size: 0.65rem; color: rgba(255,255,255,0.4); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar-logout { color: rgba(255,255,255,0.3); padding: 0.3rem; border-radius: 6px; transition: var(--transition); }
.sidebar-logout:hover { color: white; background: rgba(255,255,255,0.08); }

/* ── Main Content ──────────────────────────────────────── */
.main-content {
    flex: 1; margin-left: var(--sidebar-width);
    min-height: 100vh; display: flex; flex-direction: column;
    transition: var(--transition);
}

.topbar {
    height: var(--topbar-height);
    background: var(--white);
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center;
    padding: 0 1.5rem; gap: 1rem;
    position: sticky; top: 0; z-index: 50;
}
.sidebar-toggle { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 0.4rem; border-radius: 8px; display: block; }
.sidebar-toggle:hover { background: var(--bg); }

/* ── Collapsed Sidebar ────────────────────────────────── */
.sidebar-collapsed .sidebar { width: 68px; }
.sidebar-collapsed .sidebar .sidebar-brand,
.sidebar-collapsed .sidebar .nav-section-label,
.sidebar-collapsed .sidebar .nav-item span:not(.material-symbols-rounded),
.sidebar-collapsed .sidebar .sidebar-user-info,
.sidebar-collapsed .sidebar .sidebar-logout { display: none; }
.sidebar-collapsed .sidebar .nav-item { justify-content: center; padding: 0.7rem; }
.sidebar-collapsed .sidebar .nav-item .material-symbols-rounded { font-size: 22px; margin: 0; }
.sidebar-collapsed .sidebar .sidebar-header { padding: 1.25rem 0.75rem 0.75rem; }
.sidebar-collapsed .sidebar .sidebar-logo { justify-content: center; }
.sidebar-collapsed .sidebar .nav-section { padding: 0.5rem 0.65rem; }
.sidebar-collapsed .sidebar .sidebar-footer { padding: 1rem 0.65rem; }
.sidebar-collapsed .sidebar .sidebar-user { justify-content: center; }
.sidebar-collapsed .main-content { margin-left: 68px; }
.topbar-title { font-family: 'Sora', sans-serif; font-size: 1.1rem; font-weight: 600; flex: 1; }
.topbar-actions { display: flex; align-items: center; gap: 0.75rem; }

.notification-bell { position: relative; cursor: pointer; padding: 0.4rem; border-radius: 8px; color: var(--text-muted); transition: var(--transition); }
.notification-bell:hover { background: var(--bg); color: var(--text); }
.notification-badge {
    position: absolute; top: -2px; right: -2px;
    background: var(--purple); color: white;
    font-size: 0.6rem; font-weight: 700;
    width: 18px; height: 18px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
}

.page-content { flex: 1; padding: 1.5rem; }

/* ── Notification Panel ────────────────────────────────── */
.notification-panel {
    position: fixed; top: var(--topbar-height); right: 1rem;
    width: 360px; max-height: 400px; overflow-y: auto;
    background: var(--white); border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg); border: 1px solid var(--border-light);
    z-index: 200; animation: fadeDown 0.2s ease;
}
.notif-header { display: flex; justify-content: space-between; align-items: center; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-light); }
.notif-header h4 { font-size: 0.9rem; }
.notif-empty { padding: 2rem; text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* ═══════════════════════════════════════════════════════════
   CARDS & TABLES
   ═══════════════════════════════════════════════════════════ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: var(--transition);
}
.card:hover { box-shadow: var(--shadow-md); }
.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 1rem; }
.card-body { padding: 1.5rem; }
.card-body.no-pad { padding: 0; }

/* Stats Cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
    background: var(--white); border-radius: var(--radius-lg);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
    display: flex; align-items: center; gap: 1rem;
    transition: var(--transition);
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-icon {
    width: 48px; height: 48px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.stat-icon .material-symbols-rounded { font-size: 24px; }
.stat-icon.purple { background: var(--purple-soft); color: var(--purple); }
.stat-icon.blue { background: var(--blue-soft); color: var(--blue); }
.stat-icon.mint { background: rgba(45,138,126,0.08); color: var(--mint); }
.stat-icon.navy { background: rgba(45,54,85,0.08); color: var(--navy); }
.stat-value { font-family: 'Sora', sans-serif; font-size: 1.75rem; font-weight: 700; line-height: 1; }
.stat-label { font-size: 0.8rem; color: var(--text-secondary); margin-top: 0.2rem; }

/* Data Table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table thead th {
    text-align: left; padding: 0.75rem 1rem;
    font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); font-weight: 600;
    border-bottom: 1px solid var(--border-light);
    background: var(--bg-warm);
    position: sticky; top: 0;
}
.data-table tbody tr { transition: var(--transition); cursor: pointer; }
.data-table tbody tr:hover { background: var(--purple-soft); }
.data-table tbody td {
    padding: 0.85rem 1rem; border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem; vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }

/* ── Badges / Tags ─────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center;
    padding: 0.2rem 0.65rem; border-radius: 99px;
    font-size: 0.75rem; font-weight: 600;
}
.badge-purple { background: var(--purple-soft); color: var(--purple); }
.badge-blue { background: var(--blue-soft); color: var(--blue); }
.badge-mint { background: rgba(45,138,126,0.08); color: var(--mint); }
.badge-navy { background: rgba(45,54,85,0.08); color: var(--navy); }
.badge-yellow { background: #fef9e7; color: #b7791f; }
.badge-red { background: #fef2f2; color: #dc2626; }
.badge-green { background: #ecfdf5; color: #059669; }

.tag-pill {
    display: inline-flex; align-items: center;
    padding: 0.15rem 0.55rem; border-radius: 6px;
    font-size: 0.75rem; background: var(--bg);
    color: var(--text-secondary); margin: 0.15rem;
    border: 1px solid var(--border-light);
}

/* ── Progress Bar ──────────────────────────────────────── */
.progress-bar { height: 6px; background: var(--bg); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; transition: width 0.5s ease; }
.progress-20 { width: 20%; background: var(--text-muted); }
.progress-50 { width: 50%; background: var(--blue); }
.progress-80 { width: 80%; background: var(--purple); }
.progress-100 { width: 100%; background: var(--mint); }

/* ═══════════════════════════════════════════════════════════
   KANBAN BOARD
   ═══════════════════════════════════════════════════════════ */
.kanban-wrapper { overflow-x: auto; padding-bottom: 1rem; }
.kanban-board {
    display: flex; gap: 0.5rem;
    min-width: max-content; padding: 0.25rem 0;
}
.kanban-column {
    width: 200px; flex-shrink: 0;
    background: var(--bg-warm);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    display: flex; flex-direction: column;
    max-height: calc(100vh - 260px);
}
.kanban-column.terminal { background: #fafafa; border-color: #e8e8e8; }
.kanban-column.not-suitable { background: #fef2f2; border-color: #fca5a5; }
.kanban-column-header {
    padding: 0.5rem 0.75rem;
    font-size: 0.7rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.5px; color: var(--text-secondary);
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
    flex-shrink: 0;
}
.kanban-count { background: var(--border); padding: 0.1rem 0.45rem; border-radius: 99px; font-size: 0.65rem; }
.kanban-cards { flex: 1; padding: 0.35rem; overflow-y: auto; min-height: 40px; }
.kanban-card {
    background: var(--white); border-radius: 6px;
    padding: 0.5rem 0.6rem; margin-bottom: 0.35rem;
    box-shadow: var(--shadow-sm); border: 1px solid var(--border-light);
    cursor: grab; transition: var(--transition);
}
.kanban-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kanban-card.dragging { opacity: 0.5; transform: rotate(2deg); }
.kanban-card-name { font-weight: 600; font-size: 0.8rem; margin-bottom: 0.15rem; line-height: 1.3; }
.kanban-card-detail { font-size: 0.7rem; color: var(--text-secondary); line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kanban-card-meta { display: flex; justify-content: space-between; align-items: center; margin-top: 0.3rem; padding-top: 0.3rem; border-top: 1px solid var(--border-light); }

.kanban-add {
    margin: 0.35rem; padding: 0.35rem; border: 1.5px dashed var(--border);
    border-radius: 6px; text-align: center; cursor: pointer;
    color: var(--text-muted); font-size: 0.75rem; transition: var(--transition);
}
.kanban-add:hover { border-color: var(--purple); color: var(--purple); background: var(--purple-soft); }

/* ── Pipeline View Toggle ─────────────────────────────── */
.view-toggle { display: inline-flex; border: 1.5px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.view-toggle button {
    background: transparent; border: none; padding: 0.35rem 0.75rem; cursor: pointer;
    color: var(--text-muted); font-size: 0.85rem; display: flex; align-items: center; gap: 4px;
    transition: var(--transition);
}
.view-toggle button.active { background: var(--purple); color: white; }
.view-toggle button:not(.active):hover { background: var(--bg); color: var(--text); }

/* ── Pipeline List View ───────────────────────────────── */
.pipeline-list-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.pipeline-list-table thead th {
    text-align: left; padding: 0.6rem 0.75rem;
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); font-weight: 600;
    border-bottom: 1.5px solid var(--border);
    background: var(--bg-warm);
    position: sticky; top: 0;
}
.pipeline-list-table tbody tr { transition: var(--transition); cursor: pointer; }
.pipeline-list-table tbody tr:hover { background: var(--purple-soft); }
.pipeline-list-table tbody td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border-light); }

/* ── Status Report Table ──────────────────────────────── */
.status-report-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.status-report-table thead th {
    text-align: left; padding: 0.6rem 0.75rem;
    font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.5px;
    color: var(--text-muted); font-weight: 600;
    border-bottom: 2px solid var(--navy);
    background: var(--bg-warm);
}
.status-report-table tbody td { padding: 0.55rem 0.75rem; border-bottom: 1px solid var(--border-light); }
.status-report-table tbody tr:hover { background: var(--bg-warm); }

/* Editable cells */
.sr-editable { 
    cursor: pointer; border-radius: 3px; padding: 1px 4px; margin: -1px -4px;
    transition: background 0.15s; display: inline-block; min-width: 30px; min-height: 1.2em;
}
.sr-editable:hover { background: rgba(160, 106, 186, 0.08); }

/* ── Knowledge Bank ───────────────────────────────────── */
.kb-file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0.75rem; }
.kb-file-card {
    background: var(--white); border: 1px solid var(--border-light);
    border-radius: var(--radius-md); padding: 1rem;
    transition: var(--transition); cursor: pointer;
    display: flex; align-items: flex-start; gap: 0.75rem;
}
.kb-file-card:hover { box-shadow: var(--shadow-md); transform: translateY(-1px); }
.kb-file-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.kb-file-icon.pdf { background: #fef2f2; color: #dc2626; }
.kb-file-icon.pptx { background: #fff7ed; color: #c2410c; }
.kb-file-icon.img { background: #ecfdf5; color: #059669; }
.kb-file-icon.doc { background: var(--blue-soft); color: var(--blue); }
.kb-file-icon.other { background: var(--bg); color: var(--text-secondary); }
.kb-file-meta { flex: 1; min-width: 0; }
.kb-file-name { font-weight: 600; font-size: 0.85rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 0.2rem; }
.kb-file-info { font-size: 0.75rem; color: var(--text-muted); }
.kb-file-delete { background: none; border: none; cursor: pointer; color: var(--text-muted); padding: 2px; border-radius: 4px; transition: var(--transition); }
.kb-file-delete:hover { color: #dc2626; }

.kb-drop-zone {
    border: 2px dashed var(--border); border-radius: var(--radius-md);
    padding: 2rem 1.5rem; text-align: center; cursor: pointer;
    transition: var(--transition); margin-bottom: 1.5rem;
}
.kb-drop-zone.dragover { border-color: var(--purple); background: var(--purple-soft); }
.kb-drop-zone .material-symbols-rounded { font-size: 36px; color: var(--text-muted); margin-bottom: 0.5rem; }
.kb-drop-zone p { font-size: 0.85rem; color: var(--text-secondary); }

/* ═══════════════════════════════════════════════════════════
   MODALS
   ═══════════════════════════════════════════════════════════ */
.modal-overlay {
    position: fixed; inset: 0;
    background: rgba(45, 54, 85, 0.4);
    backdrop-filter: blur(4px);
    display: flex; align-items: center; justify-content: center;
    z-index: 500; animation: fadeIn 0.2s ease;
}
.modal {
    background: var(--white); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    width: 90%; max-width: 560px; max-height: 85vh;
    overflow: hidden; display: flex; flex-direction: column;
    animation: scaleUp 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.modal.modal-sm { max-width: 400px; }
.modal.modal-lg { max-width: 720px; }
.modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-light);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 1.05rem; }
.modal-close { background: none; border: none; font-size: 1.5rem; cursor: pointer; color: var(--text-muted); padding: 0.2rem 0.5rem; border-radius: 6px; transition: var(--transition); line-height: 1; }
.modal-close:hover { background: var(--bg); color: var(--text); }
.modal-body { padding: 1.5rem; overflow-y: auto; flex: 1; }
.modal-footer { padding: 1rem 1.5rem; border-top: 1px solid var(--border-light); display: flex; justify-content: flex-end; gap: 0.75rem; }

/* Quick Add */
.quick-add-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.quick-add-item {
    display: flex; flex-direction: column; align-items: center; gap: 0.5rem;
    padding: 1.5rem 1rem; border: 1.5px solid var(--border-light);
    border-radius: var(--radius-md); background: var(--white);
    cursor: pointer; transition: var(--transition);
    font-size: 0.85rem; font-weight: 500; color: var(--text);
}
.quick-add-item .material-symbols-rounded { font-size: 28px; color: var(--purple); }
.quick-add-item:hover { border-color: var(--purple); background: var(--purple-soft); transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* ═══════════════════════════════════════════════════════════
   PAGE-SPECIFIC STYLES
   ═══════════════════════════════════════════════════════════ */

/* Page Header */
.page-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1.5rem; }
.page-header h2 { font-size: 1.3rem; }
.page-header-actions { display: flex; gap: 0.75rem; align-items: center; }

/* Filter Bar */
.filter-bar { display: flex; gap: 0.75rem; align-items: center; margin-bottom: 1.25rem; flex-wrap: wrap; }
.filter-bar input, .filter-bar select {
    padding: 0.5rem 0.85rem; border: 1.5px solid var(--border);
    border-radius: var(--radius-sm); font-size: 0.85rem;
    transition: var(--transition); background: var(--white);
}
.filter-bar input:focus, .filter-bar select:focus {
    border-color: var(--purple); box-shadow: 0 0 0 3px var(--purple-soft); outline: none;
}

/* Empty States */
.empty-state { text-align: center; padding: 3rem 2rem; }
.empty-state .material-symbols-rounded { font-size: 48px; color: var(--text-muted); margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.1rem; margin-bottom: 0.5rem; }
.empty-state p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 1.5rem; }

/* Client / Project Detail */
.detail-header { display: flex; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.detail-back { color: var(--text-muted); cursor: pointer; padding: 0.4rem; border-radius: 8px; transition: var(--transition); background: none; border: none; }
.detail-back:hover { background: var(--bg); color: var(--text); }
.detail-title { font-size: 1.4rem; }
.detail-subtitle { color: var(--text-secondary); font-size: 0.9rem; }

.detail-tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border-light); margin-bottom: 1.5rem; }
.detail-tab {
    padding: 0.75rem 1.25rem; cursor: pointer; font-weight: 500;
    color: var(--text-muted); border-bottom: 2px solid transparent;
    transition: var(--transition); font-size: 0.9rem;
    background: none; border-top: none; border-left: none; border-right: none;
}
.detail-tab:hover { color: var(--text); }
.detail-tab.active { color: var(--purple); border-bottom-color: var(--purple); }

.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; }
.detail-field-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-bottom: 0.25rem; font-weight: 600; }
.detail-field-value { font-size: 0.95rem; }

/* ── Admin Panel ───────────────────────────────────────── */
.admin-user-card {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.25rem; border-bottom: 1px solid var(--border-light);
    transition: var(--transition);
}
.admin-user-card:last-child { border-bottom: none; }
.admin-user-card:hover { background: var(--bg-warm); }
.admin-user-meta { flex: 1; }
.admin-user-name { font-weight: 600; font-size: 0.95rem; }
.admin-user-email { font-size: 0.8rem; color: var(--text-secondary); }
.admin-user-caps { margin-top: 0.3rem; }

/* ═══════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════ */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes fadeDown { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scaleUp { from { opacity: 0; transform: scale(0.95); } to { opacity: 1; transform: scale(1); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes shake { 0%, 100% { transform: translateX(0); } 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
@keyframes slideIn { from { opacity: 0; transform: translateX(20px); } to { opacity: 1; transform: translateX(0); } }

.page-enter { animation: fadeUp 0.35s ease-out; }

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-content { margin-left: 0 !important; }
    .sidebar-collapsed .sidebar { width: var(--sidebar-width); transform: translateX(-100%); }
    .login-wrapper { flex-direction: column; }
    .login-left { flex: none; padding: 2rem; min-height: auto; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .kanban-column { width: 170px; }
    .kb-file-grid { grid-template-columns: 1fr; }
}

/* ── Scrollbar Styling ─────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* ── Misc Utilities ────────────────────────────────────── */
.text-muted { color: var(--text-secondary); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-1 { gap: 0.5rem; }
.gap-2 { gap: 1rem; }
.hidden { display: none !important; }
.clickable { cursor: pointer; }
