/* =========================================================
   SIP-GAJI Digital — Flip7-inspired design system
   Retro-playful teal / coral / gold payroll interface
   ========================================================= */

:root {
    --teal: #2BA8A2;
    --teal-light: #3CC4BD;
    --teal-dark: #1E8C86;
    --teal-deep: #123F3C;
    --teal-bg: #E8F6F5;
    --gold: #FFD23F;
    --gold-light: #FFE47A;
    --gold-dark: #E6B800;
    --coral: #EF6C4A;
    --coral-light: #FF8A6A;
    --coral-dark: #D45233;
    --cream: #FFF8E7;
    --cream-deep: #F2E6C8;
    --sky: #5DADE2;
    --surface: #EFF8F7;
    --card: #FFFFFF;
    --ink: #173E3B;
    --ink-soft: #54716F;
    --ink-muted: #7D9795;
    --line: #D8ECE9;
    --line-strong: #C4E2DE;
    --success: #27AE60;
    --error: #E74C3C;
    --silver: #C3CED8;
    --silver-deep: #8B9BA8;
    --bronze: #CC8756;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-xl: 32px;
    --radius-round: 999px;

    --shadow-sm: 0 2px 8px rgba(23, 62, 59, 0.08);
    --shadow-md: 0 4px 16px rgba(23, 62, 59, 0.12);
    --shadow-lg: 0 8px 32px rgba(23, 62, 59, 0.16);
    --shadow-card: 0 4px 20px rgba(43, 168, 162, 0.10);
    --shadow-coral-glow: 0 4px 20px rgba(239, 108, 74, 0.35);
    --shadow-teal-glow: 0 4px 20px rgba(43, 168, 162, 0.30);
    --shadow-accent-glow: 0 4px 20px rgba(255, 210, 63, 0.40);
    --shadow-sky-glow: 0 4px 16px rgba(93, 173, 226, 0.30);
    --shadow-focus: 0 0 0 4px rgba(43, 168, 162, 0.15);

    --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
    --bounce: cubic-bezier(0.34, 1.56, 0.64, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--ink);
    background: var(--surface);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image:
        radial-gradient(rgba(43, 168, 162, 0.11) 1.6px, transparent 1.6px),
        radial-gradient(rgba(255, 210, 63, 0.10) 1.6px, transparent 1.6px);
    background-position: 0 0, 22px 22px;
    background-size: 44px 44px;
}

body.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        radial-gradient(circle at 10% 10%, rgba(60, 196, 189, 0.22), transparent 32%),
        radial-gradient(circle at 90% 85%, rgba(255, 210, 63, 0.26), transparent 28%),
        var(--surface);
}

h1, h2, h3, h4, p {
    margin: 0;
}

button,
input,
select,
textarea {
    font: inherit;
    color: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

img,
svg {
    display: block;
}

[hidden] {
    display: none !important;
}

::selection {
    background: var(--gold);
    color: var(--teal-deep);
}

:focus-visible {
    outline: 3px solid var(--gold);
    outline-offset: 3px;
}

/* =========================================================
   Brand / retro logo
   ========================================================= */

.brand {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    padding: 14px 24px 16px;
    isolation: isolate;
}

.brand-fan {
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    z-index: 1;
    pointer-events: none;
}

.fan-card {
    position: absolute;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: 54px;
    height: 76px;
    border: 3px solid var(--teal-deep);
    border-radius: 9px;
    font-size: 18px;
    font-weight: 900;
    color: var(--teal-deep);
    box-shadow: var(--shadow-sm);
    transform-origin: 50% 90%;
}

.fan-card--coral {
    background: var(--coral);
    color: #fff;
    --rot: -24deg;
    --shift: -40px;
    transform: translate(-50%, -50%) rotate(var(--rot)) translateX(var(--shift));
}

.fan-card--sky {
    background: var(--sky);
    color: #fff;
    --rot: -12deg;
    --shift: -20px;
    transform: translate(-50%, -50%) rotate(var(--rot)) translateX(var(--shift));
}

.fan-card--gold {
    background: var(--gold);
    --rot: 0deg;
    --shift: 0px;
    transform: translate(-50%, -50%) rotate(var(--rot));
}

.fan-card--cream {
    background: var(--cream);
    --rot: 12deg;
    --shift: 20px;
    transform: translate(-50%, -50%) rotate(var(--rot)) translateX(var(--shift));
}

.fan-card--teal {
    background: var(--teal-light);
    color: #fff;
    --rot: 24deg;
    --shift: 40px;
    transform: translate(-50%, -50%) rotate(var(--rot)) translateX(var(--shift));
}

.brand-plate {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: baseline;
    gap: 5px;
    padding: 4px 18px 2px;
    background: var(--cream);
    border: 3px solid var(--teal-deep);
    border-radius: 12px;
    box-shadow: 0 7px 0 rgba(18, 63, 60, 0.16);
    transform: skewX(-6deg) rotate(-3deg);
}

.brand-word {
    display: inline-block;
    font-weight: 900;
    line-height: 0.9;
}

.brand-word--sip {
    font-size: 30px;
    letter-spacing: 2px;
    color: var(--teal-dark);
    text-shadow: 0 1px 0 #fff;
}

.brand-word--gaji {
    font-size: 44px;
    letter-spacing: -1.5px;
    color: var(--gold);
    transform: rotate(4deg);
    text-shadow:
        0 2px 0 var(--teal-deep),
        0 -1px 0 var(--teal-deep),
        2px 0 0 var(--teal-deep),
        -2px 0 0 var(--teal-deep),
        0 5px 0 rgba(18, 63, 60, 0.22);
}

.brand-ribbon {
    position: absolute;
    z-index: 4;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%) rotate(-1deg);
    padding: 2px 30px 3px;
    background: var(--cream);
    border: 3px solid var(--teal-deep);
    border-radius: 3px;
    color: var(--teal-dark);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 4px;
    line-height: 1.2;
    white-space: nowrap;
    box-shadow: 0 3px 0 rgba(18, 63, 60, 0.14);
}

.brand-ribbon::before,
.brand-ribbon::after {
    content: "";
    position: absolute;
    top: 6px;
    width: 20px;
    height: 22px;
    background: var(--cream-deep);
    border: 3px solid var(--teal-deep);
    border-radius: 3px;
    z-index: -1;
}

.brand-ribbon::before {
    left: -14px;
    transform: rotate(-8deg);
}

.brand-ribbon::after {
    right: -14px;
    transform: rotate(8deg);
}

.brand--lg {
    padding: 20px 32px 22px;
}

.brand--lg .fan-card {
    width: 72px;
    height: 100px;
    font-size: 25px;
}

.brand--lg .fan-card--coral { --shift: -54px; }
.brand--lg .fan-card--sky { --shift: -27px; }
.brand--lg .fan-card--cream { --shift: 27px; }
.brand--lg .fan-card--teal { --shift: 54px; }

.brand--lg .brand-plate {
    padding: 6px 24px 4px;
    border-radius: 16px;
    gap: 7px;
    box-shadow: 0 9px 0 rgba(18, 63, 60, 0.18);
}

.brand--lg .brand-word--sip { font-size: 42px; letter-spacing: 3px; }
.brand--lg .brand-word--gaji { font-size: 62px; }
.brand--lg .brand-ribbon {
    font-size: 12px;
    letter-spacing: 6px;
    padding: 3px 40px 4px;
    bottom: -2px;
}

.brand--sm {
    padding: 10px 18px 12px;
}

.brand--sm .fan-card {
    width: 38px;
    height: 54px;
    border-width: 2px;
    border-radius: 7px;
    font-size: 12px;
}

.brand--sm .fan-card--coral { --shift: -28px; }
.brand--sm .fan-card--sky { --shift: -14px; }
.brand--sm .fan-card--cream { --shift: 14px; }
.brand--sm .fan-card--teal { --shift: 28px; }

.brand--sm .brand-plate {
    padding: 3px 12px 2px;
    border-width: 2px;
    border-radius: 9px;
    box-shadow: 0 4px 0 rgba(18, 63, 60, 0.16);
}

.brand--sm .brand-word--sip { font-size: 19px; letter-spacing: 1.5px; }
.brand--sm .brand-word--gaji { font-size: 27px; }
.brand--sm .brand-ribbon {
    font-size: 6.5px;
    letter-spacing: 2.7px;
    padding: 1px 18px 2px;
    border-width: 2px;
    bottom: 1px;
}

.brand--sm .brand-ribbon::before,
.brand--sm .brand-ribbon::after {
    width: 12px;
    height: 14px;
    border-width: 2px;
    top: 3px;
}

.brand--sm .brand-ribbon::before { left: -9px; }
.brand--sm .brand-ribbon::after { right: -9px; }

.brand--xs {
    padding: 7px 12px 9px;
}

.brand--xs .fan-card {
    width: 28px;
    height: 39px;
    border-width: 2px;
    border-radius: 5px;
    font-size: 9px;
}

.brand--xs .fan-card--coral { --shift: -20px; }
.brand--xs .fan-card--sky { --shift: -10px; }
.brand--xs .fan-card--cream { --shift: 10px; }
.brand--xs .fan-card--teal { --shift: 20px; }

.brand--xs .brand-plate {
    padding: 2px 8px 1px;
    border-width: 2px;
    border-radius: 6px;
    box-shadow: 0 3px 0 rgba(18, 63, 60, 0.16);
}

