@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap");

:root {
    --yellow: #fcca00;
    --yellow-alt: #ffba03;
    --sunglow: #ffbd3b;
    --blue: #05278b;
    --grey: #a9aaae;
    --grey2: #848484;
    --white: #ffffff;
    --whisper: #eaeaea;
    --light-grey: #d6d5d5;
    --dark-charcoal: #333333;
    --black: #000000;

    --brand: var(--yellow);
    --brand-alt: var(--yellow-alt);
    --brand-accent: var(--sunglow);
    --brand-dark: #c88700;
    --charcoal: var(--dark-charcoal);
    --ink: #1f2430;
    --muted: #6f7480;
    --surface: var(--white);
    --surface-soft: #f6f7fb;
    --line: #e3e5eb;
    --ok: #1f9b57;
    --warn: #be7d00;
    --danger: #dc3545;
    --shadow: 0 14px 32px rgba(5, 39, 139, 0.08);
    --shadow-strong: 0 18px 44px rgba(5, 39, 139, 0.12);
    --text-strong: #2b2f3a;
    --text: #3a4250;
    --text-muted: #6f7480;
    color-scheme: light;
}

[data-theme="dark"] {
    --surface: #0f1624;
    --surface-soft: #121b2b;
    --ink: #e7ecf7;
    --charcoal: #d9dff0;
    --muted: #9aa4b8;
    --line: #1f2a3c;
    --shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
    --shadow-strong: 0 18px 44px rgba(0, 0, 0, 0.45);
    --text-strong: #f5f7ff;
    --text: #e7ecf7;
    --text-muted: #b8c2d6;
    color-scheme: dark;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Manrope", "Plus Jakarta Sans", "Segoe UI", Tahoma, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at 14% 8%, rgba(255, 189, 59, 0.26), transparent 30%),
        radial-gradient(circle at 90% 0%, rgba(5, 39, 139, 0.08), transparent 34%),
        linear-gradient(180deg, #fbfbfc 0%, #eef1f4 260px, #eef1f4 100%);
    min-height: 100vh;
    line-height: 1.45;
}

[data-theme="dark"] body {
    background:
        radial-gradient(circle at 14% 8%, rgba(255, 189, 59, 0.14), transparent 28%),
        radial-gradient(circle at 86% 0%, rgba(5, 39, 139, 0.28), transparent 30%),
        linear-gradient(180deg, #0f1725 0%, #0c1220 260px, #0c1220 100%);
}

.app-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

.app-shell.solo {
    grid-template-columns: 1fr;
}

.sidebar {
    position: sticky;
    top: 0;
    height: 100vh;
    background: linear-gradient(180deg, rgba(255, 202, 0, 0.16) 0%, rgba(255, 189, 59, 0.05) 100%), #fff;
    border-right: 1px solid rgba(5, 39, 139, 0.08);
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
    box-shadow: 12px 0 28px -24px rgba(5, 39, 139, 0.25);
    z-index: 9;
}

[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, rgba(255, 202, 0, 0.08) 0%, rgba(5, 39, 139, 0.2) 100%), #0f1624;
    border-right: 1px solid #1f2a3c;
    box-shadow: 12px 0 28px -24px rgba(0, 0, 0, 0.6);
}

.brand-block {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    border-radius: 16px;
    background: #f6f3e7;
    border: 1px solid rgba(5, 39, 139, 0.12);
    box-shadow: 0 10px 24px rgba(5, 39, 139, 0.1);
}

[data-theme="dark"] .brand-block {
    background: #f6f3e7;
    border-color: rgba(255, 202, 0, 0.35);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.brand-logo {
    width: 100%;
    max-width: 105px;
    height: auto;
    display: block;
}

.brand-mark {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--yellow-alt), var(--sunglow));
    display: grid;
    place-items: center;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.5), 0 10px 30px rgba(255, 189, 59, 0.6);
}

.brand-mark .brand-dot,
.brand-dot {
    width: 16px;
    height: 16px;
    background: var(--blue);
    border-radius: 50%;
    box-shadow: 0 0 0 6px rgba(5, 39, 139, 0.14);
}

.brand-kicker {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
    letter-spacing: 0.3px;
}

[data-theme="dark"] .brand-kicker {
    color: var(--text-muted);
}

.brand-title {
    margin: 2px 0 0;
    color: var(--text-strong);
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    font-size: 1.08rem;
    letter-spacing: 0.12px;
}

.nav-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.nav-label {
    margin: 0;
    font-size: 0.75rem;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--muted);
}

[data-theme="dark"] .nav-label {
    color: var(--text-muted);
}

.side-nav {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.side-link {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    text-decoration: none;
    color: var(--text-strong);
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    position: relative;
}

[data-theme="dark"] .side-link {
    color: var(--text);
}

.nav-icon {
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--blue);
}

.nav-icon svg {
    width: 20px;
    height: 20px;
}

.side-link .badge {
    margin-left: auto;
}

.side-link:hover {
    border-color: rgba(5, 39, 139, 0.14);
    background: rgba(255, 202, 0, 0.18);
    box-shadow: 0 8px 20px rgba(5, 39, 139, 0.08);
}

[data-theme="dark"] .side-link:hover {
    background: rgba(255, 202, 0, 0.12);
    border-color: rgba(255, 202, 0, 0.28);
}

.side-link.active {
    background: var(--yellow);
    color: var(--dark-charcoal);
    box-shadow: 0 12px 28px rgba(252, 202, 0, 0.35), 0 0 0 1px rgba(5, 39, 139, 0.15);
}

.side-footer {
    margin-top: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cmd-pill {
    width: 100%;
    padding: 12px;
    border: 1px solid rgba(5, 39, 139, 0.22);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255, 202, 0, 0.4), rgba(255, 189, 59, 0.25));
    color: var(--dark-charcoal);
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: var(--shadow);
}

[data-theme="dark"] .cmd-pill {
    background: linear-gradient(135deg, rgba(255, 202, 0, 0.6), rgba(255, 189, 59, 0.35));
    border-color: rgba(255, 202, 0, 0.45);
    color: var(--dark-charcoal);
}

.cmd-pill:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-strong);
}

.app-main {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.main-toolbar {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 22px;
    background: rgba(255, 255, 255, 0.92);
    border-bottom: 1px solid rgba(5, 39, 139, 0.08);
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .main-toolbar {
    background: rgba(15, 22, 36, 0.92);
    border-bottom: 1px solid #1f2a3c;
}

.crumb {
    margin: 0;
    color: var(--muted);
    font-size: 0.85rem;
}

.toolbar-title {
    margin: 4px 0 0;
    font-size: 1.4rem;
    color: var(--text-strong);
    letter-spacing: 0.15px;
}

.toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.user-chip {
    display: inline-flex;
    flex-direction: column;
    gap: 1px;
    border: 1px solid #dddfe4;
    border-radius: 14px;
    background: #fafbfc;
    padding: 8px 12px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 8px 18px rgba(5, 39, 139, 0.08);
}

[data-theme="dark"] .user-chip {
    background: #151d2d;
    border-color: #22304a;
}

.icon-btn {
    border: 1px solid #d6dae4;
    background: #fff;
    color: var(--blue);
    border-radius: 10px;
    padding: 8px 10px;
    font-weight: 800;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

[data-theme="dark"] .icon-btn {
    background: #151d2d;
    border-color: #22304a;
    color: var(--text);
    box-shadow: 0 10px 22px rgba(0, 0, 0, 0.35);
}

.icon-btn:hover {
    transform: translateY(-1px);
    background: #f6f8ff;
}

.icon-btn:active {
    transform: translateY(0) scale(0.98);
}

.user-chip-name {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-strong);
}

.user-chip-meta {
    font-size: 0.74rem;
    color: var(--text-muted);
    font-weight: 600;
}

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--yellow-alt) 0%, var(--sunglow) 90%);
    color: var(--dark-charcoal);
    font-size: 0.75rem;
    font-weight: 800;
    box-shadow: 0 6px 16px rgba(255, 189, 59, 0.28);
}

.badge-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    perspective: 1200px;
}

.badge-catalog {
    display: grid;
    gap: 10px;
}

.catalog-row {
    display: grid;
    grid-template-columns: 160px 1fr;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border: 1px dashed rgba(5, 39, 139, 0.18);
    border-radius: 14px;
    background: rgba(255, 189, 59, 0.04);
}

