/* ============================================================
   WCHR HRMS — Professional Design System
   Colors: White (#fff), Dark Blue (#0d2b52), Orange (#ff8a1f)
   ============================================================ */

:root {
    --primary: #0d2b52;
    --primary-light: #1a4b8c;
    --primary-dark: #081d37;
    --accent: #ff8a1f;
    --accent-light: #fff3e6;
    --accent-hover: #e67a15;
    --success: #16a34a;
    --success-light: #f0fdf4;
    --warning: #f59e0b;
    --warning-light: #fffbeb;
    --danger: #ef4444;
    --danger-light: #fef2f2;
    --info: #3b82f6;
    --info-light: #eff6ff;
    --bg: #f1f5f9;
    --surface: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    --text: #1e293b;
    --text-secondary: #64748b;
    --text-muted: #94a3b8;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 1px 3px rgba(0,0,0,0.1), 0 1px 2px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --sidebar-width: 260px;
    --topbar-height: 64px;
}

/* === RESET === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
img { max-width: 100%; }
table { border-collapse: collapse; }

/* === LAYOUT === */
.layout { display: flex; min-height: 100vh; }

/* === SIDEBAR === */
.sidebar {
    width: var(--sidebar-width);
    background: var(--primary-dark);
    color: #fff;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 50;
    overflow-y: auto;
    transition: transform 0.3s ease;
}
.sidebar::-webkit-scrollbar { width: 4px; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 4px; }

.sidebar__brand {
    padding: 20px 20px 16px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex; align-items: center; gap: 12px;
}
.brand-mark {
    width: 40px; height: 40px; border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), #ffb460);
    color: var(--primary-dark);
    display: grid; place-items: center;
    font-weight: 800; font-size: 16px; flex-shrink: 0;
}
.sidebar__brand-text strong { font-size: 15px; font-weight: 700; display: block; }
.sidebar__brand-text span { font-size: 11px; color: rgba(255,255,255,0.5); }

.sidebar__nav { padding: 12px 0; flex: 1; }
.nav-section { padding: 16px 20px 6px; font-size: 10px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255,255,255,0.35); font-weight: 600; }
.nav-link {
    display: flex; align-items: center; gap: 10px;
    padding: 9px 20px; margin: 1px 8px; border-radius: var(--radius);
    color: rgba(255,255,255,0.7); font-size: 13px; font-weight: 500;
    transition: all 0.15s ease;
}
.nav-link i { font-size: 16px; width: 20px; text-align: center; opacity: 0.8; }
.nav-link:hover { background: rgba(255,255,255,0.08); color: #fff; }
.nav-link.is-active { background: var(--accent); color: var(--primary-dark); font-weight: 600; }
.nav-link.is-active i { opacity: 1; }

.nav-badge {
    margin-left: auto; background: var(--accent);
    color: var(--primary-dark); font-size: 11px; font-weight: 700;
    padding: 1px 7px; border-radius: 10px; min-width: 20px; text-align: center;
}
.nav-link.is-active .nav-badge { background: var(--primary-dark); color: #fff; }

.sidebar__footer {
    padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 11px; color: rgba(255,255,255,0.4);
}

/* === MAIN WRAP === */
.main-wrap { flex: 1; margin-left: var(--sidebar-width); min-width: 0; }

/* === TOPBAR === */
.topbar {
    height: var(--topbar-height);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    position: sticky; top: 0; z-index: 30;
}
.topbar__left { display: flex; align-items: center; gap: 16px; }
.topbar__left h1 { font-size: 18px; font-weight: 700; color: var(--text); }
.topbar__left .breadcrumb { font-size: 12px; color: var(--text-muted); }

.topbar__right { display: flex; align-items: center; gap: 12px; }
.topbar-btn {
    width: 36px; height: 36px; border-radius: var(--radius);
    border: 1px solid var(--border); background: var(--surface);
    display: grid; place-items: center; cursor: pointer;
    color: var(--text-secondary); transition: all 0.15s;
    position: relative;
}
.topbar-btn:hover { background: var(--bg); color: var(--text); }
.topbar-btn .badge-dot {
    position: absolute; top: 6px; right: 6px;
    width: 8px; height: 8px; border-radius: 50%;
    background: var(--danger); border: 2px solid var(--surface);
}
.topbar-btn .notif-count {
    position: absolute; top: -4px; right: -4px;
    min-width: 18px; height: 18px; border-radius: 9px;
    background: var(--danger); color: #fff;
    font-size: 10px; font-weight: 700; line-height: 18px;
    text-align: center; padding: 0 4px;
    border: 2px solid var(--surface);
}
.topbar-user {
    display: flex; align-items: center; gap: 10px;
    padding: 6px 12px 6px 6px; border-radius: var(--radius);
    border: 1px solid var(--border); cursor: default;
}
.topbar-avatar {
    width: 32px; height: 32px; border-radius: var(--radius);
    background: var(--primary); color: #fff;
    display: grid; place-items: center; font-size: 13px; font-weight: 700;
}
.topbar-user-info { line-height: 1.3; }
.topbar-user-info strong { font-size: 13px; font-weight: 600; display: block; }
.topbar-user-info span { font-size: 11px; color: var(--text-muted); }

.mobile-toggle { display: none; }

/* === CONTENT AREA === */
.content { padding: 24px; }

/* === PAGE HEADER === */
.page-header {
    display: flex; align-items: center; justify-content: space-between;
    margin-bottom: 24px; flex-wrap: wrap; gap: 12px;
}
.page-header h2 { font-size: 22px; font-weight: 700; color: var(--text); }
.page-header p { font-size: 13px; color: var(--text-secondary); margin-top: 2px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* === CARDS === */
.card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-sm);
}
.card-header {
    padding: 16px 20px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.card-header h3 { font-size: 15px; font-weight: 600; }
.card-header .subtitle { font-size: 12px; color: var(--text-muted); margin-top: 1px; }
.card-body { padding: 20px; }
.card-footer { padding: 12px 20px; border-top: 1px solid var(--border); }

/* === STAT CARDS === */
.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 24px; }
.stat-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
    box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.stat-card:hover { box-shadow: var(--shadow-md); }
.stat-card__icon {
    width: 40px; height: 40px; border-radius: var(--radius);
    display: grid; place-items: center; font-size: 18px; margin-bottom: 12px;
}
.stat-card__icon.blue { background: var(--info-light); color: var(--info); }
.stat-card__icon.green { background: var(--success-light); color: var(--success); }
.stat-card__icon.orange { background: var(--accent-light); color: var(--accent); }
.stat-card__icon.red { background: var(--danger-light); color: var(--danger); }
.stat-card__icon.purple { background: #f3e8ff; color: #9333ea; }
.stat-card__value { font-size: 28px; font-weight: 800; color: var(--text); line-height: 1; }
.stat-card__label { font-size: 13px; color: var(--text-secondary); margin-top: 4px; }
.stat-card__change { font-size: 12px; margin-top: 8px; display: flex; align-items: center; gap: 4px; }
.stat-card__change.up { color: var(--success); }
.stat-card__change.down { color: var(--danger); }

/* === BUTTONS === */
.btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius);
    font-size: 13px; font-weight: 600; cursor: pointer;
    border: 1px solid transparent; transition: all 0.15s;
    white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; border-color: var(--accent); }