.brand--xs .brand-word--sip { font-size: 13px; letter-spacing: 1px; }
.brand--xs .brand-word--gaji { font-size: 19px; }
.brand--xs .brand-ribbon {
    font-size: 4.5px;
    letter-spacing: 1.8px;
    padding: 0 12px 1px;
    border-width: 1.5px;
    bottom: 1px;
}

.brand--xs .brand-ribbon::before,
.brand--xs .brand-ribbon::after {
    width: 8px;
    height: 10px;
    border-width: 1.5px;
    top: 2px;
}

.brand--xs .brand-ribbon::before { left: -6px; }
.brand--xs .brand-ribbon::after { right: -6px; }

/* =========================================================
   Shared primitives
   ========================================================= */

.eyebrow {
    display: inline-block;
    color: var(--teal-dark);
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 2.4px;
    line-height: 1.2;
    text-transform: uppercase;
}

.ribbon-label {
    display: inline-block;
    padding: 5px 14px;
    background: var(--gold);
    border: 2px solid var(--teal-deep);
    border-radius: 4px;
    color: var(--teal-deep);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 2.2px;
    box-shadow: 0 3px 0 rgba(18, 63, 60, 0.20);
    transform: rotate(-1.2deg);
}

.ico {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--teal-bg);
    font-size: 19px;
    line-height: 1;
}

.ico--gold { background: var(--gold-light); box-shadow: var(--shadow-accent-glow); }
.ico--teal { background: var(--teal-bg); }
.ico--coral { background: rgba(239, 108, 74, 0.14); }
.ico--sky { background: rgba(93, 173, 226, 0.15); }
.ico--sm { width: 30px; height: 30px; border-radius: 10px; font-size: 15px; }

.avatar {
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, var(--teal-light), var(--teal-dark));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35), 0 3px 10px rgba(43, 168, 162, 0.25);
    color: #fff;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.5px;
}

.avatar--gold {
    background: linear-gradient(145deg, var(--gold-light), var(--gold-dark));
    color: var(--teal-deep);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55), 0 3px 10px rgba(230, 184, 0, 0.28);
}

.avatar--sm { width: 32px; height: 32px; font-size: 11px; }
.avatar--lg { width: 56px; height: 56px; font-size: 17px; }
.avatar--xl { width: 76px; height: 76px; font-size: 23px; }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 26px;
    padding: 3px 10px;
    border-radius: var(--radius-round);
    background: var(--teal-bg);
    color: var(--teal-dark);
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.5px;
    line-height: 1.1;
    white-space: nowrap;
}

.badge::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.badge--gold { background: var(--gold-light); color: #705400; }
.badge--coral { background: rgba(239, 108, 74, 0.14); color: var(--coral-dark); }
.badge--sky { background: rgba(93, 173, 226, 0.16); color: #2878ad; }
.badge--success { background: rgba(39, 174, 96, 0.13); color: #1d8549; }
.badge--muted { background: #EEF2F1; color: var(--ink-muted); }

.btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 44px;
    padding: 0 22px;
    border: 0;
    border-radius: var(--radius-round);
    background: transparent;
    color: var(--ink);
    font-size: 13.5px;
    font-weight: 900;
    letter-spacing: 0.2px;
    line-height: 1;
    white-space: nowrap;
    text-decoration: none;
    overflow: hidden;
    transition:
        transform 280ms var(--bounce),
        box-shadow 200ms ease,
        background 200ms ease,
        color 200ms ease;
    -webkit-tap-highlight-color: transparent;
}

.btn:active {
    transform: scale(0.95);
}

.btn:disabled,
.btn.is-loading {
    pointer-events: none;
    opacity: 0.65;
}

.btn-gold {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 48%, var(--gold-dark) 100%);
    color: #503900;
    box-shadow: var(--shadow-accent-glow);
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
}

.btn-gold::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: 2px 3px 52%;
    border-radius: var(--radius-round);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.7), rgba(255, 255, 255, 0));
    pointer-events: none;
}

.btn-gold > * {
    position: relative;
    z-index: 1;
}

.btn-teal {
    background: linear-gradient(135deg, var(--teal-light), var(--teal-dark));
    color: #fff;
    box-shadow: var(--shadow-teal-glow);
}

.btn-sky {
    background: linear-gradient(135deg, #7BC4EF, var(--sky));
    color: #073a55;
    box-shadow: var(--shadow-sky-glow);
}

.btn-coral {
    background: linear-gradient(135deg, var(--coral-light), var(--coral));
    color: #fff;
    box-shadow: var(--shadow-coral-glow);
}

.btn-ghost {
    background: var(--teal-bg);
    color: var(--teal-dark);
    box-shadow: inset 0 0 0 1.5px rgba(43, 168, 162, 0.14);
}

.btn-ghost:hover {
    background: #dff3f1;
}

.btn-white {
    background: #fff;
    color: var(--teal-dark);
    box-shadow: var(--shadow-md);
}

.btn-sm {
    min-height: 36px;
    padding: 0 15px;
    font-size: 12px;
}

.btn-lg {
    min-height: 52px;
    padding: 0 28px;
    font-size: 15px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    width: 44px;
    min-width: 44px;
    padding: 0;
}

.btn-danger-ghost {
    background: rgba(239, 108, 74, 0.10);
    color: var(--coral-dark);
    box-shadow: inset 0 0 0 1.5px rgba(239, 108, 74, 0.16);
}

.btn-spinner {
    display: none;
    width: 17px;
    height: 17px;
    border: 2.5px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin 700ms linear infinite;
}

.is-loading .btn-spinner {
    display: inline-block;
}

.is-loading .btn-label {
    opacity: 0.8;
}

.icon-btn {
    display: inline-grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: #fff;
    color: var(--teal-dark);
    box-shadow: var(--shadow-sm);
    transition: transform 220ms var(--bounce), box-shadow 200ms, background 200ms;
}

.icon-btn:hover {
    background: var(--teal-bg);
}

.icon-btn:active {
    transform: scale(0.92);
}

/* Forms */

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
    min-width: 0;
}

.field label,
.field-label {
    color: var(--teal-dark);
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 1.1px;
    line-height: 1.3;
    text-transform: uppercase;
}

.field-hint {
    color: var(--ink-muted);
    font-size: 11.5px;
    line-height: 1.4;
}

.input,
.select,
.textarea {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    background: var(--cream);
    color: var(--ink);
    font-size: 14px;
    font-weight: 600;
    outline: none;
    transition: border-color 180ms, box-shadow 180ms, background 180ms;
}

.textarea {
    min-height: 100px;
    padding: 12px 14px;
    resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
    color: #A8B7B4;
    font-weight: 500;
}

.input:focus,
.select:focus,
.textarea:focus {
    border-color: var(--teal);
    background: #fff;
    box-shadow: var(--shadow-focus);
}

.input.is-invalid,
.select.is-invalid {
    border-color: var(--coral);
    background: #FFF3EF;
}

.field-error {
    color: var(--coral-dark);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.35;
}

.input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrap .input {
    padding-left: 44px;
}

.input-wrap .input.has-trailing {
    padding-right: 48px;
}

.input-icon {
    position: absolute;
    left: 14px;
    z-index: 1;
    display: grid;
    place-items: center;
    font-size: 16px;
    pointer-events: none;
}

.password-toggle {
    position: absolute;
    right: 6px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--teal-dark);
    transition: background 180ms;
}

.password-toggle:hover {
    background: var(--teal-bg);
}

.check-row {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--ink-soft);
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
}

.check-row input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.check-box {
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
    width: 21px;
    height: 21px;
    border: 2px solid var(--line-strong);
    border-radius: 7px;
    background: var(--cream);
    transition: background 180ms, border-color 180ms, transform 180ms var(--bounce);
}

.check-row input:checked + .check-box {
    background: var(--teal);
    border-color: var(--teal);
}

.check-row input:checked + .check-box::after {
    content: "✓";
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.check-row input:focus-visible + .check-box {
    box-shadow: var(--shadow-focus);
}

.select {
    appearance: none;
    padding-right: 38px;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--teal-dark) 50%),
        linear-gradient(135deg, var(--teal-dark) 50%, transparent 50%);
    background-position:
        calc(100% - 18px) calc(50% - 2px),
        calc(100% - 13px) calc(50% - 2px);
    background-size: 5px 5px, 5px 5px;
    background-repeat: no-repeat;
    cursor: pointer;
}

.check-row--block {
    display: flex;
    padding: 12px 14px;
    background: var(--cream);
    border-radius: var(--radius-md);
}

/* Scrollbar */

* {
    scrollbar-width: thin;
    scrollbar-color: rgba(43, 168, 162, 0.35) transparent;
}

*::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

*::-webkit-scrollbar-thumb {
    background: rgba(43, 168, 162, 0.32);
    border-radius: 999px;
}

*::-webkit-scrollbar-track {
    background: transparent;
}

/* =========================================================
   Login page
   ========================================================= */

.login-shell {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.08fr 0.92fr;
    width: min(1120px, 100%);
    min-height: 700px;
    background: #fff;
    border-radius: 38px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(18, 63, 60, 0.22), 0 2px 0 rgba(255, 255, 255, 0.8) inset;
}

.login-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 42px 46px 34px;
    overflow: hidden;
    color: #fff;
    background:
        linear-gradient(155deg, #1E8C86 0%, #218F89 44%, #146C68 100%);
}

