/* ============================================
   CallDesk Pro - Main Stylesheet
   Light Theme | Modern Premium Design
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ---- CSS Variables ---- */
:root {
    --primary:       #4f46e5;
    --primary-light: #818cf8;
    --primary-dark:  #3730a3;
    --secondary:     #7c3aed;
    --accent:        #06b6d4;
    --success:       #10b981;
    --warning:       #f59e0b;
    --danger:        #ef4444;
    --info:          #3b82f6;

    --bg:            #f1f5f9;
    --bg-card:       #ffffff;
    --bg-hover:      #f8fafc;
    --sidebar-bg:    #1e293b;
    --sidebar-hover: #334155;
    --sidebar-active:#4f46e5;
    --sidebar-text:  #cbd5e1;
    --sidebar-text-active: #ffffff;

    --text-dark:     #0f172a;
    --text-mid:      #475569;
    --text-light:    #94a3b8;
    --border:        #e2e8f0;
    --border-focus:  #4f46e5;

    --shadow-sm:  0 1px 3px rgba(0,0,0,.08);
    --shadow:     0 4px 16px rgba(0,0,0,.10);
    --shadow-lg:  0 10px 40px rgba(0,0,0,.14);
    --radius:     12px;
    --radius-sm:  8px;
    --sidebar-w:  260px;
    --topbar-h:   64px;
    --transition: all 0.25s cubic-bezier(.4,0,.2,1);
}

/* ---- Reset ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg);
    color: var(--text-dark);
    min-height: 100vh;
    overflow-x: hidden;
}
a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
img { max-width: 100%; }
input, select, textarea { font-family: inherit; }

/* ============================================
   LOGIN PAGE
   ============================================ */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #06b6d4 100%);
    position: relative;
    overflow: hidden;
}
.login-page::before {
    content: '';
    position: absolute;
    width: 600px; height: 600px;
    background: rgba(255,255,255,.06);
    border-radius: 50%;
    top: -200px; right: -200px;
}
.login-page::after {
    content: '';
    position: absolute;
    width: 400px; height: 400px;
    background: rgba(255,255,255,.05);
    border-radius: 50%;
    bottom: -150px; left: -100px;
}
.login-card {
    background: rgba(255,255,255,.97);
    border-radius: 20px;
    padding: 48px 40px;
    width: 100%;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 1;
    animation: slideUp .5s ease;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}
