canvas {
    width: 100% !important;
    height: 100% !important;
}

:root {
    --app-font: "Plus Jakarta Sans", "Noto Sans Thai", "Sukhumvit Set", "Thonburi", "SF Pro Text", sans-serif;
    --app-bg: #f8fafc;
    --app-surface: #ffffff;
    --app-surface-soft: #f8fafc;
    --app-line: #e2e8f0;
    --app-line-strong: #cbd5e1;
    --app-ink: #0f172a;
    --app-muted: #64748b;
    --app-primary: #38bdf8;
    --app-primary-strong: #0284c7;
    --app-mint: #d9fbf2;
    --app-blue: #e0f2fe;
    --app-cyan: #cffafe;
    --app-indigo: #e0e7ff;
    --app-lilac: #ede9fe;
    --app-frost: #f0f9ff;
    --app-aqua: #ccfbf1;
    --app-cool-flow: linear-gradient(135deg, #f8fafc 0%, #f0f9ff 38%, #ecfeff 74%, #ffffff 100%);
    --app-radius: 24px;
    --app-radius-sm: 16px;
    --app-shadow: 0 28px 76px -42px rgba(15, 23, 42, .34);
    --app-shadow-soft: 0 18px 46px -34px rgba(15, 23, 42, .28);
    --bs-body-font-family: var(--app-font);
    --bs-body-color: var(--app-ink);
    --bs-body-bg: var(--app-bg);
    --bs-border-color: var(--app-line);
    --bs-primary: var(--app-primary);
    --bs-primary-rgb: 56, 189, 248;
}

html {
    scroll-behavior: auto;
    font-size: 15px;
    max-width: 100%;
}

body {
    min-height: 100vh;
    max-width: 100%;
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% 0%, rgba(224, 242, 254, .64), transparent 30%),
        radial-gradient(circle at 92% 4%, rgba(204, 251, 241, .46), transparent 28%),
        linear-gradient(180deg, #ffffff 0%, var(--app-bg) 52%, #f8fafc 100%);
    color: var(--app-ink);
    font-family: var(--app-font);
    letter-spacing: -.01em;
    text-rendering: optimizeLegibility;
    -webkit-font-smoothing: antialiased;
}

* {
    min-width: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    color: var(--app-ink);
    font-weight: 850;
    letter-spacing: -.035em;
}

a {
    color: var(--app-primary-strong);
    text-decoration: none;
}

a:hover {
    color: #2454c7;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 260px;
    flex: 0 0 260px;
    min-height: 100vh;
    padding: 14px;
    border-right: 1px solid rgba(226, 232, 240, .86);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .94)),
        var(--app-cool-flow);
}

.app-main {
    min-width: 0;
    flex: 1 1 auto;
}

.app-content {
    width: min(1440px, 100%);
    margin: 0 auto;
    padding: 22px;
}

.brand-lockup {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 6px 16px;
}

.brand-mark,
.auth-brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 18px;
    background: linear-gradient(135deg, #bae6fd 0%, #cffafe 54%, #ccfbf1 100%);
    color: var(--app-primary-strong);
    font-weight: 950;
    letter-spacing: -.05em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9), 0 14px 32px -24px rgba(14, 165, 233, .7);
}

.brand-kicker,
.topbar-kicker,
.hero-kicker,
.nav-section-title {
    color: #0284c7;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.brand-title {
    color: var(--app-ink);
    font-size: 1.04rem;
    font-weight: 950;
    letter-spacing: -.045em;
}

.app-nav {
    display: grid;
    gap: 4px;
}

.nav-section-title {
    margin: 18px 8px 6px;
}

.app-nav .nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    border-radius: 16px;
    color: #526173;
    font-size: .88rem;
    font-weight: 750;
}

.app-nav .nav-link i {
    width: 20px;
    color: #94a3b8;
    font-size: .96rem;
    text-align: center;
}

.app-nav .nav-link:hover {
    background: rgba(240, 249, 255, .82);
    color: var(--app-primary-strong);
}

.app-nav .nav-link:hover i,
.app-nav .nav-link.active i {
    color: var(--app-primary-strong);
}

.app-nav .nav-link.active {
    background: linear-gradient(135deg, rgba(224, 242, 254, .95), rgba(236, 254, 255, .84));
    color: var(--app-primary-strong);
    box-shadow: inset 0 0 0 1px rgba(186, 230, 253, .9);
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 72px;
    padding: 16px 22px;
    border-bottom: 1px solid rgba(226, 232, 240, .78);
    background: linear-gradient(90deg, rgba(255, 255, 255, .88), rgba(240, 249, 255, .78), rgba(238, 242, 255, .72));
}

.topbar h1 {
    margin: 3px 0 2px;
    font-size: clamp(1.16rem, 1.7vw, 1.55rem);
    font-weight: 950;
}

.topbar-date,
.user-role,
.text-muted {
    color: var(--app-muted) !important;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 9px;
}

@media (min-width: 1200px) {
    .app-nav-panel {
        min-width: 282px;
        max-width: min(92vw, 680px);
    }

    .app-nav-panel-wide {
        width: min(620px, calc(100vw - 2rem));
    }

    .app-nav-panel-wide:not(.hidden) {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: .25rem;
    }

    .app-nav-link {
        min-width: 0;
        white-space: nowrap;
    }

    .app-nav-label {
        display: block;
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
    }
}

.notification-dropdown {
    position: relative;
}

.notification-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 1px solid var(--app-line);
    border-radius: 999px;
    background: rgba(255,255,255,.86);
    color: var(--app-primary-strong);
    box-shadow: 0 18px 44px -34px rgba(15, 23, 42, .36);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), border-color .28s ease, background .28s ease, box-shadow .28s ease;
}

.notification-button:hover,
.notification-button:focus {
    border-color: #bae6fd;
    background: rgba(240,249,255,.92);
    transform: translateY(-1px);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -4px;
    min-width: 19px;
    height: 19px;
    padding: 0 6px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #0ea5e9;
    color: #fff;
    font-size: .64rem;
    font-weight: 900;
    line-height: 15px;
    text-align: center;
}

.notification-menu {
    width: min(420px, calc(100vw - 32px));
    padding: 0;
    overflow: hidden;
    border: 1px solid var(--app-line);
    border-radius: 24px;
    background: rgba(255, 255, 255, .94);
    box-shadow: var(--app-shadow);
    backdrop-filter: blur(18px);
}

.notification-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px;
    border-bottom: 1px solid var(--app-line);
    background: linear-gradient(135deg, #f0f9ff, #ecfeff);
}

.notification-title {
    color: var(--app-ink);
    font-weight: 950;
    letter-spacing: -.03em;
}

.notification-subtitle {
    color: var(--app-muted);
    font-size: .82rem;
    font-weight: 650;
}

.notification-list {
    display: grid;
    max-height: min(480px, 68vh);
    overflow-y: auto;
    padding: 8px;
}

.notification-item {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 9px;
    padding: 9px;
    border-radius: 18px;
    color: var(--app-ink);
}

.notification-item:hover {
    background: #f8fbff;
    color: var(--app-ink);
}

.notification-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 16px;
    color: var(--app-primary-strong);
}

.notification-tone-primary {
    background: #dbeafe;
}

.notification-tone-info {
    background: #cffafe;
    color: #0e7490;
}

.notification-tone-violet {
    background: #ede9fe;
    color: #5b21b6;
}

.notification-tone-warning {
    background: #e0f2fe;
    color: #0369a1;
}

.notification-copy {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.notification-copy strong {
    color: var(--app-ink);
    font-size: .86rem;
}

.notification-copy small {
    color: var(--app-muted);
    line-height: 1.35;
}

.notification-count {
    min-width: 28px;
    padding: 4px 8px;
    border: 1px solid #bae6fd;
    border-radius: 999px;
    background: #f0f9ff;
    color: #0284c7;
    font-size: .78rem;
    font-weight: 900;
    text-align: center;
}

.notification-empty {
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 128px;
    padding: 14px;
    color: var(--app-muted);
    text-align: center;
}

.notification-empty i {
    color: #0f766e;
    font-size: 1.45rem;
}

.notification-empty strong {
    color: var(--app-ink);
}

.user-pill {
    width: auto;
    max-width: 170px;
    min-height: 40px;
    padding: 0 12px;
    border: 1px solid var(--app-line);
    border-radius: 999px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 18px 44px -34px rgba(15, 23, 42, .34);
    text-align: right;
}

.user-name {
    display: flex;
    align-items: center;
    height: 38px;
    justify-content: flex-end;
    gap: 6px;
    color: var(--app-ink);
    font-size: .82rem;
    font-weight: 850;
    white-space: nowrap;
}

.user-name-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
}

.content-card,
.stat-card {
    border: 1px solid rgba(255, 255, 255, .82);
    border-radius: var(--app-radius);
    background: rgba(255, 255, 255, .9);
    box-shadow: var(--app-shadow-soft);
    backdrop-filter: blur(18px);
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), border-color .28s ease, box-shadow .28s ease, background .28s ease;
}