.login-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(rgba(255, 255, 255, 0.16) 1.5px, transparent 1.5px),
        radial-gradient(rgba(255, 210, 63, 0.18) 1.5px, transparent 1.5px);
    background-position: 0 0, 24px 24px;
    background-size: 48px 48px;
    opacity: 0.6;
    pointer-events: none;
}

.login-hero::after {
    content: "";
    position: absolute;
    right: -150px;
    bottom: -190px;
    width: 440px;
    height: 440px;
    border-radius: 50%;
    border: 60px solid rgba(255, 210, 63, 0.12);
    pointer-events: none;
}

.login-hero-glow {
    position: absolute;
    top: -100px;
    left: -80px;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    background: rgba(60, 196, 189, 0.35);
    filter: blur(20px);
    pointer-events: none;
}

.login-hero-top,
.login-hero-copy,
.login-hero-foot,
.login-card-fan {
    position: relative;
    z-index: 2;
}

.login-hero-top {
    display: flex;
    justify-content: flex-start;
}

.login-hero-copy {
    margin-top: 26px;
    max-width: 470px;
}

.login-hero-copy h1 {
    margin-top: 18px;
    font-size: clamp(42px, 4.4vw, 64px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 0.98;
    text-shadow: 0 4px 0 rgba(18, 63, 60, 0.14);
}

.login-hero-copy h1 span {
    color: var(--gold);
    text-shadow:
        0 2px 0 var(--teal-deep),
        2px 0 0 var(--teal-deep),
        -2px 0 0 var(--teal-deep),
        0 -1px 0 var(--teal-deep);
}

.login-hero-copy p {
    max-width: 390px;
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    font-weight: 500;
    line-height: 1.65;
}

.login-card-fan {
    position: absolute;
    right: 38px;
    bottom: 82px;
    width: 260px;
    height: 210px;
    pointer-events: none;
}

.login-fan-card {
    position: absolute;
    top: 40px;
    left: 80px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 112px;
    height: 158px;
    padding: 12px;
    background: var(--cream);
    border: 4px solid var(--teal-deep);
    border-radius: 14px;
    box-shadow: 0 12px 26px rgba(18, 63, 60, 0.28);
    color: var(--teal-deep);
}

.login-fan-card--one {
    transform: rotate(-18deg) translateX(-48px);
    background: var(--gold);
}

.login-fan-card--two {
    transform: rotate(-2deg) translateY(-8px);
    background: #fff;
    z-index: 2;
}

.login-fan-card--three {
    transform: rotate(15deg) translateX(48px);
    background: var(--coral);
    color: #fff;
}

.fan-card-corner {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.4px;
}

.fan-card-mark {
    align-self: center;
    font-size: 48px;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 2px 0 rgba(18, 63, 60, 0.16);
}

.fan-card-foot {
    align-self: flex-end;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.8px;
}

.login-hero-foot {
    display: flex;
    align-items: center;
    gap: 9px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.hero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--gold);
    box-shadow: 0 0 0 4px rgba(255, 210, 63, 0.18);
    animation: glowPulse 2s ease-in-out infinite;
}

.hero-foot-sep {
    color: rgba(255, 255, 255, 0.35);
}

.login-main {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 22px;
    padding: 48px;
    background:
        radial-gradient(circle at 90% 5%, rgba(255, 228, 122, 0.30), transparent 32%),
        radial-gradient(circle at 5% 95%, rgba(60, 196, 189, 0.15), transparent 36%),
        #fff;
}

.login-card {
    width: min(390px, 100%);
}

.login-card-head {
    display: flex;
    align-items: center;
    gap: 13px;
}

.login-card-head h2 {
    margin-top: 2px;
    color: var(--teal-deep);
    font-size: 25px;
    font-weight: 900;
    letter-spacing: -0.5px;
}

.login-intro {
    margin: 18px 0 24px;
    color: var(--ink-soft);
    font-size: 13.5px;
    line-height: 1.6;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.login-form .btn-block {
    margin-top: 4px;
}

.auth-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 18px;
    padding: 13px 14px;
    background: linear-gradient(135deg, #FFF1EC, #FFE1D8);
    border: 1.5px solid rgba(239, 108, 74, 0.36);
    border-left: 5px solid var(--coral);
    border-radius: 14px;
    color: var(--coral-dark);
    font-size: 12.5px;
    font-weight: 700;
    line-height: 1.45;
    box-shadow: var(--shadow-coral-glow);
    animation: shakeIn 320ms var(--bounce);
}

.auth-alert-ico {
    font-size: 16px;
    line-height: 1.2;
}

.login-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 24px;
    padding: 14px;
    background: var(--cream);
    border: 1.5px dashed var(--line-strong);
    border-radius: 14px;
}

.login-note p {
    color: var(--ink-soft);
    font-size: 11.5px;
    line-height: 1.55;
}

.login-copyright {
    color: var(--ink-muted);
    font-size: 10.5px;
    font-weight: 600;
    letter-spacing: 0.2px;
    text-align: center;
}

/* =========================================================
   App shell
   ========================================================= */

.app-page {
    min-height: 100vh;
    background: var(--surface);
}

.app-shell {
    position: relative;
    z-index: 1;
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    z-index: 90;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    width: 284px;
    padding: 24px 18px 18px;
    overflow-y: auto;
    overflow-x: hidden;
    color: #fff;
    background:
        radial-gradient(circle at 15% 8%, rgba(255, 210, 63, 0.16), transparent 28%),
        radial-gradient(circle at 110% 90%, rgba(60, 196, 189, 0.24), transparent 34%),
        linear-gradient(180deg, #1E8C86 0%, #177A75 54%, #125F5B 100%);
    box-shadow: 16px 0 50px rgba(30, 140, 134, 0.16);
    transition: transform 320ms var(--bounce);
}

.sidebar::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, 0.13) 1.4px, transparent 1.4px);
    background-size: 38px 38px;
    opacity: 0.45;
    pointer-events: none;
}

.sidebar-deco {
    position: absolute;
    border: 18px solid rgba(255, 210, 63, 0.09);
    border-radius: 50%;
    pointer-events: none;
}

.sidebar-deco--one {
    width: 230px;
    height: 230px;
    top: -110px;
    right: -110px;
}

.sidebar-deco--two {
    width: 180px;
    height: 180px;
    bottom: 150px;
    left: -120px;
    border-color: rgba(255, 255, 255, 0.06);
}

.sidebar-brand {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 6px 0 20px;
}

.sidebar-app-label {
    color: rgba(255, 255, 255, 0.55);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: 3.2px;
}

.side-nav {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin-top: 6px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 7px 12px;
    border: 1.5px solid transparent;
    border-radius: 16px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13.5px;
    font-weight: 800;
    letter-spacing: 0.2px;
    transition:
        background 200ms ease,
        color 200ms ease,
        transform 260ms var(--bounce),
        box-shadow 200ms ease;
}

.nav-item:hover {
    background: rgba(255, 255, 255, 0.10);
    color: #fff;
    transform: translateX(2px);
}

.nav-item.is-active {
    background: linear-gradient(135deg, var(--gold-light), var(--gold));
    border-color: rgba(18, 63, 60, 0.18);
    color: var(--teal-deep);
    box-shadow: 0 4px 18px rgba(255, 210, 63, 0.35);
}

.nav-item.is-active .nav-ico {
    background: rgba(255, 255, 255, 0.45);
}

.nav-ico {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.11);
    font-size: 16px;
    line-height: 1;
    transition: background 200ms;
}

.nav-text {
    flex: 1;
}

.sidebar-spacer {
    flex: 1;
    min-height: 22px;
}

.sidebar-tip {
    position: relative;
    z-index: 1;
    display: flex;
    gap: 10px;
    margin-bottom: 14px;
    padding: 13px;
    background: rgba(255, 248, 231, 0.94);
    border: 1.5px dashed rgba(18, 63, 60, 0.34);
    border-radius: 16px;
    color: var(--teal-deep);
    box-shadow: 0 8px 20px rgba(18, 63, 60, 0.15);
}

.sidebar-tip-ico {
    font-size: 15px;
    line-height: 1.2;
}

.sidebar-tip p {
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.5;
}

.sidebar-tip strong {
    font-weight: 900;
}

.sidebar-user {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 18px;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.sidebar-user-info strong {
    overflow: hidden;
    color: #fff;
    font-size: 11.5px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-user-info span {
    overflow: hidden;
    color: rgba(255, 255, 255, 0.56);
    font-size: 9px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sidebar-logout {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.10);
    color: rgba(255, 255, 255, 0.72);
    transition: background 180ms, color 180ms;
}

.sidebar-logout:hover {
    background: var(--coral);
    color: #fff;
}

.app-main {
    margin-left: 284px;
    min-height: 100vh;
}

.drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 89;
    display: none;
    background: rgba(18, 63, 60, 0.48);
    backdrop-filter: blur(4px);
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 78px;
    padding: 0 30px;
    background: rgba(239, 248, 247, 0.86);
    border-bottom: 1px solid rgba(43, 168, 162, 0.13);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
}

.menu-btn {
    display: none;
}

.topbar-brand-mobile {
    display: none;
}

.topbar-context {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.topbar-context h2 {
    color: var(--teal-deep);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.2px;
    line-height: 1.2;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-left: auto;
}

.user-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 50px;
    padding: 5px 12px 5px 6px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-round);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 200ms, transform 220ms var(--bounce);
}

