﻿:root {
    font-family: "Segoe UI", "Noto Sans Thai", sans-serif;
    --primary: #b91c1c;
    --primary-dark: #7f1d1d;
    --accent: #fb7185;
    --primary-rgb: 185, 28, 28;
    --accent-rgb: 251, 113, 133;
    --text: #1c0d0d;
    --muted: #6b5a60;
    --bg: #fff5f5;
    --card-bg: #ffffff;
    --border: #f4dada;
    --shadow-soft: 0 15px 40px rgba(15, 23, 42, 0.08);
    color-scheme: light;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe4e6 60%, #ffe8f0 100%);
    color: var(--text);
}

.auth-layout {
    display: grid;
    gap: 2rem;
    padding: clamp(1.5rem, 4vw, 4rem);
    min-height: 100vh;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: center;
}

.brand-panel {
    background: linear-gradient(145deg, rgba(var(--primary-rgb), 0.95), rgba(var(--accent-rgb), 0.9));
    border-radius: 28px;
    padding: clamp(1.5rem, 4vw, 3rem);
    color: #fff;
    box-shadow: 0 25px 60px rgba(var(--primary-rgb), 0.35);
}

.badge {
    display: inline-flex;
    gap: 0.4rem;
    align-items: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand-panel h1 {
    margin: 1.25rem 0 0.5rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.2;
}

.brand-panel .subtitle {
    margin: 0;
    font-size: 1rem;
    opacity: 0.9;
}

.feature-list {
    margin: 2rem 0 0;
    padding: 0;
    list-style: none;
    display: grid;
    gap: 0.5rem;
}

.feature-list li {
    display: flex;
    gap: 0.6rem;
    align-items: center;
    font-weight: 600;
}

.feature-list li::before {
    content: "•";
    color: var(--accent);
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: clamp(1.5rem, 3vw, 2.5rem);
    box-shadow: var(--shadow-soft);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.card.hidden {
    opacity: 0;
    pointer-events: none;
    position: absolute;
}

.card-header h2 {
    margin: 0;
    font-size: 1.8rem;
}

.card-header p {
    margin: 0.35rem 0 1.5rem;
    color: var(--muted);
}

.auth-card {
    width: 100%;
    margin: 0;
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(12px);
}

/* Login form inputs - taller for easier input */
.auth-card .form input {
    padding: 1.25rem 1.25rem;
    font-size: 1.1rem;
    min-height: 56px;
}

.auth-card .form input::placeholder {
    font-size: 1rem;
}

.auth-layout .auth-card {
    width: min(460px, 100%);
    margin: 0 auto;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

label {
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    color: var(--text);
    font-weight: 600;
}

input {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.1rem;
    font-size: 1rem;
    transition: border 0.2s ease, box-shadow 0.2s ease;
    background: #f8fafc;
}

input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

.primary-btn,
.secondary-btn {
    border: none;
    border-radius: 16px;
    padding: 0.95rem 1rem;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.primary-btn {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 15px 35px rgba(var(--primary-rgb), 0.35);
}

.primary-btn:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
}

.manager-approvals-list .primary-btn[data-approval-action="approve"] {
    background: #16a34a;
    box-shadow: 0 15px 30px rgba(22, 163, 74, 0.3);
}

.manager-approvals-list .primary-btn[data-approval-action="approve"]:hover,
.manager-approvals-list .primary-btn[data-approval-action="approve"]:focus-visible {
    background: #15803d;
}

.secondary-btn {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary-dark);
    font-weight: 600;
}

.secondary-btn:hover {
    transform: translateY(-1px);
}

.primary-btn.ghost {
    background: transparent;
    color: var(--primary-dark);
    box-shadow: none;
    border: 1px solid rgba(var(--primary-rgb), 0.3);
}

.alert {
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: #fee2e2;
    color: #b91c1c;
    font-size: 0.9rem;
}

.alert.hidden {
    display: none;
}

.text-muted {
    color: var(--muted);
    font-size: 0.75rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.dashboard-item {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.25rem;
    background: #f9fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.dashboard-item h2 {
    margin: 0 0 0.5rem;
    font-size: 1.1rem;
}

.dashboard-item p {
    color: var(--muted);
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
}

.dashboard-item.highlight {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--accent-rgb), 0.08));
    border-color: rgba(var(--primary-rgb), 0.15);
}

