/* ── SPLASH SCREEN ─────────────────────── */
.splash-screen {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.4s ease;
}
.splash-screen.splash-fade-out {
    opacity: 0;
    pointer-events: none;
}
.splash-logo {
    width: 180px;
    height: auto;
    opacity: 0;
    animation: splashLogoIn 1200ms ease forwards;
}
@keyframes splashLogoIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

/* ── INSTALL MODAL ─────────────────────── */
.install-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9000;
    padding: 24px;
    animation: fadeInOverlay 0.3s ease;
}
@keyframes fadeInOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}
.install-modal {
    background: #ffffff;
    border-radius: 20px;
    padding: 32px 24px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    animation: slideUpModal 0.35s ease;
}
@keyframes slideUpModal {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.install-modal-logo {
    width: 100px;
    height: auto;
    margin-bottom: 20px;
}
.install-modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a1a;
    margin-bottom: 8px;
}
.install-modal-desc {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.55;
    margin-bottom: 24px;
}
.install-modal-actions {
    display: flex;
    gap: 10px;
}
.install-ios-steps {
    text-align: left;
    font-size: 13px;
    color: #374151;
    line-height: 1.7;
    padding-left: 20px;
    margin: 0 0 8px;
}
.install-ios-steps li {
    margin-bottom: 6px;
}
.install-ios-share-icon {
    display: inline-block;
    background: #007aff;
    color: #fff;
    border-radius: 5px;
    padding: 1px 5px;
    font-size: 12px;
    vertical-align: middle;
}