.user-chip:hover {
    box-shadow: var(--shadow-card);
    transform: translateY(-1px);
}

.user-chip-info {
    display: flex;
    flex-direction: column;
    max-width: 160px;
    line-height: 1.2;
}

.user-chip-info strong {
    overflow: hidden;
    color: var(--teal-deep);
    font-size: 11.5px;
    font-weight: 900;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-chip-info span {
    color: var(--ink-muted);
    font-size: 9px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.user-chip-caret {
    color: var(--ink-muted);
    font-size: 14px;
    line-height: 1;
}

.view {
    width: min(1280px, 100%);
    margin: 0 auto;
    padding: 30px 30px 64px;
    outline: none;
}

.page-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    min-height: 52vh;
    color: var(--ink-muted);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.loader-card {
    display: grid;
    place-items: center;
    width: 58px;
    height: 78px;
    background: var(--gold);
    border: 3px solid var(--teal-deep);
    border-radius: 10px;
    color: var(--teal-deep);
    font-size: 30px;
    font-weight: 900;
    box-shadow: 0 7px 0 rgba(18, 63, 60, 0.16);
    animation: cardHop 1.1s var(--bounce) infinite;
}

.mobile-nav {
    display: none;
}

/* =========================================================
   Page header & context
   ========================================================= */

.page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 22px;
    animation: fadeUp 360ms ease both;
}

.page-title {
    color: var(--teal-deep);
    font-size: clamp(28px, 3.2vw, 38px);
    font-weight: 900;
    letter-spacing: -0.9px;
    line-height: 1.1;
}

.page-title .title-emoji {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-left: 6px;
    vertical-align: 3px;
    font-size: 27px;
    animation: crownBounce 1.5s ease-in-out infinite;
}

.page-sub {
    max-width: 640px;
    margin-top: 6px;
    color: var(--ink-soft);
    font-size: 13px;
    line-height: 1.6;
}

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

.context-bar {
    display: flex;
    align-items: flex-end;
    gap: 11px;
    flex-wrap: wrap;
    margin-bottom: 14px;
    padding: 13px 14px;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.12);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
    animation: fadeUp 380ms ease both;
}

.context-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.context-group--employee {
    flex: 1 1 260px;
}

.context-group--period {
    flex: 0 1 150px;
}

.context-group--year {
    flex: 0 1 105px;
}

.context-group label {
    padding-left: 4px;
    color: var(--ink-muted);
    font-size: 8.5px;
    font-weight: 900;
    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.context-select {
    width: 100%;
    min-height: 42px;
    padding: 0 34px 0 12px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background-color: var(--cream);
    color: var(--teal-deep);
    font-size: 12.5px;
    font-weight: 800;
    cursor: pointer;
    outline: none;
    transition: border-color 180ms, box-shadow 180ms;
}

.context-readonly {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 6px 12px;
    border: 1.5px dashed var(--line-strong);
    border-radius: 12px;
    background: var(--cream);
}

.context-readonly strong {
    display: block;
    color: var(--teal-deep);
    font-size: 12px;
    font-weight: 900;
    line-height: 1.3;
}

.context-readonly small {
    display: block;
    color: var(--ink-muted);
    font-size: 9.5px;
    font-weight: 700;
}

.context-select:focus {
    border-color: var(--teal);
    box-shadow: var(--shadow-focus);
}

.context-note {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 8px 12px;
    border-radius: 12px;
    background: var(--teal-bg);
    color: var(--teal-dark);
    font-size: 10.5px;
    font-weight: 800;
    white-space: nowrap;
}

.quick-periods {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin: -2px 0 22px;
    padding-left: 4px;
    animation: fadeUp 400ms ease both;
}

.quick-periods-label {
    color: var(--ink-muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.period-chip {
    min-height: 29px;
    padding: 3px 12px;
    border: 1.5px solid var(--line-strong);
    border-radius: var(--radius-round);
    background: #fff;
    color: var(--ink-soft);
    font-size: 10.5px;
    font-weight: 800;
    transition: all 180ms ease;
}

.period-chip:hover {
    border-color: var(--teal);
    color: var(--teal-dark);
}

.period-chip.is-active {
    background: var(--gold);
    border-color: var(--gold-dark);
    color: #5a4000;
    box-shadow: var(--shadow-accent-glow);
}

.context-empty {
    color: var(--ink-muted);
    font-size: 10.5px;
    font-weight: 700;
}

/* =========================================================
   Dashboard
   ========================================================= */

.dashboard-body {
    display: flex;
    flex-direction: column;
    gap: 18px;
    animation: fadeUp 400ms ease both;
}

.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
    gap: 18px;
}

.thp-hero {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 286px;
    padding: 26px 28px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 210, 63, 0.30), transparent 34%),
        radial-gradient(circle at 12% 100%, rgba(60, 196, 189, 0.50), transparent 44%),
        linear-gradient(135deg, #12615D 0%, #1E8C86 44%, #2BA8A2 100%);
    color: #fff;
    box-shadow: 0 14px 42px rgba(30, 140, 134, 0.28);
    isolation: isolate;
}

.thp-hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background-image: radial-gradient(rgba(255, 255, 255, 0.14) 1.4px, transparent 1.4px);
    background-size: 30px 30px;
    opacity: 0.55;
}

.thp-hero::after {
    content: "";
    position: absolute;
    right: -70px;
    top: -100px;
    width: 290px;
    height: 290px;
    border: 42px solid rgba(255, 255, 255, 0.07);
    border-radius: 50%;
    pointer-events: none;
}

.thp-hero.is-empty {
    background:
        radial-gradient(circle at 85% 15%, rgba(255, 210, 63, 0.22), transparent 34%),
        linear-gradient(135deg, #165F5B, #1E8C86);
}

.hero-topline {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    position: relative;
    z-index: 2;
}

.hero-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 30px;
    padding: 4px 13px 4px 6px;
    border-radius: var(--radius-round);
    background: rgba(255, 248, 231, 0.94);
    color: var(--teal-deep);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 1.8px;
    box-shadow: 0 3px 12px rgba(18, 63, 60, 0.18);
}

.hero-label .ico {
    width: 23px;
    height: 23px;
    border-radius: 8px;
    font-size: 12px;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 3px 11px;
    border: 1.5px solid rgba(18, 63, 60, 0.28);
    border-radius: 999px;
    background: var(--gold);
    color: var(--teal-deep);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: 1px;
    transform: rotate(2deg);
    box-shadow: 0 3px 10px rgba(18, 63, 60, 0.2);
}

.hero-main {
    position: relative;
    z-index: 2;
    margin: 16px 0 14px;
}

.hero-amount {
    color: #fff;
    font-size: clamp(35px, 4.5vw, 56px);
    font-weight: 900;
    letter-spacing: -2px;
    line-height: 1.05;
    text-shadow: 0 4px 0 rgba(18, 63, 60, 0.20), 0 10px 26px rgba(18, 63, 60, 0.18);
    font-variant-numeric: tabular-nums;
    animation: heroGlow 2s ease-in-out infinite;
}

.hero-amount--empty {
    font-size: clamp(27px, 3.4vw, 40px);
    letter-spacing: -0.8px;
    animation: none;
}

.hero-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.76);
    font-size: 11.5px;
    font-weight: 700;
}

.hero-meta strong {
    color: #fff;
    font-weight: 900;
}

.hero-meta-sep {
    color: rgba(255, 255, 255, 0.34);
}

.hero-actions {
    position: relative;
    z-index: 2;
    display: flex;
    gap: 9px;
    flex-wrap: wrap;
}

.hero-fan {
    position: absolute;
    z-index: 1;
    right: 4px;
    top: 50%;
    width: 240px;
    height: 220px;
    transform: translateY(-50%);
    opacity: 0.92;
    pointer-events: none;
}

.hero-fan .fan-card {
    width: 92px;
    height: 132px;
    border-width: 4px;
    border-radius: 13px;
    font-size: 29px;
    box-shadow: 0 14px 26px rgba(18, 63, 60, 0.26);
}

.hero-fan .fan-card--coral { --shift: -78px; }
.hero-fan .fan-card--sky { --shift: -39px; }
.hero-fan .fan-card--cream { --shift: 39px; }
.hero-fan .fan-card--teal { --shift: 78px; }

.contribution-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 22px;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.12);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
    overflow: hidden;
}

.contribution-card::after {
    content: "";
    position: absolute;
    right: -50px;
    bottom: -50px;
    width: 130px;
    height: 130px;
    border: 24px solid var(--teal-bg);
    border-radius: 50%;
    pointer-events: none;
}

.section-title {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 17px;
    padding-bottom: 11px;
    border-bottom: 3px dashed var(--line);
}

.section-title .ico {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    font-size: 17px;
}

.section-title h2,
.section-title h3 {
    color: var(--teal-deep);
    font-size: 15px;
    font-weight: 900;
    letter-spacing: 0.2px;
    line-height: 1.25;
}

.section-title .section-sub {
    margin-left: auto;
    color: var(--ink-muted);
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}

.rank-list {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.rank-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 9px;
    border: 1px solid transparent;
    border-radius: 13px;
    transition: background 180ms, transform 200ms var(--bounce);
}

.rank-item:hover {
    background: #F8FCFB;
    transform: translateX(2px);
}