.content-card {
    position: relative;
    overflow: hidden;
}

.stat-card {
    min-height: 96px;
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .98), rgba(248, 250, 252, .94)),
        var(--app-cool-flow);
}

.metric-card {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.metric-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 16px;
    background: linear-gradient(135deg, #e0f2fe, #cffafe);
    color: var(--app-primary-strong);
    font-size: 1rem;
}

.tw-card,
.tw-glass-card {
    border-color: rgba(255, 255, 255, .82) !important;
    border-radius: var(--app-radius) !important;
    background-color: rgba(255, 255, 255, .9) !important;
    box-shadow: var(--app-shadow-soft) !important;
    backdrop-filter: blur(18px);
}

.tw-glass-card {
    border-radius: 28px !important;
    background-color: rgba(255, 255, 255, .74) !important;
    box-shadow: var(--app-shadow) !important;
}

.tw-btn,
.tw-btn-primary,
.tw-btn-soft,
.btn {
    border-radius: 999px !important;
    transition: transform .28s cubic-bezier(.2, .8, .2, 1), border-color .28s ease, background .28s ease, box-shadow .28s ease, color .28s ease;
}

.tw-btn:hover,
.tw-btn-primary:hover,
.tw-btn-soft:hover,
.btn:hover {
    transform: translateY(-1px);
}

.tw-input,
.form-control,
.form-select {
    border-radius: 16px !important;
    background-color: rgba(255, 255, 255, .9) !important;
}

.row > [class*="col"]:nth-child(4n + 2) .metric-icon {
    background: linear-gradient(135deg, #ccfbf1, #d9fbf2);
    color: #0f766e;
}

.row > [class*="col"]:nth-child(4n + 3) .metric-icon {
    background: linear-gradient(135deg, #cffafe, #e0f2fe);
    color: #0e7490;
}

.row > [class*="col"]:nth-child(4n) .metric-icon {
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    color: #5b21b6;
}

.stat-value {
    color: var(--app-ink);
    font-size: clamp(1.35rem, 1.7vw, 1.82rem);
    font-weight: 950;
    letter-spacing: -.05em;
}

.dashboard-hero {
    background:
        radial-gradient(circle at 12% 10%, rgba(255, 255, 255, .72), transparent 26%),
        linear-gradient(135deg, rgba(224, 242, 254, .96) 0%, rgba(219, 234, 254, .92) 34%, rgba(224, 231, 255, .86) 62%, rgba(204, 251, 241, .9) 100%),
        #fff;
}

.hero-title {
    max-width: 660px;
    margin: .25rem 0 .65rem;
    font-size: clamp(1.45rem, 2.45vw, 2.2rem);
    font-weight: 950;
}

.hero-subtitle {
    max-width: 720px;
    color: var(--app-muted);
    font-size: .94rem;
}

.hero-stat-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.hero-stat {
    padding: 11px;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .86);
}

.hero-stat-label {
    display: block;
    color: var(--app-muted);
    font-size: .76rem;
    font-weight: 750;
}

.hero-stat strong {
    display: block;
    margin-top: 4px;
    color: #4f46e5;
    font-size: 1.35rem;
    font-weight: 950;
}

.quick-action-panel {
    padding: 14px;
    border: 1px solid var(--app-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .86);
}

.quick-action-list {
    display: grid;
    gap: 9px;
}

.quick-action {
    display: grid;
    grid-template-columns: 36px 1fr auto;
    align-items: center;
    gap: 10px;
    padding: 9px;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #f8fbff);
    color: var(--app-ink);
}

.quick-action:hover {
    border-color: #c4b5fd;
    background: linear-gradient(135deg, #eef7ff, #f5f3ff);
}

.quick-action i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, #dbeafe, #ede9fe);
    color: var(--app-primary-strong);
}

.quick-action span {
    font-weight: 850;
}

.quick-action strong {
    color: var(--app-primary-strong);
}

.section-heading,
.card-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.compact-list {
    display: grid;
    gap: 8px;
}

.alert-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 9px 10px;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #f8fbff);
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 5px;
    min-height: 112px;
    padding: 14px;
    border: 1px dashed var(--app-line-strong);
    border-radius: 15px;
    background: linear-gradient(135deg, #f8fbff, #fff);
    color: var(--app-muted);
    text-align: center;
}

.empty-state.compact {
    min-height: auto;
}

.empty-state i {
    color: var(--app-primary-strong);
    font-size: 1.25rem;
}

.empty-state strong {
    color: var(--app-ink);
}

.soft-dot {
    width: 10px;
    height: 10px;
    flex: 0 0 10px;
    border-radius: 999px;
    background: linear-gradient(135deg, #34d399, #60a5fa);
}

.leave-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
}

.summary-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #f8fbff);
}

.summary-chip strong {
    color: var(--app-primary-strong);
}

.payroll-period {
    color: var(--app-primary-strong);
    font-size: 1.85rem;
    font-weight: 950;
    letter-spacing: -.06em;
}

.payroll-module-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,.46);
    border-radius: 22px;
    background:
        radial-gradient(circle at 14% 8%, rgba(45, 212, 191, .55), transparent 30%),
        radial-gradient(circle at 90% 18%, rgba(125, 211, 252, .36), transparent 32%),
        linear-gradient(135deg, #0f766e, #2563eb);
    box-shadow: 0 18px 42px rgba(37, 99, 235, .16);
    color: #fff;
    padding: 18px;
}

.payroll-module-hero h2 {
    margin: 4px 0;
    color: #fff;
    font-size: clamp(1.35rem, 2.35vw, 1.95rem);
}

.payroll-module-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255,255,255,.82);
}

.payroll-module-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.payroll-kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.payroll-kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 108px;
    border-radius: 18px;
    color: #fff;
    padding: 14px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .09);
}

.payroll-kpi-card::after {
    position: absolute;
    right: -34px;
    bottom: -42px;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    content: "";
}

.payroll-kpi-card span,
.payroll-kpi-card strong,
.payroll-kpi-card small {
    display: block;
    position: relative;
    z-index: 1;
}

.payroll-kpi-card span {
    color: rgba(255,255,255,.9);
    font-weight: 900;
}

.payroll-kpi-card strong {
    margin-top: 6px;
    color: #fff;
    font-size: clamp(1.25rem, 1.65vw, 1.62rem);
    line-height: 1.15;
}

.payroll-kpi-card small {
    margin-top: 5px;
    color: rgba(255,255,255,.76);
}