:root {
            --primary: #4fba70;
            --primary-dark: #3d8f58;
            --primary-light: #e8f5e9;
            --secondary: #1a1a1a;
            --white: #ffffff;
            --bg: #f8faf9;
            --surface: #ffffff;
            --border: #e0e4e1;
            --text: #1a1a1a;
            --text-secondary: #6b7280;
            --text-muted: #9ca3af;
            --danger: #ef4444;
            --danger-light: #fef2f2;
            --warning: #f59e0b;
            --warning-light: #fffbeb;
            --info: #3b82f6;
            --info-light: #eff6ff;
            --shadow-sm: none;
            --shadow: none;
            --shadow-lg: none;
            --radius-xs: 6px;
            --radius-sm: 8px;
            --radius: 10px;
            --radius-lg: 16px;
            --radius-full: 9999px;
            --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', 'Roboto', sans-serif;
            --transition: 0.2s ease;
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            -webkit-tap-highlight-color: transparent;
            -webkit-user-select: none;
            user-select: none;
        }
        input, textarea, select {
            -webkit-user-select: text;
            user-select: text;
            font-size: 16px !important; /* prevents iOS auto-zoom on focus */
        }

        html, body {
            width: 100%;
            min-height: 100%;
            color: var(--text);
            font-family: var(--font);
            -webkit-font-smoothing: antialiased;
            line-height: 1.5;
            background-color: #ffffff;
        }

        #app {
            display: flex;
            flex-direction: column;
            min-height: 100vh;
            width: 100%;
            margin: 0 auto;
            background-color: #ffffff;
            padding-top: env(safe-area-inset-top);
        }
        @media(min-width:481px) {
            #app {
                border-radius: var(--radius-lg);
                margin-top: 24px;
                background-color: #ffffff;
            }
        }

        .page {
            display: none;
            flex-direction: column;
        }
        .page.active {
            display: flex;
        }

        /* ── LOGIN ─────────────────────────── */
        .login-page {
            min-height: 100vh;
            background: #ffffff;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 24px;
        }
        .login-container {
            width: 100%;
            max-width: 380px;
        }
        .login-brand {
            text-align: center;
            margin-bottom: 60px;
            margin-top: -60px;
            display: block;
            justify-content: center;
        }
        .login-brand h1 {
            font-size: 28px;
            font-weight: 700;
            letter-spacing: -0.3px;
            color: var(--secondary);
        }
        .login-brand span {
            font-size: 12px;
            color: var(--text-muted);
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 1px;
        }
        .login-card {
            background: transparent;
            padding: 0;
            border: none;
        }
        .login-form-group {
            margin-bottom: 18px;
        }
        .login-label {
            display: block;
            font-size: 11px;
            font-weight: 600;
            color: var(--text-secondary);
            margin-bottom: 6px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }
        .login-input {
            width: 100%;
            padding: 12px 14px;
            border: 1.5px solid var(--border);
            border-radius: var(--radius-sm);
            background: var(--white);
            color: var(--text);
            font-size: 14px;
            font-family: var(--font);
            transition: var(--transition);
            outline: none;
        }
        .login-input:focus {
            border-color: var(--primary);
            box-shadow: 0 0 0 3px rgba(79,186,112,0.08);
        }
        .login-remember {
            display: flex;
            align-items: center;
            gap: 8px;
            margin-bottom: 20px;
            font-size: 12px;
            color: var(--text-secondary);
            cursor: pointer;
        }
        .login-remember input {
            width: 18px;
            height: 18px;
            accent-color: var(--primary);
        }
        .login-btn {
            width: 100%;
            padding: 10px 14px;
            background: transparent;
            border: 1.5px solid var(--secondary);
            color: var(--secondary);
            border-radius: var(--radius-sm);
            font-weight: 600;
            font-size: 13px;
            cursor: pointer;
            font-family: var(--font);
            transition: var(--transition);
            letter-spacing: 0.2px;
            text-align: center;
        }
        .login-btn:active {
            opacity: 0.7;
            transform: scale(0.98);
        }
        .login-error {
            background: var(--danger-light);
            color: #b91c1c;
            padding: 10px 14px;
            border-radius: var(--radius-xs);
            font-size: 12px;
            margin-bottom: 16px;
            display: none;
            font-weight: 500;
            border: 1px solid #fecaca;
        }
        .login-error.show {
            display: block;
        }
        .login-demo {
            margin-top: 24px;
            text-align: center;
            font-size: 11px;
            color: var(--text-muted);
            line-height: 1.7;
            border: 1px dashed var(--border);
            padding: 12px 16px;
            border-radius: var(--radius-sm);
        }
        .login-demo strong {
            color: var(--text-secondary);
        }

        /* ── MAIN SHELL ───────────────────── */
        .app-shell {
            display: flex;
            flex-direction: column;
        }
        .app-topbar {
            position: sticky;
            top: env(safe-area-inset-top);
            z-index: 50;
            background: var(--white);
            padding: 14px 16px;
            box-sizing: border-box;
            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--border);
        }
        .topbar-brand {
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .topbar-logo {
            width: 34px;
            height: 34px;
            background: var(--primary);
            border-radius: var(--radius-xs);
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-weight: 700;
            font-size: 13px;
        }
        .topbar-title {
            font-size: 15px;
            font-weight: 600;
            color: var(--secondary);
        }
        .topbar-avatar {
            width: 38px;
            height: 38px;
            border-radius: 50%;
            background: var(--primary-light);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            font-weight: 700;
            font-size: 13px;
            color: var(--primary-dark);
            border: 2px solid var(--primary);
        }
        .page-content {
            padding-bottom: calc(100px + env(safe-area-inset-bottom));
        }

        /* ── HOME ─────────────────────────── */
        .home-welcome-banner {
            background: var(--secondary);
            color: #fff;
            padding: 22px 18px;
            margin: 12px 14px 0;
            border-radius: var(--radius);
            position: relative;
            overflow: hidden;
        }
        .home-welcome-banner .wave {
            position: absolute;
            bottom: 0;
            left: 0;
            right: 0;
            height: 24px;
            background: var(--secondary);
            border-radius: 0 0 var(--radius) var(--radius);
            opacity: 0.6;
        }
        .home-banner-content {
            position: relative;
            z-index: 1;
        }
        .home-banner-greeting {
            font-size: 20px;
            font-weight: 700;
            margin-bottom: 2px;
            color: var(--primary)
        }
        .home-banner-sub {
            font-size: 11px;
            opacity: 0.8;
            font-weight: 500;
            text-transform: uppercase;
            color: var(--white)
        }
        .home-stats-row {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 10px;
            padding: 14px;
        }
        .home-stat-card {
            background: transparent;
            border-radius: var(--radius);
            padding: 14px 10px;
            text-align: center;
            border: 1px solid var(--border);
            cursor: pointer;
        }
        .home-stat-card:active {
            transform: scale(0.96);
        }
        .home-stat-icon {
            width: 36px;
            height: 36px;
            border-radius: 50%;
            margin: 0 auto 8px;
            display: flex;
            align-items: center;
            justify-content: center;
        }
        .home-stat-icon svg {
            width: 20px;
            height: 20px;
        }
        .home-stat-icon.green { background: var(--primary-light); color: var(--primary); }
        .home-stat-icon.amber { background: var(--warning-light); color: var(--warning); }
        .home-stat-icon.blue { background: var(--info-light); color: var(--info); }
        .home-stat-value { font-size: 22px; font-weight: 700; }
        .home-stat-label { font-size: 10px; color: var(--text-muted); font-weight: 600; text-transform: uppercase; margin-top: 2px; }
        .home-section-title {
            font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase;
            letter-spacing: 1px; padding: 0 18px; margin-bottom: 8px;
        }
        .home-menu-grid {
            display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 0 14px 8px;
        }
        .home-menu-card {
            background: transparent; border-radius: var(--radius); padding: 16px 14px;
            border: 1px solid var(--primary); cursor: pointer; display: flex; align-items: flex-start;
            gap: 10px;
        }
        .home-menu-card:active { border-color: var(--primary); }
        .home-menu-card--featured {
            align-items: center;
            justify-content: space-between;
        }
        .leave-apps-badge {
            background: var(--primary);
            color: #fff;
            font-size: 10px;
            font-weight: 700;
            padding: 4px 10px;
            border-radius: var(--radius-full);
            white-space: nowrap;
            flex-shrink: 0;
        }
        .home-menu-card .menu-icon-circle {
            width: 40px; height: 40px; border-radius: var(--radius-xs); flex-shrink: 0;
            display: flex; align-items: center; justify-content: center;
        }
        .home-menu-card .menu-icon-circle svg {
            width: 22px; height: 22px;
        }
        .menu-icon-circle { background: var(--primary-light); color: var(--primary); }
        .menu-icon-circle.alt { background: #f0f9ff; color: #3b82f6; }
        .home-menu-card .menu-info h4 { font-size: 13px; font-weight: 600; margin-bottom: 2px; }
        .home-menu-card .menu-info span { font-size: 10px; color: var(--text-muted); }

        /* ── FORM PAGES (transparent panels) ── */
        .page-inner { padding: 16px; }
        .page-heading { margin-bottom: 18px; }
        .page-heading h2 { font-size: 18px; font-weight: 700; color: var(--secondary); }
        .page-heading p { font-size: 12px; color: var(--text-muted); font-weight: 500; }
        .form-panel {
            background: transparent; border-radius: 0; padding: 0;
            border: none; margin-bottom: 14px;
        }
        .form-field { margin-bottom: 16px; }
        .form-field:last-child { margin-bottom: 0; }
        .form-label-text {
            display: block; font-size: 11px; font-weight: 700; color: var(--text-secondary);
            margin-bottom: 6px; text-transform: uppercase; letter-spacing: 0.5px;
        }
        .form-input, textarea, select {
            width: 100%; padding: 10px 12px; border: 1.5px solid var(--border);
            border-radius: var(--radius-sm); background: var(--white); color: var(--text);
            font-size: 13px; font-family: var(--font); transition: var(--transition); outline: none;
            resize: vertical;
        }
        .form-input:focus, textarea:focus, select:focus {
            border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79,186,112,0.06);
        }
        textarea { min-height: 90px; }
        .form-row-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
        /* ── CUSTOM DATE BADGE PICKER ─── */
        .date-badge-wrap {
            position: relative;
            overflow: hidden;
            border-radius: var(--radius-sm);
        }
        .date-badge-input {
            position: absolute; inset: 0; width: 100%; height: 100%;
            -webkit-appearance: none; appearance: none;
            opacity: 0.01;
            color: transparent; -webkit-text-fill-color: transparent;
            background: transparent; border: none;
            z-index: 2; cursor: pointer;
            touch-action: manipulation; pointer-events: auto;
            font-size: 16px;
        }
        .form-checkbox-row {
            display: flex; align-items: center; gap: 10px; font-size: 13px;
            color: var(--text-secondary); font-weight: 500; cursor: pointer; padding: 4px 0;
        }
        .form-checkbox-row input { width: 18px; height: 18px; accent-color: var(--primary); }
        .summary-badge {
            background: var(--primary-light); border: 1px solid #c8e6c9;
            border-radius: var(--radius); padding: 12px 16px; margin-bottom: 14px; display: none;
        }
        .summary-badge .sb-row { display: flex; justify-content: space-between; font-size: 12px; margin-bottom: 4px; }
        .summary-badge .sb-row strong { color: var(--primary-dark); }

        /* ── BUTTONS (transparent, no icons) ── */
        .btn {
            display: inline-flex; align-items: center; justify-content: center;
            padding: 10px 16px; border-radius: var(--radius-sm);
            font-weight: 600; font-size: 12px; cursor: pointer;
            font-family: var(--font); transition: var(--transition);
            border: 1.5px solid transparent; background: transparent;
            letter-spacing: 0.2px;
        }
        .btn:active { transform: scale(0.97); }
        .btn-primary { color: var(--primary); border-color: var(--primary); }
        .btn-outline { color: var(--text-secondary); border-color: var(--border); }
        .btn-danger { color: var(--danger); border-color: var(--danger); }
        .btn-sm {font-size: 11px; }
        .btn-block { width: 100%; }

        /* ── REQUESTS ─────────────────────── */
        .tabs-row {
            display: flex; gap: 6px; margin-bottom: 16px;
            overflow-x: auto; white-space: nowrap;
            -webkit-overflow-scrolling: touch;
            scrollbar-width: none;
            padding-bottom: 2px;
        }
        .tabs-row::-webkit-scrollbar { display: none; }
        .tab-pill {
            padding: 6px 14px; border-radius: var(--radius-full); font-size: 11px;
            font-weight: 600; cursor: pointer; border: 1.5px solid var(--border);
            background: transparent; color: var(--text-secondary); transition: var(--transition);
            font-family: var(--font);
        }
        .tab-pill.active { background: var(--secondary); color: #fff; border-color: var(--secondary); }
        .request-card {
            background: transparent; border-radius: var(--radius); padding: 14px 16px;
            margin-bottom: 10px; border: 1px solid var(--border); cursor: pointer;
            position: relative; overflow: hidden;
        }
        .request-card::before {
            content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px;
            border-radius: 0 3px 3px 0;
        }
        .request-card.pending::before { background: var(--warning); }
        .request-card.approved::before { background: var(--primary); }
        .request-card.rejected::before { background: var(--danger); }
        .req-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
        .req-type { font-size: 13px; font-weight: 600; }
        .req-dates { font-size: 11px; color: var(--text-muted); }
        .req-badge {
            font-size: 10px; font-weight: 700; padding: 4px 10px; border-radius: var(--radius-full);
            letter-spacing: 0.5px; text-transform: uppercase; flex-shrink: 0;
        }
        .req-badge.pending { background: var(--warning-light); color: #92400e; }
        .req-badge.approved { background: var(--primary-light); color: #166534; }
        .req-badge.rejected { background: var(--danger-light); color: #991b1b; }
        .req-details { display: none; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 11px; }
        .req-details.show { display: block; }

        /* ── BALANCE ──────────────────────── */
        .balance-hero { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 16px; }
        .balance-donut-card {
            background: transparent; border-radius: var(--radius); padding: 16px;
            text-align: center; border: 1px solid var(--border);
        }
        .donut-ring {
            width: 70px; height: 70px; border-radius: 50%; margin: 0 auto 10px;
            position: relative; display: flex; align-items: center; justify-content: center;
        }
        .donut-ring::before {
            content: ''; position: absolute; inset: 6px; border-radius: 50%; background: var(--bg); z-index: 1;
        }
        .donut-value { position: relative; z-index: 2; font-size: 18px; font-weight: 700; }
        .bal-label { font-size: 10px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; }
        .bal-sub { font-size: 10px; color: var(--text-muted); }
        .policy-chip {
            display: inline-flex; align-items: center; gap: 6px; padding: 8px 14px;
            background: transparent; border: 1px solid var(--border); border-radius: var(--radius-full);
            font-size: 12px; font-weight: 500; cursor: pointer; margin: 4px;
        }
        .policy-chip:active { border-color: var(--primary); background: var(--primary-light); }

        /* ── PROFILE ──────────────────────── */
        .profile-banner {
            background: var(--secondary); color: #fff; padding: 24px 18px;
            text-align: center; border-radius: 0 0 var(--radius-lg) var(--radius-lg);
            position: relative;
        }
        .profile-avatar-lg {
            width: 64px; height: 64px; border-radius: 50%;
            background: rgba(255,255,255,0.2); margin: 0 auto 10px;
            display: flex; align-items: center; justify-content: center;
            font-size: 26px; font-weight: 700; border: 3px solid rgba(255,255,255,0.3);
        }
        .profile-name-lg { font-size: 17px; font-weight: 700; }
        .profile-role-lg { font-size: 11px; opacity: 0.8; text-transform: uppercase; }
        .profile-meta-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; }
        .profile-meta-item {
            background: transparent; border-radius: var(--radius); padding: 14px;
            text-align: center; border: 1px solid var(--border);
        }
        .profile-meta-item .meta-val { font-size: 16px; font-weight: 700; color: var(--primary-dark); }
        .profile-meta-item .meta-lbl { font-size: 10px; color: var(--text-muted); text-transform: uppercase; }

        /* ── EMPTY STATE ─────────────────── */
        .empty-state { text-align: center; padding: 40px 20px; }
        .empty-state svg { width: 48px; height: 48px; color: var(--border); margin-bottom: 10px; }
        .empty-state p { font-size: 13px; color: var(--text-muted); }

        /* ── BOTTOM NAV ──────────────────── */
        .bottom-nav {
            position: fixed;
            bottom: calc(16px + env(safe-area-inset-bottom));
            left: 50%;
            transform: translateX(-50%);
            background: var(--secondary);
            border-radius: var(--radius-full);
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 7px 7px;
            gap: 4px;
            z-index: 30;
            width: 94%;
        }
        .nav-item {
            display: flex; flex-direction: column; align-items: center; justify-content: center;
            gap: 2px; padding: 7px 14px; background: none; border: none;
            cursor: pointer; color: rgba(255,255,255,0.5); font-size: 9px;
            font-weight: 600; font-family: var(--font); transition: var(--transition);
            border-radius: var(--radius-full); white-space: nowrap; flex: 1;
        }
        .nav-item.active { color: var(--secondary); background: var(--primary); font-weight: 700; }
        .nav-icon { display: flex; align-items: center; justify-content: center; width: 22px; height: 22px; }
        .nav-icon svg { width: 100%; height: 100%; stroke: currentColor; }

        @media(max-width:380px) {
            .home-stats-row { gap: 6px; padding: 10px; }
            .home-menu-grid { gap: 6px; }
            .form-row-2 { grid-template-columns: 1fr; }
        }

        /* ── HOME APPROVALS LIST ──────────────────── */
        .home-approvals-list { padding: 0 14px; margin-bottom: 4px; }
        .home-approvals-empty { font-size: 12px; color: var(--text-muted); padding: 8px 4px; }
        .home-approval-card {
            display: flex; align-items: center; justify-content: space-between;
            gap: 10px; padding: 12px 14px;
            border: 1px solid var(--primary); border-radius: var(--radius);
            margin-bottom: 8px; cursor: pointer; background: transparent;
            transition: background var(--transition);
        }
        .home-approval-card:active { background: var(--primary-light); }
        .hac-left { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
        .hac-avatar {
            width: 36px; height: 36px; border-radius: 50%;
            background: var(--warning-light); color: #92400e;
            display: flex; align-items: center; justify-content: center;
            font-size: 12px; font-weight: 700; flex-shrink: 0;
        }
        .hac-info { flex: 1; min-width: 0; }
        .hac-name  { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .hac-type  { font-size: 11px; color: var(--text-secondary); margin-top: 1px; }
        .hac-dates { font-size: 10px; color: var(--text-muted); }

        /* ── APPROVAL DETAIL MODAL ────────────────── */
        .approval-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.5);
            z-index: 1000; display: flex; align-items: flex-end; justify-content: center;
        }
        .approval-modal {
            background: var(--white); width: 100%; max-width: 480px;
            border-radius: var(--radius-lg) var(--radius-lg) 0 0;
            max-height: 88vh;
            padding-top: 12px;
            display: flex; flex-direction: column;
        }
        .approval-modal-head {
            display: flex; align-items: center; justify-content: space-between;
            padding: 8px 16px 14px; border-bottom: 1px solid var(--border);
            flex-shrink: 0;
        }
        .approval-emp-info { display: flex; align-items: center; gap: 10px; }
        .approval-emp-avatar {
            width: 40px; height: 40px; border-radius: 50%;
            background: var(--primary-light); color: var(--primary-dark);
            display: flex; align-items: center; justify-content: center;
            font-size: 14px; font-weight: 700; flex-shrink: 0;
        }
        .approval-emp-name { font-size: 15px; font-weight: 700; color: var(--secondary); }
        .approval-emp-meta { font-size: 11px; color: var(--text-muted); }
        .approval-modal-body { padding: 16px; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
        .ad-dates-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
        .ad-date-badge {
            background: var(--secondary); color: var(--primary);
            padding: 10px 12px; border-radius: var(--radius-sm);
            font-size: 13px; font-weight: 600; text-align: center;
        }
        .approval-modal-actions {
            display: flex; gap: 10px;
            padding: 12px 16px 35px; flex-shrink: 0;
            border-top: 1px solid var(--border);
        }

        /* ── CANCEL BUTTON & CANCELLED STATUS ─────── */
        .request-card.cancelled::before { background: var(--text-muted); }
        .req-badge.cancelled { background: #f3f4f6; color: #6b7280; }
        .btn-cancel {
            display: inline-block; margin-top: 10px;
            padding: 7px 14px; font-size: 11px; font-weight: 600;
            color: var(--danger); border: 1.5px solid var(--danger);
            background: transparent; border-radius: var(--radius-sm);
            cursor: pointer; font-family: var(--font); transition: var(--transition);
        }
        .btn-cancel:active { opacity: 0.7; transform: scale(0.97); }

        /* ── CALENDAR ──────────────────────────────── */
        .cal-nav {
            display: flex; align-items: center; justify-content: space-between;
            margin-bottom: 14px;
        }
        .cal-nav-btn {
            width: 34px; height: 34px; border: 1.5px solid var(--border);
            border-radius: var(--radius-full); background: transparent;
            font-size: 20px; line-height: 1; color: var(--text-secondary);
            cursor: pointer; display: flex; align-items: center;
            justify-content: center; font-family: var(--font);
            transition: var(--transition);
        }
        .cal-nav-btn:active { background: var(--primary-light); border-color: var(--primary); }
        .cal-month-label { font-size: 15px; font-weight: 700; color: var(--secondary); }
        .cal-grid-wrap {
            border: 1px solid var(--border); border-radius: var(--radius);
            overflow: hidden; margin-bottom: 14px;
        }
        .cal-days-header {
            display: grid; grid-template-columns: repeat(7, 1fr);
            background: var(--secondary);
        }
        .cal-days-header span {
            text-align: center; font-size: 9px; font-weight: 700;
            color: rgba(255,255,255,0.65); padding: 8px 0;
            text-transform: uppercase; letter-spacing: 0.4px;
        }
        .cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
        .cal-cell {
            min-height: 52px; padding: 5px 4px;
            border-right: 1px solid var(--border);
            border-bottom: 1px solid var(--border);
            cursor: pointer; transition: background var(--transition);
        }
        .cal-cell:nth-child(7n) { border-right: none; }
        .cal-cell.empty { background: var(--bg); cursor: default; }
        .cal-cell.today { background: var(--primary-light); }
        .cal-cell.today .cal-day-num { color: var(--primary-dark); font-weight: 700; }
        .cal-cell.has-leave:not(.empty):hover { background: #f0faf4; }
        .cal-day-num { font-size: 12px; font-weight: 500; color: var(--text); display: block; margin-bottom: 3px; }
        .cal-dots { display: flex; flex-wrap: wrap; gap: 2px; }
        .cal-dot {
            width: 7px; height: 7px; border-radius: 50%;
            background: var(--primary); flex-shrink: 0;
        }
        .cal-dot.sick         { background: var(--danger); }
        .cal-dot.maternity    { background: #ec4899; }
        .cal-dot.paternity    { background: var(--info); }
        .cal-dot.compassionate{ background: var(--warning); }
        .cal-dot.annual       { background: var(--primary); }
        .cal-more { font-size: 8px; color: var(--text-muted); font-weight: 700; line-height: 7px; }
        .cal-legend {
            display: flex; flex-wrap: wrap; gap: 10px;
            margin-bottom: 20px; padding: 0 2px;
        }
        .cal-legend-item {
            display: flex; align-items: center; gap: 5px;
            font-size: 10px; color: var(--text-muted); font-weight: 500;
        }
        .cal-section-title {
            font-size: 11px; font-weight: 700; color: var(--text-muted);
            text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
        }
        .cal-member-card {
            display: flex; align-items: center; gap: 12px;
            padding: 12px 14px; border: 1px solid var(--border);
            border-radius: var(--radius); margin-bottom: 8px;
        }
        .cal-member-avatar {
            width: 36px; height: 36px; border-radius: 50%;
            background: var(--primary-light); color: var(--primary-dark);
            display: flex; align-items: center; justify-content: center;
            font-size: 12px; font-weight: 700; flex-shrink: 0;
        }
        .cal-member-info { flex: 1; min-width: 0; }
        .cal-member-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
        .cal-member-dept { font-size: 10px; color: var(--text-muted); }
        .cal-member-status {
            font-size: 10px; font-weight: 700; padding: 4px 10px;
            border-radius: var(--radius-full); text-transform: uppercase;
            letter-spacing: 0.3px; flex-shrink: 0; white-space: nowrap;
        }
        .cal-member-status.available { background: var(--primary-light); color: #166534; }
        .cal-member-status.on-leave  { background: var(--warning-light); color: #92400e; }
        .cal-loading { text-align: center; padding: 40px; color: var(--text-muted); font-size: 13px; }
        /* ── DRAG HANDLE ── */
        .sheet-drag-handle {
            width: 40px; height: 4px;
            background: var(--border);
            border-radius: var(--radius-full);
            margin: 0 auto 16px;
            flex-shrink: 0;
        }
        /* Day detail modal */
        .cal-modal-overlay {
            position: fixed; inset: 0; background: rgba(0,0,0,0.45);
            z-index: 10000; display: flex; align-items: flex-end; justify-content: center; width: 100%;
        }
        .cal-modal {
            background: var(--white); width: 100%; max-width: 480px;
            border-radius: var(--radius-lg) var(--radius-lg) 0 0;
            padding: 12px 16px 32px; overflow-y: auto;
        }
        .cal-modal-title { font-size: 15px; font-weight: 700; margin-bottom: 14px; color: var(--secondary); }
        .cal-day-member {
            display: flex; align-items: center; gap: 12px;
            padding: 10px 0; border-bottom: 1px solid var(--border);
        }
        .cal-day-member:last-child { border-bottom: none; }
        .cal-day-avatar {
            width: 36px; height: 36px; border-radius: 50%;
            background: var(--primary-light); color: var(--primary-dark);
            display: flex; align-items: center; justify-content: center;
            font-size: 12px; font-weight: 700; flex-shrink: 0;
        }
        .cal-day-name { font-size: 13px; font-weight: 600; }
        .cal-day-type { font-size: 10px; color: var(--text-muted); }
        .cal-modal-close {
            width: 100%; margin-top: 16px; padding: 10px;
            border: 1.5px solid var(--border); background: transparent;
            border-radius: var(--radius-sm); font-size: 13px; font-weight: 600;
            color: var(--text-secondary); cursor: pointer; font-family: var(--font);
        }

        