/* ESS — Employee Self Service (HiPE) */

.ess-body {
    margin: 0;
    background:
        radial-gradient(1200px 500px at 10% -10%, rgba(135, 204, 255, .28), transparent 55%),
        radial-gradient(900px 420px at 100% 0%, rgba(250, 219, 25, .18), transparent 50%),
        var(--bg, #F6F6EF);
    color: var(--text, #19191A);
    font-family: 'Geist', system-ui, sans-serif;
}

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

.ess-sidebar {
    background: var(--ink, #19191A);
    color: #FDFFF1;
    padding: 22px 16px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.ess-brand-sub {
    margin-top: 8px;
    font-size: 12px;
    opacity: .7;
}

.ess-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.ess-nav-item {
    color: rgba(253, 255, 241, .78);
    text-decoration: none;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
}

.ess-nav-item:hover {
    background: rgba(253, 255, 241, .08);
    color: #FDFFF1;
}

.ess-nav-item.active {
    background: #E50008;
    color: #FDFFF1;
}

.ess-sidebar-foot {
    border-top: 1px solid rgba(253, 255, 241, .12);
    padding-top: 14px;
    display: grid;
    gap: 10px;
}

.ess-user-name {
    font-size: 13px;
    font-weight: 600;
}

.ess-user-email {
    font-size: 11px;
    opacity: .65;
    word-break: break-all;
}

.ess-main {
    padding: 28px 32px 48px;
}

.ess-top {
    margin-bottom: 18px;
}

.ess-title {
    margin: 0;
    font-family: 'Archivo', 'Geist', sans-serif;
    font-size: 28px;
    font-weight: 650;
    letter-spacing: -.02em;
}

.ess-content {
    max-width: 980px;
}

.ess-hero {
    margin-bottom: 22px;
}

.ess-eyebrow {
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: 11px;
    color: var(--muted, #6E6E68);
    margin: 0 0 8px;
}

.ess-hero-title {
    margin: 0;
    font-family: 'Archivo', sans-serif;
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 700;
    letter-spacing: -.03em;
}

.ess-hero-sub {
    margin: 8px 0 0;
    color: var(--muted, #6E6E68);
}

.ess-kpi-row {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 22px;
}

.ess-kpi {
    background: rgba(255, 255, 255, .78);
    border: 1px solid var(--line, #E9E9E2);
    border-radius: 14px;
    padding: 14px 16px;
}

.ess-kpi-label {
    font-size: 12px;
    color: var(--muted, #6E6E68);
}

.ess-kpi-value {
    margin-top: 6px;
    font-size: 24px;
    font-weight: 700;
    letter-spacing: -.02em;
}

.ess-section-title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 650;
}

.ess-stack {
    display: grid;
    gap: 10px;
}

.ess-card {
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line, #E9E9E2);
    border-radius: 14px;
    padding: 14px 16px;
}

.ess-card h4 {
    margin: 0 0 6px;
    font-size: 15px;
}

.ess-card p,
.ess-muted {
    margin: 0;
    color: var(--muted, #6E6E68);
    font-size: 13px;
}

.ess-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.ess-chip {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    background: var(--blue-50, #E8F0FC);
    color: var(--blue, #004CC2);
}

.ess-chip.warn {
    background: var(--yellow-50, #FEF9E0);
    color: #8A6D00;
}

.ess-chip.danger {
    background: var(--red-50, #FDECEC);
    color: var(--red, #E50008);
}

.ess-chip.ok {
    background: var(--green-50, #E6F3E9);
    color: var(--green, #00801C);
}

.ess-dl-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 16px;
}

.ess-dl-item {
    background: rgba(255, 255, 255, .82);
    border: 1px solid var(--line, #E9E9E2);
    border-radius: 12px;
    padding: 12px 14px;
}

.ess-dl-item dt {
    font-size: 11px;
    color: var(--muted, #6E6E68);
    margin: 0 0 4px;
}

.ess-dl-item dd {
    margin: 0;
    font-size: 14px;
    font-weight: 560;
    word-break: break-word;
}

.ess-note {
    font-size: 13px;
    color: var(--muted, #6E6E68);
    margin: 0 0 14px;
}

.ess-split {
    display: grid;
    grid-template-columns: 1.2fr .8fr;
    gap: 22px;
}

.ess-form,
.ess-auth-form {
    display: grid;
    gap: 8px;
}

.ess-label {
    font-size: 12px;
    font-weight: 600;
    margin-top: 4px;
}

.ess-input {
    width: 100%;
    border: 1px solid var(--line-strong, #DCDCD2);
    border-radius: 10px;
    padding: 10px 12px;
    font: inherit;
    background: #fff;
}

.ess-textarea {
    resize: vertical;
    min-height: 110px;
}

.ess-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 0;
    border-radius: 10px;
    padding: 11px 14px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
}

.ess-btn-primary {
    background: #E50008;
    color: #FDFFF1;
}

.ess-btn-ghost {
    background: transparent;
    color: #FDFFF1;
    border: 1px solid rgba(253, 255, 241, .25);
}

.ess-btn-google {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    background: #fff;
    color: #19191A;
    border: 1px solid var(--line-strong, #DCDCD2);
}

.ess-auth-form .ess-btn-primary {
    width: 100%;
}

.ess-check-inline {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--muted, #6E6E68);
    margin: 4px 0 8px;
}

.ess-check-inline input {
    margin: 0;
}

.ess-auth {
    min-height: 100vh;
    display: grid;
    place-items: center;
    background:
        linear-gradient(160deg, rgba(25, 25, 26, .92), rgba(25, 25, 26, .78)),
        radial-gradient(800px 400px at 20% 10%, rgba(229, 0, 8, .35), transparent 60%),
        #19191A;
    padding: 24px;
}

.ess-auth-shell {
    width: min(420px, 100%);
}

.ess-auth-panel {
    background: #FDFFF1;
    border-radius: 18px;
    padding: 28px 24px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}

.ess-auth-brand {
    margin-bottom: 18px;
}

.ess-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 4px;
    margin-bottom: 16px;
    background: #EFEFE8;
    border-radius: 12px;
}

.ess-tab {
    border: 0;
    background: transparent;
    color: #6E6E68;
    font: inherit;
    font-weight: 600;
    font-size: 13px;
    padding: 10px 12px;
    border-radius: 9px;
    cursor: pointer;
}

.ess-tab.active {
    background: #fff;
    color: #19191A;
    box-shadow: 0 1px 2px rgba(25, 25, 26, .06);
}

.ess-tab-panel {
    display: none;
}

.ess-tab-panel.active {
    display: block;
}

.ess-auth-sub {
    margin: 8px 0 0;
    color: #6E6E68;
    font-size: 14px;
}

.ess-auth-divider {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
    color: #9A9A93;
    font-size: 12px;
}

.ess-auth-divider::before,
.ess-auth-divider::after {
    content: '';
    height: 1px;
    background: #E9E9E2;
}

.ess-auth-note {
    margin: 14px 0 0;
    font-size: 12px;
    color: #6E6E68;
    line-height: 1.45;
}

.ess-alert {
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    margin-bottom: 12px;
}

.ess-alert-ok {
    background: #E6F3E9;
    color: #00801C;
}

.ess-alert-err {
    background: #FDECEC;
    color: #E50008;
}

.ess-toast {
    position: fixed;
    right: 18px;
    bottom: 18px;
    background: #19191A;
    color: #FDFFF1;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 13px;
    z-index: 50;
}

.ess-empty {
    padding: 18px;
    border: 1px dashed var(--line-strong, #DCDCD2);
    border-radius: 14px;
    color: var(--muted, #6E6E68);
    font-size: 14px;
}

.ess-check {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line, #E9E9E2);
    font-size: 14px;
}

.ess-check:last-child {
    border-bottom: 0;
}

.ess-check-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #DCDCD2;
}

.ess-check-dot.on {
    background: #00801C;
}

@media (max-width: 960px) {
    .ess-app {
        grid-template-columns: 1fr;
    }

    .ess-sidebar {
        position: sticky;
        top: 0;
        z-index: 5;
    }

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

    .ess-kpi-row,
    .ess-dl-grid,
    .ess-split {
        grid-template-columns: 1fr;
    }

    .ess-main {
        padding: 18px 16px 40px;
    }
}