.btn-primary:hover { background: var(--accent-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border-color: var(--border); }
.btn-secondary:hover { background: var(--bg); }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-info { background: var(--primary); color: #fff; }
.btn-info:hover { background: var(--primary-light); }
.btn-sm { padding: 5px 10px; font-size: 12px; }
.btn-lg { padding: 12px 24px; font-size: 15px; }
.btn-icon { width: 32px; height: 32px; padding: 0; justify-content: center; }
.btn-ghost { background: transparent; color: var(--text-secondary); border: none; }
.btn-ghost:hover { color: var(--text); background: var(--bg); }

/* === BADGES === */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 600; white-space: nowrap;
}
.badge-success { background: var(--success-light); color: var(--success); }
.badge-warning { background: var(--warning-light); color: #b45309; }
.badge-danger { background: var(--danger-light); color: var(--danger); }
.badge-info { background: var(--info-light); color: var(--info); }
.badge-primary { background: #eef2ff; color: var(--primary); }
.badge-secondary { background: var(--bg); color: var(--text-secondary); }
.badge-accent { background: var(--accent-light); color: var(--accent-hover); }

/* === TABLES === */
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; }
.data-table th {
    padding: 10px 16px; text-align: left;
    font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.05em; color: var(--text-muted);
    background: var(--bg); border-bottom: 1px solid var(--border);
}
.data-table td {
    padding: 12px 16px; border-bottom: 1px solid var(--border-light);
    font-size: 13px; color: var(--text);
}
.data-table tbody tr:hover { background: #f8fafc; }
.data-table .user-cell { display: flex; align-items: center; gap: 10px; }
.data-table .user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: #fff;
    display: grid; place-items: center; font-size: 12px; font-weight: 700; flex-shrink: 0;
}
.data-table .user-info strong { font-weight: 600; display: block; }
.data-table .user-info span { font-size: 12px; color: var(--text-muted); }

/* === LEAVE BADGE (avatar overlay) === */
.avatar-wrap { position: relative; display: inline-flex; flex-shrink: 0; }
.leave-badge {
    position: absolute; top: -3px; right: -3px; z-index: 2;
    width: 16px; height: 16px; border-radius: 50%;
    background: #f59e0b; color: #fff; border: 2px solid #fff;
    display: grid; place-items: center; font-size: 8px; line-height: 1;
}
.leave-badge i { font-size: 8px; }
/* Larger variant for profile banner */
.avatar-wrap--lg .leave-badge {
    width: 24px; height: 24px; top: -2px; right: -2px; font-size: 12px; border-width: 3px;
}
.avatar-wrap--lg .leave-badge i { font-size: 12px; }
/* Org chart variant */
.org-card__avatar-wrap { position: relative; display: inline-flex; }
.org-card__avatar-wrap .leave-badge { top: -2px; right: -2px; }

/* === FORMS === */
.form-group { margin-bottom: 16px; }
.form-label {
    display: block; font-size: 13px; font-weight: 600;
    color: var(--text); margin-bottom: 6px;
}
.form-control {
    width: 100%; padding: 9px 12px;
    border: 1px solid var(--border); border-radius: var(--radius);
    font-size: 13px; color: var(--text); background: var(--surface);
    transition: border-color 0.15s, box-shadow 0.15s;
}
.form-control:focus {
    outline: none; border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255,138,31,0.15);
}
.form-control::placeholder { color: var(--text-muted); }
select.form-control { cursor: pointer; }
textarea.form-control { min-height: 80px; resize: vertical; }
.form-hint { font-size: 12px; color: var(--text-muted); margin-top: 4px; }
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.form-row-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }

/* === ALERTS === */
.alert {
    padding: 12px 16px; border-radius: var(--radius);
    font-size: 13px; display: flex; align-items: center; gap: 10px;
    margin-bottom: 16px; border: 1px solid;
}
.alert-success { background: var(--success-light); color: #166534; border-color: #bbf7d0; }
.alert-danger { background: var(--danger-light); color: #991b1b; border-color: #fecaca; }
.alert-warning { background: var(--warning-light); color: #92400e; border-color: #fde68a; }
.alert-info { background: var(--info-light); color: #1e40af; border-color: #bfdbfe; }
.alert i { font-size: 16px; }

/* === TABS === */
.tabs { margin-bottom: 24px; }
.tab-list {
    display: flex; gap: 0; border-bottom: 2px solid var(--border);
    overflow-x: auto; scrollbar-width: none; -ms-overflow-style: none;
}
.tab-list::-webkit-scrollbar { display: none; }
.tab-btn {
    padding: 10px 20px; font-size: 13px; font-weight: 600;
    color: var(--text-secondary); border: none; background: none;
    cursor: pointer; border-bottom: 2px solid transparent;
    margin-bottom: -2px; transition: all 0.15s; white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.is-active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { display: none; padding-top: 20px; }
.tab-panel.is-active { display: block; }

/* === PROGRESS BAR === */
.progress { width: 100%; height: 8px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; border-radius: 4px; transition: width 0.3s; }
.progress-bar.blue { background: var(--info); }
.progress-bar.green { background: var(--success); }
.progress-bar.orange { background: var(--accent); }
.progress-bar.red { background: var(--danger); }

/* === AVATAR === */
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center;
    font-weight: 700; font-size: 14px; flex-shrink: 0;
}
.avatar-sm { width: 28px; height: 28px; font-size: 11px; }
.avatar-lg { width: 48px; height: 48px; font-size: 18px; }
.avatar-primary { background: var(--primary); color: #fff; }
.avatar-accent { background: var(--accent-light); color: var(--accent); }

/* === GRID HELPERS === */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }

/* === WELCOME BANNER === */
.welcome-banner {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    color: #fff; border-radius: var(--radius-xl); padding: 28px 32px;
    margin-bottom: 24px; position: relative; overflow: hidden;
}
.welcome-banner::after {
    content: ''; position: absolute; width: 200px; height: 200px;
    border-radius: 50%; background: rgba(255,138,31,0.15);
    top: -60px; right: -40px;
}
.welcome-banner h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.welcome-banner p { font-size: 14px; color: rgba(255,255,255,0.7); max-width: 600px; }
.welcome-banner .banner-chips { display: flex; gap: 8px; margin-top: 14px; flex-wrap: wrap; }
.welcome-banner .chip {
    padding: 5px 12px; border-radius: 20px; font-size: 12px;
    background: rgba(255,255,255,0.15); font-weight: 500;
}

/* === LIST ITEMS === */
.list-item {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 0; border-bottom: 1px solid var(--border-light);
}
.list-item:last-child { border-bottom: none; }
.list-item__content { flex: 1; min-width: 0; }
.list-item__content strong { font-size: 13px; font-weight: 600; display: block; }
.list-item__content span { font-size: 12px; color: var(--text-muted); }

/* === EMPTY STATE === */
.empty-state {
    text-align: center; padding: 40px 20px; color: var(--text-muted);
}
.empty-state i { font-size: 40px; margin-bottom: 12px; display: block; opacity: 0.4; }
.empty-state p { font-size: 14px; }

/* === KANBAN === */
.kanban-board { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; }
.kanban-column {
    min-width: 260px; flex: 1;
    background: var(--bg); border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}
.kanban-column__header {
    padding: 12px 16px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.kanban-column__header h4 { font-size: 13px; font-weight: 600; }
.kanban-column__body { padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.kanban-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 12px;
    box-shadow: var(--shadow-sm);
}
.kanban-card strong { font-size: 13px; display: block; margin-bottom: 4px; }
.kanban-card span { font-size: 12px; color: var(--text-muted); }

/* === CHART CONTAINERS === */
.chart-container { position: relative; width: 100%; }
.chart-container canvas { width: 100% !important; }

/* === SETTINGS === */
.settings-layout { display: grid; grid-template-columns: 220px 1fr; gap: 24px; }
.settings-nav { list-style: none; }
.settings-nav li a {
    display: flex; align-items: center; gap: 8px;
    padding: 10px 14px; border-radius: var(--radius);
    font-size: 13px; font-weight: 500; color: var(--text-secondary);
    transition: all 0.15s;
}
.settings-nav li a:hover { background: var(--bg); color: var(--text); }
.settings-nav li a.is-active { background: var(--accent-light); color: var(--accent-hover); font-weight: 600; }
.settings-section { padding: 0; }
.settings-section h3 { font-size: 17px; font-weight: 700; margin-bottom: 4px; }
.settings-section p { font-size: 13px; color: var(--text-secondary); margin-bottom: 20px; }
.setting-row {
    display: flex; align-items: flex-start; justify-content: space-between;
    gap: 40px; padding: 16px 0; border-bottom: 1px solid var(--border-light);
}
.setting-row:last-child { border-bottom: none; }
.setting-row__info { flex: 1; max-width: 400px; }
.setting-row__info label { font-size: 13px; font-weight: 600; display: block; }
.setting-row__info span { font-size: 12px; color: var(--text-muted); }
.setting-row__control { flex: 1; max-width: 400px; }

/* === TOGGLE SWITCH === */
.toggle { position: relative; display: inline-block; width: 44px; height: 24px; }
.toggle input { display: none; }
.toggle-slider {
    position: absolute; inset: 0; background: var(--border);
    border-radius: 12px; cursor: pointer; transition: 0.2s;
}
.toggle-slider::before {
    content: ''; position: absolute;
    width: 18px; height: 18px; border-radius: 50%;
    left: 3px; bottom: 3px; background: #fff;
    transition: 0.2s; box-shadow: var(--shadow-sm);
}
.toggle input:checked + .toggle-slider { background: var(--accent); }
.toggle input:checked + .toggle-slider::before { transform: translateX(20px); }

/* === PAYSLIP === */
.payslip-print {
    max-width: 800px; margin: 0 auto;
    background: var(--surface); padding: 32px;
    border: 1px solid var(--border); border-radius: var(--radius-lg);
}
.payslip-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 24px; padding-bottom: 16px; border-bottom: 2px solid var(--primary); }
.payslip-table { width: 100%; margin-bottom: 16px; }
.payslip-table th, .payslip-table td { padding: 8px 12px; text-align: left; font-size: 13px; }
.payslip-table th { background: var(--bg); font-weight: 600; color: var(--text-secondary); font-size: 11px; text-transform: uppercase; }
.payslip-table .total-row { font-weight: 700; background: var(--accent-light); }

/* === TIMELINE === */
.timeline { position: relative; padding-left: 24px; }
.timeline::before {
    content: ''; position: absolute; left: 7px; top: 4px; bottom: 4px;
    width: 2px; background: var(--border);
}
.timeline-item { position: relative; padding-bottom: 20px; }
.timeline-item::before {
    content: ''; position: absolute; left: -20px; top: 4px;
    width: 10px; height: 10px; border-radius: 50%;
    background: var(--accent); border: 2px solid var(--surface);
}
.timeline-item strong { font-size: 13px; display: block; }
.timeline-item span { font-size: 12px; color: var(--text-muted); }

/* === NOTIFICATION ITEM === */
.notification-item {
    display: flex; gap: 12px; padding: 14px 16px;
    border-bottom: 1px solid var(--border-light); transition: background 0.15s;
}
.notification-item:hover { background: var(--bg); cursor: pointer; }
.notification-item.unread { background: var(--info-light); }
.notification-item__icon {
    width: 36px; height: 36px; border-radius: 50%;
    display: grid; place-items: center; flex-shrink: 0;
    font-size: 16px;
}
.notification-item__content { flex: 1; }
.notification-item__content strong { font-size: 13px; font-weight: 600; display: block; }
.notification-item__content p { font-size: 12px; color: var(--text-secondary); margin: 2px 0 0; }
.notification-item__time { font-size: 11px; color: var(--text-muted); white-space: nowrap; }

/* === IDEA CARD === */
.idea-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow-sm);
}
.idea-card__header { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 8px; }
.idea-card__header h4 { font-size: 15px; font-weight: 600; }
.idea-card__body { font-size: 13px; color: var(--text-secondary); margin-bottom: 12px; }
.idea-card__footer { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--text-muted); }
.idea-card__footer .vote-btn { display: flex; align-items: center; gap: 4px; cursor: pointer; color: var(--text-muted); border: none; background: none; font: inherit; }
.idea-card__footer .vote-btn:hover { color: var(--accent); }

/* === MODAL === */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.5); z-index: 100;
    place-items: center; padding: 20px;
}
.modal-overlay.is-active { display: grid; }
.modal {
    background: var(--surface); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); width: min(560px, 100%); max-height: 90vh; overflow-y: auto;
}
.modal-header {
    padding: 20px 24px; border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
}
.modal-header h3 { font-size: 17px; font-weight: 700; }
.modal-body { padding: 24px; }
.modal-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 8px; }