.rank-medal {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 30px;
    height: 30px;
    border-radius: 10px;
    background: var(--teal-bg);
    font-size: 15px;
}

.rank-body {
    flex: 1;
    min-width: 0;
}

.rank-top {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
}

.rank-name {
    overflow: hidden;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rank-value {
    color: var(--teal-deep);
    font-size: 11px;
    font-weight: 900;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.rank-bar {
    height: 5px;
    margin-top: 5px;
    overflow: hidden;
    border-radius: 999px;
    background: #EDF4F3;
}

.rank-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--teal-light), var(--teal));
    transform-origin: left center;
    animation: growBar 700ms var(--bounce) both;
}

.rank-item.is-first {
    background: linear-gradient(135deg, #FFF9E6, #FFFDF6);
    border-color: rgba(230, 184, 0, 0.26);
    box-shadow: 0 4px 14px rgba(255, 210, 63, 0.16);
}

.rank-item.is-first .rank-medal { background: var(--gold-light); }
.rank-item.is-first .rank-fill { background: linear-gradient(90deg, var(--gold-light), var(--gold-dark)); }
.rank-item.is-first .rank-value { color: #705400; }

.rank-item.is-second {
    background: linear-gradient(135deg, #F7FAFC, #FFFFFF);
    border-color: rgba(139, 155, 168, 0.18);
}

.rank-item.is-second .rank-medal { background: #E8EEF3; }
.rank-item.is-second .rank-fill { background: linear-gradient(90deg, #DCE4EB, var(--silver-deep)); }
.rank-item.is-second .rank-value { color: var(--silver-deep); }

.rank-item.is-third {
    background: linear-gradient(135deg, #FFF7F2, #FFFFFF);
    border-color: rgba(204, 135, 86, 0.18);
}

.rank-item.is-third .rank-medal { background: #F6E3D6; }
.rank-item.is-third .rank-fill { background: linear-gradient(90deg, #E7B28F, var(--bronze)); }
.rank-item.is-third .rank-value { color: #A26336; }

.rank-item.is-deduction .rank-fill {
    background: linear-gradient(90deg, var(--coral-light), var(--coral));
}

.rank-footnote {
    position: relative;
    z-index: 1;
    margin-top: 11px;
    padding-top: 9px;
    border-top: 1px dashed var(--line-strong);
    color: var(--ink-muted);
    font-size: 9.5px;
    font-weight: 700;
    font-style: italic;
}

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

.kpi-card {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    min-height: 112px;
    padding: 17px 17px 15px 22px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.10);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform 240ms var(--bounce), box-shadow 200ms;
}

.kpi-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--teal-light);
}

.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.kpi-card--gold::before { background: var(--gold); }
.kpi-card--sky::before { background: var(--sky); }
.kpi-card--coral::before { background: var(--coral); }

.kpi-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 13px;
    background: var(--teal-bg);
    font-size: 19px;
}

.kpi-card--gold .kpi-icon { background: var(--gold-light); }
.kpi-card--sky .kpi-icon { background: rgba(93, 173, 226, 0.16); }
.kpi-card--coral .kpi-icon { background: rgba(239, 108, 74, 0.13); }

.kpi-copy {
    min-width: 0;
}

.kpi-label {
    color: var(--ink-muted);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 0.8px;
    line-height: 1.3;
    text-transform: uppercase;
}

.kpi-value {
    margin-top: 5px;
    color: var(--teal-deep);
    font-size: clamp(17px, 1.7vw, 22px);
    font-weight: 900;
    letter-spacing: -0.6px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.kpi-foot {
    display: block;
    margin-top: 5px;
    color: var(--ink-muted);
    font-size: 9.5px;
    font-weight: 600;
    line-height: 1.35;
}

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(280px, 0.85fr);
    gap: 18px;
    align-items: start;
}

.content-grid > *,
.hero-grid > *,
.kpi-grid > * {
    min-width: 0;
}

.panel {
    position: relative;
    padding: 22px;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.11);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 15px;
    padding-bottom: 11px;
    border-bottom: 3px dashed var(--line);
}

.panel-head .section-title {
    flex: 1;
    margin: 0;
    padding: 0;
    border: 0;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.tabs {
    display: flex;
    gap: 4px;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 14px;
    padding: 4px;
    overflow-x: auto;
    background: var(--teal-bg);
    border-radius: var(--radius-round);
}

.tab {
    min-height: 33px;
    padding: 4px 13px;
    border: 0;
    border-radius: var(--radius-round);
    background: transparent;
    color: var(--teal-dark);
    font-size: 10.5px;
    font-weight: 900;
    letter-spacing: 0.3px;
    white-space: nowrap;
    transition: background 180ms, box-shadow 180ms, color 180ms;
}

.tab:hover {
    background: rgba(255, 255, 255, 0.55);
}

.tab.is-active {
    background: #fff;
    color: var(--teal-deep);
    box-shadow: var(--shadow-sm);
}

.ledger {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.ledger-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 8px 11px;
    border-radius: 10px;
    font-size: 12.5px;
    line-height: 1.4;
}

.ledger-row:nth-child(even) {
    background: #F7FBFA;
}

.ledger-label {
    color: var(--ink-soft);
    font-weight: 600;
}

.ledger-amount {
    color: var(--teal-deep);
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.ledger-row.is-deduction .ledger-amount {
    color: var(--coral-dark);
}

.ledger-total {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    margin-top: 8px;
    padding: 11px 13px;
    border-top: 2px dashed var(--line-strong);
    border-radius: 12px;
    background: linear-gradient(135deg, var(--teal-bg), #F6FCFB);
    color: var(--teal-deep);
    font-size: 12.5px;
    font-weight: 900;
}

.ledger-total .ledger-amount {
    font-size: 14px;
}

.ledger-updated {
    margin-top: 9px;
    padding-left: 3px;
    color: var(--ink-muted);
    font-size: 9.5px;
    font-weight: 700;
    font-style: italic;
    letter-spacing: 0.2px;
}

.ledger-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 26px 18px;
    border: 2px dashed var(--line-strong);
    border-radius: 16px;
    text-align: center;
}

.ledger-empty-ico {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 14px;
    background: var(--cream);
    font-size: 22px;
}

.ledger-empty p {
    max-width: 300px;
    color: var(--ink-muted);
    font-size: 11.5px;
    line-height: 1.5;
}

.side-stack {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.side-card {
    padding: 19px;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.11);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
}

.side-card .section-title {
    margin-bottom: 12px;
    padding-bottom: 9px;
}

.info-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.info-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 8px 3px;
    border-bottom: 1px dashed rgba(216, 236, 233, 0.9);
    font-size: 11.5px;
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row dt,
.info-row .info-label {
    color: var(--ink-muted);
    font-weight: 700;
}

.info-row dd,
.info-row .info-value {
    margin: 0;
    color: var(--teal-deep);
    font-weight: 900;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.quick-action {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 42px;
    padding: 7px 10px;
    border: 1.5px solid var(--line);
    border-radius: 12px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 11.5px;
    font-weight: 800;
    text-align: left;
    transition: background 180ms, border-color 180ms, transform 200ms var(--bounce);
}

.quick-action:hover {
    background: var(--teal-bg);
    border-color: var(--line-strong);
    transform: translateX(2px);
}

.quick-action .ico {
    width: 29px;
    height: 29px;
    border-radius: 9px;
    font-size: 15px;
}

.quick-action span:last-child {
    margin-left: auto;
    color: var(--ink-muted);
    font-size: 12px;
}

.quick-action.is-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.side-tip {
    background:
        radial-gradient(circle at 92% 8%, rgba(255, 210, 63, 0.24), transparent 42%),
        linear-gradient(135deg, #FFFDF5, #FFF8E4);
    border-color: rgba(230, 184, 0, 0.28);
}

.side-tip-text {
    color: var(--ink-muted);
    font-size: 10.5px;
    line-height: 1.65;
}

/* Warnings / BOOM */

.dashboard-warnings {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
}

.boom-alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    background: linear-gradient(135deg, #FFF1EC, #FFE4DA);
    border: 2px solid rgba(239, 108, 74, 0.68);
    border-left: 8px solid var(--coral);
    border-radius: 16px;
    color: var(--coral-dark);
    box-shadow: var(--shadow-coral-glow);
    animation: boomPulse 2s ease-in-out infinite;
}

.boom-ico {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: var(--coral);
    color: #fff;
    font-size: 17px;
    box-shadow: 0 3px 10px rgba(212, 82, 51, 0.3);
}

.boom-alert strong {
    display: block;
    margin-bottom: 1px;
    font-size: 10px;
    font-weight: 900;
    letter-spacing: 1.3px;
    text-transform: uppercase;
}

.boom-alert p {
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.45;
}

/* Empty / skeleton */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 34px 22px;
    border: 2px dashed var(--line-strong);
    border-radius: 20px;
    background:
        radial-gradient(circle at 50% 0, rgba(255, 210, 63, 0.12), transparent 50%),
        #FCFEFD;
    text-align: center;
}

.empty-ico {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 20px;
    background: var(--cream);
    font-size: 29px;
    box-shadow: var(--shadow-sm);
}

.empty-state h3 {
    color: var(--teal-deep);
    font-size: 17px;
    font-weight: 900;
    letter-spacing: -0.3px;
}

.empty-state p {
    max-width: 390px;
    color: var(--ink-muted);
    font-size: 12px;
    line-height: 1.55;
}

.empty-state .btn {
    margin-top: 4px;
}

.skeleton {
    position: relative;
    overflow: hidden;
    background: #E7F1F0;
    border-radius: 10px;
}

.skeleton::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.62), transparent);
    transform: translateX(-100%);
    animation: shimmer 1.5s infinite;
}

.dash-skeleton {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.dash-skeleton-hero {
    display: grid;
    grid-template-columns: 1.55fr 0.85fr;
    gap: 18px;
}

.dash-skeleton-hero .skeleton {
    height: 286px;
    border-radius: var(--radius-xl);
}

.dash-skeleton-kpis {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.dash-skeleton-kpis .skeleton {
    height: 112px;
    border-radius: var(--radius-lg);
}

.dash-skeleton-body {
    display: grid;
    grid-template-columns: 1.55fr 0.85fr;
    gap: 18px;
}

.dash-skeleton-body .skeleton {
    height: 330px;
    border-radius: var(--radius-lg);
}

/* =========================================================
   Employees
   ========================================================= */

.toolbar {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    padding: 14px;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.11);
    border-radius: 20px;
    box-shadow: var(--shadow-card);
}

.toolbar .field {
    flex: 0 1 155px;
}

.toolbar .field--search {
    flex: 1 1 250px;
}

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

.employee-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.employee-card {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 19px 19px 16px 24px;
    overflow: hidden;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.11);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    transition: transform 240ms var(--bounce), box-shadow 200ms;
}

.employee-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: var(--teal-light);
}

.employee-card.is-inactive::before {
    background: var(--silver);
}

.employee-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.employee-card-head {
    display: flex;
    align-items: center;
    gap: 12px;
}

.employee-identity {
    flex: 1;
    min-width: 0;
}

.employee-name {
    overflow: hidden;
    color: var(--teal-deep);
    font-size: 14px;
    font-weight: 900;
    letter-spacing: -0.2px;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-nip {
    margin-top: 2px;
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.4px;
    font-variant-numeric: tabular-nums;
}

.employee-meta {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 10px 11px;
    background: #F8FCFB;
    border-radius: 12px;
}

.employee-meta-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    font-size: 10.5px;
}

.employee-meta-row span:first-child {
    color: var(--ink-muted);
    font-weight: 700;
}

.employee-meta-row span:last-child {
    overflow: hidden;
    color: var(--ink-soft);
    font-weight: 800;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.employee-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-top: 12px;
    border-top: 2px dashed var(--line);
}

.employee-actions .btn {
    flex: 1;
}

.badge-row {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 18px;
}

.pagination-info {
    color: var(--ink-muted);
    font-size: 10.5px;
    font-weight: 700;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 6px;
}

.pagination-btn {
    display: grid;
    place-items: center;
    min-width: 34px;
    height: 34px;
    padding: 0 10px;
    border: 1.5px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--ink-soft);
    font-size: 11px;
    font-weight: 800;
    transition: all 180ms;
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--teal);
    color: var(--teal-dark);
    background: var(--teal-bg);
}

.pagination-btn.is-active {
    border-color: var(--gold-dark);
    background: var(--gold);
    color: #5a4000;
    box-shadow: var(--shadow-accent-glow);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* =========================================================
   Audit timeline
   ========================================================= */

.audit-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.audit-item {
    position: relative;
    display: flex;
    gap: 13px;
    padding: 15px 16px 15px 20px;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.11);
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
}

.audit-item::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    border-radius: 16px 0 0 16px;
    background: var(--teal-light);
}

.audit-item.is-updated::before { background: var(--sky); }
.audit-item.is-deleted::before { background: var(--coral); }
.audit-item.is-created::before { background: var(--success); }

.audit-ico {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 12px;
    background: var(--teal-bg);
    font-size: 18px;
}

.audit-body {
    flex: 1;
    min-width: 0;
}

.audit-top {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.audit-title {
    color: var(--teal-deep);
    font-size: 12.5px;
    font-weight: 900;
}

.audit-meta {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
    margin-top: 4px;
    color: var(--ink-muted);
    font-size: 10px;
    font-weight: 600;
}

.audit-meta-sep {
    color: var(--line-strong);
}

.audit-details {
    margin-top: 7px;
}

.audit-details summary {
    color: var(--teal-dark);
    font-size: 10px;
    font-weight: 800;
    cursor: pointer;
    user-select: none;
}

.audit-props {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 7px;
}

.audit-prop {
    padding: 2px 8px;
    border-radius: 6px;
    background: var(--teal-bg);
    color: var(--teal-dark);
    font-size: 9px;
    font-weight: 700;
}

.audit-prop strong {
    font-weight: 900;
}

/* =========================================================
   Profile
   ========================================================= */

.profile-grid {
    display: grid;
    grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
    gap: 18px;
    align-items: start;
}

.profile-card {
    padding: 24px;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.11);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-card);
}

.profile-hero {
    display: flex;
    align-items: center;
    gap: 15px;
    padding-bottom: 18px;
    border-bottom: 3px dashed var(--line);
}

.profile-name {
    color: var(--teal-deep);
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.profile-role {
    margin-top: 4px;
}

.profile-list {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 14px;
}

.profile-row {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 9px 2px;
    border-bottom: 1px dashed var(--line);
    font-size: 12px;
}

.profile-row:last-child {
    border-bottom: 0;
}

.profile-row span:first-child {
    color: var(--ink-muted);
    font-weight: 700;
}

.profile-row span:last-child {
    color: var(--ink);
    font-weight: 800;
    text-align: right;
}

.password-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 16px;
}

.form-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
    margin-top: 4px;
}