.dashboard-team-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: #fff;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-soft);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.team-report-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
}

.team-report-summary-item {
    border: 1px solid rgba(var(--primary-rgb), 0.15);
    border-radius: 14px;
    padding: 0.9rem 1rem;
    background: rgba(var(--primary-rgb), 0.04);
    text-align: left;
}

.team-report-summary-item p {
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.team-report-summary-item strong {
    font-size: 1.4rem;
    color: var(--primary-dark);
}

.team-report-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.team-report-table th,
.team-report-table td {
    text-align: left;
    padding: 0.65rem 0.4rem;
    border-bottom: 1px solid var(--border);
}

.team-report-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.team-report-table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.04);
}

.dashboard-daily-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: #fff;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-soft);
}

.dashboard-daily-panel .card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.daily-leaves-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.daily-leaves-table th,
.daily-leaves-table td {
    text-align: left;
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

.daily-leaves-table thead th {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
}

.daily-leaves-table tbody tr:hover {
    background: rgba(var(--primary-rgb), 0.04);
}

.daily-leaves-status {
    margin: 0;
}

.daily-leaves-reason {
    display: block;
    max-width: 360px;
    white-space: normal;
    word-break: break-word;
}

.profile-layout {
    display: flex;
    gap: 2rem;
    min-height: 100vh;
    padding: clamp(1.5rem, 4vw, 4rem);
    position: relative;
}

.profile-sidebar {
    width: 280px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    border-radius: 28px;
    padding: 1.5rem;
    border: 1px solid rgba(226, 232, 240, 0.8);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    box-shadow: var(--shadow-soft);
    transition: width 0.3s ease, padding 0.3s ease, transform 0.3s ease, opacity 0.3s ease;
    position: sticky;
    top: clamp(1.5rem, 4vw, 2rem);
    align-self: flex-start;
}

.profile-sidebar .sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 700;
}

.brand-logo {
    display: inline-flex;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--primary);
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.2);
}

.brand-text-group {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.sidebar-toggle {
    border: none;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary-dark);
    border-radius: 12px;
    padding: 0.4rem 0.75rem;
    font-size: 1rem;
    cursor: pointer;
}

.sidebar-section-label {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.8rem;
    color: #94a3b8;
    margin: 0;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.sidebar-link {
    border: none;
    background: transparent;
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-radius: 16px;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease;
    font-size: 0.95rem;
    text-align: left;
}

.sidebar-link .icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(var(--primary-rgb), 0.12);
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-dark);
}

.sidebar-link.active,
.sidebar-link:hover {
    background: rgba(var(--primary-rgb), 0.08);
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.12);
}

.sidebar-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.sidebar-footer .sidebar-username {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    line-height: 1.2;
    align-self: center;
    text-align: center;
}

.sidebar-footer .sidebar-login-label {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    text-align: center;
}

.sidebar-text.sidebar-username-top {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-align: center;
}

.profile-sidebar.is-collapsed {
    width: 90px;
    padding: 1rem;
}

.profile-sidebar.is-collapsed .sidebar-text {
    opacity: 0;
    pointer-events: none;
    width: 0;
    height: 0;
}

.profile-sidebar.is-collapsed .brand-text,
.profile-sidebar.is-collapsed .sidebar-section-label,
.profile-sidebar.is-collapsed .sidebar-footer p {
    display: none;
}

.profile-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    background: rgba(255, 255, 255, 0.95);
}

.content-panel.hidden {
    display: none;
}

.mock-list {
    padding-left: 1.1rem;
    margin: 0;
    color: var(--muted);
}

