:root {
    --bg: #f4f6f8;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #6b7280;
    --border: #e5e7eb;
    --primary: #2563eb;
    --success: #16a34a;
    --danger: #dc2626;
    --warning: #f59e0b;
    --dark: #111827;
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

body {
    background: var(--bg);
    color: var(--text);
    font-size: 15px;
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: 1180px;
}

/* HEADINGS */
h1, h2, h3, h4, h5 {
    font-weight: 750;
    letter-spacing: -0.02em;
}

h3 {
    margin-bottom: 18px;
}

/* CARDS */
.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
    overflow: hidden;
}

.card-header {
    background: #ffffff;
    border-bottom: 1px solid var(--border);
    font-weight: 700;
    padding: 14px 18px;
}

.card-body {
    padding: 18px;
}

/* FORMS */
.form-control,
.form-select {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 10px 12px;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,0.15);
}

.form-label {
    font-weight: 650;
    color: #374151;
}

/* BUTTONS */
.btn {
    border-radius: 12px;
    font-weight: 650;
}

.btn-sm {
    padding: 7px 10px;
}

/* TABLES */
.table {
    background: #ffffff;
    border-radius: 12px;
    overflow: hidden;
}

.table th {
    background: #f9fafb;
    color: #374151;
    font-weight: 700;
}

.table td,
.table th {
    vertical-align: middle;
}

/* ALERTS */
.alert {
    border-radius: 14px;
    border: 1px solid var(--border);
}

/* DASHBOARD */
.dashboard-card {
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,0.04);
}

.dashboard-card small {
    color: var(--muted);
    font-weight: 650;
}

.dashboard-card h3 {
    margin: 0;
    font-weight: 800;
}

/* CALENDAR */
.calendar-grid {
    gap: 10px;
}

.day-card {
    box-shadow: 0 4px 12px rgba(0,0,0,0.04);
}

/* LEFT SIDEBAR LAYOUT */
.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: #111827;
    color: white;
    padding: 18px;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    overflow-y: auto;
    z-index: 1000;
    transition: left 0.25s ease;
}

.sidebar-brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid rgba(255,255,255,0.12);
}

.sidebar-brand strong {
    display: block;
    font-size: 15px;
}

.sidebar-brand small {
    display: block;
    color: rgba(255,255,255,0.6);
    font-size: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    border-radius: 14px;
    background: #2563eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
}

.sidebar-section {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.45);
    font-weight: 800;
    margin: 18px 0 8px;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255,255,255,0.82);
    text-decoration: none;
    padding: 11px 12px;
    border-radius: 12px;
    margin-bottom: 4px;
    font-weight: 650;
    transition: 0.18s ease;
}

.sidebar-link:hover {
    background: rgba(255,255,255,0.10);
    color: white;
}

.sidebar-footer {
    margin-top: 28px;
    padding-top: 18px;
    border-top: 1px solid rgba(255,255,255,0.12);
}

.logout-link {
    background: rgba(220,38,38,0.12);
}

.main-content {
    margin-left: 260px;
    padding: 28px;
    width: calc(100% - 260px);
}

/* MOBILE MENU */
.mobile-menu-btn {
    display: none;
    position: fixed;
    top: 18px;
    left: 18px;
    z-index: 1200;
    border: none;
    background: #111827;
    color: #ffffff;
    border-radius: 18px;
    width: 56px;
    height: 56px;
    font-size: 26px;
    line-height: 1;
    box-shadow: 0 14px 34px rgba(0,0,0,0.28);
}

.sidebar-overlay {
    display: none;
}

/* MOBILE */
@media (max-width: 768px) {
    body {
        font-size: 14px;
        overflow-x: hidden;
    }

    .desktop-label {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .app-shell {
        display: block !important;
        width: 100% !important;
        min-height: 100vh;
    }

    .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: -290px !important;
        width: 280px !important;
        height: 100vh !important;
        z-index: 1150;
        padding: 22px 16px !important;
        background: #111827;
        overflow-y: auto;
        overflow-x: hidden;
        transition: left 0.28s ease;
        box-shadow: 18px 0 40px rgba(0,0,0,0.28);
        display: block !important;
    }

    .sidebar.sidebar-open {
        left: 0 !important;
    }

    .sidebar-brand {
        display: flex !important;
    }

    .sidebar-section {
        display: block !important;
    }

    .sidebar-link {
        display: flex !important;
        width: 100%;
        margin-bottom: 6px;
        padding: 13px 14px;
        border-radius: 14px;
        font-size: 15px;
        white-space: normal;
        background: transparent;
    }

    .sidebar-link:hover {
        background: rgba(255,255,255,0.10);
    }

    .sidebar-footer {
        display: block !important;
        margin-top: 24px;
        padding-top: 18px;
        border-top: 1px solid rgba(255,255,255,0.12);
    }

    .sidebar-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(17, 24, 39, 0.55);
        backdrop-filter: blur(3px);
        z-index: 1100;
    }

    .sidebar-overlay.sidebar-overlay-show {
        display: block;
    }

    .main-content {
        margin-left: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        padding: 92px 16px 32px !important;
    }

    .container {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .page-header,
    .soft-card,
    .employee-card,
    .metric,
    .dashboard-card,
    .card {
        width: 100% !important;
        max-width: 100% !important;
    }

    .row {
        margin-left: 0 !important;
        margin-right: 0 !important;
    }

    .row > * {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }

    .col-md-3,
    .col-md-4,
    .col-md-5,
    .col-md-6,
    .col-md-8,
    .col-md-9,
    .col-md-12 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .page-header {
        padding: 22px !important;
        border-radius: 24px !important;
    }

    .page-title {
        font-size: 30px !important;
        line-height: 1.1;
    }

    .page-subtitle {
        font-size: 17px;
        line-height: 1.5;
    }

    .employee-card {
        padding: 20px !important;
    }

    .employee-card .d-flex {
        flex-wrap: wrap;
    }

    .employee-name {
        font-size: 24px !important;
    }

    .d-flex {
        min-width: 0;
    }

    .btn {
        white-space: normal;
    }

    .card-body {
        padding: 14px;
    }

    .form-control,
    .form-select {
        font-size: 14px;
        padding: 10px;
    }

    .table-responsive {
        border-radius: 14px;
    }

    .day-card {
        min-height: 86px !important;
        padding: 6px !important;
        font-size: 11px;
    }
}