/* =========================================================
   Force password
   ========================================================= */

.force-mode .sidebar,
.force-mode .topbar,
.force-mode .mobile-nav {
    display: none !important;
}

.force-mode .app-main {
    margin-left: 0;
}

.force-mode .view {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px;
}

.force-card {
    width: min(470px, 100%);
    padding: 30px;
    background: #fff;
    border: 1px solid rgba(43, 168, 162, 0.14);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    animation: fadeUp 400ms ease both;
}

.force-ico {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    margin-bottom: 14px;
    border-radius: 20px;
    background: var(--gold-light);
    font-size: 29px;
    box-shadow: var(--shadow-accent-glow);
}

.force-card h1 {
    color: var(--teal-deep);
    font-size: 27px;
    font-weight: 900;
    letter-spacing: -0.7px;
    line-height: 1.15;
}

.force-card > p {
    margin-top: 8px;
    color: var(--ink-soft);
    font-size: 12.5px;
    line-height: 1.6;
}

.force-card .password-form {
    margin-top: 20px;
}

.force-logout {
    margin-top: 12px;
}

/* =========================================================
   Modals
   ========================================================= */

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    overflow-y: auto;
    background: rgba(18, 63, 60, 0.56);
    backdrop-filter: blur(7px);
    -webkit-backdrop-filter: blur(7px);
    animation: fadeIn 180ms ease both;
}