.mock-table {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.mock-row {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr auto;
    gap: 0.5rem;
    align-items: center;
    padding: 0.85rem 1rem;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(249, 250, 251, 0.9);
}

.mock-row--header {
    font-weight: 600;
    background: transparent;
    border: none;
    padding-bottom: 0;
}

.status {
    font-weight: 600;
}

.status.pending {
    color: #eab308;
}

.status.reviewing {
    color: var(--primary);
}

.mock-users {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.admin-form-wrapper {
    margin-bottom: 1.25rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1rem;
    background: rgba(248, 250, 255, 0.9);
}

.admin-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.admin-form input,
.admin-form select {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
}

.form-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mock-users article {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    background: rgba(248, 250, 255, 0.9);
}

.mock-list-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.mock-list-grid article {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
}

.admin-users-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: rgba(249, 250, 251, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.admin-users-panel.hidden {
    display: none;
}

.admin-users-panel-header {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.admin-users-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.admin-search {
    flex: 2 1 360px;
    min-width: 280px;
}

.admin-search input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.7rem 1rem;
    font-size: 0.95rem;
    background: #fff;
}

.admin-search input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
}

@media (min-width: 768px) {
    .admin-users-panel-header {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
    }

    .admin-users-actions {
        justify-content: flex-end;
    }
}

.admin-users-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.manager-approvals-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.approvals-status {
    margin: 0;
    color: var(--muted);
}

.manager-approvals-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.manager-approval-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: space-between;
    background: rgba(249, 250, 251, 0.9);
}

.manager-approval-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.manager-approval-meta strong {
    font-size: 1rem;
}

.manager-approval-meta small {
    color: var(--muted);
}

.manager-approval-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.approval-status-badge {
    border-radius: 999px;
    padding: 0.25rem 0.8rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.approval-status-badge.is-pending {
    background: rgba(234, 179, 8, 0.2);
    color: #854d0e;
}

.approval-status-badge.is-approved {
    background: rgba(34, 197, 94, 0.2);
    color: #166534;
}

.approval-status-badge.is-rejected {
    background: rgba(248, 113, 113, 0.2);
    color: #991b1b;
}

.leave-history-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leave-history-status {
    margin: 0;
    color: var(--muted);
}

.leave-history-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leave-history-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    background: rgba(249, 250, 251, 0.8);
}

.leave-history-card header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.leave-history-card .history-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--muted);
}

.history-reject-note {
    font-size: 0.9rem;
    color: #b91c1c;
    background: rgba(248, 113, 113, 0.15);
    border-radius: 12px;
    padding: 0.6rem 0.75rem;
}

.admin-users-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.admin-user-card {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 1rem;
    display: grid;
    grid-template-columns: minmax(220px, 1.1fr) minmax(200px, 1fr) minmax(160px, 0.9fr) minmax(180px, 0.9fr) auto;
    gap: 0.75rem;
    align-items: center;
    background: #fff;
}

.admin-user-card--header {
    background: rgba(249, 250, 251, 0.9);
    border-color: rgba(226, 232, 240, 0.8);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.admin-user-field {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.admin-user-field strong {
    font-size: 1rem;
}

.admin-user-field span,
.admin-user-field small {
    font-size: 0.85rem;
    color: var(--muted);
}

.admin-password-hash {
    font-family: 'Courier New', Courier, monospace;
    word-break: break-all;
}

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: flex-end;
}

@media (max-width: 768px) {
    .admin-user-card {
        grid-template-columns: 1fr;
    }

    .admin-user-card--header {
        display: none;
    }
}

.secondary-btn.danger {
    background: rgba(220, 38, 38, 0.12);
    color: #b91c1c;
}

.admin-manage-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.admin-manage-section .admin-users-header {
    padding: 0 0 1rem;
}

.admin-users-header {
    padding: 2rem clamp(1rem, 5vw, 4rem) 1rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.admin-header-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

.page-badge {
    margin: 0;
    display: inline-flex;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-dark);
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-users-layout {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    width: 100%;
}

body.modal-open {
    overflow: hidden;
}

.admin-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 900;
}

.admin-modal-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.admin-modal {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -45%) scale(0.95);
    opacity: 0;
    pointer-events: none;
    background: transparent;
    z-index: 905;
    width: min(640px, 95vw);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.permissions-add-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease;
    z-index: 950;
}