.catalog-title {
    font-weight: 800;
    color: var(--text-strong);
}

.catalog-criteria {
    color: var(--text);
    line-height: 1.4;
}

[data-theme="dark"] .catalog-row {
    border-color: rgba(255, 189, 59, 0.3);
    background: rgba(5, 39, 139, 0.14);
}

.badge-tile {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 10px;
    align-items: center;
    border-radius: 16px;
    padding: 12px 14px;
    color: var(--text-strong);
    box-shadow: 0 12px 28px rgba(5, 39, 139, 0.08);
    position: relative;
    overflow: hidden;
}

.badge-tile::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 18% 18%, rgba(255, 255, 255, 0.32), transparent 50%);
    pointer-events: none;
}

.badge-img {
    width: 86px;
    height: 98px;
    object-fit: contain;
    filter: drop-shadow(0 10px 18px rgba(0, 0, 0, 0.22));
    transform-origin: center;
}

.badge-img.badge-entry {
    animation: badgeSettle 0.7s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

.badge-img.pop {
    animation: badgePop 0.6s ease forwards;
}

@keyframes badgeSettle {
    0% { transform: rotateY(-12deg) translateY(10px) scale(0.94); opacity: 0; }
    70% { transform: rotateY(5deg) translateY(-2px) scale(1.03); opacity: 1; }
    100% { transform: rotateY(0deg) translateY(0) scale(1); opacity: 1; }
}

@keyframes badgePop {
    0% { transform: scale(0.92) translateY(6px); opacity: 0; }
    60% { transform: scale(1.05) translateY(-2px); opacity: 1; }
    100% { transform: scale(1); translateY(0); opacity: 1; }
}

.badge-title {
    margin: 0;
    font-weight: 800;
    font-size: 1rem;
}

.badge-sub {
    margin: 2px 0 0;
    color: var(--text);
    font-size: 0.9rem;
}

.tone-sunglow {
    background: linear-gradient(135deg, rgba(255, 186, 3, 0.55), rgba(255, 189, 59, 0.9));
}

.tone-blue {
    background: linear-gradient(135deg, rgba(5, 39, 139, 0.14), rgba(5, 39, 139, 0.22));
    color: #0c1b4a;
}

.tone-amber {
    background: linear-gradient(135deg, rgba(255, 202, 0, 0.35), rgba(255, 166, 43, 0.22));
}

.tone-mint {
    background: linear-gradient(135deg, rgba(19, 194, 150, 0.22), rgba(126, 213, 166, 0.32));
}

.tone-sky {
    background: linear-gradient(135deg, rgba(86, 162, 255, 0.24), rgba(5, 39, 139, 0.12));
}

.tone-violet {
    background: linear-gradient(135deg, rgba(131, 88, 255, 0.22), rgba(5, 39, 139, 0.16));
}

.page {
    width: min(1240px, 94vw);
    margin: 18px auto 56px;
}

.card {
    background: var(--surface);
    border: 1px solid rgba(51, 51, 51, 0.08);
    border-radius: 18px;
    padding: 20px;
    box-shadow: var(--shadow);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    background-image: linear-gradient(145deg, rgba(255, 189, 59, 0.08), rgba(255, 202, 0, 0));
    color: var(--text);
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 32px rgba(51, 51, 51, 0.11);
}

.auth-card {
    max-width: 520px;
    margin: 48px auto;
}

.grid {
    display: grid;
    gap: 20px;
}

.two-col {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid {
    display: grid;
    gap: 12px;
}

.field-two-col {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-section {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface-soft);
}

.section-title {
    margin: 0 0 10px;
    font-size: 0.96rem;
    color: var(--text-strong);
}

.inline-hint {
    margin: 2px 0 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

.sticky-action-bar {
    position: sticky;
    bottom: 10px;
    z-index: 5;
    margin-top: 14px;
    padding: 10px;
    border-radius: 12px;
    border: 1px solid #d8dce3;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

[data-theme="dark"] .sticky-action-bar {
    background: rgba(21, 29, 45, 0.92);
    border-color: #22304a;
}

.sticky-action-bar .action-row {
    margin-left: auto;
}

.sticky-action-bar p {
    margin: 0;
}

.meta-chip-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 8px 0 14px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    border: 1px solid #d9dde3;
    background: #f7f8fa;
    border-radius: 999px;
    padding: 5px 10px;
}

[data-theme="dark"] .meta-chip {
    color: var(--text-strong);
    background: #1b2538;
    border-color: #2a3450;
}

.meta-chip-danger {
    color: #a32020;
    border-color: #efc7c7;
    background: #fff1f1;
}

.attendance-flex {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 14px;
    align-items: center;
}

.progress-ring {
    --value: 0;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background:
        radial-gradient(circle at center, var(--surface) 62%, transparent 63%),
        conic-gradient(var(--blue) calc(var(--value) * 1deg), #e8ebf2 0deg);
    display: grid;
    place-items: center;
    box-shadow: 0 18px 44px rgba(5, 39, 139, 0.12);
    position: relative;
    overflow: hidden;
}

.progress-ring::after {
    content: "";
    position: absolute;
    inset: 12px;
    border-radius: 50%;
    background: radial-gradient(circle at 30% 30%, rgba(255, 189, 59, 0.24), transparent 55%);
    pointer-events: none;
}

.progress-ring-inner {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: var(--surface);
    display: grid;
    place-items: center;
    text-align: center;
    box-shadow: inset 0 0 0 1px var(--line), 0 8px 20px rgba(5, 39, 139, 0.08);
    position: relative;
}

.progress-ring-inner::before {
    content: "";
    position: absolute;
    inset: 10px;
    border-radius: 50%;
    background: linear-gradient(145deg, rgba(255, 189, 59, 0.18), rgba(255, 202, 0, 0.08));
    z-index: 0;
}

.progress-ring-inner > * {
    position: relative;
    z-index: 1;
}

.ring-value {
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--blue);
}

.ring-label {
    font-size: 0.85rem;
    color: var(--muted);
}

.pulse-dot {
    position: relative;
}

.pulse-dot::after {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 999px;
    border: 2px solid rgba(252, 202, 0, 0.6);
    animation: pulse 1.6s ease-out infinite;
}

@keyframes pulse {
    0% {
        transform: scale(0.9);
        opacity: 1;
    }
    100% {
        transform: scale(1.25);
        opacity: 0;
    }
}

.inline-warning {
    margin: 0 0 8px;
    color: #b42318;
    font-weight: 700;
    font-size: 0.88rem;
}

.calendar-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.calendar-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
}

.view-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 12px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    font-weight: 700;
    border: 1px solid transparent;
    transition: all 0.16s ease;
}

.view-chip:hover {
    background: var(--surface);
    border-color: var(--line);
}

.view-chip.active {
    background: #fff3d1;
    border-color: rgba(210, 154, 44, 0.45);
    color: var(--dark-charcoal);
}

.rules-list {
    margin: 0;
    padding-left: 18px;
    display: grid;
    gap: 8px;
}

.panel-soft {
    padding: 12px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
}

.employee-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.hr-month-grid-wrap {
    overflow-x: auto;
}

.hr-month-grid {
    min-width: 980px;
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 10px;
}

.hr-weekday-head {
    text-align: center;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    font-weight: 700;
    color: var(--text-strong);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 6px;
}

.hr-month-cell {
    min-height: 210px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.hr-month-cell.other-month {
    background: var(--surface-soft);
    opacity: 0.6;
}

.hr-month-cell.today {
    border-color: rgba(255, 189, 59, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 189, 59, 0.2);
}

.hr-month-cell-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.hr-cell-date {
    font-size: 0.98rem;
    font-weight: 800;
    color: var(--text-strong);
}

.hr-cell-events {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    padding: 2px 7px;
}

.hr-cell-counts {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.hr-count-pill {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--surface-soft);
    color: var(--text-muted);
    padding: 2px 8px;
    font-size: 0.68rem;
    font-weight: 700;
}

.hr-day-events {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 6px;
}

.hr-day-event {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
    padding: 6px;
}

.hr-day-event.worked {
    border-color: #bde3cc;
    background: #ecfaf2;
}

.hr-day-event.in_progress {
    border-color: #ffdca0;
    background: #fff7e7;
}

.hr-day-event.leave_approved {
    border-color: #d6c2ec;
    background: #f5effd;
}

.hr-day-event.leave_pending {
    border-color: #f4d8a5;
    background: #fff6e8;
}

.hr-day-event-title,
.hr-day-event-meta,
.hr-day-event-note {
    margin: 0;
}

.hr-day-event-title {
    font-size: 0.78rem;
    font-weight: 800;
    color: var(--text-strong);
    line-height: 1.25;
}

.hr-day-event-meta {
    margin-top: 1px;
    font-size: 0.72rem;
    color: var(--text-muted);
    line-height: 1.25;
}

.hr-day-event-note {
    margin-top: 2px;
    font-size: 0.7rem;
    color: var(--text-muted);
    line-height: 1.2;
}

.hr-day-empty {
    margin-top: auto;
}

.hr-more-events {
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--text-muted);
    padding-left: 2px;
}

.calendar-head {
    text-align: center;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    font-weight: 700;
    color: var(--text-strong);
    background: var(--surface-soft);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 6px;
}

.calendar-day {
    min-height: 150px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.calendar-day.other-month {
    background: var(--surface-soft);
    opacity: 0.55;
}

.calendar-day.today {
    border-color: rgba(255, 189, 59, 0.9);
    box-shadow: 0 0 0 3px rgba(255, 189, 59, 0.2);
}

.calendar-day-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
}

.calendar-date {
    font-size: 1rem;
    font-weight: 800;
    color: var(--text-strong);
}

.calendar-day-body {
    display: grid;
    gap: 4px;
}

.calendar-day-body p {
    margin: 0;
    font-size: 0.83rem;
    color: var(--text);
}

.small-status {
    font-size: 0.68rem;
    padding: 2px 7px;
}

.status-short_hours .small-status {
    background: #fff1f1;
    color: #b42318;
    border-color: #efc7c7;
}

.status-absent .small-status {
    background: #f3f4f6;
    color: #6b7280;
    border-color: #dce0e7;
}

label {
    display: grid;
    gap: 6px;
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--text-strong);
}