/* === PUBLIC PAGES === */
.public-layout { min-height: 100vh; }
.public-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 32px; background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.public-topbar .brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; }
.public-nav { display: flex; align-items: center; gap: 8px; }
.public-nav a {
    padding: 8px 16px; border-radius: var(--radius);
    font-size: 13px; font-weight: 600; color: var(--text-secondary);
    transition: all 0.15s;
}
.public-nav a:hover { color: var(--text); background: var(--bg); }
.public-nav .btn-primary { color: #fff; }

.public-hero {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    color: #fff; text-align: center; padding: 80px 32px;
}
.public-hero h1 { font-size: 36px; font-weight: 800; margin-bottom: 12px; }
.public-hero p { font-size: 16px; color: rgba(255,255,255,0.7); max-width: 600px; margin: 0 auto 24px; }
.public-hero .hero-stats { display: flex; justify-content: center; gap: 40px; margin-top: 32px; }
.public-hero .hero-stat strong { font-size: 28px; display: block; }
.public-hero .hero-stat span { font-size: 13px; color: rgba(255,255,255,0.6); }

.public-section { max-width: 1100px; margin: 0 auto; padding: 48px 32px; }
.public-section h2 { font-size: 24px; font-weight: 700; margin-bottom: 8px; text-align: center; }
.public-section > p { text-align: center; color: var(--text-secondary); margin-bottom: 32px; }

.public-footer {
    text-align: center; padding: 32px;
    border-top: 1px solid var(--border);
    color: var(--text-muted); font-size: 13px;
}

/* === AUTH PAGES === */
.auth-page {
    min-height: calc(100vh - 130px);
    display: flex; align-items: center; justify-content: center;
    padding: 48px 24px;
    background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 50%, #f1f5f9 100%);
}
.auth-card {
    background: var(--surface); border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg); width: min(460px, 100%); padding: 0;
    border: 1px solid var(--border);
    overflow: hidden;
}
.auth-card__header {
    text-align: center; padding: 36px 40px 24px;
}
.auth-logo {
    display: flex; justify-content: center; margin-bottom: 20px;
}
.auth-card__header h1 {
    font-size: 22px; font-weight: 700; margin-bottom: 8px; color: var(--text);
}
.auth-card__header p {
    font-size: 13px; color: var(--text-secondary); line-height: 1.6; max-width: 340px; margin: 0 auto;
}
.auth-form {
    padding: 0 40px 8px;
}
.input-icon-wrap {
    position: relative;
}
.input-icon-wrap > i {
    position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
    font-size: 15px; color: var(--text-muted); pointer-events: none;
}
.form-control--icon {
    padding-left: 38px;
}
.otp-input {
    font-size: 24px; letter-spacing: 12px; text-align: center;
    padding: 14px 16px; font-weight: 700;
}
.remember-label {
    display: flex; align-items: center; gap: 8px; cursor: pointer;
    font-size: 13px; color: var(--text-secondary);
}
.btn-block {
    width: 100%; justify-content: center; margin-top: 8px; padding: 11px 20px;
}
.auth-card__footer {
    text-align: center; padding: 16px 40px 20px;
    font-size: 13px; color: var(--text-secondary);
}
.auth-card__footer a {
    color: var(--accent); font-weight: 600; margin-left: 4px;
}
.auth-card__footer a:hover {
    text-decoration: underline;
}
.auth-hint {
    display: flex; align-items: center; gap: 10px; justify-content: center;
    margin: 0 40px 28px; padding: 12px 16px;
    background: var(--info-light); border: 1px solid #bfdbfe;
    border-radius: var(--radius); font-size: 12px; color: #1e40af;
}
.auth-hint i { font-size: 16px; flex-shrink: 0; }
.auth-hint div { line-height: 1.6; }
.auth-hint strong { display: block; font-weight: 600; }
.auth-hint span { opacity: 0.85; }