.login-logo {
    text-align: center;
    margin-bottom: 32px;
}
.login-logo .logo-icon-big {
    font-size: 48px;
    display: block;
    margin-bottom: 10px;
}
.login-logo h1 {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.login-logo p {
    color: var(--text-mid);
    font-size: .875rem;
    margin-top: 4px;
}
.login-form .form-group {
    margin-bottom: 18px;
}
.login-form label {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--text-mid);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: .05em;
}
.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .95rem;
    transition: var(--transition);
    background: var(--bg);
    color: var(--text-dark);
}
.login-form input:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(79,70,229,.1);
}
.btn-login {
    width: 100%;
    padding: 13px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    border-radius: var(--radius-sm);
    font-size: 1rem;
    font-weight: 600;
    transition: var(--transition);
    margin-top: 8px;
    letter-spacing: .02em;
}
.btn-login:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(79,70,229,.35);
}
.btn-login:active { transform: translateY(0); }
.alert-error {
    background: #fee2e2;
    color: var(--danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid #fecaca;
    font-size: .875rem;
    margin-bottom: 16px;
    font-weight: 500;
}

/* ============================================
   MAIN LAYOUT
   ============================================ */
.layout { display: flex; min-height: 100vh; }

/* ---- Sidebar ---- */
.sidebar {
    width: var(--sidebar-w);
    background: var(--sidebar-bg);
    min-height: 100vh;
    position: fixed;
    left: 0; top: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}
.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 24px 20px 20px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}
.logo-icon {
    width: 42px; height: 42px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    flex-shrink: 0;
}
.logo-title {
    display: block;
    color: #fff;
    font-weight: 700;
    font-size: 1.1rem;
}
.logo-sub {
    display: block;
    color: var(--sidebar-text);
    font-size: .72rem;
}
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 20px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}
.user-avatar {
    width: 38px; height: 38px;
    background: linear-gradient(135deg, var(--accent), var(--primary));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: .85rem;
    flex-shrink: 0;
}
.user-name {
    display: block;
    color: #fff;
    font-weight: 600;
    font-size: .875rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.user-role {
    display: inline-block;
    font-size: .65rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-top: 3px;
}
.badge-admin { background: rgba(239,68,68,.2); color: #fca5a5; }
.badge-hr    { background: rgba(168,85,247,.2); color: #d8b4fe; }
.badge-user  { background: rgba(16,185,129,.2); color: #6ee7b7; }

.sidebar-nav {
    padding: 16px 12px;
    flex: 1;
}
.nav-section-title {
    color: var(--text-light);
    font-size: .65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    padding: 8px 10px 4px;
    margin-top: 4px;
}
.nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--sidebar-text);
    font-size: .875rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 3px;
}
.nav-link:hover {
    background: var(--sidebar-hover);
    color: #fff;
    transform: translateX(3px);
}
.nav-link.active {
    background: var(--sidebar-active);
    color: #fff;
    box-shadow: 0 4px 12px rgba(79,70,229,.3);
}
.nav-icon { font-size: 1rem; flex-shrink: 0; }
.nav-divider {
    height: 1px;
    background: rgba(255,255,255,.06);
    margin: 12px 0;
}
.nav-logout:hover { background: rgba(239,68,68,.15); color: #fca5a5; }

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.5);
    z-index: 99;
}

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

/* ---- Top Bar ---- */
.topbar {
    height: var(--topbar-h);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 28px;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: var(--shadow-sm);
}
.topbar-left {
    display: flex;
    align-items: center;
    gap: 16px;
}
.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    color: var(--text-mid);
}
.page-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--text-dark);
}
.topbar-right {
    display: flex;
    align-items: center;
    gap: 12px;
}
.topbar-time {
    font-size: .8rem;
    color: var(--text-light);
    font-weight: 500;
}
.btn-sm {
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    font-size: .8rem;
    font-weight: 600;
    border: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { filter: brightness(1.1); transform: translateY(-1px); }
.btn-danger  { background: var(--danger);  color: #fff; }
.btn-danger:hover  { filter: brightness(1.1); transform: translateY(-1px); }
.btn-warning { background: var(--warning); color: #fff; }
.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-mid);
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }

/* ---- Page Content ---- */
.page-content {
    padding: 28px;
    flex: 1;
}

/* ---- Stats Cards ---- */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}
.stat-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 22px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}
.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--card-color, var(--primary));
    border-radius: 0 0 var(--radius) var(--radius);
}
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: var(--icon-bg, rgba(79,70,229,.1));
    flex-shrink: 0;
}
.stat-info .stat-label {
    font-size: .75rem;
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: .06em;
}
.stat-info .stat-value {
    font-size: 1.75rem;
    font-weight: 800;
    color: var(--text-dark);
    line-height: 1.1;
}

/* ---- Card ---- */
.card {
    background: var(--bg-card);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    overflow: hidden;
    margin-bottom: 24px;
}
.card-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-body { padding: 24px; }

/* ============================================
   GOOGLE SHEETS STYLE TABLE
   ============================================ */