input,
select,
textarea,
button,
.button-like {
    font: inherit;
}

input,
select,
textarea {
    width: 100%;
    padding: 11px 12px;
    border-radius: 10px;
    border: 1px solid #d4d7dd;
    background: #f9fafb;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
    color: var(--text);
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(255, 189, 59, 0.9);
    box-shadow: 0 0 0 4px rgba(255, 189, 59, 0.2);
    background: #ffffff;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
    background: #1b2538;
    border-color: #2a3450;
    color: var(--text);
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus {
    background: #202c42;
    border-color: rgba(255, 189, 59, 0.8);
    box-shadow: 0 0 0 3px rgba(255, 189, 59, 0.2);
}

label:focus-within {
    color: var(--text-strong);
}

input[type="checkbox"] {
    width: auto;
    padding: 0;
}

button,
.button-like {
    background: linear-gradient(145deg, #ffd16a 0%, var(--brand) 72%);
    color: #222222;
    border: 1px solid var(--brand-dark);
    border-radius: 10px;
    padding: 10px 16px;
    font-weight: 700;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.16s ease, box-shadow 0.16s ease, filter 0.16s ease;
    box-shadow: 0 4px 10px rgba(210, 154, 44, 0.26);
}

button:hover,
.button-like:hover {
    filter: brightness(1.02);
    transform: translateY(-1px);
    box-shadow: 0 8px 14px rgba(210, 154, 44, 0.28);
}

button:active,
.button-like:active {
    transform: translateY(0) scale(0.98);
}

button.secondary {
    background: linear-gradient(180deg, #ffffff 0%, #eceff4 100%);
    border-color: #d5d9df;
    box-shadow: 0 4px 10px rgba(92, 104, 119, 0.15);
}

.outline-btn {
    background: transparent;
    border: 1px solid #cfd4dc;
    color: #05278b;
    box-shadow: none;
    border-radius: 999px;
    padding: 12px 20px;
    font-weight: 800;
}

.outline-btn:hover {
    border-color: var(--blue);
    box-shadow: 0 8px 20px rgba(5, 39, 139, 0.16);
}

.secondary-link {
    background: linear-gradient(180deg, #ffffff 0%, #eceff4 100%);
    border-color: #d5d9df;
    color: #1d1f24;
    box-shadow: 0 4px 10px rgba(92, 104, 119, 0.15);
}

.urgent-btn {
    background: linear-gradient(135deg, var(--yellow-alt), var(--sunglow));
    color: var(--blue);
    border-color: var(--yellow-alt);
    box-shadow: 0 8px 16px rgba(255, 186, 3, 0.35);
}

button.danger {
    background: #ffe2e5;
    border-color: #f2b0b8;
    color: #811421;
}

button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.action-row {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.flex-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.inline-form {
    display: flex;
    align-items: center;
    gap: 8px;
}

.calendar-filter-form label {
    min-width: 160px;
}

.wrap {
    flex-wrap: wrap;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-radius: 12px;
    overflow: hidden;
}

th,
td {
    border-bottom: 1px solid var(--line);
    padding: 8px 10px;
    text-align: left;
    font-size: 0.92rem;
    vertical-align: top;
}

th {
    background: linear-gradient(180deg, var(--surface-soft) 0%, var(--surface) 100%);
    color: var(--text-strong);
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    letter-spacing: 0.2px;
    font-weight: 800;
}

tbody tr:nth-child(even) {
    background: var(--surface-soft);
}

tbody tr:hover {
    background: var(--surface);
}

.table-wrap {
    overflow-x: auto;
}

.user-table .table-control {
    min-width: 140px;
    padding: 8px 10px;
}

.user-table .action-row {
    align-items: center;
}

.user-table .action-row form {
    margin: 0;
}

.group-row td {
    font-weight: 700;
}

.team-row td {
    background: #fff3d1;
    border-top: 1px solid #f1ddab;
}

.employee-row td {
    background: #f3f6fa;
    font-size: 0.88rem;
}

.flash-wrap {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
    position: fixed;
    right: 16px;
    top: 70px;
    z-index: 30;
    width: min(380px, calc(100vw - 28px));
}

.flash {
    padding: 11px 13px;
    border-radius: 10px;
    border: 1px solid;
    font-size: 0.92rem;
    box-shadow: 0 8px 18px rgba(51, 51, 51, 0.08);
    animation: toastIn 0.25s ease forwards;
}

.flash-hide {
    opacity: 0;
    transform: translateY(-4px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.flash-success {
    background: #e9f8ef;
    border-color: #9fdbb1;
}

.flash-error {
    background: #ffecee;
    border-color: #f1b6bd;
}

.status {
    display: inline-flex;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    border: 1px solid transparent;
    animation: statusIn 0.22s ease;
}

.status.online,
.status.approved {
    background: #ecfaf2;
    color: #1b7a47;
    border-color: #b8e3c9;
}

.status.offline,
.status.rejected {
    background: #f6eef0;
    color: #84515f;
    border-color: #e6cfd6;
}

.pill {
    font-weight: 800;
}

.badge-primary {
    background: rgba(252, 202, 0, 0.18);
    color: #05278b;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(252, 202, 0, 0.5);
}

.cta {
    font-size: 1rem;
    padding: 14px 22px;
    border-radius: 999px;
    box-shadow: var(--shadow);
    background: linear-gradient(135deg, var(--yellow-alt), var(--sunglow));
    color: var(--dark-charcoal);
    border: 0;
    font-weight: 800;
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.cta:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-strong);
}

.cta:active {
    transform: translateY(1px) scale(0.985);
    filter: brightness(0.98);
}

.cta[disabled] {
    opacity: 0.55;
    cursor: not-allowed;
    background: var(--light-grey);
    color: var(--grey2);
    box-shadow: none;
}

.office-update-form {
    gap: 8px;
}

.update-preview {
    border: 1px dashed var(--line);
    border-radius: 12px;
    padding: 10px;
    color: var(--muted);
    background: var(--surface-soft);
}

.status.pending {
    background: #fff8e7;
    color: #8a5602;
    border-color: #ffd57f;
}

.inline-link {
    color: var(--blue);
    text-decoration: none;
    font-weight: 600;
}

[data-theme="dark"] .inline-link {
    color: #9bb4ff;
}

.inline-link:hover {
    text-decoration: underline;
}

.list-plain {
    margin: 0;
    padding-left: 20px;
}

.notification-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.notification-delete-btn {
    padding: 6px 10px;
    font-size: 0.8rem;
    box-shadow: none;
}

.pagination-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.page-arrow {
    min-width: 110px;
    text-align: center;
}

.page-arrow.disabled {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 110px;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid #d9dee6;
    background: #f3f5f8;
    color: #8a93a2;
    font-weight: 700;
}

.muted {
    color: #828b99;
}

.small {
    font-size: 0.82rem;
}

.hint-box {
    margin-top: 14px;
    background: var(--surface-soft);
    border: 1px solid #dee1e7;
    border-radius: 12px;
    padding: 13px;
    font-size: 0.9rem;
}

.policy-grid {
    display: grid;
    gap: 12px;
}

.policy-card {
    border: 1px solid #dee1e6;
    border-radius: 12px;
    padding: 14px;
    background: var(--surface-soft);
}
.policy-card summary {
    font-weight: 800;
    cursor: pointer;
}

.filter-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.chip-btn {
    border: 1px solid var(--light-grey);
    background: var(--surface);
    color: var(--blue);
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.chip-btn.active {
    background: var(--yellow);
    color: var(--dark-charcoal);
    border-color: rgba(0, 0, 0, 0.08);
}

.chip-btn:hover {
    box-shadow: var(--shadow);
}

.streak-bar {
    height: 14px;
    border-radius: 999px;
    background: var(--light-grey);
    overflow: hidden;
}

.streak-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--yellow), var(--sunglow));
}

.event-dots {
    display: flex;
    gap: 4px;
    margin-top: 6px;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.dot-present { background: var(--ok); }
.dot-short { background: #ff8a80; }
.dot-leave { background: var(--blue); }
.dot-working { background: var(--yellow); }

.calendar-range-chips {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.range-chip {
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--surface-soft);
    border: 1px solid var(--line);
}

.balance-bar {
    height: 10px;
    border-radius: 999px;
    background: var(--light-grey);
    overflow: hidden;
}

.balance-fill {
    height: 100%;
    background: var(--blue);
}

.slide-over {
    position: fixed;
    inset: 0;
    display: none;
    z-index: 60;
}

.slide-over.active {
    display: block;
}

.slide-over-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
}

.slide-over-body {
    position: absolute;
    top: 0;
    right: 0;
    width: min(480px, 90vw);
    height: 100%;
    background: var(--surface);
    box-shadow: var(--shadow-strong);
    padding: 14px;
    overflow: auto;
}

.slide-over-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.skeleton-list {
    display: grid;
    gap: 8px;
    margin: 10px 0;
}

.skeleton-row {
    height: 16px;
    background: linear-gradient(90deg, var(--whisper), var(--surface-soft), var(--whisper));
    background-size: 200% 100%;
    animation: shimmer 1.2s infinite;
    border-radius: 8px;
}

.slide-iframe {
    display: none;
    width: 100%;
    height: 0;
    border: none;
}

.notif-row.unread .status {
    border-color: var(--blue);
}

.notif-row.urgent {
    background: rgba(255, 186, 3, 0.08);
}

.reject-reason {
    width: 180px;
}

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.command-palette-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.command-palette-overlay.active {
    display: flex;
}

.command-palette {
    width: min(560px, 92vw);
    background: var(--surface);
    border-radius: 16px;
    box-shadow: var(--shadow-strong);
    border: 1px solid var(--line);
    padding: 12px;
}

.cmd-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--muted);
    font-weight: 700;
}

.command-palette input {
    margin: 10px 0;
    width: 100%;
}

#cmdList {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 260px;
    overflow: auto;
    display: grid;
    gap: 6px;
}

#cmdList li {
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--surface-soft);
}