/* legacy compat */
.auth-layout {
    min-height: 100vh; display: grid; place-items: center;
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 50%, var(--primary-light) 100%);
    padding: 24px;
}
.auth-card .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 32px; justify-content: center; }
.auth-card .brand strong { font-size: 18px; font-weight: 700; }
.auth-card h2 { font-size: 22px; font-weight: 700; margin-bottom: 4px; text-align: center; }
.auth-card > p { font-size: 13px; color: var(--text-secondary); margin-bottom: 24px; text-align: center; }
.auth-card .auth-links { display: flex; justify-content: center; gap: 16px; margin-top: 20px; font-size: 13px; }
.auth-card .auth-links a { color: var(--accent); font-weight: 600; }

/* === CAREER CARD === */
.career-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.career-card:hover { box-shadow: var(--shadow-md); border-color: var(--accent); }
.career-card h3 { font-size: 17px; font-weight: 700; margin-bottom: 8px; }
.career-card .career-meta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.career-card .career-meta span { font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 4px; }
.career-card p { font-size: 13px; color: var(--text-secondary); margin-bottom: 16px; line-height: 1.6; }

/* === CHECKLIST === */
.checklist { list-style: none; }
.checklist li {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 0; border-bottom: 1px solid var(--border-light);
    font-size: 13px;
}
.checklist li:last-child { border-bottom: none; }
.checklist li i { font-size: 16px; }
.checklist li.done { color: var(--text-muted); }
.checklist li.done i { color: var(--success); }
.checklist li.pending i { color: var(--text-muted); }

/* === REPORT CARD === */
.report-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 20px;
    display: flex; align-items: center; gap: 16px;
    transition: all 0.2s; cursor: pointer;
}
.report-card:hover { box-shadow: var(--shadow-md); }
.report-card__icon {
    width: 48px; height: 48px; border-radius: var(--radius-lg);
    display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
}
.report-card__info h4 { font-size: 14px; font-weight: 600; }
.report-card__info p { font-size: 12px; color: var(--text-muted); margin-top: 2px; }

/* === UTILITIES === */
.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-accent { color: var(--accent) !important; }
.text-center { text-align: center !important; }
.text-right { text-align: right !important; }
.text-sm { font-size: 12px !important; }
.text-lg { font-size: 16px !important; }
.fw-600 { font-weight: 600 !important; }
.fw-700 { font-weight: 700 !important; }
.d-flex { display: flex !important; }
.d-grid { display: grid !important; }
.align-center { align-items: center !important; }
.justify-between { justify-content: space-between !important; }
.gap-1 { gap: 8px !important; }
.gap-2 { gap: 16px !important; }
.gap-3 { gap: 24px !important; }
.mt-1 { margin-top: 8px !important; }
.mt-2 { margin-top: 16px !important; }
.mt-3 { margin-top: 24px !important; }
.mb-1 { margin-bottom: 8px !important; }
.mb-2 { margin-bottom: 16px !important; }
.mb-3 { margin-bottom: 24px !important; }
.p-0 { padding: 0 !important; }
.w-100 { width: 100% !important; }
.flex-1 { flex: 1 !important; }

/* === TASK LIST === */
.task-list { display: flex; flex-direction: column; gap: 8px; }
.task-item {
    display: flex; align-items: flex-start; gap: 12px;
    padding: 14px 18px; background: var(--surface);
    border: 1px solid var(--border); border-radius: var(--radius-lg);
    transition: all 0.15s;
}
.task-item:hover { box-shadow: var(--shadow); }
.task-item--completed { opacity: 0.6; }
.task-item__check { padding-top: 2px; }
.task-check-btn {
    border: none; background: none; cursor: pointer;
    font-size: 20px; color: var(--text-muted); transition: color 0.15s;
}
.task-check-btn:hover { color: var(--success); }
.task-check-done { font-size: 20px; color: var(--success); }
.task-item__content { flex: 1; min-width: 0; }
.task-item__title { font-size: 14px; font-weight: 600; }
.task-item__title.done { text-decoration: line-through; color: var(--text-muted); }
.task-item__desc { font-size: 12px; color: var(--text-secondary); margin-top: 2px; }
.task-item__meta { display: flex; gap: 12px; align-items: center; margin-top: 6px; font-size: 12px; flex-wrap: wrap; }
.task-item__actions { display: flex; gap: 6px; flex-shrink: 0; }

/* === COLOR PICKER === */
.color-picker-wrap {
    display: flex; align-items: center; gap: 12px;
}
.color-picker-wrap input[type="color"] {
    width: 44px; height: 36px; border: 1px solid var(--border);
    border-radius: var(--radius); cursor: pointer; padding: 2px;
}
.color-picker-wrap input[type="text"] { max-width: 140px; }

/* === LOGO PREVIEW === */
.logo-upload-wrap {
    display: flex; align-items: center; gap: 20px;
}
.logo-preview {
    width: 80px; height: 80px; border-radius: var(--radius-lg);
    border: 2px dashed var(--border); display: grid; place-items: center;
    overflow: hidden; background: var(--bg); flex-shrink: 0;
}
.logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.logo-preview i { font-size: 28px; color: var(--text-muted); }