.sheet-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card);
}
.sheet-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1200px;
    font-size: .82rem;
}
.sheet-table thead th {
    background: #f8fafc;
    color: var(--text-mid);
    font-weight: 700;
    font-size: .72rem;
    text-transform: uppercase;
    letter-spacing: .06em;
    padding: 12px 14px;
    text-align: left;
    border-bottom: 2px solid var(--border);
    border-right: 1px solid var(--border);
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 10;
    user-select: none;
}
.sheet-table thead th:first-child { position: sticky; left: 0; z-index: 11; background: #f1f5f9; }
.sheet-table tbody tr {
    border-bottom: 1px solid var(--border);
    transition: background .15s;
}
.sheet-table tbody tr:hover { background: #f8fafc; }
.sheet-table tbody tr:last-child { border-bottom: none; }
.sheet-table tbody td {
    padding: 0;
    border-right: 1px solid var(--border);
    vertical-align: middle;
    min-width: 90px;
    max-width: 200px;
}
.sheet-table tbody td:first-child {
    position: sticky; left: 0;
    background: #f8fafc;
    z-index: 5;
    font-weight: 600;
    color: var(--text-mid);
    text-align: center;
    font-size: .75rem;
    padding: 8px 12px;
    min-width: 50px;
}
.cell-input {
    width: 100%;
    padding: 9px 12px;
    border: none;
    outline: none;
    background: transparent;
    font-size: .82rem;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    transition: background .15s;
    cursor: text;
    min-height: 38px;
}
.cell-input:focus {
    background: #eff6ff;
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    border-radius: 4px;
}
.cell-select {
    width: 100%;
    padding: 8px 12px;
    border: none;
    outline: none;
    background: transparent;
    font-size: .82rem;
    color: var(--text-dark);
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    min-height: 38px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}
.cell-select:focus {
    background-color: #eff6ff;
    outline: 2px solid var(--primary);
    outline-offset: -2px;
    border-radius: 4px;
}
.stat-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 600;
    white-space: nowrap;
}
/* Row number column */
.row-num { background: #f1f5f9; }

/* ---- Table Toolbar ---- */
.table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
    background: var(--bg-card);
}
.toolbar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.toolbar-right { display: flex; align-items: center; gap: 8px; }
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}
.search-box .search-icon {
    position: absolute;
    left: 10px;
    color: var(--text-light);
    font-size: .9rem;
}
.search-box input {
    padding: 7px 12px 7px 32px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    width: 220px;
    transition: var(--transition);
    background: var(--bg);
}
.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    width: 260px;
    background: #fff;
}
.filter-select {
    padding: 7px 12px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .82rem;
    background: var(--bg);
    color: var(--text-dark);
    cursor: pointer;
}
.filter-select:focus { outline: none; border-color: var(--primary); }
.saved-indicator {
    font-size: .75rem;
    color: var(--success);
    font-weight: 600;
    opacity: 0;
    transition: opacity .3s;
}
.saved-indicator.show { opacity: 1; }

/* ---- Forms ---- */
.form-section {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 28px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
}
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group.full { grid-column: 1 / -1; }
.form-label {
    font-size: .78rem;
    font-weight: 600;
    color: var(--text-mid);
    text-transform: uppercase;
    letter-spacing: .05em;
}
.form-label .required { color: var(--danger); }
.form-control {
    padding: 10px 14px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: .9rem;
    transition: var(--transition);
    background: var(--bg);
    color: var(--text-dark);
    width: 100%;
}
.form-control:focus {
    outline: none;
    border-color: var(--primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(79,70,229,.08);
}
.form-control.error { border-color: var(--danger); }
.form-error { font-size: .75rem; color: var(--danger); margin-top: 2px; }
.form-hint  { font-size: .75rem; color: var(--text-light); margin-top: 2px; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ---- Upload Zone ---- */
.upload-zone {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg);
}
.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary);
    background: rgba(79,70,229,.04);
}
.upload-zone .upload-icon { font-size: 2.5rem; margin-bottom: 12px; }
.upload-zone p { color: var(--text-mid); font-size: .9rem; }
.upload-zone span { color: var(--primary); font-weight: 600; }