#cmdList li:hover,
#cmdList li.active {
    background: rgba(252, 202, 0, 0.16);
    border-color: rgba(252, 202, 0, 0.5);
}

.team-card-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.team-status-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-soft) 100%);
    box-shadow: var(--shadow);
}

.team-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
}

.team-card-header h3 {
    margin: 0;
    font-size: 1.05rem;
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

.active-progress {
    height: 7px;
    border-radius: 999px;
    background: var(--surface-soft);
    overflow: hidden;
    margin-bottom: 10px;
}

.active-progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #1f9b57 0%, #7ed5a6 100%);
    transition: width 0.3s ease;
}

h2,
h3 {
    color: var(--text-strong);
    font-family: "Plus Jakarta Sans", "Segoe UI", sans-serif;
    letter-spacing: 0.2px;
}

h2 {
    font-size: 1.62rem;
}

h3 {
    font-size: 1.18rem;
}

.alert-panel {
    border: 1px solid #e3e6ec;
    border-radius: 12px;
    padding: 12px;
    background: #f9fafc;
    color: var(--text);
}

[data-theme="dark"] .alert-panel {
    background: #151d2d;
    border-color: #22304a;
}

[data-theme="dark"] .card {
    background-image: linear-gradient(145deg, rgba(255, 189, 59, 0.12), rgba(5, 39, 139, 0.1));
    border-color: #1f2a3c;
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.35);
    color: var(--text);
}

.mt-16 {
    margin-top: 16px;
}

.mt-24 {
    margin-top: 30px;
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(9px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.reveal-in {
    animation: riseIn 0.45s ease forwards;
    animation-delay: var(--reveal-delay, 0ms);
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateY(-6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes statusIn {
    from {
        opacity: 0;
        transform: translateY(3px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Novalife product polish layer */
:where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 3px solid rgba(255, 189, 59, 0.55);
    outline-offset: 3px;
}

body,
input,
select,
textarea,
button,
.button-like {
    font-family: "Manrope", "Plus Jakarta Sans", "Segoe UI", sans-serif;
}

h1,
h2,
h3,
.toolbar-title,
.side-link,
.cmd-pill,
.badge-title,
.catalog-title,
.hero-metrics span,
.eyebrow {
    font-family: "Plus Jakarta Sans", "Manrope", "Segoe UI", sans-serif;
}

body.is-guest {
    min-height: 100vh;
    color: var(--text);
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 189, 59, 0.38), transparent 28%),
        radial-gradient(circle at 84% 12%, rgba(5, 39, 139, 0.14), transparent 32%),
        linear-gradient(135deg, #fff8df 0%, #f6f7fb 48%, #eef2f7 100%);
}

.auth-shell {
    grid-template-columns: 1fr;
    min-height: 100vh;
}

.auth-page {
    width: min(1180px, calc(100vw - 36px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    place-items: center;
    padding: 42px 0;
}

.login-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(380px, 0.78fr);
    gap: 24px;
    align-items: stretch;
}

.login-brand-panel,
.auth-card {
    position: relative;
    overflow: hidden;
    border-radius: 32px;
}

.login-brand-panel {
    min-height: 650px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: #f8fbff;
    background:
        linear-gradient(145deg, rgba(5, 39, 139, 0.9), rgba(8, 14, 30, 0.95)),
        radial-gradient(circle at 18% 18%, rgba(255, 189, 59, 0.5), transparent 30%);
    box-shadow: 0 30px 80px rgba(5, 39, 139, 0.22);
    isolation: isolate;
}

.login-brand-panel::before,
.login-brand-panel::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    z-index: -1;
}

.login-brand-panel::before {
    width: 360px;
    height: 360px;
    right: -120px;
    top: -120px;
    background: radial-gradient(circle, rgba(255, 202, 0, 0.5), transparent 66%);
}

.login-brand-panel::after {
    width: 520px;
    height: 520px;
    left: -180px;
    bottom: -220px;
    background: radial-gradient(circle, rgba(255, 189, 59, 0.22), transparent 67%);
}

.login-brand-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.login-logo {
    width: 164px;
    height: 92px;
    object-fit: contain;
    border-radius: 22px;
    background: #050505;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.32);
}

.secure-chip,
.eyebrow {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.secure-chip {
    padding: 9px 13px;
    color: var(--dark-charcoal);
    background: linear-gradient(135deg, var(--yellow), var(--sunglow));
    box-shadow: 0 12px 30px rgba(255, 189, 59, 0.24);
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--blue);
}

.login-brand-panel .eyebrow {
    color: var(--yellow);
}

.login-copy {
    max-width: 680px;
}

.login-copy h1 {
    margin: 0;
    max-width: 700px;
    color: #ffffff;
    font-size: clamp(2.6rem, 5vw, 5.1rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.login-copy p {
    max-width: 590px;
    margin: 20px 0 0;
    color: rgba(248, 251, 255, 0.76);
    font-size: 1.06rem;
}

.login-proof-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}

.proof-card {
    min-height: 150px;
    padding: 16px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.14);
    backdrop-filter: blur(14px);
}

.proof-card span {
    display: inline-flex;
    margin-bottom: 18px;
    color: var(--yellow);
    font-weight: 800;
    letter-spacing: 0.08em;
}

.proof-card strong {
    display: block;
    color: #ffffff;
    font-size: 0.98rem;
}

.proof-card p {
    margin: 7px 0 0;
    color: rgba(248, 251, 255, 0.68);
    font-size: 0.86rem;
}

.auth-card {
    max-width: none;
    margin: 0;
    align-self: stretch;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 4vw, 48px);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 251, 240, 0.94)),
        radial-gradient(circle at 16% 12%, rgba(255, 202, 0, 0.24), transparent 28%);
    border: 1px solid rgba(5, 39, 139, 0.09);
    box-shadow: 0 30px 70px rgba(5, 39, 139, 0.14);
}

.auth-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-top: 7px solid var(--yellow);
    pointer-events: none;
}

.auth-logo-lockup {
    display: none;
}

.auth-card h2 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    line-height: 1.02;
    letter-spacing: -0.045em;
}