/* === EMPLOYEE PROFILE === */
.profile-banner {
    display: flex; align-items: center; gap: 20px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; padding: 32px 36px; border-radius: var(--radius);
    margin-bottom: 24px;
}
.profile-banner__avatar {
    width: 80px; height: 80px; border-radius: 50%;
    background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
    font-size: 28px; font-weight: 700; letter-spacing: 1px; flex-shrink: 0;
    border: 3px solid rgba(255,255,255,.3);
}
.profile-banner__info h1 { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.profile-banner__info p { font-size: 14px; opacity: .8; margin: 0; }

.profile-layout { display: grid; grid-template-columns: 260px 1fr; gap: 24px; }

.profile-sidebar {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 20px;
    align-self: start; position: sticky; top: 24px;
}
.profile-sidebar__title {
    font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px;
    color: var(--text-muted); margin-bottom: 14px;
}
.profile-vitals { list-style: none; padding: 0; margin: 0; }
.profile-vitals li {
    display: flex; align-items: flex-start; gap: 10px; padding: 8px 0;
    font-size: 13px; color: var(--text); border-bottom: 1px solid var(--border);
}
.profile-vitals li:last-child { border-bottom: none; }
.profile-vitals li i { color: var(--primary); font-size: 15px; width: 18px; text-align: center; margin-top: 1px; flex-shrink: 0; }

.profile-main { min-width: 0; }

.profile-section {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 24px; margin-bottom: 20px;
}
.profile-section h3 {
    font-size: 15px; font-weight: 700; margin: 0 0 16px;
    display: flex; align-items: center; gap: 8px;
}
.profile-section h3 i { color: var(--primary); }

.profile-grid {
    display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px;
}
.profile-field label {
    display: block; font-size: 11px; font-weight: 600; text-transform: uppercase;
    letter-spacing: .4px; color: var(--text-muted); margin-bottom: 4px;
}
.profile-field span { font-size: 14px; font-weight: 500; }

@media (max-width: 900px) {
    .profile-layout { grid-template-columns: 1fr; }
    .profile-sidebar { position: static; }
}
@media (max-width: 640px) {
    .profile-banner { flex-direction: column; text-align: center; padding: 24px 20px; }
    .profile-grid { grid-template-columns: 1fr; }
}

/* === DASHBOARD WELCOME === */
.dash-welcome {
    display: flex; align-items: center; justify-content: space-between;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; padding: 28px 32px; border-radius: var(--radius);
    margin-bottom: 24px;
}
.dash-welcome__left { display: flex; align-items: center; gap: 16px; }
.dash-welcome__avatar {
    width: 56px; height: 56px; border-radius: 50%;
    background: rgba(255,255,255,.2); display: flex; align-items: center; justify-content: center;
    font-size: 20px; font-weight: 700; letter-spacing: 1px; flex-shrink: 0;
}
.dash-welcome__info h2 { font-size: 22px; font-weight: 700; margin: 0 0 4px; }
.dash-welcome__meta { display: flex; gap: 16px; font-size: 13px; opacity: .85; flex-wrap: wrap; }
.dash-welcome__meta span { display: flex; align-items: center; gap: 5px; }
.dash-welcome__date { font-size: 13px; opacity: .75; display: flex; align-items: center; gap: 6px; white-space: nowrap; }

.dash-main-grid { display: grid; grid-template-columns: 1fr 300px; gap: 24px; }
.dash-main-grid__content { min-width: 0; }

.dash-quick-actions { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.dash-action-card {
    display: flex; align-items: center; gap: 12px; padding: 18px 16px;
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    text-decoration: none; color: inherit; transition: box-shadow .2s, transform .15s;
}
.dash-action-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.08); transform: translateY(-2px); }
.dash-action-card__icon {
    width: 42px; height: 42px; border-radius: 10px; display: flex; align-items: center; justify-content: center;
    font-size: 18px; flex-shrink: 0;
}
.dash-action-card__icon.blue { background: rgba(59,130,246,.12); color: #3b82f6; }
.dash-action-card__icon.green { background: rgba(22,163,74,.12); color: #16a34a; }
.dash-action-card__icon.orange { background: rgba(255,138,31,.12); color: #ff8a1f; }
.dash-action-card__icon.purple { background: rgba(147,51,234,.12); color: #9333ea; }
.dash-action-card__text { flex: 1; min-width: 0; }
.dash-action-card__text strong { display: block; font-size: 13px; font-weight: 600; }
.dash-action-card__text span { font-size: 11px; color: var(--text-muted); }
.dash-action-card > .bi-chevron-right { font-size: 12px; color: var(--text-muted); }

.dash-quick-link {
    display: flex; align-items: center; gap: 10px; padding: 12px 16px;
    text-decoration: none; color: var(--text); font-size: 13px; font-weight: 500;
    border-bottom: 1px solid var(--border); transition: background .15s;
}
.dash-quick-link:last-child { border-bottom: none; }
.dash-quick-link:hover { background: var(--bg-light); }
.dash-quick-link i:first-child { font-size: 16px; color: var(--primary); width: 20px; text-align: center; }
.dash-quick-link .bi-chevron-right { margin-left: auto; font-size: 11px; color: var(--text-muted); }

@media (max-width: 1024px) {
    .dash-main-grid { grid-template-columns: 1fr; }
    .dash-quick-actions { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
    .dash-welcome { flex-direction: column; align-items: flex-start; gap: 12px; padding: 20px; }
    .dash-quick-actions { grid-template-columns: 1fr; }
}

/* === HOMEPAGE HERO === */
.home-hero {
    display: flex; align-items: center; justify-content: center; gap: 48px;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary), var(--primary-light));
    color: #fff; padding: 64px 48px; min-height: 380px;
}
.home-hero__content {
    flex: 1; max-width: 520px;
}
.home-hero__content h1 {
    font-size: 34px; font-weight: 800; line-height: 1.2; margin-bottom: 14px;
}
.home-hero__content h1 .text-accent { color: var(--accent); }
.home-hero__content p {
    font-size: 15px; color: rgba(255,255,255,0.7); line-height: 1.7; max-width: 440px;
}
.home-hero__visual {
    flex: 0 0 320px; max-width: 320px;
}
.home-hero__visual svg {
    width: 100%; height: auto;
}

/* === HOMEPAGE COMPONENTS === */
.hero-inner { max-width: 720px; margin: 0 auto; }
.hero-btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.btn-hero-outline {
    background: rgba(255,255,255,0.12); color: #fff;
    border: 1px solid rgba(255,255,255,0.3);
}
.btn-hero-outline:hover {
    background: rgba(255,255,255,0.22);
}
.hero-stats-bar {
    display: flex; justify-content: center; gap: 16px; margin-top: 36px; flex-wrap: wrap;
}
.hero-stat-pill {
    background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-lg); padding: 14px 24px; text-align: center;
    min-width: 130px; backdrop-filter: blur(4px);
}
.hero-stat-pill strong { font-size: 26px; font-weight: 800; display: block; color: #fff; }
.hero-stat-pill span { font-size: 12px; color: rgba(255,255,255,0.6); font-weight: 500; }

.section-heading {
    display: flex; align-items: center; gap: 14px; margin-bottom: 28px;
}
.section-icon {
    width: 44px; height: 44px; border-radius: var(--radius-lg);
    display: grid; place-items: center; font-size: 20px; flex-shrink: 0;
}
.section-icon.blue { background: var(--info-light); color: var(--info); }
.section-icon.green { background: var(--success-light); color: var(--success); }
.section-icon.orange { background: var(--accent-light); color: var(--accent); }

.news-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
}
.news-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 24px;
    box-shadow: var(--shadow-sm); transition: all 0.2s;
    display: flex; flex-direction: column;
}
.news-card:hover { box-shadow: var(--shadow-md); border-color: var(--info); }
.news-card--featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    color: #fff; border-color: transparent;
}
.news-card--featured:hover { border-color: transparent; }
.news-card--featured .news-card__meta span { color: rgba(255,255,255,0.55); }
.news-card--featured p { color: rgba(255,255,255,0.75); }
.news-card__badge { margin-bottom: 10px; }
.news-card h3 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.news-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.7; flex: 1; margin-bottom: 14px; }
.news-card__meta {
    display: flex; gap: 16px; font-size: 12px; color: var(--text-muted);
}
.news-card__meta span { display: flex; align-items: center; gap: 4px; }