.modal {
    position: relative;
    width: min(640px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 80px rgba(18, 63, 60, 0.34);
    animation: modalIn 320ms var(--bounce) both;
}

.modal--wide {
    width: min(930px, 100%);
}

.modal--slip {
    width: min(860px, 100%);
}

.modal-head {
    position: sticky;
    top: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 20px 24px 16px;
    background: #fff;
    border-bottom: 3px dashed var(--line);
}

.modal-head .ico {
    width: 40px;
    height: 40px;
    border-radius: 13px;
    font-size: 20px;
}

.modal-heading {
    flex: 1;
    min-width: 0;
}

.modal-heading h2 {
    color: var(--teal-deep);
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -0.4px;
    line-height: 1.2;
}

.modal-heading p {
    margin-top: 1px;
    color: var(--ink-muted);
    font-size: 10.5px;
    font-weight: 600;
    line-height: 1.4;
}

.modal-close {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 12px;
    background: var(--teal-bg);
    color: var(--teal-dark);
    font-size: 20px;
    font-weight: 700;
    line-height: 1;
    transition: background 180ms, transform 180ms var(--bounce);
}

.modal-close:hover {
    background: rgba(239, 108, 74, 0.14);
    color: var(--coral-dark);
}

.modal-close:active {
    transform: scale(0.9);
}

.modal-body {
    padding: 20px 24px;
}

.modal-foot {
    position: sticky;
    bottom: 0;
    z-index: 4;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;
    flex-wrap: wrap;
    padding: 15px 24px 19px;
    background: #fff;
    border-top: 3px dashed var(--line);
}

.modal-foot .modal-foot-left {
    margin-right: auto;
}

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

.form-grid .field--full {
    grid-column: 1 / -1;
}

.modal-intro {
    margin-bottom: 16px;
    padding: 11px 13px;
    border-radius: 12px;
    background: var(--cream);
    color: var(--ink-soft);
    font-size: 11.5px;
    font-weight: 600;
    line-height: 1.5;
}

.modal-tabs {
    margin-bottom: 16px;
}

.money-field {
    position: relative;
    display: flex;
    align-items: center;
}

.money-prefix {
    position: absolute;
    left: 14px;
    z-index: 1;
    color: var(--teal-dark);
    font-size: 11px;
    font-weight: 900;
    pointer-events: none;
}

.money-field .input {
    padding-left: 38px;
    font-variant-numeric: tabular-nums;
}

.stepper {
    display: flex;
    align-items: center;
    gap: 6px;
}

.stepper-btn {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 14px;
    background: var(--teal-bg);
    color: var(--teal-dark);
    font-size: 20px;
    font-weight: 900;
    line-height: 1;
    transition: transform 180ms var(--bounce), background 180ms, box-shadow 180ms;
}

.stepper-btn:hover {
    background: var(--teal-light);
    color: #fff;
    box-shadow: var(--shadow-teal-glow);
}

.stepper-btn:active {
    transform: scale(0.9);
}

.stepper-btn--minus {
    background: rgba(239, 108, 74, 0.12);
    color: var(--coral-dark);
}

.stepper-btn--minus:hover {
    background: var(--coral);
    color: #fff;
    box-shadow: var(--shadow-coral-glow);
}

.stepper .input {
    text-align: center;
    padding: 0 8px;
    font-weight: 900;
}

.editor-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 12px 14px;
    border: 2px dashed var(--line-strong);
    border-radius: 14px;
    background: linear-gradient(135deg, var(--teal-bg), #F8FDFC);
}

.editor-total span {
    color: var(--teal-dark);
    font-size: 9.5px;
    font-weight: 900;
    letter-spacing: 1.1px;
    text-transform: uppercase;
}

.editor-total strong {
    color: var(--teal-deep);
    font-size: 18px;
    font-weight: 900;
    letter-spacing: -0.5px;
    font-variant-numeric: tabular-nums;
}

.form-error-box {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 14px;
    padding: 11px 13px;
    border-left: 5px solid var(--coral);
    border-radius: 10px;
    background: #FFF1EC;
    color: var(--coral-dark);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.45;
}

/* Confirm dialog */

.confirm-modal {
    width: min(420px, 100%);
    padding: 24px;
    text-align: center;
}

.confirm-ico {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto 13px;
    border-radius: 19px;
    background: var(--gold-light);
    font-size: 28px;
    box-shadow: var(--shadow-accent-glow);
}

.confirm-ico--danger {
    background: rgba(239, 108, 74, 0.14);
    box-shadow: var(--shadow-coral-glow);
}

.confirm-modal h2 {
    color: var(--teal-deep);
    font-size: 20px;
    font-weight: 900;
    letter-spacing: -0.4px;
}

.confirm-modal p {
    margin-top: 7px;
    color: var(--ink-soft);
    font-size: 12px;
    line-height: 1.55;
}

.confirm-actions {
    display: flex;
    justify-content: center;
    gap: 9px;
    margin-top: 20px;
}

/* Toasts */

.toast-root {
    position: fixed;
    z-index: 200;
    right: 18px;
    bottom: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: min(360px, calc(100vw - 36px));
    pointer-events: none;
}

.toast {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 12px 12px 14px;
    background: #fff;
    border: 1px solid var(--line);
    border-left: 6px solid var(--teal);
    border-radius: 14px;
    box-shadow: var(--shadow-lg);
    color: var(--ink);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 1.45;
    pointer-events: auto;
    animation: toastIn 320ms var(--bounce) both;
}

.toast.is-success { border-left-color: var(--success); }
.toast.is-error { border-left-color: var(--coral); }
.toast.is-info { border-left-color: var(--sky); }

.toast-ico {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    width: 26px;
    height: 26px;
    border-radius: 8px;
    background: var(--teal-bg);
    font-size: 14px;
}

.toast.is-success .toast-ico { background: rgba(39, 174, 96, 0.13); }
.toast.is-error .toast-ico { background: rgba(239, 108, 74, 0.14); }
.toast.is-info .toast-ico { background: rgba(93, 173, 226, 0.14); }

.toast-body {
    flex: 1;
}

.toast-close {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: var(--ink-muted);
    font-size: 14px;
    line-height: 1;
}

.toast-close:hover {
    background: var(--teal-bg);
}

.toast.is-leaving {
    animation: toastOut 220ms ease forwards;
}

/* Slip preview */

.slip-shell {
    padding: 24px;
    background: #F3F6F5;
    border-radius: 0 0 var(--radius-xl) var(--radius-xl);
}

.slip-paper {
    max-width: 760px;
    margin: 0 auto;
    padding: 34px 38px;
    background: #fff;
    border: 1px solid #DBE5E3;
    box-shadow: 0 6px 26px rgba(18, 63, 60, 0.10);
    color: #111827;
    font-family: "DejaVu Sans", Arial, sans-serif;
    font-size: 10.5px;
    line-height: 1.45;
}

.slip-kop {
    padding-bottom: 8px;
    border-bottom: 2px solid #111827;
    text-align: center;
}

.slip-kop-top {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
}

.slip-kop-name {
    margin-top: 2px;
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.2px;
}

.slip-kop-address {
    margin-top: 2px;
    color: #4B5563;
    font-size: 9px;
}

.slip-title {
    margin: 12px 0 10px;
    text-align: center;
    font-size: 11px;
    font-weight: 800;
    line-height: 1.45;
    text-decoration: underline;
}

.slip-identity {
    width: 100%;
    margin-bottom: 10px;
    border-collapse: collapse;
}

.slip-identity td {
    padding: 1px 3px;
    vertical-align: top;
}

.slip-identity .label {
    width: 12%;
    color: #4B5563;
}

.slip-identity .value {
    width: 38%;
}

.slip-table {
    width: 100%;
    margin-bottom: 7px;
    border-collapse: collapse;
}

.slip-table td {
    padding: 2px 4px;
    vertical-align: top;
}

.slip-table tr:nth-child(even) td {
    background: #F9FAFB;
}

.slip-table .section-row td {
    padding: 4px;
    background: #E5E7EB !important;
    font-size: 10.5px;
    font-weight: 800;
}

.slip-table .amount {
    width: 32%;
    text-align: right;
    white-space: nowrap;
}

.slip-table .subtotal td {
    border-top: 1px solid #9CA3AF;
    font-weight: 800;
}

.slip-table .total td {
    border-top: 1px solid #111827;
    border-bottom: 1px solid #111827;
    background: #F3F4F6 !important;
    font-weight: 800;
}

.slip-thp {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin: 9px 0 12px;
    padding: 8px 10px;
    border: 1.5px solid #111827;
    background: #F3F4F6;
    font-weight: 800;
}

.slip-thp-label {
    font-size: 11px;
    letter-spacing: 0.3px;
}

.slip-thp-value {
    font-size: 13px;
    white-space: nowrap;
}

.slip-signature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 10px;
    text-align: center;
}

.slip-signature-space {
    height: 42px;
}

.slip-signature-name {
    font-weight: 800;
    text-decoration: underline;
}

.slip-signature-nip {
    margin-top: 1px;
}

.slip-footer {
    margin-top: 12px;
    padding-top: 4px;
    border-top: 1px solid #D1D5DB;
    color: #6B7280;
    font-size: 8px;
    text-align: right;
}

/* =========================================================
   Confetti / animations
   ========================================================= */

.confetti-root {
    position: fixed;
    inset: 0;
    z-index: 300;
    overflow: hidden;
    pointer-events: none;
}

.confetti-piece {
    position: absolute;
    top: -24px;
    left: var(--x);
    width: var(--w);
    height: var(--h);
    background: var(--color);
    border-radius: var(--radius, 2px);
    opacity: 0;
    animation: confettiFall var(--dur) linear var(--delay) forwards;
}

.noscript-card {
    position: fixed;
    inset: 24px;
    z-index: 500;
    display: grid;
    place-items: center;
    background: #fff;
    border-radius: 24px;
    box-shadow: var(--shadow-lg);
}

/* =========================================================
   Motion
   ========================================================= */