.auth-card > .muted {
    margin: 14px 0 24px;
    color: #5c6472;
    font-size: 0.98rem;
}

.auth-form {
    gap: 16px;
}

.auth-form label {
    gap: 8px;
}

.auth-form input {
    min-height: 52px;
    border-radius: 16px;
    background: #ffffff;
    border-color: rgba(5, 39, 139, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 12px 28px rgba(5, 39, 139, 0.04);
}

.auth-submit {
    min-height: 54px;
    margin-top: 4px;
    border-radius: 18px;
    background: linear-gradient(135deg, var(--yellow-alt), var(--sunglow));
    color: var(--dark-charcoal);
    border: 0;
    font-weight: 900;
    box-shadow: 0 18px 36px rgba(255, 186, 3, 0.28);
}

.auth-footnote {
    display: grid;
    gap: 4px;
    margin-top: 22px;
    padding: 16px;
    border-radius: 18px;
    background: rgba(5, 39, 139, 0.06);
    border: 1px solid rgba(5, 39, 139, 0.08);
    color: #566071;
}

.auth-footnote strong {
    color: var(--text-strong);
}

body.is-guest .auth-card h2,
body.is-guest .auth-form label,
body.is-guest .auth-footnote strong {
    color: #202633;
}

.dashboard-hero {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.75fr);
    gap: 22px;
    align-items: stretch;
    margin-bottom: 24px;
    padding: clamp(22px, 3vw, 34px);
    border-radius: 30px;
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 202, 0, 0.36), transparent 30%),
        linear-gradient(135deg, #ffffff 0%, #fff8e5 48%, #eef3ff 100%);
    border: 1px solid rgba(5, 39, 139, 0.08);
    box-shadow: 0 24px 60px rgba(5, 39, 139, 0.12);
}

.dashboard-hero::after {
    content: "";
    position: absolute;
    width: 300px;
    height: 300px;
    right: -120px;
    top: -130px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(5, 39, 139, 0.15), transparent 68%);
    pointer-events: none;
}

.hero-copy {
    position: relative;
    z-index: 1;
}

.hero-copy h1 {
    margin: 0;
    color: var(--text-strong);
    font-size: clamp(2.1rem, 4vw, 4rem);
    line-height: 0.98;
    letter-spacing: -0.06em;
}

.hero-copy p:not(.eyebrow) {
    max-width: 620px;
    margin: 16px 0 0;
    color: #586274;
    font-size: 1rem;
}

.hero-metrics {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    align-content: end;
}

.hero-metrics article {
    min-height: 132px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 6px;
    padding: 16px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(5, 39, 139, 0.08);
    box-shadow: 0 16px 34px rgba(5, 39, 139, 0.08);
    backdrop-filter: blur(12px);
}

.hero-metrics span {
    color: var(--blue);
    font-size: clamp(1.35rem, 2.3vw, 2.2rem);
    font-weight: 900;
    line-height: 1;
}

.hero-metrics small {
    color: #667084;
    font-weight: 800;
}

.main-toolbar {
    padding: 18px 28px;
    background: rgba(255, 255, 255, 0.88);
    box-shadow: 0 12px 34px rgba(5, 39, 139, 0.05);
}

.toolbar-title {
    max-width: 980px;
    line-height: 1.2;
}

.theme-toggle {
    width: 46px;
    height: 46px;
    padding: 0;
    border-radius: 16px;
}

.theme-toggle svg {
    width: 22px;
    height: 22px;
}

.card {
    border-radius: 24px;
    padding: 24px;
    border-color: rgba(5, 39, 139, 0.08);
    background-image:
        radial-gradient(circle at 12% 0%, rgba(255, 189, 59, 0.1), transparent 30%),
        linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 252, 243, 0.86));
}

.card:hover {
    transform: translateY(-3px);
}

[data-theme="dark"] .card {
    background-color: #141d2e;
    background-image:
        radial-gradient(circle at 12% 0%, rgba(255, 189, 59, 0.13), transparent 32%),
        linear-gradient(145deg, rgba(22, 32, 50, 0.98), rgba(15, 22, 36, 0.96));
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text);
    box-shadow: 0 18px 44px rgba(0, 0, 0, 0.34);
}

.alert-panel,
.policy-card,
.team-status-card,
.panel-soft,
.form-section {
    border-radius: 18px;
    border-color: rgba(5, 39, 139, 0.1);
}

.alert-panel {
    padding: 18px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(246, 248, 252, 0.92));
}

.alert-panel h3 {
    margin-top: 0;
}

.meta-chip {
    color: #273044;
    background: #ffffff;
    border-color: rgba(5, 39, 139, 0.12);
    box-shadow: 0 8px 18px rgba(5, 39, 139, 0.06);
}

.badge-grid {
    gap: 16px;
}

.badge-tile {
    min-height: 170px;
    border: 1px solid rgba(5, 39, 139, 0.08);
    border-radius: 24px;
    padding: 18px;
}

.badge-img {
    width: 104px;
    height: 118px;
}

.badge-title {
    font-size: 1.06rem;
}

.badge-sub {
    color: #566071;
}

.badge-catalog {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.catalog-row {
    grid-template-columns: 1fr;
    align-content: start;
    min-height: 138px;
    padding: 18px;
    border-style: solid;
    border-color: rgba(5, 39, 139, 0.1);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 8%, rgba(255, 202, 0, 0.2), transparent 38%),
        rgba(255, 255, 255, 0.74);
    box-shadow: 0 14px 30px rgba(5, 39, 139, 0.06);
}

.catalog-title {
    font-size: 1.04rem;
    color: var(--blue);
}

.catalog-criteria {
    color: #50596b;
}

table {
    background: var(--surface);
}