.feature-card {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius-lg); padding: 28px 24px; text-align: center;
    box-shadow: var(--shadow-sm); transition: all 0.2s;
}
.feature-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.feature-card__icon {
    width: 56px; height: 56px; border-radius: var(--radius-lg);
    display: grid; place-items: center; font-size: 24px;
    margin: 0 auto 16px;
}
.feature-card__icon.blue { background: var(--info-light); color: var(--info); }
.feature-card__icon.green { background: var(--success-light); color: var(--success); }
.feature-card__icon.orange { background: var(--accent-light); color: var(--accent); }
.feature-card h4 { font-size: 16px; font-weight: 700; margin-bottom: 8px; }
.feature-card p { font-size: 13px; color: var(--text-secondary); line-height: 1.6; }

/* === RESPONSIVE === */

/* Responsive utility classes — desktop defaults */
.d-only-mobile { display: none !important; }

/* --- Tablet landscape / small desktop --- */
@media (max-width: 1200px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-4 { grid-template-columns: repeat(2, 1fr) !important; }
    .grid-3 { grid-template-columns: repeat(2, 1fr) !important; }
    .settings-layout { grid-template-columns: 1fr !important; }
    .settings-nav { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; }
    .settings-nav li a { padding: 8px 12px; font-size: 12px; }
}

/* --- Tablet portrait --- */
@media (max-width: 768px) {
    /* Responsive utility classes */
    .d-none-mobile { display: none !important; }
    .d-only-mobile { display: flex !important; }

    /* Sidebar */
    .sidebar { transform: translateX(-100%); }
    .sidebar.is-open { transform: translateX(0); }
    .main-wrap { margin-left: 0; }
    .mobile-toggle { display: flex; }

    /* Topbar */
    .topbar { padding: 0 12px; gap: 8px; }
    .topbar__left h1 { font-size: 15px; }
    .topbar__right { gap: 6px; }
    .topbar-user-info { display: none; }
    .topbar-user { padding: 6px; }

    /* Content */
    .content { padding: 14px; }

    /* Grids — !important to override inline styles */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px !important; }
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr !important; }
    .form-row, .form-row-3 { grid-template-columns: 1fr !important; }

    /* Page header — stack on mobile, compact heading */
    .page-header { flex-direction: column; align-items: flex-start; gap: 8px; }
    .page-header > div:first-child h2 { font-size: 16px; margin: 0; }
    .page-header > div:first-child p { font-size: 12px; margin: 2px 0 0; color: var(--text-muted); }
    .page-actions { width: 100%; }
    .page-actions .btn { flex: 1; justify-content: center; min-width: 0; font-size: 12px; padding: 8px 10px; }

    /* Topbar — hide heading & breadcrumb on mobile */
    .topbar__left h1, .topbar__left .breadcrumb { display: none; }

    /* Stat cards */
    .stat-card { padding: 14px; }
    .stat-card__value { font-size: 22px; }
    .stat-card__label { font-size: 12px; }
    .stat-card__icon { width: 34px; height: 34px; font-size: 15px; margin-bottom: 8px; }

    /* Cards */
    .card-header { padding: 12px 14px; flex-wrap: wrap; gap: 8px; }
    .card-body { padding: 14px; }

    /* Tables — ensure horizontal scroll */
    .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .data-table { min-width: 600px; }
    .data-table th, .data-table td { padding: 10px 10px; font-size: 12px; white-space: nowrap; }

    /* Modals */
    .modal { width: 95% !important; max-width: 95vw !important; margin: 10px; border-radius: var(--radius-lg); }
    .modal-header { padding: 14px 16px; }
    .modal-header h3 { font-size: 15px; }
    .modal-body { padding: 16px; }
    .modal-footer { padding: 12px 16px; flex-wrap: wrap; }

    /* Settings */
    .setting-row { flex-direction: column; gap: 8px; }
    .setting-row__info, .setting-row__control { max-width: 100% !important; width: 100% !important; }

    /* Tabs */
    .tab-list { gap: 0; }
    .tab-btn { padding: 8px 12px; font-size: 12px; }

    /* Welcome banner */
    .welcome-banner { padding: 20px; }
    .welcome-banner h2 { font-size: 18px; }

    /* Dashboard */
    .dash-welcome { flex-direction: column; align-items: flex-start; gap: 10px; padding: 16px; }
    .dash-welcome__info h2 { font-size: 18px; }
    .dash-welcome__meta { font-size: 12px; gap: 10px; }
    .dash-welcome__date { font-size: 12px; }
    .dash-main-grid { grid-template-columns: 1fr !important; }
    .dash-quick-actions { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
    .dash-action-card { padding: 12px 10px; gap: 8px; }
    .dash-action-card__icon { width: 36px; height: 36px; font-size: 15px; }
    .dash-action-card__text strong { font-size: 12px; }
    .dash-action-card > .bi-chevron-right { display: none; }

    /* Kanban */
    .kanban-board { flex-direction: column; }
    .kanban-column { min-width: auto; }

    /* Payslip */
    .payslip-print { padding: 16px; }
    .payslip-header { flex-direction: column; gap: 12px; }

    /* Profile */
    .profile-banner { flex-direction: column; text-align: center; padding: 20px; gap: 12px; }
    .profile-banner__info h1 { font-size: 20px; }

    /* Public pages */
    .public-topbar { padding: 12px 16px; flex-wrap: wrap; gap: 8px; }
    .public-nav { flex-wrap: wrap; }
    .public-hero { padding: 40px 16px; }
    .public-hero h1 { font-size: 22px; }
    .public-hero p { font-size: 14px; }
    .home-hero { flex-direction: column; padding: 32px 16px; gap: 24px; text-align: center; }
    .home-hero__content h1 { font-size: 24px; }
    .home-hero__content p { margin: 0 auto; }
    .home-hero__visual { flex: 0 0 auto; max-width: 200px; }
    .hero-stats-bar { flex-direction: column; align-items: center; }
    .hero-stat-pill { min-width: 180px; }
    .public-section { padding: 28px 16px; }
    .news-grid { grid-template-columns: 1fr !important; }
    .news-card--featured { grid-column: auto; }

    /* Auth */
    .auth-page { padding: 24px 12px; }
    .auth-card__header { padding: 24px 20px 16px; }
    .auth-card__header h1 { font-size: 18px; }
    .auth-form { padding: 0 20px 8px; }
    .auth-card__footer { padding: 14px 20px 18px; }
    .auth-hint { margin: 0 20px 20px; }

    /* Calendar mobile fix */
    .cal-month-grid { grid-template-columns: repeat(7, 1fr) !important; font-size: 11px; }
    .cal-month-grid .cal-day { min-height: 48px !important; padding: 2px !important; }
    .cal-month-grid .cal-day-num { font-size: 11px; }
    .cal-month-grid .cal-event { font-size: 9px; padding: 1px 3px; }

    /* Tickets inline layout fix */
    .ticket-cards { grid-template-columns: 1fr !important; }
}