@keyframes spin {
    to { transform: rotate(360deg); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes modalIn {
    from { opacity: 0; transform: translateY(18px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes toastIn {
    from { opacity: 0; transform: translateX(24px) scale(0.96); }
    to { opacity: 1; transform: translateX(0) scale(1); }
}

@keyframes toastOut {
    to { opacity: 0; transform: translateX(24px) scale(0.96); }
}

@keyframes shakeIn {
    0% { opacity: 0; transform: translateX(-8px); }
    50% { transform: translateX(3px); }
    100% { opacity: 1; transform: translateX(0); }
}

@keyframes cardHop {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50% { transform: translateY(-12px) rotate(4deg); }
}

@keyframes crownBounce {
    0%, 100% { transform: translateY(0) rotate(-3deg); }
    25% { transform: translateY(-4px) rotate(4deg); }
    50% { transform: translateY(0) rotate(-2deg); }
    75% { transform: translateY(-2px) rotate(2deg); }
}

@keyframes glowPulse {
    0%, 100% { opacity: 0.55; transform: scale(1); }
    50% { opacity: 1; transform: scale(1.08); }
}

@keyframes heroGlow {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.94; transform: scale(1.012); }
}

@keyframes boomPulse {
    0%, 100% {
        border-color: rgba(239, 108, 74, 0.62);
        box-shadow: 0 4px 18px rgba(239, 108, 74, 0.24);
    }
    50% {
        border-color: rgba(239, 108, 74, 1);
        box-shadow: 0 4px 26px rgba(239, 108, 74, 0.44);
    }
}

@keyframes growBar {
    from { transform: scaleX(0); }
    to { transform: scaleX(1); }
}

@keyframes shimmer {
    100% { transform: translateX(100%); }
}

@keyframes confettiFall {
    0% {
        opacity: 1;
        transform: translate3d(0, 0, 0) rotate(0deg);
    }
    100% {
        opacity: 0.9;
        transform: translate3d(var(--drift), 108vh, 0) rotate(var(--spin));
    }
}

/* =========================================================
   Responsive
   ========================================================= */

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

    .contribution-card {
        min-height: 0;
    }

    .hero-fan {
        opacity: 0.5;
    }

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

    .dash-skeleton-hero,
    .dash-skeleton-body {
        grid-template-columns: 1fr;
    }

    .dash-skeleton-kpis {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1080px) {
    .sidebar {
        transform: translateX(-105%);
        border-radius: 0 28px 28px 0;
    }

    body.drawer-open .sidebar {
        transform: translateX(0);
    }

    body.drawer-open .drawer-overlay {
        display: block;
    }

    .app-main {
        margin-left: 0;
    }

    .menu-btn {
        display: inline-grid;
    }

    .topbar {
        padding: 0 20px;
    }

    .view {
        padding: 24px 20px 56px;
    }

    .login-shell {
        grid-template-columns: 1fr;
        min-height: 0;
    }

    .login-hero {
        min-height: 330px;
        padding: 28px 30px;
    }

    .login-hero-copy {
        margin-top: 6px;
    }

    .login-hero-copy h1 {
        font-size: 38px;
    }

    .login-hero-copy p {
        max-width: 520px;
        margin-top: 12px;
        font-size: 12.5px;
    }

    .login-card-fan,
    .login-hero-foot {
        display: none;
    }

    .login-main {
        padding: 34px 30px 28px;
    }
}

@media (max-width: 860px) {
    .profile-grid {
        grid-template-columns: 1fr;
    }

    .hero-fan {
        display: none;
    }

    .thp-hero {
        min-height: 260px;
    }

    .hero-amount {
        font-size: clamp(32px, 8vw, 46px);
    }
}

@media (max-width: 760px) {
    body.app-page {
        padding-bottom: 72px;
    }

    .topbar {
        min-height: 66px;
        gap: 9px;
        padding: 0 14px;
    }

    .topbar-context {
        display: none;
    }

    .topbar-brand-mobile {
        display: block;
        margin-right: auto;
    }

    .topbar-refresh {
        display: none;
    }

    .user-chip {
        min-height: 42px;
        padding: 4px;
        border-radius: 50%;
        background: transparent;
        border-color: transparent;
        box-shadow: none;
    }

    .user-chip-info,
    .user-chip-caret {
        display: none;
    }

    .view {
        padding: 20px 14px 42px;
    }

    .page-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 12px;
        margin-bottom: 18px;
    }

    .page-title {
        font-size: 27px;
    }

    .page-title .title-emoji {
        width: 33px;
        height: 33px;
        font-size: 23px;
    }

    .page-sub {
        font-size: 12px;
    }

    .page-actions {
        width: 100%;
    }

    .context-bar {
        gap: 8px;
        padding: 11px;
    }

    .context-group--employee {
        flex: 1 1 100%;
    }

    .context-group--period,
    .context-group--year {
        flex: 1 1 calc(50% - 4px);
    }

    .context-note {
        display: none;
    }

    .quick-periods {
        margin-bottom: 17px;
    }

    .hero-grid,
    .content-grid {
        gap: 13px;
    }

    .dashboard-body {
        gap: 13px;
    }

    .thp-hero {
        padding: 21px 19px;
        min-height: 245px;
        border-radius: 24px;
    }

    .hero-amount {
        font-size: clamp(29px, 9vw, 40px);
        letter-spacing: -1.2px;
    }

    .hero-meta {
        font-size: 10.5px;
    }

    .hero-actions {
        width: 100%;
    }

    .hero-actions .btn {
        flex: 1;
        padding: 0 13px;
        font-size: 11.5px;
    }

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

    .kpi-card {
        min-height: 100px;
        padding: 14px 13px 12px 18px;
        gap: 9px;
    }

    .kpi-icon {
        width: 34px;
        height: 34px;
        border-radius: 11px;
        font-size: 16px;
    }

    .kpi-value {
        font-size: 15.5px;
    }

    .kpi-label {
        font-size: 8.5px;
    }

    .kpi-foot {
        font-size: 8.5px;
    }

    .panel,
    .side-card,
    .contribution-card {
        padding: 17px;
        border-radius: 20px;
    }

    .panel-head {
        gap: 7px;
    }

    .section-title h2,
    .section-title h3 {
        font-size: 13.5px;
    }

    .tabs {
        width: 100%;
    }

    .tab {
        flex: 0 0 auto;
        padding: 4px 8px;
        font-size: 9.5px;
    }

    .ledger-row {
        font-size: 11.5px;
        padding: 7px 8px;
    }

    .ledger-total {
        font-size: 11.5px;
    }

    .ledger-total .ledger-amount {
        font-size: 12.5px;
    }

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

    .toolbar {
        align-items: stretch;
    }

    .toolbar .field,
    .toolbar .field--search {
        flex: 1 1 calc(50% - 5px);
    }

    .toolbar-actions {
        width: 100%;
        margin-left: 0;
    }

    .toolbar-actions .btn {
        flex: 1;
    }

    .modal-backdrop {
        align-items: flex-end;
        padding: 0;
    }

    .modal {
        width: 100%;
        max-height: 92vh;
        border-radius: 26px 26px 0 0;
        animation: sheetIn 300ms var(--bounce) both;
    }

    .modal-head {
        padding: 16px 17px 13px;
    }

    .modal-body {
        padding: 16px 17px;
    }

    .modal-foot {
        padding: 12px 17px 17px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-grid .field--full {
        grid-column: auto;
    }

    .confirm-modal {
        margin: auto 16px;
        border-radius: 24px;
        animation: modalIn 300ms var(--bounce) both;
    }

    .toast-root {
        right: 12px;
        bottom: 84px;
        width: calc(100vw - 24px);
    }

    .mobile-nav {
        position: fixed;
        z-index: 70;
        inset: auto 10px 10px;
        display: flex;
        align-items: center;
        justify-content: space-around;
        gap: 4px;
        min-height: 62px;
        padding: 6px;
        background: rgba(255, 255, 255, 0.94);
        border: 1px solid rgba(43, 168, 162, 0.16);
        border-radius: 22px;
        box-shadow: 0 12px 34px rgba(18, 63, 60, 0.18);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
    }

    .mobile-nav-item {
        display: flex;
        flex: 1;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        min-height: 48px;
        border-radius: 15px;
        color: var(--ink-muted);
        font-size: 8px;
        font-weight: 900;
        letter-spacing: 0.3px;
        transition: background 180ms, color 180ms;
    }

    .mobile-nav-item.is-active {
        background: var(--gold);
        color: var(--teal-deep);
        box-shadow: var(--shadow-accent-glow);
    }

    .mobile-nav-ico {
        font-size: 17px;
        line-height: 1;
    }

    .login-page {
        padding: 12px;
    }

    .login-shell {
        border-radius: 26px;
    }

    .login-hero {
        min-height: 270px;
        padding: 22px 22px 20px;
    }

    .login-hero .brand--lg {
        padding: 12px 18px 16px;
    }

    .login-hero .brand--lg .fan-card {
        width: 48px;
        height: 66px;
        font-size: 16px;
    }

    .login-hero .brand--lg .brand-word--sip { font-size: 29px; }
    .login-hero .brand--lg .brand-word--gaji { font-size: 43px; }
    .login-hero .brand--lg .brand-ribbon { font-size: 8px; letter-spacing: 3.5px; padding: 1px 24px 2px; }

    .login-hero-copy h1 {
        margin-top: 12px;
        font-size: 31px;
        letter-spacing: -1px;
    }

    .login-hero-copy p {
        display: none;
    }

    .login-main {
        padding: 26px 20px 24px;
    }

    .login-card-head h2 {
        font-size: 22px;
    }

    .login-intro {
        margin: 14px 0 20px;
    }
}

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

@media (max-width: 430px) {
    .kpi-grid {
        grid-template-columns: 1fr;
    }

    .hero-badge {
        font-size: 8px;
    }

    .context-group--period,
    .context-group--year {
        flex: 1 1 100%;
    }

    .quick-periods {
        gap: 5px;
    }

    .period-chip {
        font-size: 9px;
        padding: 3px 9px;
    }

    .page-actions .btn {
        flex: 1;
    }

    .slip-shell {
        padding: 10px;
    }

    .slip-paper {
        padding: 18px 14px;
        font-size: 9px;
    }

    .slip-kop-name {
        font-size: 12px;
    }
}

/* =========================================================
   Print
   ========================================================= */

@media print {
    body {
        background: #fff !important;
    }

    body.slip-open {
        overflow: visible !important;
    }

    body.slip-open .app-shell {
        display: none !important;
    }

    body::before,
    .sidebar,
    .topbar,
    .mobile-nav,
    .modal-backdrop > *:not(.modal--slip),
    .modal-head,
    .modal-foot,
    .toast-root,
    .confetti-root {
        display: none !important;
    }

    .modal-backdrop {
        position: static;
        display: block;
        padding: 0;
        background: #fff;
        backdrop-filter: none;
    }

    .modal--slip {
        width: 100% !important;
        max-height: none !important;
        overflow: visible !important;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .slip-shell {
        padding: 0;
        background: #fff;
    }

    .slip-paper {
        max-width: none;
        padding: 0;
        border: 0;
        box-shadow: none;
    }
}

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