th {
    background: linear-gradient(180deg, #fff4cb 0%, #fff8e6 100%);
}

td {
    color: var(--text);
}

.sidebar {
    padding: 24px 18px;
}

.brand-block {
    padding: 12px;
    border-radius: 22px;
}

.side-link {
    border-radius: 18px;
}

.side-link.active {
    box-shadow: 0 16px 36px rgba(252, 202, 0, 0.32), 0 0 0 1px rgba(5, 39, 139, 0.16);
}

[data-theme="dark"] .main-toolbar {
    background: rgba(11, 17, 30, 0.9);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .dashboard-hero {
    background:
        radial-gradient(circle at 12% 20%, rgba(255, 202, 0, 0.18), transparent 32%),
        linear-gradient(135deg, #182236 0%, #101827 52%, #0b1220 100%);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.34);
}

[data-theme="dark"] .hero-copy h1,
[data-theme="dark"] .hero-copy p:not(.eyebrow),
[data-theme="dark"] .hero-metrics small,
[data-theme="dark"] .catalog-criteria,
[data-theme="dark"] .badge-sub {
    color: var(--text);
}

[data-theme="dark"] .hero-metrics article,
[data-theme="dark"] .catalog-row,
[data-theme="dark"] .alert-panel,
[data-theme="dark"] .team-status-card,
[data-theme="dark"] .policy-card,
[data-theme="dark"] .panel-soft,
[data-theme="dark"] .form-section {
    background: rgba(22, 32, 50, 0.94);
    border-color: rgba(255, 255, 255, 0.08);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
}

[data-theme="dark"] .hero-metrics span,
[data-theme="dark"] .catalog-title,
[data-theme="dark"] .ring-value {
    color: #ffd65f;
}

[data-theme="dark"] .meta-chip,
[data-theme="dark"] .range-chip,
[data-theme="dark"] .page-arrow.disabled {
    color: #f2f6ff;
    background: #1f2b42;
    border-color: #35445f;
}

[data-theme="dark"] .status.online,
[data-theme="dark"] .status.approved {
    background: #143624;
    color: #a6f0c0;
    border-color: #285b3e;
}

[data-theme="dark"] .status.pending {
    background: #3a2b09;
    color: #ffe2a3;
    border-color: #6e5014;
}

[data-theme="dark"] .status.offline,
[data-theme="dark"] .status.rejected {
    background: #3a1f29;
    color: #ffc7d4;
    border-color: #6b3446;
}

[data-theme="dark"] th {
    background: linear-gradient(180deg, #27344c 0%, #202b40 100%);
    color: #f7f9ff;
}

[data-theme="dark"] tbody tr:nth-child(even),
[data-theme="dark"] .team-row td,
[data-theme="dark"] .employee-row td {
    background: rgba(255, 255, 255, 0.035);
}

[data-theme="dark"] tbody tr:hover {
    background: rgba(255, 255, 255, 0.06);
}

[data-theme="dark"] .flash,
[data-theme="dark"] .auth-footnote {
    color: #172033;
}

[data-theme="dark"] body.is-guest .auth-card h2,
[data-theme="dark"] body.is-guest .auth-form label,
[data-theme="dark"] body.is-guest .auth-footnote strong {
    color: #202633;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
    }
}

/* UI Pro Max enterprise dashboard layer */
:root {
    --radius-sm: 12px;
    --radius-md: 18px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --surface-glass: rgba(255, 255, 255, 0.78);
    --surface-raised: #ffffff;
    --shadow-soft: 0 18px 50px rgba(15, 23, 42, 0.08);
    --shadow-lift: 0 28px 70px rgba(15, 23, 42, 0.12);
    --motion-fast: 180ms ease;
    --motion-med: 260ms cubic-bezier(0.2, 0.8, 0.2, 1);
}

[data-theme="dark"] {
    --surface-glass: rgba(17, 24, 39, 0.78);
    --surface-raised: #121a2b;
    --shadow-soft: 0 18px 50px rgba(0, 0, 0, 0.34);
    --shadow-lift: 0 28px 70px rgba(0, 0, 0, 0.42);
}

.skip-link {
    position: fixed;
    left: 18px;
    top: 12px;
    z-index: 1000;
    transform: translateY(-150%);
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--blue);
    color: #ffffff;
    font-weight: 800;
    text-decoration: none;
    box-shadow: var(--shadow-lift);
    transition: transform var(--motion-fast);
}

.skip-link:focus {
    transform: translateY(0);
}

body.is-authenticated {
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 202, 0, 0.2), transparent 26%),
        radial-gradient(circle at 92% 0%, rgba(5, 39, 139, 0.08), transparent 34%),
        linear-gradient(180deg, #f8fafc 0%, #eef2f7 48%, #e9edf4 100%);
}

[data-theme="dark"] body.is-authenticated {
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 202, 0, 0.09), transparent 26%),
        radial-gradient(circle at 92% 0%, rgba(55, 91, 210, 0.18), transparent 34%),
        linear-gradient(180deg, #070b14 0%, #0b1220 48%, #090f1a 100%);
}

.app-shell {
    grid-template-columns: 288px 1fr;
}

.sidebar {
    padding: 22px 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 226, 0.86)),
        radial-gradient(circle at 20% 8%, rgba(255, 202, 0, 0.24), transparent 28%);
    border-right: 1px solid rgba(15, 23, 42, 0.08);
}

[data-theme="dark"] .sidebar {
    background:
        linear-gradient(180deg, rgba(13, 20, 34, 0.98), rgba(10, 15, 27, 0.94)),
        radial-gradient(circle at 20% 8%, rgba(255, 202, 0, 0.08), transparent 28%);
    border-right-color: rgba(255, 255, 255, 0.08);
}

.brand-block {
    background: #080808;
    border-color: rgba(255, 202, 0, 0.22);
    box-shadow: 0 18px 42px rgba(15, 23, 42, 0.16);
}

.brand-logo {
    max-width: 118px;
    aspect-ratio: 1;
    object-fit: contain;
}

.nav-label {
    margin-left: 6px;
    color: #647084;
    font-weight: 800;
}

.side-nav {
    gap: 8px;
}

.side-link {
    min-height: 48px;
    padding: 12px 13px;
    color: #263044;
    border: 1px solid transparent;
    isolation: isolate;
}

.side-link::before {
    content: "";
    position: absolute;
    inset: 7px auto 7px 7px;
    width: 4px;
    border-radius: 999px;
    background: transparent;
    transition: background var(--motion-fast), transform var(--motion-fast);
}

.side-link:hover {
    background: rgba(255, 255, 255, 0.76);
    border-color: rgba(5, 39, 139, 0.08);
    transform: translateX(2px);
}

.side-link.active {
    background: linear-gradient(135deg, var(--yellow), var(--sunglow));
    color: var(--dark-charcoal);
}

.side-link.active::before {
    background: var(--blue);
}

[data-theme="dark"] .side-link {
    color: #edf3ff;
}

[data-theme="dark"] .nav-icon {
    color: #ffd65f;
}

[data-theme="dark"] .side-link:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .side-link.active {
    color: var(--dark-charcoal);
}

[data-theme="dark"] .side-link.active .nav-icon {
    color: var(--blue);
}

.side-footer {
    gap: 12px;
}

.cmd-pill,
.user-chip {
    min-height: 48px;
    border-radius: var(--radius-md);
}

.main-toolbar {
    min-height: 86px;
    padding: 16px 32px;
    background: rgba(248, 250, 252, 0.82);
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.crumb {
    font-weight: 800;
    letter-spacing: 0.02em;
}

.toolbar-title {
    max-width: 980px;
    color: #172033;
    font-size: clamp(1.05rem, 1.5vw, 1.42rem);
    font-weight: 800;
    letter-spacing: -0.02em;
}

.page {
    width: min(1400px, calc(100% - 52px));
    margin-top: 24px;
}

.dashboard-hero {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 0.78fr);
    padding: clamp(24px, 3vw, 38px);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(255, 250, 232, 0.9)),
        radial-gradient(circle at 100% 0%, rgba(255, 202, 0, 0.26), transparent 30%);
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: var(--shadow-soft);
}

.dashboard-hero::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 6px;
    background: linear-gradient(90deg, var(--yellow), var(--sunglow), var(--blue));
}

.hero-copy h1 {
    max-width: 850px;
    color: #172033;
    font-size: clamp(2.4rem, 4.2vw, 4.8rem);
}

.hero-copy p:not(.eyebrow) {
    color: #526075;
    line-height: 1.65;
}

.hero-metrics {
    align-content: stretch;
}

.hero-metrics article {
    min-height: 118px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(248, 250, 252, 0.86));
    border-color: rgba(15, 23, 42, 0.08);
    transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-med);
}

.hero-metrics article:hover {
    transform: translateY(-4px);
    border-color: rgba(5, 39, 139, 0.2);
    box-shadow: var(--shadow-lift);
}

.card {
    border-radius: var(--radius-lg);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(255, 253, 246, 0.9));
    box-shadow: var(--shadow-soft);
}

.card:hover {
    box-shadow: var(--shadow-lift);
}

.card h2 {
    margin-top: 0;
    letter-spacing: -0.035em;
}

.grid.two-col {
    gap: 24px;
}

.attendance-flex {
    grid-template-columns: minmax(190px, 230px) minmax(0, 1fr);
    gap: 22px;
}