/* --- Phone --- */
@media (max-width: 480px) {
    /* Stats stay 2-per-row — content is compact enough */
    .stats-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 8px !important; }
    .stat-card { padding: 12px; }
    .stat-card__value { font-size: 20px; }
    .stat-card__label { font-size: 11px; }
    .stat-card__icon { width: 30px; height: 30px; font-size: 14px; margin-bottom: 6px; }

    /* Quick actions stay 2-per-row */
    .dash-quick-actions { grid-template-columns: repeat(2, 1fr) !important; gap: 8px; }
    .dash-action-card { padding: 10px 8px; gap: 6px; flex-direction: column; align-items: flex-start; }
    .dash-action-card__icon { width: 32px; height: 32px; font-size: 14px; }
    .dash-action-card__text strong { font-size: 12px; }
    .dash-action-card__text span { font-size: 10px; }

    /* Dashboard welcome */
    .dash-welcome { padding: 14px; gap: 8px; }
    .dash-welcome__avatar { width: 44px; height: 44px; font-size: 16px; }
    .dash-welcome__info h2 { font-size: 16px; }
    .dash-welcome__meta { font-size: 11px; }

    /* Page actions */
    .page-actions { flex-direction: column; }
    .page-actions .btn { width: 100%; }

    /* Topbar */
    .topbar__left h1 { font-size: 14px; }
    .topbar__right .btn-sm { font-size: 11px; padding: 4px 8px; }

    /* Tabs */
    .tab-btn { padding: 6px 8px; font-size: 11px; }

    /* Modals — bottom sheet */
    .modal { width: 100% !important; max-width: 100vw !important; margin: 0; border-radius: var(--radius-lg) var(--radius-lg) 0 0; max-height: 95vh; }
    .modal-overlay { align-items: flex-end !important; padding: 0 !important; }

    /* Cards */
    .card-header { flex-direction: column; align-items: flex-start; }
    .card-body { padding: 10px; }

    /* Welcome banner */
    .welcome-banner h2 { font-size: 16px; }
    .welcome-banner p { font-size: 12px; }

    /* Content padding */
    .content { padding: 10px; }

    /* Profile */
    .profile-grid { grid-template-columns: 1fr !important; }

    /* Hero */
    .hero-btns { flex-direction: column; align-items: center; }
    .hero-btns .btn { width: 100%; max-width: 280px; justify-content: center; }

    /* List items tighter */
    .list-item { padding: 10px 0; gap: 8px; }
    .list-item__content strong { font-size: 12px; }
    .list-item__content span { font-size: 11px; }

    /* Charts */
    .chart-container { height: 200px !important; }
    .chart-container canvas { height: 200px !important; }
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,0.4); z-index: 40;
}
.sidebar-overlay.is-active { display: block; }

/* Print styles for payslip */
@media print {
    .sidebar, .topbar, .page-header, .page-actions { display: none !important; }
    .main-wrap { margin-left: 0 !important; }
    .content { padding: 0 !important; }
    .payslip-print { border: none; box-shadow: none; }

    /* Preserve payslip 2-column grid in print */
    .payslip-print .grid-2 { grid-template-columns: repeat(2, 1fr) !important; }

    /* Preserve payslip header row layout in print */
    .payslip-print .payslip-header { flex-direction: row !important; justify-content: space-between !important; align-items: flex-start !important; }

    /* Ensure backgrounds & colors print correctly */
    .payslip-print, .payslip-print * {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
        color-adjust: exact !important;
    }
}
