:root {
    --bg: #f5efe3;
    --paper: rgba(255, 252, 246, 0.9);
    --ink: #1d2430;
    --muted: #5e6672;
    --line: #ddcfbb;
    --brand: #0f766e;
    --brand-strong: #0b5c56;
    --accent: #c96a1b;
    --danger: #b42318;
    --success: #157f3b;
    --shadow: 0 24px 60px rgba(51, 39, 19, 0.12);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--ink);
    background:
        radial-gradient(circle at top left, rgba(201, 106, 27, 0.18), transparent 26%),
        radial-gradient(circle at top right, rgba(15, 118, 110, 0.16), transparent 24%),
        linear-gradient(135deg, rgba(255, 255, 255, 0.38), rgba(255, 248, 238, 0.1)),
        var(--bg);
}

a {
    color: var(--brand-strong);
}

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

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.auth-shell::before,
.auth-shell::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    filter: blur(6px);
    opacity: 0.9;
}

.auth-shell::before {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(201, 106, 27, 0.22), rgba(201, 106, 27, 0));
    top: 5%;
    left: 8%;
}

.auth-shell::after {
    width: 360px;
    height: 360px;
    background: radial-gradient(circle, rgba(15, 118, 110, 0.20), rgba(15, 118, 110, 0));
    right: 4%;
    bottom: 2%;
}

.auth-panel,
.hero-card,
.panel,
.card,
.side-nav {
    background: rgba(255, 253, 248, 0.92);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(216, 208, 194, 0.85);
    box-shadow: var(--shadow);
    border-radius: var(--radius);
}

.auth-panel {
    width: min(560px, 100%);
    padding: 40px 34px 34px;
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.auth-panel::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 7px;
    background: linear-gradient(90deg, var(--accent), var(--brand), #eab676);
}

.auth-panel h1 {
    font-size: clamp(34px, 5vw, 48px);
    line-height: 0.98;
    margin-bottom: 12px;
    letter-spacing: -0.04em;
}

.auth-lead {
    max-width: 34rem;
    font-size: 15px;
    line-height: 1.6;
    margin-bottom: 8px;
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.22em;
    font-size: 12px;
    color: var(--accent);
    margin-bottom: 10px;
    font-weight: 700;
}

.muted {
    color: var(--muted);
}

.stack,
.inline-form {
    display: grid;
    gap: 14px;
}

label {
    display: grid;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
}

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

input,
select,
textarea {
    width: 100%;
    padding: 14px 15px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.92);
    color: var(--ink);
    transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(15, 118, 110, 0.55);
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.10);
    transform: translateY(-1px);
}

textarea {
    resize: vertical;
}

button {
    border: 0;
    padding: 14px 18px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--brand), var(--brand-strong));
    color: #fff;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 16px 28px rgba(15, 118, 110, 0.18);
}

button:hover {
    transform: translateY(-2px);
    opacity: 0.96;
    box-shadow: 0 20px 32px rgba(15, 118, 110, 0.22);
}

.button-secondary {
    background: linear-gradient(135deg, #eef2f3, #dde6e8);
    color: var(--ink);
    box-shadow: none;
}

.button-danger {
    background: var(--danger);
    box-shadow: none;
}

.demo-box,
.flash {
    padding: 14px 16px;
    border-radius: 16px;
    margin-top: 18px;
}

.demo-box {
    background: #f4f7f8;
    border: 1px dashed #bfd1d3;
}

.flash.success {
    background: rgba(21, 127, 59, 0.10);
    border: 1px solid rgba(21, 127, 59, 0.25);
    color: #155724;
}

.flash.error {
    background: rgba(180, 35, 24, 0.10);
    border: 1px solid rgba(180, 35, 24, 0.22);
    color: #7a271a;
}

.topbar {
    padding: 26px 28px 12px;
    display: flex;
    gap: 20px;
    align-items: flex-start;
    justify-content: space-between;
}

.topbar h1 {
    margin-bottom: 6px;
}

.topbar h1 span {
    color: var(--brand-strong);
    font-size: 18px;
}

.app-shell {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    gap: 20px;
    padding: 8px 28px 32px;
}

.side-nav {
    position: sticky;
    top: 20px;
    height: fit-content;
    padding: 18px;
    display: grid;
    gap: 10px;
}

.side-nav a {
    text-decoration: none;
    color: var(--ink);
    padding: 10px 12px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f9f2e7, #f1eadf);
    font-weight: 600;
}

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

.hero-card {
    padding: 22px;
    display: grid;
    gap: 18px;
}

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

.metric-grid article,
.salary-summary div {
    background: linear-gradient(180deg, rgba(243, 247, 246, 0.96), rgba(255, 255, 255, 0.96));
    border-radius: 18px;
    padding: 16px;
}

.metric-grid span,
.salary-summary span {
    display: block;
    color: var(--muted);
    margin-bottom: 8px;
    font-size: 13px;
}

.metric-grid strong,
.salary-summary strong {
    font-size: 28px;
}

.panel {
    padding: 20px;
}

.panel-header,
.section-title-row,
.list-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.card {
    padding: 18px;
}

.card h4,
.panel h3,
.hero-card h2 {
    letter-spacing: -0.02em;
}

.list {
    display: grid;
    gap: 12px;
}

.list-item {
    align-items: center;
    padding: 14px 0;
    border-bottom: 1px solid #ebe3d5;
}

.list-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.list-item img {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 16px;
    border: 1px solid var(--line);
}

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

.calendar-head {
    text-align: center;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
    padding-bottom: 6px;
}

.calendar-day {
    min-height: 74px;
    border-radius: 16px;
    border: 1px solid #e9e2d4;
    padding: 10px;
    background: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.calendar-day.today {
    border-color: var(--brand);
    background: #ebfbf8;
}

.calendar-day.holiday {
    background: #fff4e8;
    border-color: #f0b27a;
}

.calendar-day.empty {
    background: transparent;
    border-style: dashed;
}

.calendar-day small {
    color: var(--accent);
    font-weight: 700;
}

.inline-form {
    margin-top: 16px;
}

.button-row {
    display: flex;
    gap: 10px;
}

.salary-summary,
.component-list {
    display: grid;
    gap: 12px;
}

.component-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #eee3d1;
}

.component-item:last-child {
    border-bottom: 0;
}

.pill {
    background: #eaf7ef;
    color: var(--success);
    border-radius: 999px;
    padding: 8px 12px;
    height: fit-content;
    font-size: 12px;
    font-weight: 700;
}

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

    .side-nav {
        position: static;
        grid-auto-flow: column;
        overflow-x: auto;
    }

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

@media (max-width: 640px) {
    .topbar,
    .app-shell {
        padding-left: 16px;
        padding-right: 16px;
    }

    .topbar {
        flex-direction: column;
    }

    .auth-panel,
    .panel,
    .card,
    .hero-card {
        padding: 16px;
    }

    .auth-panel h1 {
        font-size: 32px;
    }
}