.progress-ring {
    background:
        radial-gradient(circle at center, var(--surface-raised) 62%, transparent 63%),
        conic-gradient(var(--blue) calc(var(--value) * 1deg), rgba(15, 23, 42, 0.1) 0deg);
}

.progress-ring-inner {
    background: var(--surface-raised);
}

.meta-chip-row {
    gap: 10px;
}

.meta-chip,
.status,
.badge-primary {
    min-height: 30px;
}

.alert-panel {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(248, 250, 252, 0.92));
}

.badge-grid,
.team-card-grid {
    gap: 18px;
}

.badge-tile,
.catalog-row,
.team-status-card {
    transition: transform var(--motion-med), box-shadow var(--motion-med), border-color var(--motion-med);
}

.badge-tile:hover,
.catalog-row:hover,
.team-status-card:hover {
    transform: translateY(-4px);
    border-color: rgba(5, 39, 139, 0.2);
    box-shadow: var(--shadow-lift);
}

.badge-img {
    will-change: transform;
}

.badge-img.pop {
    animation: badgePop 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

table {
    border: 1px solid rgba(15, 23, 42, 0.08);
}

th,
td {
    padding: 11px 12px;
}

tbody tr {
    transition: background var(--motion-fast);
}

button,
.button-like,
.side-link,
.chip-btn,
.view-chip,
.icon-btn {
    touch-action: manipulation;
}

[data-theme="dark"] .main-toolbar {
    background: rgba(7, 11, 20, 0.82);
}

[data-theme="dark"] .toolbar-title,
[data-theme="dark"] .hero-copy h1,
[data-theme="dark"] .card h2,
[data-theme="dark"] .card h3 {
    color: #f8fbff;
}

[data-theme="dark"] .dashboard-hero {
    background:
        linear-gradient(135deg, rgba(18, 26, 43, 0.98), rgba(10, 16, 28, 0.96)),
        radial-gradient(circle at 100% 0%, rgba(255, 202, 0, 0.12), transparent 32%);
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .card {
    background:
        linear-gradient(180deg, rgba(18, 26, 43, 0.98), rgba(13, 20, 34, 0.96));
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hero-metrics article,
[data-theme="dark"] .alert-panel,
[data-theme="dark"] .badge-tile,
[data-theme="dark"] .catalog-row,
[data-theme="dark"] .team-status-card {
    background: linear-gradient(180deg, rgba(24, 34, 54, 0.98), rgba(16, 24, 39, 0.96));
    border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .hero-copy p:not(.eyebrow),
[data-theme="dark"] .muted,
[data-theme="dark"] .small,
[data-theme="dark"] .catalog-criteria {
    color: #c3cee3;
}

[data-theme="dark"] table {
    border-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 900px) {
    .auth-page {
        width: min(100% - 24px, 680px);
        padding: 24px 0;
    }

    .login-layout {
        grid-template-columns: 1fr;
    }

    .login-brand-panel {
        min-height: auto;
        padding: 22px;
        gap: 34px;
    }

    .login-copy h1 {
        font-size: clamp(2.2rem, 14vw, 3.8rem);
    }

    .login-proof-grid,
    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .auth-logo-lockup {
        display: flex;
        width: 132px;
        height: 82px;
        margin-bottom: 22px;
        align-items: center;
        justify-content: center;
        border-radius: 20px;
        background: #050505;
        box-shadow: 0 18px 38px rgba(5, 39, 139, 0.16);
    }

    .auth-logo-lockup img {
        max-width: 112px;
        max-height: 68px;
        object-fit: contain;
    }

    .dashboard-hero {
        grid-template-columns: 1fr;
        border-radius: 24px;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .topbar {
        align-items: flex-start;
        flex-direction: column;
        padding: 10px 14px;
    }

    .topbar-right {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
    }

    .nav-links {
        width: 100%;
        overflow-x: auto;
        padding-bottom: 4px;
    }

    .user-chip {
        width: 100%;
        border-radius: 12px;
        padding: 6px 10px;
        gap: 0;
    }

    .app-shell {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: relative;
        height: auto;
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        padding: 18px 14px;
    }

    .side-nav {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .side-link {
        flex: 1 1 46%;
        padding: 10px 12px;
    }

    .page {
        width: 95vw;
        margin: 18px auto 30px;
    }

    .team-card-grid {
        grid-template-columns: 1fr;
    }

    .field-two-col {
        grid-template-columns: 1fr;
    }

    .calendar-filter-grid {
        grid-template-columns: 1fr;
    }

    .employee-calendar {
        grid-template-columns: 1fr;
    }

    .calendar-head {
        display: none;
    }

    .calendar-view-switch {
        width: 100%;
        justify-content: stretch;
    }

    .view-chip {
        flex: 1 1 0;
    }

    .hr-month-grid {
        min-width: 920px;
    }

    .sticky-action-bar {
        position: static;
        flex-direction: column;
        align-items: stretch;
    }

    .sticky-action-bar .action-row {
        margin-left: 0;
    }

    .flash-wrap {
        top: 62px;
        right: 10px;
        width: calc(100vw - 20px);
    }
}

@media print {
    .topbar,
    .flash-wrap,
    form,
    .button-like,
    button {
        display: none !important;
    }

    body {
        background: white;
    }

    .page,
    .card,
    .print-card {
        width: 100%;
        margin: 0;
        border: 0;
        padding: 0;
    }

    table {
        font-size: 11px;
    }
}

@media (max-width: 900px) {
    .login-layout {
        gap: 14px;
    }

    .login-brand-panel {
        border-radius: 24px;
    }

    .login-proof-grid {
        display: none;
    }

    .login-copy h1 {
        font-size: clamp(2.25rem, 12vw, 3.35rem);
        letter-spacing: -0.055em;
    }

    .login-copy p {
        font-size: 0.96rem;
        line-height: 1.55;
    }

    .auth-card {
        border-radius: 24px;
    }

    .sidebar {
        padding: 14px;
        gap: 10px;
    }

    .brand-block {
        width: 112px;
        min-height: 86px;
        padding: 8px;
        border-radius: 18px;
    }

    .brand-logo {
        max-width: 82px;
    }

    .nav-section {
        width: 100%;
    }

    .nav-label {
        margin-left: 2px;
        font-size: 0.68rem;
    }

    .side-nav {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 6px;
        width: 100%;
    }

    .side-link {
        flex: none;
        min-height: 42px;
        padding: 8px 9px;
        border-radius: 14px;
        font-size: 0.88rem;
        gap: 7px;
    }

    .nav-icon,
    .nav-icon svg {
        width: 18px;
        height: 18px;
    }

    .side-footer {
        width: 100%;
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
        gap: 8px;
    }

    .cmd-pill,
    .user-chip {
        min-height: 44px;
        padding: 8px 10px;
        font-size: 0.86rem;
    }

    .user-chip {
        min-width: 0;
        white-space: normal;
    }

    .user-chip-name,
    .user-chip-meta {
        overflow-wrap: anywhere;
    }

    .main-toolbar {
        min-height: auto;
        padding: 12px 16px;
        gap: 12px;
    }

    .toolbar-title {
        font-size: 0.98rem;
        line-height: 1.28;
    }

    .page {
        width: calc(100% - 20px);
        margin-top: 18px;
    }

    .dashboard-hero {
        padding: 22px;
        gap: 18px;
    }

    .hero-copy h1 {
        font-size: clamp(2.05rem, 13vw, 3.1rem);
    }

    .hero-metrics article {
        min-height: 96px;
    }

    .attendance-flex {
        grid-template-columns: 1fr;
    }

    .progress-ring {
        width: 176px;
        height: 176px;
        margin: 0 auto;
    }

    .progress-ring-inner {
        width: 108px;
        height: 108px;
    }
}

@media (max-width: 520px) {
    .login-logo {
        width: 122px;
        height: 78px;
    }

    .secure-chip {
        max-width: 156px;
        padding: 8px 11px;
        font-size: 0.68rem;
        line-height: 1.15;
    }

    .login-brand-top {
        align-items: flex-start;
    }

    .auth-card {
        padding: 24px;
    }

    .auth-card h2 {
        font-size: 2rem;
    }
}

/* Clean login mode: single-panel sign-in with a readable brand lockup. */
.app-shell.auth-shell {
    grid-template-columns: minmax(0, 1fr);
}

.auth-shell .app-main {
    width: 100%;
    min-width: 0;
}

.auth-shell .auth-page {
    width: min(100%, calc(100vw - 36px));
    margin-inline: auto;
    place-items: center;
}

.login-layout-clean {
    width: min(520px, 100%);
    grid-template-columns: 1fr;
    gap: 0;
}

.login-layout-clean .auth-card {
    width: 100%;
    max-width: 520px;
    min-height: auto;
    align-self: auto;
    padding: clamp(30px, 5vw, 48px);
}

.login-layout-clean .auth-logo-lockup {
    display: flex;
    width: min(268px, 78%);
    min-height: 96px;
    margin: 0 0 26px;
    align-items: center;
    justify-content: center;
    padding: 14px 18px;
    border-radius: 22px;
    background: linear-gradient(180deg, #ffffff 0%, #fff6d9 100%);
    border: 1px solid rgba(5, 39, 139, 0.1);
    box-shadow: 0 16px 34px rgba(5, 39, 139, 0.11);
}

.login-layout-clean .auth-logo-lockup img {
    width: 100%;
    max-width: 226px;
    height: auto;
    object-fit: contain;
}

.login-layout-clean .auth-card > .muted {
    color: #4d5a6f;
}

.brand-block {
    background: linear-gradient(180deg, #ffffff 0%, #fff5cf 100%);
    border-color: rgba(252, 202, 0, 0.48);
}

[data-theme="dark"] .brand-block {
    background: linear-gradient(180deg, #ffffff 0%, #fff5cf 100%);
    border-color: rgba(252, 202, 0, 0.58);
}

.brand-logo {
    max-width: 170px;
    aspect-ratio: auto;
}

[data-theme="dark"] body.is-guest .login-layout-clean .auth-card {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 237, 0.96)),
        radial-gradient(circle at 16% 12%, rgba(255, 202, 0, 0.24), transparent 28%);
    color: #202633;
}

[data-theme="dark"] body.is-guest .login-layout-clean .auth-card > .muted {
    color: #4d5a6f;
}

[data-theme="dark"] body.is-guest .login-layout-clean .auth-logo-lockup {
    background: linear-gradient(180deg, #ffffff 0%, #fff6d9 100%);
    border-color: rgba(252, 202, 0, 0.42);
}

@media (max-width: 900px) {
    .login-layout-clean {
        width: min(100%, 520px);
    }

    .login-layout-clean .auth-logo-lockup {
        width: min(232px, 78%);
        min-height: 84px;
        margin-bottom: 22px;
    }

    .login-layout-clean .auth-logo-lockup img {
        max-width: 196px;
    }
}

@media (max-width: 520px) {
    .auth-shell .auth-page {
        width: min(100%, calc(100vw - 24px));
    }

    .login-layout-clean .auth-card {
        padding: 26px;
    }

    .login-layout-clean .auth-logo-lockup {
        width: min(218px, 82%);
        min-height: 78px;
    }
}

/* Executive dashboard refinement: calmer type scale and denser workday layout. */
body,
input,
select,
textarea,
button,
.button-like {
    font-family: "Plus Jakarta Sans", "Manrope", "Segoe UI", sans-serif;
}

h1,
h2,
h3,
.toolbar-title,
.side-link,
.cmd-pill,
.badge-title,
.catalog-title,
.hero-metrics span,
.eyebrow,
th {
    font-family: "Plus Jakarta Sans", "Manrope", "Segoe UI", sans-serif;
}

.main-toolbar {
    min-height: 76px;
}

.toolbar-title {
    max-width: 1080px;
    font-size: clamp(1rem, 1.15vw, 1.22rem);
    line-height: 1.3;
    letter-spacing: -0.015em;
}

.dashboard-hero {
    grid-template-columns: minmax(0, 1.18fr) minmax(380px, 0.82fr);
    gap: clamp(20px, 3vw, 36px);
    align-items: center;
    margin-bottom: 20px;
    padding: clamp(24px, 2.35vw, 34px);
    border-radius: 30px;
}

.dashboard-hero > *,
.dashboard-main-grid > *,
.hero-copy,
.hero-metrics {
    min-width: 0;
}

.dashboard-hero::after {
    width: 220px;
    height: 220px;
    right: -80px;
    top: -92px;
}

.hero-copy {
    display: grid;
    align-content: center;
}

.hero-copy h1 {
    max-width: 640px;
    font-size: clamp(2.1rem, 2.9vw, 3.25rem);
    line-height: 1.04;
    letter-spacing: -0.045em;
    overflow-wrap: anywhere;
    text-wrap: balance;
}

.hero-copy p:not(.eyebrow) {
    max-width: 680px;
    margin-top: 14px;
    font-size: clamp(0.98rem, 0.96vw, 1.08rem);
    line-height: 1.58;
}

.hero-metrics {
    align-content: center;
    gap: 14px;
}

.hero-metrics article {
    min-height: 112px;
    justify-content: center;
    padding: 18px;
    border-radius: 22px;
}

.hero-metrics span {
    font-size: clamp(1.55rem, 2.2vw, 2.35rem);
    letter-spacing: -0.04em;
}

.hero-metrics small {
    font-size: 0.78rem;
    line-height: 1.25;
}

.dashboard-main-grid {
    grid-template-columns: minmax(430px, 0.92fr) minmax(500px, 1.08fr);
    align-items: start;
    gap: 20px;
}

.dashboard-card {
    padding: clamp(22px, 2vw, 28px);
}

.dashboard-card > h2,
.dashboard-card > .flex-row h2 {
    font-size: clamp(1.35rem, 1.55vw, 1.78rem);
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.attendance-card .flex-row {
    align-items: flex-start;
    gap: 12px;
}

.attendance-card .small.muted {
    margin-top: 12px;
}

.attendance-card .attendance-flex {
    grid-template-columns: minmax(168px, 190px) minmax(0, 1fr);
    gap: 28px;
    align-items: center;
    margin-top: 18px;
}

.attendance-card .progress-ring {
    width: 184px;
    height: 184px;
}

.attendance-card .progress-ring-inner {
    width: 112px;
    height: 112px;
}

.attn-meta {
    display: grid;
    gap: 10px;
}

.attn-meta p {
    margin: 0;
    color: #39465a;
    line-height: 1.55;
}

.meta-chip-row {
    align-items: center;
    gap: 8px;
}

.meta-chip {
    font-size: 0.78rem;
    font-weight: 800;
}

.quick-alerts-card {
    display: grid;
    gap: 14px;
}

.quick-alerts-card h2 {
    margin-bottom: 4px;
}

.quick-alerts-card .alert-panel {
    margin-top: 0;
    padding: 20px;
}

.quick-alerts-card .alert-panel h3 {
    font-size: clamp(1rem, 1vw, 1.18rem);
    letter-spacing: -0.02em;
}

.quick-alerts-card .alert-panel p {
    line-height: 1.55;
}

[data-theme="dark"] .attn-meta p {
    color: #dbe5f5;
}

@media (max-width: 1180px) {
    .dashboard-hero,
    .dashboard-main-grid {
        grid-template-columns: 1fr;
    }

    .hero-metrics {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .page {
        width: calc(100% - 20px);
        overflow-x: clip;
    }

    .dashboard-hero {
        padding: 22px;
        gap: 20px;
    }

    .hero-copy h1 {
        font-size: clamp(1.85rem, 9vw, 2.55rem);
        max-width: 100%;
    }

    .hero-metrics {
        grid-template-columns: 1fr;
    }

    .hero-metrics article {
        min-height: 88px;
        align-items: flex-start;
    }

    .attendance-card .attendance-flex {
        grid-template-columns: 1fr;
    }

    .attendance-card .progress-ring {
        width: 174px;
        height: 174px;
    }
}

@media (max-width: 900px) {
    body.is-authenticated {
        overflow-x: hidden;
    }

    body.is-authenticated .app-shell {
        width: 100%;
        max-width: 100vw;
        grid-template-columns: minmax(0, 1fr);
        overflow-x: hidden;
    }

    body.is-authenticated .sidebar,
    body.is-authenticated .app-main,
    body.is-authenticated .nav-section,
    body.is-authenticated .side-nav,
    body.is-authenticated .side-footer {
        min-width: 0;
        max-width: 100%;
    }

    body.is-authenticated .sidebar,
    body.is-authenticated .app-main {
        width: 100%;
    }
}