.payroll-kpi-card.blue {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.payroll-kpi-card.green {
    background: linear-gradient(135deg, #14b8a6, #22c55e);
}

.payroll-kpi-card.amber {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.payroll-kpi-card.purple {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.report-hero {
    background:
        radial-gradient(circle at 12% 18%, rgba(255, 255, 255, .78), transparent 25%),
        linear-gradient(135deg, rgba(224, 242, 254, .96), rgba(224, 231, 255, .9) 56%, rgba(204, 251, 241, .88));
}

.report-document-preview {
    display: grid;
    gap: 8px;
    min-height: 150px;
    padding: 14px;
    border: 1px solid rgba(203, 213, 225, .78);
    border-radius: 18px;
    background: rgba(255, 255, 255, .74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .9);
}

.preview-line {
    width: 64%;
    height: 12px;
    border-radius: 999px;
    background: linear-gradient(90deg, #bfdbfe, #c4b5fd);
}

.preview-line.wide {
    width: 86%;
}

.preview-card {
    min-height: 48px;
    border: 1px solid var(--app-line);
    border-radius: 14px;
    background: linear-gradient(135deg, #fff, #f8fbff);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.preview-grid span {
    min-height: 28px;
    border-radius: 11px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
}

.report-card {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 11px;
    padding: 14px;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.report-card:hover {
    transform: translateY(-2px);
    border-color: #c4b5fd;
    box-shadow: var(--app-shadow);
}

.report-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    color: var(--app-primary-strong);
    font-size: 1.05rem;
}

.report-tone-primary {
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
}

.report-tone-violet {
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    color: #5b21b6;
}

.report-tone-info {
    background: linear-gradient(135deg, #cffafe, #e0f2fe);
    color: #0e7490;
}

.report-tone-mint {
    background: linear-gradient(135deg, #ccfbf1, #d9fbf2);
    color: #0f766e;
}

.report-code {
    display: inline-flex;
    margin-bottom: 6px;
    padding: 4px 10px;
    border: 1px solid #c4b5fd;
    border-radius: 999px;
    background: #f5f3ff;
    color: #4f46e5;
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .04em;
}

.report-card h2 {
    margin: 0 0 7px;
    font-size: .98rem;
}

.report-card p {
    margin: 0;
    color: var(--app-muted);
    line-height: 1.55;
}

.report-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.employee-type-card {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 78px;
    padding: 13px;
    color: var(--app-ink);
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.employee-type-card:hover,
.employee-type-card.active {
    transform: translateY(-2px);
    border-color: #a5b4fc;
    color: var(--app-ink);
    box-shadow: var(--app-shadow);
}

.employee-type-card.active {
    background:
        linear-gradient(135deg, rgba(255, 255, 255, .92), rgba(239, 246, 255, .86)),
        var(--app-cool-flow);
}

.employee-type-card small {
    display: block;
    color: var(--app-muted);
    font-weight: 850;
}

.employee-type-card strong {
    display: block;
    margin-top: 3px;
    color: var(--app-ink);
    font-size: 1.1rem;
    font-weight: 950;
    letter-spacing: -.045em;
}

.employee-type-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    color: var(--app-primary-strong);
    font-size: 1.05rem;
}

.employee-type-icon.daily {
    background: linear-gradient(135deg, #ccfbf1, #d9fbf2);
    color: #0f766e;
}

.employee-type-icon.probation {
    background: linear-gradient(135deg, #ede9fe, #e0e7ff);
    color: #5b21b6;
}

.leave-qr-card {
    background:
        radial-gradient(circle at 10% 0%, rgba(204, 251, 241, .52), transparent 28%),
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .92));
}

.leave-qr-box {
    display: grid;
    place-items: center;
    padding: 11px;
    border: 1px dashed var(--app-line-strong);
    border-radius: 16px;
    background: #fff;
}

.leave-qr-box img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
}

.employee-shortcuts {
    background:
        radial-gradient(circle at 10% 0%, rgba(224, 242, 254, .62), transparent 26%),
        linear-gradient(135deg, rgba(255, 255, 255, .96), rgba(248, 251, 255, .9));
}

.employee-action-card {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    min-height: 100%;
    padding: 13px;
    border: 1px solid var(--app-line);
    border-radius: 16px;
    background: rgba(255, 255, 255, .86);
    color: var(--app-ink);
}

.employee-action-card:hover {
    border-color: #a5b4fc;
    color: var(--app-ink);
    box-shadow: var(--app-shadow-soft);
}

.employee-action-card strong {
    display: block;
    color: var(--app-ink);
    font-weight: 950;
}

.employee-action-card small {
    display: block;
    margin-top: 3px;
    color: var(--app-muted);
    line-height: 1.45;
}

.employee-action-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    flex: 0 0 40px;
    border-radius: 14px;
    background: linear-gradient(135deg, #dbeafe, #e0e7ff);
    color: var(--app-primary-strong);
    font-size: 1rem;
}

.employee-action-icon.payroll {
    background: linear-gradient(135deg, #ccfbf1, #d9fbf2);
    color: #0f766e;
}

.leave-qr-box.compact {
    width: 172px;
    flex: 0 0 172px;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    align-items: center;
}

.form-label {
    color: #475569;
    font-size: .88rem;
    font-weight: 800;
}

.form-control,
.form-select,
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
    border: 1px solid var(--app-line) !important;
    border-radius: var(--app-radius-sm) !important;
    background-color: #fff !important;
    color: var(--app-ink) !important;
    box-shadow: none !important;
}

.form-control:focus,
.form-select:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: #a5b4fc !important;
    box-shadow: 0 0 0 4px rgba(129, 140, 248, .14) !important;
}

.input-group-text {
    border-color: var(--app-line);
    border-radius: var(--app-radius-sm);
    background: var(--app-surface-soft);
    color: var(--app-muted);
    font-weight: 750;
}

.btn {
    border-radius: 14px;
    font-weight: 800;
}

.btn-primary {
    border-color: transparent !important;
    background: linear-gradient(135deg, #5b7cfa, #22c7c7) !important;
    color: #fff !important;
    box-shadow: 0 10px 22px rgba(79, 125, 243, .18);
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, #4564e8, #0ea5a4) !important;
}

.btn-outline-secondary {
    border-color: var(--app-line-strong);
    background: #fff;
    color: #475569;
}

.btn-outline-secondary:hover {
    border-color: #c4b5fd;
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    color: var(--app-primary-strong);
}

.btn-outline-danger {
    border-color: #fecdd3;
    background: #fff;
    color: #e11d48;
}

.btn-outline-danger:hover,
.btn-danger {
    border-color: transparent !important;
    background: #64748b !important;
    color: #fff !important;
}

.btn-outline-warning,
.btn-warning {
    border-color: #bae6fd;
    background: var(--app-blue);
    color: #0369a1;
}

.table-responsive {
    border: 1px solid var(--app-line);
    border-radius: 18px;
    background: #fff;
}

.table {
    margin-bottom: 0;
    color: var(--app-ink);
}

.table thead th {
    border-bottom: 1px solid var(--app-line);
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    color: #6672a5;
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.table tbody td {
    border-color: #eef2f7;
    vertical-align: middle;
}

.table-hover tbody tr:hover {
    background: #f8fbff;
}

.schedule-table-wrap {
    max-height: 72vh;
}

.schedule-table {
    min-width: 1560px;
}

.schedule-table th,
.schedule-table td {
    min-width: 100px;
    padding: .55rem .45rem;
}

.schedule-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    text-align: center;
}

.schedule-employee-col {
    left: 0;
    min-width: 240px !important;
    position: sticky;
    z-index: 3;
    background: #fff !important;
    box-shadow: 1px 0 0 var(--app-line);
}

.schedule-table thead .schedule-employee-col {
    z-index: 4;
    background: linear-gradient(135deg, #eff6ff, #f5f3ff) !important;
}

.schedule-weekend {
    background: #f8fafc !important;
}

.schedule-cell-form {
    min-width: 84px;
}

.schedule-chip {
    display: block;
    width: 100%;
    margin-top: .35rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--shift-color) 16%, #fff);
    color: var(--shift-color);
    font-size: .68rem;
    font-weight: 850;
    line-height: 1;
    padding: .3rem .4rem;
    text-align: center;
}

.schedule-planner-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, .9fr);
    gap: 12px;
}

.schedule-person-card,
.schedule-quick-panel {
    border: 1px solid var(--app-line);
    border-radius: 18px;
    background: rgba(255, 255, 255, .86);
    box-shadow: 0 12px 30px rgba(91, 124, 250, .07);
    padding: 14px;
}

.schedule-person-card {
    display: flex;
    align-items: center;
    gap: 12px;
}

.schedule-person-card h2 {
    margin: 0;
    font-size: clamp(1.05rem, 1.65vw, 1.42rem);
}

.schedule-avatar {
    display: grid;
    width: 52px;
    height: 52px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 16px;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
    color: #4f46e5;
    font-weight: 950;
    letter-spacing: .04em;
}

.schedule-quick-panel .form-select {
    max-width: 260px;
}

.schedule-week-header,
.schedule-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 8px;
}

.schedule-week-header {
    margin-bottom: 8px;
}

.schedule-week-header > div {
    border-radius: 12px;
    background: linear-gradient(135deg, #eff6ff, #f5f3ff);
    color: #6672a5;
    font-weight: 900;
    padding: .5rem;
    text-align: center;
}

.schedule-day-card {
    min-height: 136px;
    border: 1px solid #dbe7fb;
    border-radius: 16px;
    background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(248,251,255,.92));
    padding: 10px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.schedule-day-card:hover {
    border-color: #b7c9ff;
    box-shadow: 0 16px 34px rgba(91, 124, 250, .12);
    transform: translateY(-1px);
}

.schedule-day-empty {
    min-height: auto;
    border-style: dashed;
    background: transparent;
    box-shadow: none;
}

.schedule-day-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.schedule-day-head strong {
    display: block;
    color: var(--app-ink);
    font-size: 1.05rem;
    line-height: 1;
}

.schedule-day-head small,
.schedule-holiday-name {
    color: var(--app-muted);
}

.schedule-holiday-name {
    min-height: 18px;
    margin-bottom: 6px;
    font-size: .76rem;
    font-weight: 800;
}

.schedule-day-card.is-weekend {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
}

.schedule-day-card.is-holiday {
    border-color: #c4b5fd;
    background: linear-gradient(145deg, #f5f3ff, #ecfeff);
}

.schedule-overview-wrap {
    max-height: 72vh;
}

.schedule-overview-table {
    min-width: 1420px;
}

.schedule-overview-table th,
.schedule-overview-table td {
    min-width: 78px;
    padding: .58rem .45rem;
    text-align: center;
}

.schedule-overview-table thead th {
    position: sticky;
    top: 0;
    z-index: 2;
}

.schedule-overview-table .schedule-employee-col {
    text-align: left;
}

.schedule-person-link {
    display: grid;
    gap: 2px;
    color: var(--app-ink);
    text-decoration: none;
}

.schedule-person-link:hover {
    color: #4f46e5;
}

.schedule-overview-chip,
.schedule-overview-muted,
.schedule-overview-empty {
    display: inline-flex;
    min-width: 64px;
    justify-content: center;
    border-radius: 999px;
    font-size: .68rem;
    font-weight: 900;
    padding: .32rem .45rem;
}

.schedule-overview-chip {
    border: 1px solid color-mix(in srgb, var(--shift-color) 35%, #fff);
    background: color-mix(in srgb, var(--shift-color) 14%, #fff);
    color: var(--shift-color);
}

.schedule-overview-muted {
    border: 1px solid #c4b5fd;
    background: #f5f3ff;
    color: #6d5dfc;
}

.schedule-overview-empty {
    color: #cbd5e1;
}

.schedule-overview-holiday {
    background: linear-gradient(145deg, #f8f7ff, #effefe) !important;
}

.schedule-overview-week-header {
    grid-template-columns: repeat(7, minmax(0, 1fr));
}

.schedule-overview-calendar {
    display: grid;
    grid-template-columns: repeat(7, minmax(160px, 1fr));
    align-items: start;
    gap: 10px;
}

.schedule-overview-day {
    display: flex;
    min-height: 220px;
    max-height: 220px;
    flex-direction: column;
    border: 1px solid #dbe7fb;
    border-radius: 17px;
    background: rgba(255, 255, 255, .92);
    padding: 11px;
    transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.schedule-overview-day:hover {
    border-color: #b7c9ff;
    box-shadow: 0 16px 34px rgba(91, 124, 250, .12);
    transform: translateY(-1px);
}

.schedule-overview-day.is-empty {
    min-height: 0;
    max-height: 220px;
    border-style: dashed;
    background: transparent;
    box-shadow: none;
}

.schedule-overview-day.is-weekend {
    background: linear-gradient(145deg, #f8fafc, #f1f5f9);
}

.schedule-overview-day.is-holiday {
    border-color: #c4b5fd;
    background: linear-gradient(145deg, #f5f3ff, #ecfeff);
}

.schedule-overview-day-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.schedule-overview-day-head strong {
    display: block;
    color: var(--app-ink);
    font-size: 1.08rem;
    line-height: 1;
}

.schedule-overview-day-head small {
    color: var(--app-muted);
    font-weight: 800;
}

.schedule-assignment-list {
    display: grid;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-right: 2px;
    gap: 6px;
}

.schedule-assignment-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 2px 8px;
    align-items: center;
    border: 1px solid #e5edf8;
    border-radius: 13px;
    background: rgba(255, 255, 255, .76);
    color: var(--app-ink);
    padding: 6px 7px;
    text-decoration: none;
}

.schedule-assignment-item:hover {
    border-color: #b7c9ff;
    color: #4f46e5;
}

.schedule-assignment-item .schedule-overview-chip {
    min-width: auto;
    grid-row: 1;
    grid-column: 2;
}

.schedule-assignment-item span:not(.schedule-overview-chip) {
    grid-column: 1;
    grid-row: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-assignment-item small {
    grid-column: 1 / -1;
    color: var(--app-muted);
}

.schedule-day-empty-message {
    display: grid;
    flex: 1;
    min-height: 0;
    place-items: center;
    border: 1px dashed #dbe7fb;
    border-radius: 13px;
    color: #a8b4c8;
    font-weight: 800;
}

.schedule-assignment-list::-webkit-scrollbar {
    width: 8px;
}

.schedule-assignment-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #dbe7fb;
}

.shift-matrix-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,.32);
    border-radius: 22px;
    background:
        radial-gradient(circle at 10% 0%, rgba(20, 184, 166, .46), transparent 30%),
        linear-gradient(135deg, #116c8f, #2348a3);
    box-shadow: 0 18px 40px rgba(35, 72, 163, .18);
    color: #fff;
    padding: 18px;
}

.shift-matrix-kicker {
    color: rgba(255,255,255,.72);
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.shift-matrix-hero h2 {
    margin: 4px 0;
    color: #fff;
    font-size: clamp(1.3rem, 2.35vw, 1.9rem);
}

.shift-matrix-hero p {
    margin: 0;
    color: rgba(255,255,255,.78);
}

.shift-matrix-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.shift-matrix-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.shift-count-card {
    min-width: 88px;
    border: 1px solid color-mix(in srgb, var(--shift-color, #5b7cfa) 26%, #fff);
    border-radius: 14px;
    background: color-mix(in srgb, var(--shift-color, #5b7cfa) 12%, #fff);
    padding: 8px 11px;
}

.shift-count-card.total {
    --shift-color: #0ea5e9;
}

.shift-count-card span {
    display: block;
    color: #64748b;
    font-size: .78rem;
    font-weight: 850;
}

.shift-count-card strong {
    color: var(--shift-color, #4f46e5);
    font-size: 1.18rem;
    line-height: 1;
}

.shift-palette {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 10px;
    border: 1px solid var(--app-line);
    border-radius: 16px;
    background: rgba(255,255,255,.86);
    padding: 8px;
}

.shift-palette-label {
    color: #64748b;
    font-weight: 900;
    margin-right: 4px;
}

.shift-token {
    display: inline-flex;
    align-items: center;
    flex-direction: column;
    gap: 2px;
    border: 2px solid transparent;
    border-radius: 13px;
    background: color-mix(in srgb, var(--shift-color, #cbd5e1) 24%, #fff);
    color: color-mix(in srgb, var(--shift-color, #64748b) 82%, #111827);
    font-weight: 950;
    min-width: 74px;
    padding: 7px 10px;
}

.shift-token small {
    color: #64748b;
    font-size: .72rem;
    font-weight: 800;
    line-height: 1;
}

.shift-token.is-active {
    border-color: #111827;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, .08);
}

.shift-matrix-card {
    overflow: hidden;
    padding: 10px !important;
}

.shift-matrix-wrap {
    max-height: 72vh;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 22px;
    background: rgba(255,255,255,.72);
}

.shift-matrix-table {
    min-width: 2300px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: .82rem;
}

.shift-matrix-table th,
.shift-matrix-table td {
    border-color: rgba(226, 232, 240, .86);
}

.shift-matrix-table thead th {
    position: sticky;
    top: 0;
    z-index: 4;
    height: 50px;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: #0f172a;
    text-align: center;
    box-shadow: inset 0 -1px 0 rgba(186, 230, 253, .9);
}

.shift-matrix-table thead th small {
    display: block;
    color: #64748b;
    font-weight: 850;
}

.matrix-sticky {
    position: sticky;
    left: 0;
    z-index: 3;
    background: rgba(255,255,255,.96) !important;
    box-shadow: 1px 0 0 rgba(226, 232, 240, .9), 12px 0 28px -28px rgba(15, 23, 42, .42);
}

.shift-matrix-table thead .matrix-sticky {
    z-index: 5;
    background: linear-gradient(135deg, #e0f2fe, #cffafe) !important;
}

.matrix-person-col {
    min-width: 250px;
}

.matrix-position-col {
    min-width: 178px;
}

.matrix-person {
    display: flex;
    align-items: center;
    gap: 8px;
}

.matrix-person > span {
    display: grid;
    width: 26px;
    height: 26px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 10px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 950;
}

.matrix-person strong,
.matrix-person small {
    display: block;
}

.matrix-person small {
    color: #64748b;
}

.position-pill {
    display: inline-flex;
    max-width: 170px;
    overflow: hidden;
    border-radius: 999px;
    background: linear-gradient(135deg, #dbeafe, #ccfbf1);
    color: #25636a;
    font-size: .76rem;
    font-weight: 850;
    padding: .35rem .55rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.matrix-cell-wrap {
    min-width: 106px;
    padding: 5px !important;
    text-align: center;
    vertical-align: top;
}

.matrix-cell-wrap.is-weekend,
.shift-matrix-table thead th.is-weekend {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
    color: #64748b;
}

.matrix-cell-wrap.is-holiday {
    background: #fff7ed;
}

.matrix-cell {
    display: grid;
    width: 100%;
    min-height: 32px;
    place-items: center;
    border: 1px solid rgba(226, 232, 240, .95);
    border-radius: 14px;
    background: rgba(255,255,255,.88);
    color: #94a3b8;
    font-size: .74rem;
    font-weight: 950;
    line-height: 1.15;
    padding: 4px 7px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.matrix-cell.has-shift {
    border-color: color-mix(in srgb, var(--shift-color) 52%, #fff);
    background:
        linear-gradient(135deg, color-mix(in srgb, var(--shift-color) 32%, #fff), color-mix(in srgb, var(--shift-color) 16%, #fff));
    color: color-mix(in srgb, var(--shift-color) 72%, #111827);
    box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--shift-color) 46%, #fff);
}

.matrix-cell:hover {
    border-color: #7dd3fc;
    box-shadow: 0 0 0 3px rgba(125, 211, 252, .16);
    transform: translateY(-1px);
}

.matrix-ot-row {
    display: grid;
    grid-template-columns: 22px minmax(34px, 1fr) minmax(34px, 1fr);
    gap: 4px;
    align-items: center;
    margin-top: 4px;
}

.matrix-ot-row span {
    color: #0f766e;
    font-size: .64rem;
    font-weight: 950;
}

.matrix-ot-row input {
    min-width: 0;
    height: 24px;
    border: 1px solid rgba(226, 232, 240, .92);
    border-radius: 999px !important;
    background: rgba(255,255,255,.86) !important;
    color: #334155;
    font-size: .62rem !important;
    font-weight: 850;
    padding: 2px 5px;
    text-align: center;
    box-shadow: none !important;
}

.matrix-ot-row input::placeholder {
    color: #cbd5e1;
    font-size: .58rem;
}

.matrix-ot-row input:focus {
    border-color: #5eead4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, .14) !important;
}

.schedule-ot-fields {
    display: grid;
    grid-template-columns: 32px 1fr 1fr;
    gap: 6px;
    align-items: center;
}

.schedule-ot-fields label {
    color: #0f766e;
    font-size: .78rem;
    font-weight: 950;
}

.schedule-dashboard-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,.36);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0%, rgba(45, 212, 191, .55), transparent 30%),
        radial-gradient(circle at 90% 18%, rgba(99, 102, 241, .42), transparent 34%),
        linear-gradient(135deg, #0e7490, #2563eb);
    box-shadow: 0 18px 42px rgba(37, 99, 235, .18);
    color: #fff;
    padding: 18px;
}

.schedule-dashboard-hero h2 {
    margin: 4px 0;
    color: #fff;
    font-size: clamp(1.35rem, 2.35vw, 1.95rem);
}

.schedule-dashboard-hero p {
    margin: 0;
    color: rgba(255,255,255,.8);
}

.schedule-dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.schedule-dashboard-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 14px;
}

.schedule-dashboard-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 1px solid var(--app-line);
    border-radius: 999px;
    background: rgba(255,255,255,.86);
    color: #475569;
    font-weight: 900;
    padding: 9px 14px;
    text-decoration: none;
}

.schedule-dashboard-tabs a.active,
.schedule-dashboard-tabs a:hover {
    border-color: #bae6fd;
    background: linear-gradient(135deg, #0ea5e9, #22c55e);
    color: #fff;
}

.holiday-hero {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 22px;
    background:
        radial-gradient(circle at 16% 8%, rgba(125, 211, 252, .6), transparent 28%),
        radial-gradient(circle at 84% 12%, rgba(167, 139, 250, .38), transparent 32%),
        linear-gradient(135deg, #0891b2, #2563eb);
    box-shadow: 0 18px 42px rgba(37, 99, 235, .16);
    color: #fff;
    padding: 18px;
}

.holiday-hero h2 {
    margin: 4px 0;
    color: #fff;
    font-size: clamp(1.3rem, 2.35vw, 1.9rem);
}

.holiday-hero p {
    max-width: 720px;
    margin: 0;
    color: rgba(255,255,255,.84);
}

.holiday-hero-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.holiday-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.holiday-stat-card {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    border-radius: 18px;
    color: #fff;
    padding: 14px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .08);
}

.holiday-stat-card::after {
    position: absolute;
    right: -34px;
    bottom: -42px;
    width: 108px;
    height: 108px;
    border-radius: 50%;
    background: rgba(255,255,255,.18);
    content: "";
}

.holiday-stat-card i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 12px;
    background: rgba(255,255,255,.22);
    font-size: 1.05rem;
}

.holiday-stat-card span,
.holiday-stat-card small {
    display: block;
    position: relative;
    z-index: 1;
}

.holiday-stat-card span {
    margin-top: 10px;
    color: rgba(255,255,255,.9);
    font-weight: 900;
}

.holiday-stat-card strong {
    display: block;
    position: relative;
    z-index: 1;
    color: #fff;
    font-size: 1.55rem;
    line-height: 1.1;
}

.holiday-stat-card small {
    color: rgba(255,255,255,.78);
}

.holiday-stat-card.blue {
    background: linear-gradient(135deg, #0ea5e9, #2563eb);
}

.holiday-stat-card.green {
    background: linear-gradient(135deg, #14b8a6, #22c55e);
}

.holiday-stat-card.purple {
    background: linear-gradient(135deg, #8b5cf6, #6366f1);
}

.holiday-stat-card.amber {
    background: linear-gradient(135deg, #f59e0b, #f97316);
}

.holiday-year-form {
    display: flex;
    gap: 10px;
}

.holiday-year-form .form-control {
    max-width: 150px;
}

.holiday-note-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.holiday-note {
    min-height: 112px;
    border: 1px solid #dbe7fb;
    border-radius: 17px;
    background: linear-gradient(145deg, rgba(255,255,255,.96), rgba(248,251,255,.9));
    padding: 13px;
}

.holiday-note i {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 11px;
    background: #e0f2fe;
    color: #2563eb;
    font-size: 1rem;
}

.holiday-note strong,
.holiday-note span {
    display: block;
}

.holiday-note strong {
    margin-top: 9px;
    color: var(--app-ink);
}

.holiday-note span {
    margin-top: 4px;
    color: var(--app-muted);
    font-size: .84rem;
}

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

.holiday-month-card {
    border: 1px solid #dbe7fb;
    border-radius: 17px;
    background: rgba(255,255,255,.92);
    padding: 11px;
}

.holiday-month-title {
    margin-bottom: 10px;
    color: var(--app-ink);
    font-weight: 950;
}

.holiday-week-row,
.holiday-day-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 5px;
}

.holiday-week-row {
    margin-bottom: 6px;
    color: #94a3b8;
    font-size: .76rem;
    font-weight: 900;
    text-align: center;
}

.holiday-day {
    display: grid;
    min-height: 26px;
    place-items: center;
    border: 1px solid transparent;
    border-radius: 8px;
    color: #64748b;
    font-size: .76rem;
    font-weight: 850;
}

.holiday-day.is-empty {
    opacity: 0;
}

.holiday-day.has-holiday {
    border-color: #7dd3fc;
    background: linear-gradient(135deg, #e0f2fe, #dbeafe);
    color: #1d4ed8;
}

.holiday-day.has-branch-holiday {
    border-color: #c4b5fd;
    background: linear-gradient(135deg, #ede9fe, #e0f2fe);
    color: #6d28d9;
}

.holiday-list {
    display: grid;
    gap: 9px;
}

.holiday-list-date {
    display: grid;
    grid-template-columns: 78px 1fr;
    gap: 10px;
    align-items: stretch;
}

.holiday-date-pill {
    display: grid;
    place-items: center;
    border: 1px solid #bfdbfe;
    border-radius: 16px;
    background: linear-gradient(135deg, #eff6ff, #ecfeff);
    color: #2563eb;
    padding: 10px;
    text-align: center;
}

.holiday-date-pill strong {
    color: #1e293b;
    font-size: 1.16rem;
    line-height: 1;
}

.holiday-date-pill span {
    color: #64748b;
    font-size: .78rem;
    font-weight: 900;
}

.holiday-list-items {
    display: grid;
    gap: 8px;
}

.holiday-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border: 1px solid #dbe7fb;
    border-radius: 16px;
    background: rgba(255,255,255,.94);
    padding: 11px;
}

.holiday-item-name {
    color: var(--app-ink);
    font-weight: 950;
}

.holiday-item-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
    color: var(--app-muted);
    font-size: .9rem;
}

.holiday-item-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.schedule-kpi-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.schedule-kpi-card {
    position: relative;
    overflow: hidden;
    min-height: 116px;
    border-radius: 18px;
    color: #fff;
    padding: 14px;
    box-shadow: 0 14px 30px rgba(15, 23, 42, .1);
}

.schedule-kpi-card::after {
    position: absolute;
    right: -28px;
    bottom: -38px;
    width: 92px;
    height: 92px;
    border-radius: 50%;
    background: rgba(255,255,255,.15);
    content: "";
}

.schedule-kpi-card i {
    display: grid;
    width: 32px;
    height: 32px;
    place-items: center;
    border-radius: 11px;
    background: rgba(255,255,255,.22);
    font-size: 1rem;
}

.schedule-kpi-card strong {
    display: block;
    margin-top: 12px;
    font-size: 1.55rem;
    line-height: 1;
}

.schedule-kpi-card span {
    display: block;
    margin-top: 4px;
    color: rgba(255,255,255,.86);
    font-weight: 850;
}

.schedule-kpi-card.teal { background: linear-gradient(135deg, #14b8a6, #22c55e); }
.schedule-kpi-card.blue { background: linear-gradient(135deg, #2563eb, #06b6d4); }
.schedule-kpi-card.amber { background: linear-gradient(135deg, #f59e0b, #f97316); }
.schedule-kpi-card.purple { background: linear-gradient(135deg, #8b5cf6, #d946ef); }
.schedule-kpi-card.orange { background: linear-gradient(135deg, #f97316, #ea580c); }
.schedule-kpi-card.red { background: linear-gradient(135deg, #ef4444, #e11d48); }

.schedule-bars {
    display: grid;
    gap: 9px;
}

.schedule-bar-row {
    display: grid;
    grid-template-columns: 78px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.schedule-bars.compact .schedule-bar-row {
    grid-template-columns: 130px minmax(0, 1fr);
}

.schedule-bar-row > span {
    overflow: hidden;
    color: #475569;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.schedule-bar-row > div {
    position: relative;
    overflow: hidden;
    min-height: 28px;
    border-radius: 9px;
    background: #eef2f7;
}

.schedule-bar-row > div::before {
    position: absolute;
    inset: 0 auto 0 0;
    width: var(--bar-width);
    border-radius: inherit;
    background: linear-gradient(90deg, var(--bar-color), color-mix(in srgb, var(--bar-color) 48%, #fff));
    content: "";
}

.schedule-bar-row strong {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    color: #fff;
    font-weight: 950;
}

.schedule-day-load-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
    gap: 8px;
}

.schedule-day-load {
    display: grid;
    grid-template-columns: 28px minmax(0, 1fr) 30px;
    align-items: center;
    gap: 8px;
    border: 1px solid #e5edf8;
    border-radius: 14px;
    background: #fff;
    padding: 7px;
}

.schedule-day-load span,
.schedule-day-load strong {
    color: #334155;
    font-weight: 950;
}

.schedule-day-load div {
    overflow: hidden;
    height: 9px;
    border-radius: 999px;
    background: #e2e8f0;
}

.schedule-day-load i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #06b6d4);
}

.employee-card-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 16px;
}

.employee-card-print-area {
    display: grid;
    place-items: center;
    padding: 18px;
}

.employee-photo-upload-action {
    padding-bottom: 29px;
}

.employee-id-card {
    position: relative;
    box-sizing: border-box;
    width: min(450px, 100%);
    height: 675px;
    overflow: hidden;
    aspect-ratio: 2 / 3;
    border-radius: 34px;
    background:
        radial-gradient(circle at 50% 24%, rgba(236, 180, 112, .18), transparent 24%),
        linear-gradient(145deg, #fffdf9, #fffaf1);
    box-shadow: 0 28px 62px rgba(79, 46, 22, .16);
    color: #1d1d1d;
}

.staff-card {
    border: 2px solid rgba(92, 54, 25, .22);
    padding: 32px 24px 0;
    text-align: center;
}

.staff-card.orange {
    --card-accent: #e85b00;
    --card-dark: #5b3215;
}

.staff-card.brown {
    --card-accent: #7a431f;
    --card-dark: #4c2a14;
}

.staff-brand {
    color: var(--card-dark);
    font-size: 2rem;
    font-weight: 950;
    letter-spacing: .15em;
}

.staff-brand i {
    margin: 0 .08em;
}

.staff-branch {
    margin-top: 6px;
    color: #111827;
    font-size: 1.25rem;
    font-weight: 850;
}

.staff-banner {
    margin: 16px -24px 14px;
    background: linear-gradient(135deg, var(--card-accent), #f59e0b);
    color: #fff;
    font-size: 1.58rem;
    font-weight: 950;
    padding: 12px;
}

.staff-photo {
    display: grid;
    position: relative;
    width: 208px;
    height: 214px;
    margin: 0 auto 14px;
    overflow: hidden;
    place-items: center;
    border: 3px solid var(--card-dark);
    border-radius: 22px;
    background: linear-gradient(145deg, #f8fafc, #e2e8f0);
    color: #8b5a2b;
    font-size: 3.5rem;
    font-weight: 950;
}

.staff-photo img {
    position: absolute;
    inset: 0;
    width: 100% !important;
    max-width: none !important;
    height: 100% !important;
    max-height: none !important;
    display: block;
    border-radius: 18px;
    object-fit: cover !important;
    object-position: center top;
}

.staff-fields {
    display: grid;
    gap: 0;
    margin: 0 6px 14px;
    text-align: left;
}

.staff-fields > div {
    display: grid;
    grid-template-columns: 30px 94px minmax(0, 1fr);
    align-items: center;
    border-bottom: 1px dashed #c8b9ab;
    gap: 8px;
    min-height: 42px;
}

.staff-fields i {
    color: var(--card-dark);
    font-size: 1.12rem;
}

.staff-fields strong {
    color: var(--card-dark);
    font-size: .96rem;
}

.staff-fields span {
    color: #111827;
    font-size: 1rem;
    font-weight: 850;
}

.staff-company {
    display: grid;
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    min-height: 58px;
    place-items: center;
    margin: 0;
    background: linear-gradient(135deg, #4d260f, #7a431f);
    color: #fff;
    font-size: 1.22rem;
    font-weight: 900;
}

.pc-card {
    border: 6px solid #dc5c00;
    padding: 22px 30px;
}

.pc-card::before {
    position: absolute;
    inset: auto -20% -8% -20%;
    height: 240px;
    background: radial-gradient(circle, rgba(246, 155, 67, .18), transparent 68%);
    content: "";
}

.pc-card-logo {
    position: relative;
    display: grid;
    place-items: center;
    margin-bottom: 14px;
}

.dog-mark {
    display: grid;
    width: 96px;
    height: 96px;
    place-items: center;
    border-radius: 50%;
    background: radial-gradient(circle, #fff8ed, #ffd9ad);
    font-size: 2.55rem;
}

.brand-word {
    margin-top: -14px;
    color: #111827;
    font-size: 1.92rem;
    font-weight: 950;
    line-height: .82;
    text-align: center;
    text-shadow: 0 4px 0 rgba(0,0,0,.08);
}

.brand-word span {
    color: #ea580c;
}

.pc-card-title {
    color: #111827;
    font-size: 1.58rem;
    font-weight: 950;
    text-align: center;
}

.pc-card-lines {
    height: 8px;
    margin: 13px 14px;
    border-top: 3px solid #dc5c00;
    border-bottom: 3px solid #dc5c00;
}

.pc-department {
    border-radius: 14px;
    background: linear-gradient(135deg, #f97316, #dc5c00);
    color: #fff;
    font-size: 1.28rem;
    font-weight: 950;
    padding: 10px;
    text-align: center;
}

.pc-info-list {
    position: relative;
    display: grid;
    gap: 11px;
    margin-top: 18px;
}

.pc-info-list > div {
    display: grid;
    grid-template-columns: 38px 102px minmax(0, 1fr);
    align-items: start;
    gap: 10px;
}

.pc-info-list i,
.pc-contract i {
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: linear-gradient(135deg, #f97316, #dc5c00);
    color: #fff;
    font-size: 1rem;
}

.pc-info-list strong,
.pc-contract strong {
    font-size: .96rem;
    font-weight: 950;
}

.pc-info-list span,
.pc-contract span {
    font-size: .92rem;
    font-weight: 800;
}

.pc-contract {
    position: absolute;
    right: 24px;
    bottom: 18px;
    display: grid;
    grid-template-columns: 36px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    max-width: 230px;
    border-left: 3px solid #dc5c00;
    padding-left: 12px;
}

.badge,
.badge-soft,
.text-bg-secondary {
    border: 1px solid #c4b5fd;
    border-radius: 999px;
    background: linear-gradient(135deg, #eff6ff, #f5f3ff) !important;
    color: #4f46e5 !important;
    font-weight: 850;
}

.alert {
    border-radius: 18px;
    border-width: 1px;
}

.alert-info {
    border-color: #bfdbfe;
    background: linear-gradient(135deg, #eff6ff, #e0f2fe);
    color: #1d4ed8;
}

.alert-danger {
    border-color: #cbd5e1;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: #475569;
}

.alert-success {
    border-color: #bbf7d0;
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    color: #15803d;
}

.alert-warning {
    border-color: #bae6fd;
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: #0369a1;
}

/* Compact scale guard for Tailwind-native pages that still use explicit utility sizes. */
.tw-page :is(.p-8, .lg\:p-8) {
    padding: 1.5rem !important;
}

.tw-page :is(.p-6, .p-5, .lg\:p-6) {
    padding: 1.05rem !important;
}

.tw-page :is(.px-6, .px-5, .lg\:px-6) {
    padding-left: 1.05rem !important;
    padding-right: 1.05rem !important;
}

.tw-page :is(.py-5, .py-4) {
    padding-top: .85rem !important;
    padding-bottom: .85rem !important;
}

.tw-page :is(.gap-8, .lg\:gap-8) {
    gap: 1.25rem !important;
}

.tw-page :is(.gap-6, .gap-5, .lg\:gap-6) {
    gap: 1rem !important;
}

.tw-page :is(.rounded-\[2rem\], .rounded-3xl) {
    border-radius: 1.35rem !important;
}

.tw-page :is(.text-5xl) {
    font-size: clamp(1.85rem, 3vw, 2.35rem) !important;
    line-height: 1.08 !important;
}

.tw-page :is(.text-4xl) {
    font-size: clamp(1.6rem, 2.5vw, 2rem) !important;
    line-height: 1.12 !important;
}

.tw-page :is(.text-3xl) {
    font-size: clamp(1.3rem, 2vw, 1.65rem) !important;
    line-height: 1.16 !important;
}

.tw-page :is(.text-2xl) {
    font-size: 1.15rem !important;
    line-height: 1.25 !important;
}

.tw-page :is(.text-xl) {
    font-size: 1rem !important;
    line-height: 1.35 !important;
}

.tw-page :is(.text-lg) {
    font-size: .94rem !important;
}

.tw-page :is(.min-h-72) {
    min-height: 14rem !important;
}

.tw-page :is(.min-h-64) {
    min-height: 12rem !important;
}

.tw-page :is(.h-16, .w-16) {
    height: 3.25rem !important;
    width: 3.25rem !important;
}

.tw-page :is(.h-14, .w-14) {
    height: 3rem !important;
    width: 3rem !important;
}

.tw-page :is(.h-12, .w-12) {
    height: 2.6rem !important;
    width: 2.6rem !important;
}

.tw-page :is(.space-y-6) > :not([hidden]) ~ :not([hidden]) {
    margin-top: 1rem !important;
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 10% 8%, rgba(186, 230, 253, .82), transparent 30%),
        radial-gradient(circle at 54% 0%, rgba(221, 214, 254, .72), transparent 28%),
        radial-gradient(circle at 86% 12%, rgba(207, 250, 254, .7), transparent 28%),
        linear-gradient(180deg, #fbfdff, #f4f9ff);
}

.auth-panel {
    width: min(960px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid var(--app-line);
    border-radius: 28px;
    background: #fff;
    box-shadow: var(--app-shadow);
}

.auth-brand {
    display: flex;
    min-height: 320px;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(135deg, #4564e8 0%, #0ea5e9 48%, #14b8a6 100%);
    color: #fff;
}

.auth-brand h1,
.auth-brand h2,
.auth-brand h3,
.auth-brand .h3 {
    color: #fff;
}

@media (max-width: 991.98px) {
    html {
        font-size: 14px;
    }

    body.mobile-nav-open {
        overflow: hidden;
    }

    .app-navbar {
        max-height: 100svh;
        overflow: visible;
    }

    .app-navbar nav {
        gap: .75rem;
        padding: .75rem;
    }

    #mainNavbar:not(.hidden) {
        display: block;
        max-height: calc(100svh - 76px);
        overflow-y: auto;
        overscroll-behavior: contain;
        padding: .5rem .15rem 1rem;
        scrollbar-width: thin;
    }

    #mainNavbar [data-app-menu] {
        width: 100%;
    }

    #mainNavbar [data-app-menu-button] {
        min-height: 44px;
        width: 100%;
        border-color: rgba(226, 232, 240, .95);
        background: rgba(255, 255, 255, .72);
    }

    #mainNavbar [data-app-menu-panel] {
        margin: .35rem 0 .65rem;
        border: 1px solid rgba(226, 232, 240, .9) !important;
        background: rgba(248, 251, 255, .92) !important;
        box-shadow: none !important;
    }

    #mainNavbar [data-app-menu-panel] a {
        min-height: 44px;
    }

    #mainNavbar [data-app-menu-panel] i {
        height: 34px;
        width: 34px;
    }

    .app-navbar .user-pill {
        max-width: calc(100vw - 130px);
        padding: .65rem .85rem;
    }

    .app-navbar .user-name-text {
        max-width: 42vw;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .notification-menu {
        position: fixed !important;
        inset: 76px 12px auto 12px !important;
        width: auto !important;
        max-height: calc(100svh - 96px);
        overflow-y: auto;
        overscroll-behavior: contain;
    }

    .app-main > section {
        padding: 1rem !important;
    }

    .app-main > section h1 {
        font-size: 1.45rem !important;
        line-height: 1.2 !important;
    }

    .app-shell {
        display: block;
    }

    .app-sidebar {
        width: auto;
        min-height: auto;
        border-right: 0;
        border-bottom: 1px solid var(--app-line);
    }

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

    .nav-section-title {
        grid-column: 1 / -1;
    }

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

    .topbar-actions {
        width: 100%;
        justify-content: space-between;
    }

    .user-pill {
        width: auto;
        max-width: none;
        text-align: left;
    }

    .user-name {
        justify-content: flex-start;
    }

    .app-content {
        padding: 14px;
    }

    .tw-page {
        gap: .9rem !important;
        padding: .9rem !important;
    }

    .tw-card,
    .tw-glass-card,
    .content-card,
    .stat-card {
        border-radius: 1.5rem !important;
    }

    .tw-page :is(.grid-cols-3, .grid-cols-4, .lg\:grid-cols-3, .lg\:grid-cols-4, .xl\:grid-cols-3, .xl\:grid-cols-4) {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .tw-page :is(.p-8, .p-7, .lg\:p-8) {
        padding: 1.15rem !important;
    }

    .tw-page :is(.text-5xl, .text-4xl) {
        font-size: 1.65rem !important;
        line-height: 1.12 !important;
    }

    .tw-page :is(.text-3xl) {
        font-size: 1.35rem !important;
    }

    .tw-page :is(.flex-row.lg\:items-center, .lg\:flex-row, .xl\:flex-row) {
        align-items: stretch !important;
    }

    .table {
        font-size: .82rem;
    }

    .table thead th,
    .table tbody td {
        padding: .7rem .75rem;
        white-space: nowrap;
    }

    .overflow-x-auto,
    .overflow-auto,
    .table-responsive {
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }

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

    .schedule-week-header,
    .schedule-calendar-grid,
    .schedule-overview-week-header,
    .schedule-overview-calendar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 575.98px) {
    body {
        background:
            radial-gradient(circle at 0% 0%, rgba(224, 242, 254, .48), transparent 34%),
            radial-gradient(circle at 100% 0%, rgba(204, 251, 241, .32), transparent 32%),
            linear-gradient(180deg, #ffffff, #f8fafc);
    }

    .app-navbar nav {
        padding: .65rem;
    }

    .app-navbar .brand-kicker,
    .app-navbar .topbar-kicker,
    .app-navbar .hero-kicker {
        font-size: .6rem;
    }

    .app-navbar a[href*="dashboard"] span:last-child span:first-child {
        font-size: .58rem;
        letter-spacing: .08em;
    }

    .app-navbar a[href*="dashboard"] span:last-child span:last-child {
        font-size: .98rem;
    }

    #mainNavbar:not(.hidden) {
        max-height: calc(100svh - 68px);
    }

    .app-navbar .user-pill {
        max-width: calc(100vw - 92px);
    }

    .app-navbar .user-name-text {
        max-width: 52vw;
    }

    .notification-menu {
        inset: 68px 10px auto 10px !important;
        max-height: calc(100svh - 82px);
        border-radius: 1.35rem;
    }

    .notification-item {
        grid-template-columns: 34px 1fr auto;
        gap: .65rem;
        padding: .75rem;
    }

    .app-main > section {
        padding: .9rem !important;
    }

    .app-main > section h1 {
        font-size: 1.28rem !important;
    }

    .app-content {
        padding: 10px;
    }

    .tw-page {
        padding: .7rem !important;
    }

    .tw-page :is(.grid-cols-2, .grid-cols-3, .grid-cols-4, .sm\:grid-cols-2, .md\:grid-cols-2, .md\:grid-cols-3, .lg\:grid-cols-2, .lg\:grid-cols-3, .lg\:grid-cols-4, .xl\:grid-cols-2, .xl\:grid-cols-3, .xl\:grid-cols-4) {
        grid-template-columns: 1fr !important;
    }

    .tw-page :is(.flex, .inline-flex).flex-wrap {
        gap: .55rem !important;
    }

    .tw-page :is(.tw-btn, .tw-btn-primary, .tw-btn-soft, .btn) {
        width: 100%;
        min-height: 42px;
    }

    .tw-page :is(.tw-input, .form-control, .form-select, input, select, textarea) {
        min-height: 42px;
        font-size: 16px !important;
    }

    .tw-page :is(.text-5xl, .text-4xl, .text-3xl) {
        font-size: 1.28rem !important;
        line-height: 1.18 !important;
    }

    .tw-page :is(.text-2xl) {
        font-size: 1.05rem !important;
    }

    .tw-page :is(.text-xl, .text-lg) {
        font-size: .94rem !important;
    }

    .tw-page :is(.p-8, .p-7, .p-6, .p-5, .lg\:p-8, .lg\:p-6) {
        padding: .85rem !important;
    }

    .tw-page :is(.px-6, .px-5, .lg\:px-6) {
        padding-left: .85rem !important;
        padding-right: .85rem !important;
    }

    .tw-page :is(.min-h-72, .min-h-64) {
        min-height: 9rem !important;
    }

    .table {
        min-width: 680px;
    }

    .table thead th,
    .table tbody td {
        padding: .62rem .65rem;
    }

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

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

    .section-heading,
    .card-title-row,
    .alert-item {
        align-items: flex-start;
        flex-direction: column;
    }

    .topbar-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .notification-button,
    .logout-link {
        width: 100%;
    }

    .notification-button {
        justify-content: center;
    }

    .schedule-person-card {
        align-items: flex-start;
        flex-direction: column;
    }

    .schedule-week-header {
        display: none;
    }

    .schedule-calendar-grid,
    .schedule-overview-calendar {
        grid-template-columns: 1fr;
    }

    .shift-matrix-hero {
        flex-direction: column;
    }

    .schedule-dashboard-hero {
        flex-direction: column;
    }

    .holiday-hero {
        flex-direction: column;
    }

    .payroll-module-hero {
        flex-direction: column;
    }

    .shift-matrix-actions {
        justify-content: flex-start;
    }

    .schedule-dashboard-actions {
        justify-content: flex-start;
    }

    .holiday-hero-actions {
        justify-content: flex-start;
    }

    .payroll-module-actions {
        justify-content: flex-start;
    }

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

    .holiday-stats-grid,
    .holiday-note-grid,
    .holiday-year-calendar,
    .payroll-kpi-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shift-palette {
        align-items: flex-start;
        flex-direction: column;
    }

    .schedule-kpi-grid {
        grid-template-columns: 1fr;
    }

    .holiday-stats-grid,
    .holiday-note-grid,
    .holiday-year-calendar,
    .payroll-kpi-grid {
        grid-template-columns: 1fr;
    }

    .holiday-year-form,
    .holiday-list-item,
    .holiday-item-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .holiday-year-form .form-control {
        max-width: none;
    }

    .holiday-list-date {
        grid-template-columns: 1fr;
    }

    .schedule-day-empty,
    .schedule-overview-day.is-empty {
        display: none;
    }

    .schedule-quick-panel .form-select {
        max-width: none;
        width: 100%;
    }

    .employee-card-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .employee-id-card {
        transform-origin: top center;
    }

    .employee-photo-upload-action {
        padding-bottom: 0;
    }
}

.pc-branch-public {
    overflow-x: hidden;
    background:
        radial-gradient(circle at 16% 10%, rgba(125, 211, 252, .26), transparent 30%),
        radial-gradient(circle at 82% 8%, rgba(94, 234, 212, .24), transparent 28%),
        linear-gradient(145deg, #f8fafc 0%, #f0f9ff 48%, #ecfeff 100%);
}

.pc-branch-shell {
    width: min(100%, 860px);
    min-height: 100svh;
    margin: 0 auto;
    padding: clamp(18px, 4vw, 46px) 16px;
    display: grid;
    align-content: center;
    gap: 16px;
}

.pc-branch-hero,
.pc-branch-form-card,
.pc-branch-admin-hero,
.pc-branch-qr-card {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .82);
    background: rgba(255, 255, 255, .78);
    box-shadow: 0 34px 90px -54px rgba(15, 23, 42, .45);
    backdrop-filter: blur(22px);
}

.pc-branch-hero {
    padding: clamp(28px, 5vw, 48px);
    border-radius: 34px;
    text-align: center;
}

.pc-branch-orb {
    position: absolute;
    width: 170px;
    height: 170px;
    border-radius: 999px;
    filter: blur(8px);
    opacity: .55;
    pointer-events: none;
}

.pc-branch-orb-one {
    top: -86px;
    left: -48px;
    background: #bae6fd;
}

.pc-branch-orb-two {
    right: -54px;
    bottom: -94px;
    background: #99f6e4;
}

.pc-branch-hero-mark {
    position: relative;
    z-index: 1;
    display: grid;
    width: 72px;
    height: 72px;
    margin: 0 auto;
    place-items: center;
    border-radius: 24px;
    background: linear-gradient(135deg, #7dd3fc, #5eead4);
    color: #0f172a;
    font-size: 1.75rem;
    box-shadow: 0 26px 54px -34px rgba(14, 165, 233, .86);
}

.pc-branch-kicker,
.pc-branch-admin-steps span {
    position: relative;
    z-index: 1;
    color: #0284c7;
    font-size: .72rem;
    font-weight: 950;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.pc-branch-hero h1,
.pc-branch-admin-hero h1 {
    position: relative;
    z-index: 1;
    margin: 10px 0 0;
    color: #0f172a;
    font-size: clamp(2.1rem, 7vw, 4.2rem);
    font-weight: 950;
    letter-spacing: -.075em;
    line-height: .95;
}

.pc-branch-hero p,
.pc-branch-admin-hero p {
    position: relative;
    z-index: 1;
    width: min(100%, 620px);
    margin: 16px auto 0;
    color: #64748b;
    font-size: .96rem;
    font-weight: 700;
    line-height: 1.85;
}

.pc-branch-steps {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 24px;
}

.pc-branch-steps div,
.pc-branch-admin-steps div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    border: 1px solid rgba(226, 232, 240, .76);
    border-radius: 18px;
    background: rgba(255, 255, 255, .72);
    color: #334155;
    font-size: .86rem;
    font-weight: 900;
}

.pc-branch-steps span {
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #e0f2fe;
    color: #0284c7;
    font-size: .72rem;
    font-weight: 950;
}

.pc-branch-form-card {
    padding: clamp(20px, 4vw, 32px);
    border-radius: 30px;
}

.pc-branch-form {
    display: grid;
    gap: 17px;
}

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

.pc-branch-label {
    display: block;
    margin-bottom: 8px;
    color: #334155;
    font-size: .86rem;
    font-weight: 950;
}

.pc-branch-input {
    width: 100%;
    min-height: 54px;
    border: 1px solid rgba(203, 213, 225, .82);
    border-radius: 18px;
    background: rgba(255, 255, 255, .9);
    color: #0f172a;
    font-size: 1rem;
    font-weight: 800;
    outline: none;
    padding: 0 18px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .95);
    transition: border-color .24s ease, box-shadow .24s ease, background .24s ease;
}

.pc-branch-input:focus {
    border-color: #38bdf8;
    background: #fff;
    box-shadow: 0 0 0 4px rgba(56, 189, 248, .16);
}

.pc-branch-code-input {
    font-size: 1.2rem;
    letter-spacing: .42em;
}

.pc-branch-textarea {
    min-height: 112px;
    padding-top: 14px;
    resize: vertical;
}

.pc-branch-help {
    margin-top: 8px;
    color: #64748b;
    font-size: .78rem;
    font-weight: 750;
}

.pc-branch-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 56px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #38bdf8, #14b8a6);
    color: #fff;
    font-weight: 950;
    box-shadow: 0 26px 54px -34px rgba(14, 165, 233, .86);
    transition: transform .24s ease, box-shadow .24s ease;
}

.pc-branch-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 30px 62px -36px rgba(14, 165, 233, .96);
}

.pc-branch-alert {
    border-radius: 24px;
    padding: 16px 18px;
    font-size: .9rem;
    font-weight: 850;
    line-height: 1.75;
}

.pc-branch-alert-success {
    border: 1px solid #a7f3d0;
    background: rgba(236, 253, 245, .86);
    color: #047857;
}

.pc-branch-alert-warning {
    border: 1px solid #fde68a;
    background: rgba(255, 251, 235, .9);
    color: #92400e;
}

.pc-branch-admin-hero {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, .75fr);
    gap: 24px;
    align-items: center;
    border-radius: 34px;
    padding: clamp(22px, 4vw, 36px);
}

.pc-branch-admin-copy {
    min-width: 0;
}

.pc-branch-admin-hero h1 {
    font-size: clamp(2rem, 4.5vw, 3.6rem);
}

.pc-branch-admin-hero p {
    margin-left: 0;
}

.pc-branch-admin-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin-top: 22px;
}

.pc-branch-admin-steps div {
    flex-direction: column;
    align-items: flex-start;
    padding: 14px 16px;
}

.pc-branch-admin-steps strong {
    color: #0f172a;
    font-size: .95rem;
}

.pc-branch-qr-card {
    padding: 22px;
    border-radius: 30px;
    text-align: center;
}

.pc-branch-qr-image {
    width: min(100%, 245px);
    height: auto;
    margin: 0 auto;
    border: 1px solid rgba(226, 232, 240, .9);
    border-radius: 28px;
    background: #fff;
    padding: 14px;
    box-shadow: 0 24px 54px -38px rgba(15, 23, 42, .45);
}

.pc-branch-qr-url {
    margin-top: 16px;
    border-radius: 20px;
    background: rgba(248, 250, 252, .86);
    color: #64748b;
    font-size: .78rem;
    font-weight: 850;
    line-height: 1.65;
    padding: 13px 14px;
    text-align: left;
    word-break: break-all;
}

.pc-branch-qr-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 16px;
}

@media (max-width: 991.98px) {
    .pc-branch-admin-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 575.98px) {
    .pc-branch-shell {
        align-content: start;
        padding-top: 18px;
    }

    .pc-branch-hero,
    .pc-branch-form-card {
        border-radius: 26px;
    }

    .pc-branch-steps,
    .pc-branch-form-grid,
    .pc-branch-admin-steps {
        grid-template-columns: 1fr;
    }

    .pc-branch-hero h1 {
        font-size: 2.15rem;
        line-height: 1.04;
    }
}

@media print {
    @page {
        size: A4 portrait;
        margin: 8mm;
    }

    body {
        background: #fff !important;
    }

    .app-sidebar,
    .app-navbar,
    .topbar,
    .no-print,
    .employee-card-toolbar {
        display: none !important;
    }

    .app-shell,
    .app-main,
    .app-content {
        display: block;
        width: 100%;
        min-height: auto;
        padding: 0;
    }

    .content-card,
    .stat-card {
        box-shadow: none;
    }

    .employee-card-print-area {
        display: block;
        padding: 0;
        text-align: center;
    }

    .employee-id-card {
        width: 450px;
        height: 675px;
        min-height: auto;
        margin: 0 auto;
        box-shadow: none;
        page-break-inside: avoid;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }
}