.permissions-add-modal-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.permissions-add-modal {
    position: fixed;
    inset: 50% auto auto 50%;
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    background: var(--card-bg);
    border-radius: 24px;
    padding: 1.5rem;
    width: min(520px, 90vw);
    z-index: 955;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.permissions-add-modal header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.permissions-add-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.permissions-add-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.95rem;
}

.permissions-add-form input,
.permissions-add-form textarea {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
    font-size: 0.95rem;
    background: #fff;
}

.permissions-add-form textarea {
    resize: vertical;
}

.permissions-add-modal.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.permissions-add-modal.hidden {
    display: none;
}

.permissions-add-modal-backdrop.hidden {
    display: none;
}

.admin-modal.is-visible {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, -50%) scale(1);
}

.admin-modal-content {
    background: var(--card-bg);
    border-radius: 24px;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.6);
}

.admin-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.modal-close-btn {
    border: none;
    background: rgba(15, 23, 42, 0.08);
    color: var(--text);
    width: 36px;
    height: 36px;
    border-radius: 12px;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.database-schema-panel {
    margin-top: 1.5rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: rgba(249, 250, 251, 0.95);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.database-schema-panel.hidden {
    display: none;
}

.database-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0 1rem;
}

.database-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.database-panel-header {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.database-status {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.database-schema-list {
    margin-top: 1rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.database-table-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    background: #fff;
}

.database-table-card h3 {
    margin-top: 0;
    margin-bottom: 0.5rem;
}

.database-table-card small {
    color: var(--muted);
}

.database-columns {
    width: 100%;
    border-collapse: collapse;
    margin-top: 0.75rem;
}

.database-columns th,
.database-columns td {
    text-align: left;
    padding: 0.4rem 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.9rem;
}

.database-columns th {
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
}

.mock-calendar {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
}

.calendar-legend {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--muted);
    flex-wrap: wrap;
}

.dot {
    display: inline-flex;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-right: 0.3rem;
}

.dot-leave {
    background: var(--accent);
}

.dot-sick {
    background: #f97316;
}

.dot-business {
    background: var(--primary);
}

.calendar-grid {
    margin-top: 1rem;
    display: grid;
    grid-template-columns: repeat(7, minmax(40px, 1fr));
    gap: 0.5rem;
}

.calendar-day {
    border-radius: 12px;
    border: 1px solid var(--border);
    padding: 0.75rem;
    text-align: center;
    font-weight: 600;
}

.calendar-day.busy {
    background: rgba(var(--primary-rgb), 0.08);
    border-color: rgba(var(--primary-rgb), 0.4);
}

.mock-report {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.mock-report>div {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
}

.permissions-panel {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) minmax(360px, 2fr);
    gap: 1.5rem;
}

.permissions-column {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: rgba(248, 250, 255, 0.9);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.permissions-column--details {
    background: #fff;
}

.permissions-column-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.permissions-column-header h3 {
    margin: 0;
}

.permissions-column-hint {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.permissions-role-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.permissions-role-item {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: #fff;
    padding: 0.75rem 0.9rem;
}

.permissions-role-item button {
    width: 100%;
    text-align: left;
    border: none;
    background: transparent;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.95rem;
    color: inherit;
}

.permissions-role-item.is-active {
    border-color: var(--primary);
    box-shadow: inset 0 0 0 1px rgba(var(--primary-rgb), 0.2);
    background: rgba(var(--primary-rgb), 0.06);
}

.permissions-role-meta {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.permissions-role-meta strong {
    font-size: 1rem;
}

.permissions-role-meta small {
    color: var(--muted);
}

.permissions-role-code {
    font-size: 0.8rem;
    color: var(--muted);
    font-weight: 600;
    text-transform: uppercase;
}

.permissions-role-badge {
    display: inline-flex;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-dark);
    font-size: 0.85rem;
    margin: 0 0 0.35rem;
}

.permissions-details-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.permissions-selected-count {
    margin: 0;
    color: var(--muted);
    font-weight: 600;
}

.permissions-menu-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.85rem;
}

.permissions-menu-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 0.85rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: rgba(249, 250, 251, 0.9);
}

.permissions-menu-card h4 {
    margin: 0;
    font-size: 1rem;
}

.permissions-menu-card p {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.permissions-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-weight: 600;
}

.permissions-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.permissions-status {
    color: var(--muted);
    font-size: 0.9rem;
}

.permissions-placeholder {
    border: 1px dashed var(--border);
    border-radius: 16px;
    padding: 1rem;
    color: var(--muted);
    text-align: center;
    grid-column: 1 / -1;
}

.permissions-empty-state {
    text-align: center;
    color: var(--muted);
    font-size: 0.9rem;
}

@media (max-width: 1024px) {
    .permissions-panel {
        grid-template-columns: 1fr;
    }
}

.leave-request-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr);
    gap: 1.5rem;
    margin-top: 1rem;
}