/* ---- Alert / Toast ---- */
.toast-container {
    position: fixed;
    top: 80px; right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.toast {
    padding: 14px 20px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    color: #fff;
    box-shadow: var(--shadow);
    animation: toastIn .35s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 260px;
    max-width: 360px;
}
@keyframes toastIn {
    from { opacity: 0; transform: translateX(40px); }
    to   { opacity: 1; transform: translateX(0); }
}
.toast-success { background: var(--success); }
.toast-error   { background: var(--danger); }
.toast-info    { background: var(--info); }
.toast-warning { background: var(--warning); }

/* Inline alert */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: .875rem;
    font-weight: 500;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.alert-error   { background: #fee2e2; color: var(--danger); border: 1px solid #fecaca; }
.alert-info    { background: #dbeafe; color: #1d4ed8; border: 1px solid #bfdbfe; }

/* ---- Table for HR/Admin lists ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.data-table thead th {
    background: #f8fafc;
    padding: 12px 16px;
    text-align: left;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-mid);
    border-bottom: 2px solid var(--border);
}
.data-table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    color: var(--text-dark);
    vertical-align: middle;
}
.data-table tbody tr:hover { background: var(--bg-hover); }
.data-table tbody tr:last-child td { border-bottom: none; }

/* ---- Badges ---- */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .04em;
}
.badge-role-admin { background: #fee2e2; color: #dc2626; }
.badge-role-hr    { background: #f3e8ff; color: #7c3aed; }
.badge-role-user  { background: #dcfce7; color: #15803d; }

/* ---- Modal ---- */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,.5);
    z-index: 200;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(2px);
}
.modal-overlay.open { display: flex; }
.modal {
    background: var(--bg-card);
    border-radius: 16px;
    padding: 32px;
    width: 90%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    animation: modalIn .25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(.96) translateY(-10px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 22px;
}
.modal-title { font-size: 1.1rem; font-weight: 700; }
.modal-close {
    background: none;
    border: none;
    font-size: 1.3rem;
    color: var(--text-light);
    cursor: pointer;
    padding: 4px;
    border-radius: 6px;
    transition: var(--transition);
}
.modal-close:hover { background: var(--bg); color: var(--text-dark); }
.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    margin-top: 24px;
    padding-top: 18px;
    border-top: 1px solid var(--border);
}

/* ---- Color Swatch ---- */
.color-options { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 6px; }
.color-swatch {
    width: 28px; height: 28px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: var(--transition);
}
.color-swatch:hover, .color-swatch.selected { border-color: var(--text-dark); transform: scale(1.2); }

/* ---- Empty state ---- */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-light);
}
.empty-state .empty-icon { font-size: 3rem; margin-bottom: 14px; }
.empty-state h3 { color: var(--text-mid); margin-bottom: 6px; }
.empty-state p { font-size: .875rem; }

/* ---- Pagination ---- */
.pagination {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 14px 18px;
    border-top: 1px solid var(--border);
    justify-content: flex-end;
    flex-wrap: wrap;
}
.page-btn {
    width: 34px; height: 34px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-card);
    color: var(--text-mid);
    font-size: .82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
}
.page-btn:hover  { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-info       { font-size: .8rem; color: var(--text-light); padding: 0 8px; }

/* ---- HR Dashboard Cards ---- */
.hr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}
.hr-card {
    background: var(--bg-card);
    border-radius: var(--radius);
    padding: 24px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
}
.hr-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}
.hr-card .hr-card-icon { font-size: 2.5rem; margin-bottom: 12px; }
.hr-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 6px; }
.hr-card p  { font-size: .82rem; color: var(--text-light); }
.hr-card .hr-card-count {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin: 10px 0 4px;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open {
        transform: translateX(0);
    }
    .sidebar-overlay.open { display: block; }
    .main-content { margin-left: 0; }
    .menu-toggle { display: block; }
    .page-content { padding: 18px; }
}
@media (max-width: 600px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .form-grid  { grid-template-columns: 1fr; }
    .login-card { padding: 32px 22px; margin: 16px; }
    .topbar { padding: 0 16px; }
    .search-box input { width: 160px; }
    .search-box input:focus { width: 180px; }
}

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

/* ---- Utility ---- */
.text-center { text-align: center; }
.text-right  { text-align: right; }
.mt-4  { margin-top: 4px; }
.mt-8  { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.mb-16 { margin-bottom: 16px; }
.flex  { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }
.text-primary { color: var(--primary); }
.text-success { color: var(--success); }
.text-danger  { color: var(--danger); }
.text-mid { color: var(--text-mid); }
.text-light { color: var(--text-light); }