@media (max-width: 1024px) {
    .leave-request-grid {
        grid-template-columns: 1fr;
    }
}

.leave-request-highlights {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.leave-highlight {
    border-radius: 999px;
    padding: 0.35rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary-dark);
}

.leave-highlight--pending {
    background: rgba(234, 179, 8, 0.2);
    color: #854d0e;
}

.leave-highlight--approved {
    background: rgba(34, 197, 94, 0.2);
    color: #166534;
}

.leave-highlight--total {
    background: rgba(var(--primary-rgb), 0.15);
    color: var(--primary-dark);
}

.leave-request-form {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: rgba(249, 250, 251, 0.95);
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leave-form-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leave-form-card h3 {
    margin: 0;
    font-size: 1.05rem;
}

.leave-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.leave-request-form input[type='text'],
.leave-request-form input[type='date'],
.leave-request-form input[type='time'],
.leave-request-form input[type='number'],
.leave-request-form input[type='tel'],
.leave-request-form select,
.leave-request-form textarea {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    background: #fff;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.leave-request-form input:focus,
.leave-request-form select:focus,
.leave-request-form textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15);
    outline: none;
}

.leave-request-form select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='12' height='8' viewBox='0 0 12 8' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23333' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 0.9rem) center;
    background-size: 12px;
    padding-right: 2.5rem;
    cursor: pointer;
}

.leave-request-form textarea {
    resize: vertical;
    min-height: 110px;
}

.leave-form-intro {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
    background: rgba(var(--primary-rgb), 0.08);
    padding: 0.65rem 0.8rem;
    border-radius: 14px;
}

.leave-attachment-field input[type='file'] {
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 0.45rem 0.6rem;
    background: rgba(15, 23, 42, 0.02);
    width: 100%;
    font-size: 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.leave-attachment-field input[type='file']::file-selector-button {
    border: 1px solid var(--primary);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-dark);
    font-weight: 600;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.leave-attachment-field input[type='file']:hover {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
}

.leave-attachment-field input[type='file']::-webkit-file-upload-button {
    border: 1px solid var(--primary);
    border-radius: 999px;
    padding: 0.4rem 1rem;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-dark);
    font-weight: 600;
    margin-right: 0.75rem;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.leave-attachment-field input[type='file']::-webkit-file-upload-button:hover {
    background: rgba(var(--primary-rgb), 0.2);
}

.leave-attachment-field input[type='file']::file-selector-button:hover {
    background: rgba(var(--primary-rgb), 0.2);
}

.leave-attachment-note {
    margin: -0.5rem 0 0.5rem;
    font-size: 0.8rem;
    color: var(--muted);
}

.leave-requests-panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leave-requests-header h3 {
    margin: 0;
}

.leave-requests-header p {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.leave-requests-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leave-request-card {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    background: rgba(249, 250, 251, 0.8);
}

.leave-request-card strong {
    font-size: 1rem;
}

.leave-request-meta {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.leave-request-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.2rem 0.7rem;
    font-size: 0.8rem;
    background: rgba(var(--primary-rgb), 0.12);
    color: var(--primary-dark);
}

.leave-request-status-badge.is-approved {
    background: rgba(34, 197, 94, 0.15);
    color: #15803d;
}

.leave-request-status-badge.is-pending {
    background: rgba(234, 179, 8, 0.15);
    color: #a16207;
}

.leave-request-status-badge.is-rejected {
    background: rgba(248, 113, 113, 0.15);
    color: #b91c1c;
}

.leave-request-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.leave-request-actions .secondary-btn {
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
}

.leave-request-attachment {
    font-size: 0.85rem;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
}

.leave-request-attachment:hover {
    text-decoration: underline;
}

.leave-types-layout {
    margin-top: 1rem;
}

.leave-types-stack {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.leave-types-list {
    order: 2;
}

.leave-types-panel,
.leave-type-form-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.5rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.leave-types-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.leave-types-status {
    margin: 0.35rem 0 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.leave-types-status.is-error {
    color: #b91c1c;
}

.leave-types-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.95rem;
}

.leave-types-table th,
.leave-types-table td {
    border-bottom: 1px solid var(--border);
    padding: 0.65rem 0.5rem;
}

.leave-types-table th {
    text-align: left;
    color: var(--muted);
    font-weight: 600;
}

.leave-types-table td:last-child {
    white-space: nowrap;
    width: 1%;
}

.leave-type-form label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--text);
}

.leave-type-form label+label {
    margin-top: 0.75rem;
}

.leave-type-form input {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.65rem 0.8rem;
    font-size: 0.95rem;
}

.leave-type-form-card .hidden {
    display: none !important;
}

.leave-type-actions {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.75rem;
    align-items: center;
    margin-top: 1rem;
}

.leave-type-actions button {
    flex: 0 0 auto;
    white-space: nowrap;
}

.leave-types-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

.text-center {
    text-align: center;
    color: var(--muted);
}

.danger-btn {
    border: 1px solid #ef4444;
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
    padding: 0.45rem 0.75rem;
    border-radius: 999px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.danger-btn:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #991b1b;
}

.danger-btn.ghost {
    background: transparent;
}

.danger-btn.ghost:hover {
    background: rgba(239, 68, 68, 0.08);
}

.secondary-btn.danger {
    border: 1px solid #ef4444;
    background: rgba(239, 68, 68, 0.08);
    color: #b91c1c;
}

.secondary-btn.danger:hover {
    background: rgba(239, 68, 68, 0.15);
    color: #991b1b;
}

.leave-type-actions .secondary-btn.ghost {
    padding-left: 1.1rem;
    padding-right: 1.1rem;
}

.leave-types-panel .secondary-btn,
.leave-types-panel .danger-btn {
    font-size: 0.85rem;
}

.leave-types-panel .action-stack {
    display: flex;
    gap: 0.5rem;
}

@media (max-width: 992px) {
    .leave-types-layout {
        grid-template-columns: 1fr;
    }

    .leave-form-grid {
        grid-template-columns: 1fr;
    }
}

.form-status {
    font-size: 0.85rem;
    color: var(--muted);
}

.mobile-menu-toggle {
    display: none;
    position: sticky;
    top: 1rem;
    left: 1rem;
    margin: 1rem;
    border: none;
    border-radius: 999px;
    padding: 0.75rem 1.3rem;
    background: linear-gradient(120deg, var(--primary), var(--accent));
    color: white;
    font-weight: 600;
    cursor: pointer;
    z-index: 30;
    box-shadow: 0 8px 18px rgba(var(--primary-rgb), 0.35);
    display: none;
}

.mobile-menu-toggle.is-hidden {
    opacity: 0;
    pointer-events: none;
}

.sidebar-backdrop {
    display: none;
}

@media (max-width: 768px) {
    .brand-panel {
        order: 2;
        padding: 2rem;
    }

    .auth-card {
        order: 1;
    }

    .mobile-menu-toggle {
        display: inline-flex;
        align-items: center;
        gap: 0.4rem;
    }

    .profile-layout {
        flex-direction: column;
        padding: 1.5rem;
    }

    .sidebar-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        transition: opacity 0.3s ease;
        pointer-events: none;
        z-index: 15;
        display: block;
    }

    .sidebar-backdrop.is-visible {
        pointer-events: auto;
        opacity: 1;
    }

    .profile-sidebar {
        position: fixed;
        inset: 1rem;
        width: calc(100% - 2rem);
        max-width: 320px;
        height: auto;
        transform: translateX(-120%);
        opacity: 0;
        z-index: 20;
    }

    .profile-sidebar.is-open {
        transform: translateX(0);
        opacity: 1;
    }

    .profile-sidebar.is-collapsed .sidebar-text,
    .profile-sidebar.is-collapsed .brand-text,
    .profile-sidebar.is-collapsed .sidebar-section-label,
    .profile-sidebar.is-collapsed .sidebar-footer p {
        opacity: 1;
        display: block;
        width: auto;
        height: auto;
    }

    .profile-content {
        width: 100%;
    }

    .mock-row {
        grid-template-columns: 1.2fr 1fr;
        grid-template-rows: repeat(3, auto);
    }
}

.leave-entitlements-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.leave-entitlement-actions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
}

.leave-entitlement-card {
    height: 100%;
}

.leave-entitlement-card .import-actions,
.leave-entitlement-card .leave-entitlements-header-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.5rem 1.5rem;
}

.leave-entitlements-header-actions.stacked {
    align-items: flex-start;
}

.leave-entitlements-header-actions.stacked .inline-filter {
    width: 100%;
}

.leave-entitlements-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1rem;
    padding: 1rem;
}

.leave-entitlements-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.leave-entitlements-panel-actions {
    display: flex;
    align-items: flex-start;
    width: min(360px, 100%);
}

.leave-entitlements-search {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    margin: 0;
}

.leave-entitlements-search input {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.6rem 0.85rem;
    font-size: 0.95rem;
    background: #fff;
    width: 100%;
}

.leave-entitlement-summary-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    background: var(--card-bg);
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    box-shadow: var(--shadow-soft);
}

.leave-entitlement-summary-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.leave-entitlement-summary-card strong {
    font-size: 1rem;
}

.leave-entitlement-meta {
    color: var(--muted);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.leave-entitlement-year {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    white-space: nowrap;
}

.leave-entitlement-summary-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.leave-entitlement-summary-card li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding-bottom: 0.35rem;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.leave-entitlement-summary-card li:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.leave-entitlement-info {
    display: flex;
    flex-direction: column;
}

.leave-entitlement-info span {
    font-size: 0.85rem;
    color: var(--muted);
}

.leave-entitlement-code {
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.leave-entitlement-quota {
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
}

.leave-entitlement-updated {
    color: var(--muted);
    font-size: 0.8rem;
}

.leave-entitlements-placeholder {
    grid-column: 1 / -1;
    border: 1px dashed var(--border);
    border-radius: 18px;
    padding: 2rem;
    text-align: center;
    color: var(--muted);
    background: rgba(249, 250, 251, 0.7);
}

@media (max-width: 768px) {

    .leave-entitlement-card .import-actions,
    .leave-entitlement-card .leave-entitlements-header-actions {
        padding: 1rem;
    }
}

.reports-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.reports-controls {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: flex-end;
}

.reports-controls label {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    font-weight: 600;
    color: var(--text);
}

.reports-controls input {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.55rem 0.85rem;
    min-width: 140px;
    font-size: 0.95rem;
}

.reports-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.reports-stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 1rem;
}

.report-stat-card {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 1rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.report-stat-card strong {
    font-size: 2rem;
    line-height: 1.1;
}

.report-stat-card small {
    color: var(--muted);
    font-size: 0.85rem;
}

.report-stat-card.is-total {
    background: linear-gradient(135deg, rgba(var(--primary-rgb), 0.08), rgba(var(--accent-rgb), 0.08));
    border-color: rgba(var(--primary-rgb), 0.15);
}

.report-stat-card.is-approved {
    background: rgba(34, 197, 94, 0.12);
    border-color: rgba(34, 197, 94, 0.25);
}

.report-stat-card.is-pending {
    background: rgba(234, 179, 8, 0.12);
    border-color: rgba(234, 179, 8, 0.25);
}

.report-stat-card.is-rejected {
    background: rgba(248, 113, 113, 0.12);
    border-color: rgba(248, 113, 113, 0.25);
}

.report-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 1.25rem;
}

.report-table-card,
.report-recent-card {
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 1.25rem;
    background: #fff;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.report-table-card header,
.report-recent-card header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    flex-wrap: wrap;
}

.report-totals {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.9rem;
}

.report-summary-table {
    width: 100%;
    border-collapse: collapse;
}

.report-summary-table th,
.report-summary-table td {
    padding: 0.65rem 0.5rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.report-summary-table th {
    color: var(--muted);
    font-size: 0.85rem;
    font-weight: 600;
}

.report-recent-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.report-recent-item {
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 0.85rem 1rem;
    background: rgba(249, 250, 251, 0.9);
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.report-recent-item header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.report-recent-item small {
    color: var(--muted);
    font-size: 0.85rem;
}

.report-status-pill {
    border-radius: 999px;
    padding: 0.2rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.report-status-pill.is-approved {
    background: rgba(34, 197, 94, 0.2);
    color: #166534;
}

.report-status-pill.is-pending {
    background: rgba(234, 179, 8, 0.25);
    color: #854d0e;
}

.report-status-pill.is-rejected {
    background: rgba(248, 113, 113, 0.25);
    color: #991b1b;
}

@media (max-width: 1024px) {
    .report-content-grid {
        grid-template-columns: 1fr;
    }

    .reports-controls label {
        width: 100%;
    }
}

.leave-entitlement-actions-card .leave-entitlement-actions {
    flex-direction: column;
    padding: 1rem 1.5rem 1.25rem;
}

.leave-entitlement-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.55);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 950;
}

.leave-entitlement-modal-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.leave-entitlement-modal {
    position: fixed;
    inset: 50% auto auto 50%;
    background: var(--card-bg);
    transform: translate(-50%, -50%) scale(0.95);
    opacity: 0;
    border-radius: 24px;
    width: min(540px, 90vw);
    padding: 1.5rem;
    z-index: 955;
    box-shadow: var(--shadow-soft);
    border: 1px solid rgba(226, 232, 240, 0.8);
    transition: opacity 0.25s ease, transform 0.25s ease;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    pointer-events: none;
}

.leave-entitlement-modal header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.leave-entitlement-modal header h3 {
    margin: 0;
    font-size: 1.4rem;
}

.leave-entitlement-modal.is-visible {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    pointer-events: auto;
}

.leave-entitlement-form {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.leave-entitlement-form label {
    font-weight: 600;
    color: var(--text);
    font-size: 0.9rem;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.leave-entitlement-form input,
.leave-entitlement-form select {
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 0.7rem 0.9rem;
    font-size: 0.95rem;
    background: #fff;
}

.leave-entitlement-helper {
    padding: 0 0.25rem;
    margin: 0;
    font-size: 0.85rem;
    color: var(--muted);
}

.leave-entitlement-modal .form-actions {
    justify-content: flex-end;
}