:root {
    --ink: #000000;
    --ink-2: #111111;
    --paper: #f8fafc;
    --card: #ffffff;
    --line: #e2e8f0;
    --text: #0f172a;
    --muted: #64748b;
    --accent: #e31e24;
    --accent-deep: #b91c1c;
    --teal: #e31e24;
    --gold: #e31e24;
    --danger: #ef4444;
    --ok: #065f46;
    --ok-bg: #ecfdf5;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --sidebar: 260px;
    --font: Calibri, "Segoe UI", Tahoma, Arial, sans-serif;
    --display: Calibri, "Segoe UI", Tahoma, Arial, sans-serif;
}

* { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

body {
    font-family: var(--font);
    font-size: 14px;
    line-height: 1.5;
    color: var(--text);
    background: var(--paper);
}

a { color: inherit; }

p, ul { margin: 0; }

button, input { font: inherit; }

.shell {
    min-height: 100vh;
    display: grid;
    grid-template-columns: var(--sidebar) 1fr;
}

.sidebar {
    background: #000;
    color: #fff;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: auto;
}

.brand {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 8px 8px 14px;
    margin-bottom: 6px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.brand-logo {
    display: block;
    width: 100%;
    max-height: 64px;
    object-fit: contain;
    object-position: left center;
}

.brand strong,
.who strong {
    display: block;
    font-size: 14px;
    letter-spacing: 0.01em;
}

.who small {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    margin-top: 2px;
}

.brand-mark {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #fff;
    font-family: var(--display);
    font-size: 18px;
    flex: none;
}

.nav-label {
    margin: 14px 8px 6px;
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #94a3b8;
}

.nav { display: grid; gap: 6px; }

.nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: #cbd5e1;
    padding: 10px 12px;
    border-radius: 10px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
}

.nav a svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
    opacity: 0.8;
}

.nav a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: #fff;
}

.nav a.is-active {
    background: linear-gradient(135deg, rgba(227, 30, 36, 0.32), rgba(227, 30, 36, 0.12));
    color: #fff;
    border-color: rgba(227, 30, 36, 0.4);
}

.sidebar-foot {
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.who {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 10px;
    text-decoration: none;
    color: inherit;
    border-radius: 12px;
}

a.who:hover { background: rgba(255, 255, 255, 0.08); }

.avatar {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    flex: none;
}

.workspace { min-width: 0; }

.topbar {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 20px;
    background: var(--card);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 5;
}

.topbar h1,
.login-panel h1,
.hero h2,
.form-card h2,
.form-panel h2 {
    font-family: var(--display);
    font-size: 22px;
    font-weight: 600;
    line-height: 1.25;
    letter-spacing: -0.02em;
    margin: 0;
}

.topbar h1 { font-size: 22px; }

.topbar time {
    margin-left: auto;
    color: var(--muted);
    font-size: 13px;
}

.eyebrow {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.content { padding: 12px 20px 20px; }

.hero,
.panel,
.stat,
.form-card,
.hint {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.hero {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
    padding: 22px 24px;
    background: var(--accent);
    color: #fff;
    border: 0;
    box-shadow: none;
}

.hero .eyebrow,
.hero h2,
.hero p:not(.eyebrow) { color: #fff; }

.hero .btn-primary { background: #111; }
.hero .btn-primary:hover { background: #000; }
.hero .btn-line { background: #fff; color: var(--accent); border-color: #fff; }

.hero h2 { font-size: 22px; line-height: 1.25; }

.hero p:not(.eyebrow),
.lede { margin-top: 4px; color: var(--muted); font-size: 14px; line-height: 1.45; }

.hero .eyebrow,
.hero h2,
.hero p { color: #fff; }

.hero-actions,
.login-form-wrap form { display: grid; }

.hero-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.stats {
    margin-top: 18px;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 14px;
}

.stat { padding: 18px 18px 16px; }

.stat span,
.stat small { color: var(--muted); font-size: 13px; }

.stat strong {
    display: block;
    margin: 10px 0 6px;
    font-size: 28px;
    letter-spacing: -0.04em;
}

.split,
.password-layout {
    margin-top: 18px;
    display: grid;
    grid-template-columns: 1.4fr 0.8fr;
    gap: 14px;
}

.password-layout { grid-template-columns: minmax(0, 560px) 280px; align-items: start; }

.panel { padding: 16px 18px; }

.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.panel h3,
.aside-note h3 { margin: 0 0 8px; font-size: 16px; }

.details { margin: 8px 0 0; }

.details div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0;
    border-bottom: 1px solid var(--line);
}

.details div:last-child { border-bottom: 0; }

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

.details dd { margin: 0; font-weight: 700; text-align: right; }

.checks { margin: 8px 0 16px; padding: 0; list-style: none; }

.checks li {
    position: relative;
    padding: 10px 0 10px 28px;
    color: var(--muted);
    line-height: 1.45;
}

.checks li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 16px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent);
    box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.12);
}

.pill {
    background: var(--ok-bg);
    color: var(--ok);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: 12px;
    font-weight: 800;
}

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--accent-deep);
    font-weight: 800;
}

.btn {
    border: 0;
    cursor: pointer;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.icon {
    width: 16px;
    height: 16px;
    fill: currentColor;
    flex: none;
}

.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-deep); color: #fff; }
.btn-line { background: #fff; border: 1px solid var(--line); color: var(--text); }
.btn-line:hover { border-color: var(--accent); color: var(--accent); }
.btn-ghost {
    background: transparent;
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.35);
}
.btn-ghost:hover { background: rgba(239, 68, 68, 0.15); color: #fecaca; }
.btn-block { width: 100%; }

.alert {
    margin-bottom: 16px;
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--ok-bg);
    color: var(--ok);
    font-weight: 700;
}

label { display: block; margin: 10px 0 4px; font-weight: 600; font-size: 13px; }

input[type="email"],
input[type="password"],
input[type="text"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="month"],
input[type="search"],
input[type="file"],
select {
    width: 100%;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 14px;
    outline: none;
}

input:focus,
select:focus,
textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.15); }

.field-error { color: var(--danger); font-size: 13px; margin: 8px 0 0; font-weight: 700; }

.check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 10px 0 12px;
    font-weight: 600;
    color: var(--muted);
}

.check input { width: 16px; height: 16px; accent-color: var(--accent); }

.form-panel .btn,
.form-card .btn { margin-top: 12px; }

.guest-body {
    min-height: 100vh;
    background: #000;
}

.auth-body {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #000;
    padding: 20px;
}

.auth-container { width: 100%; max-width: 440px; }

.auth-card {
    background: #fff;
    border-radius: 16px;
    padding: 40px;
    border: 1px solid #e2e8f0;
}

.auth-logo { text-align: center; margin-bottom: 24px; }

.auth-logo-img {
    display: block;
    margin: 0 auto;
    max-width: 220px;
    width: 100%;
    height: auto;
}

.auth-title {
    font-size: 20px;
    font-weight: 700;
    text-align: center;
    margin: 0 0 6px;
}

.auth-subtitle {
    color: var(--muted);
    text-align: center;
    margin: 0 0 22px;
    font-size: 13px;
}

.auth-card .btn { margin-top: 8px; }

.form-card { width: min(400px, 100%); padding: 20px; }

.form-card h2,
.form-panel h2 { font-size: 24px; }

.hint {
    margin-top: 12px;
    padding: 10px 12px;
    box-shadow: none;
    background: #f8fafc;
    display: grid;
    gap: 2px;
}

.hint strong { font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.hint span { font-weight: 700; }

.menu-btn, .backdrop { display: none; }

.alert-danger { background: #fdecec; color: var(--danger); }

.page-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.page-bar .toolbar { margin-bottom: 0; }

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

.report-types { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }

.report-types a {
    text-decoration: none;
    border: 1px solid var(--line);
    background: var(--card);
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 700;
}

.report-types a.is-active { background: var(--accent); color: #fff; border-color: var(--accent); }

.note {
    margin: 0 0 12px;
    padding: 10px 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.action-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-top: 12px;
    padding: 10px 12px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
}

.action-bar p { margin: 0; color: var(--muted); font-size: 13px; }

.shortcuts {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 10px;
    margin-top: 12px;
}

.shortcuts a {
    display: block;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    text-decoration: none;
    font-weight: 700;
}

.shortcuts a:hover { border-color: var(--accent); color: var(--accent); }

.shortcuts a span {
    display: block;
    margin-top: 4px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
    line-height: 1.4;
}

.toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.toolbar input,
.toolbar select { width: auto; }

.toolbar input[type="search"],
.toolbar input[type="file"] { width: 240px; }

.toolbar .check { margin: 0 0 6px; }

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

.form-grid .wide { grid-column: 1 / -1; }

.sheet {
    overflow: auto;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
}

.salary-sheet { max-height: calc(100vh - 250px); }

.table { width: 100%; border-collapse: separate; border-spacing: 0; background: transparent; }

.table th,
.table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    font-size: 13px;
    vertical-align: middle;
    white-space: nowrap;
}

.table th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: #f8fafc;
    font-size: 11px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--muted);
    font-weight: 700;
}

.table tbody tr:hover td { background: #f8fafc; }

.table tfoot td {
    position: sticky;
    bottom: 0;
    z-index: 2;
    background: #fff;
    box-shadow: 0 -1px 0 var(--line);
}

.table .num, .num { text-align: right; font-variant-numeric: tabular-nums; }

.table a { color: var(--accent-deep); font-weight: 700; text-decoration: none; }

.col-name { min-width: 220px; white-space: normal; }

.col-money { min-width: 108px; }

.table .net { font-weight: 800; }

.table input[type="number"] {
    width: 108px;
    padding: 6px 8px;
    text-align: right;
}

.table input[type="time"],
.table input[type="text"],
.table select {
    width: 118px;
    padding: 6px 8px;
}

.table input[readonly] { background: #f8fafc; }

input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] { -moz-appearance: textfield; appearance: textfield; }

.totals td { font-weight: 800; }

.is-neg { color: var(--danger); }

.actions { display: flex; gap: 8px; align-items: center; white-space: nowrap; }

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

.actions select { width: auto; min-width: 120px; height: 34px; }

.actions a,
.actions button,
.table a,
.table button {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    border: 0;
    background: transparent;
    color: var(--accent-deep);
    font-weight: 700;
    cursor: pointer;
    padding: 0;
    text-decoration: none;
}

.actions .danger,
.table .danger { color: var(--danger); }

.badge {
    display: inline-block;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
}

.badge-pf { background: rgba(227, 30, 36, 0.1); color: #b91c1c; }
.badge-non_pf { background: #f1f5f9; color: #334155; }
.badge-cash { background: #f1f5f9; color: #0f172a; }
.badge-p, .badge-wo, .badge-h { background: var(--ok-bg); color: var(--ok); }
.badge-ot { background: #e7f1f4; color: #1d5563; }
.badge-a { background: #fdecec; color: var(--danger); }
.badge-hd { background: #fff7ed; color: #9a3412; }

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

.cal-head { text-align: center; font-size: 11px; color: var(--muted); font-weight: 700; }

.cal-day {
    min-height: 64px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 6px;
    font: inherit;
    font-size: 12px;
    color: inherit;
    text-align: left;
    cursor: pointer;
    width: 100%;
}

.cal-day:hover { border-color: var(--accent); }

.day-modal {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.55);
}

.day-modal[hidden] { display: none; }

.day-modal-card {
    width: min(960px, 100%);
    max-height: min(82vh, 760px);
    overflow: auto;
    background: #fff;
    border-radius: 16px;
    padding: 18px;
}

.report-card {
    width: min(1180px, calc(100vw - 32px));
    height: calc(100vh - 32px);
    max-height: calc(100vh - 32px);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.report-card form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.report-card .day-lists {
    flex: 1 1 0;
    min-height: 0;
    max-height: none;
    overflow: hidden;
    align-items: stretch;
}

.report-card .day-lists section {
    min-height: 0;
    overflow: auto;
}

.report-card .sheet {
    flex: 1 1 0;
    min-height: 0;
    margin-top: 12px;
    max-height: none;
}

.day-modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.day-modal-head h2 { margin: 0; font-size: 20px; }

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

.day-lists section {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 12px;
    min-height: 180px;
}

.day-lists h3 { margin: 0 0 10px; font-size: 15px; }

.day-lists h3 span {
    display: inline-grid;
    place-items: center;
    min-width: 22px;
    margin-left: 4px;
    padding: 0 6px;
    border-radius: 999px;
    background: rgba(227, 30, 36, 0.1);
    color: var(--accent);
    font-size: 12px;
}

.day-lists ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }

.day-lists li {
    display: grid;
    gap: 2px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line);
    font-size: 13px;
}

.day-lists li:last-child { border-bottom: 0; padding-bottom: 0; }

.day-lists li strong,
.day-lists li small { display: block; }
.day-lists small,
.day-lists .is-empty { color: var(--muted); font-size: 12px; }

.day-lists .day-diff {
    display: inline-block;
    margin-left: 6px;
    padding: 0 6px;
    border-radius: 999px;
    font-weight: 700;
    background: rgba(227, 30, 36, 0.1);
}
.day-lists .day-diff.is-plus { color: var(--accent); }
.day-lists .day-diff.is-minus { color: var(--ok); background: #ecfdf5; }

.cal-day strong { display: block; margin-bottom: 4px; }
.cal-day small { display: block; color: var(--muted); }
.cal-day.is-out { opacity: 0.4; }

.cal-day.is-today {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
    background: rgba(227, 30, 36, 0.06);
}

.cal-day.is-today strong { color: var(--accent); }

.cal-day.is-holiday {
    background: #e7f4ec;
    border-color: #1c6b45;
}

.picker-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 12px;
}

.picker {
    display: grid;
    gap: 4px;
    min-width: 180px;
    margin: 0;
    padding: 8px 12px 10px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    font-weight: 600;
}

.picker span {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--muted);
}

.picker input,
.picker select {
    width: 100%;
    border: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
    font-weight: 700;
    box-shadow: none;
}

.picker input:focus,
.picker select:focus { box-shadow: none; }

.combo { position: relative; }

.combo-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0;
    padding: 0 !important;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.combo-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 12px;
    padding: 11px 12px;
    font-size: 14px;
    text-align: left;
    cursor: pointer;
    color: var(--text);
}

.combo-btn.is-placeholder { color: var(--muted); }

.combo-label {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.combo-caret {
    width: 16px;
    height: 16px;
    flex: none;
}

.combo-caret svg {
    display: block;
    width: 16px;
    height: 16px;
    fill: var(--muted);
}

.combo.is-open .combo-btn {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(227, 30, 36, 0.15);
}

.combo-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    min-width: 280px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 8px;
}

.combo-search {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 0 10px;
    background: #fff;
}

.combo-search svg {
    width: 16px;
    height: 16px;
    flex: none;
    fill: var(--muted);
}

.combo-search input {
    border: 0;
    padding: 9px 0;
    box-shadow: none;
}

.combo-search input:focus { box-shadow: none; }

.combo-list {
    list-style: none;
    margin: 8px 0 0;
    padding: 0;
    max-height: 240px;
    overflow: auto;
}

.combo-list li {
    padding: 8px 10px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
}

.combo-list li.is-active,
.combo-list li:hover { background: #f6efe4; }

.combo-list li.is-selected { color: var(--accent-deep); font-weight: 700; }

.combo-empty { color: var(--muted); cursor: default; }

.picker .combo-btn {
    border: 0;
    padding: 0;
    border-radius: 0;
    background: transparent;
    font-weight: 700;
    box-shadow: none;
}

.picker .combo.is-open .combo-btn { box-shadow: none; }

.picker .combo-panel { right: auto; width: max(100%, 320px); }

.picker-wide { min-width: 260px; flex: 1; }

.monthbox { position: relative; }

.monthbox-native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    margin: 0;
    padding: 0 !important;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.monthbox-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 0;
    background: transparent;
    padding: 0;
    font-size: 14px;
    font-weight: 700;
    text-align: left;
    cursor: pointer;
    color: var(--text);
}

.monthbox-btn svg {
    width: 16px;
    height: 16px;
    flex: none;
    fill: var(--muted);
}

.monthbox.is-open .monthbox-btn { color: var(--accent-deep); }

.monthbox-panel {
    position: absolute;
    z-index: 40;
    top: calc(100% + 10px);
    left: 0;
    width: 280px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: var(--shadow);
    padding: 10px;
}

.monthbox-year {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.monthbox-year strong { font-size: 15px; }

.monthbox-year button,
.monthbox-now {
    border: 1px solid var(--line);
    background: #fff;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 700;
}

.monthbox-year button {
    width: 32px;
    height: 32px;
    padding: 0;
}

.monthbox-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: 10px;
}

.monthbox-grid button {
    border: 0;
    background: transparent;
    border-radius: 8px;
    padding: 8px 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.monthbox-grid button:hover,
.monthbox-grid button.is-active { background: #f6efe4; }

.monthbox-grid button.is-today { box-shadow: inset 0 0 0 1px var(--accent); }

.monthbox-grid button.is-selected {
    background: var(--accent);
    color: #fff;
    box-shadow: none;
}

.monthbox-now {
    width: 100%;
    margin-top: 10px;
    padding: 8px;
    color: var(--accent-deep);
}

.upload-box { margin-bottom: 14px; }
.upload-box h2 { font-size: 18px; margin: 0 0 4px; }

.print-body { background: #f8fafc; }
.slip { max-width: 820px; margin: 24px auto; padding: 24px; }
.slip-head, .slip-sign { display: flex; justify-content: space-between; gap: 16px; }
.slip h1 { font-family: var(--display); font-size: 28px; margin: 0; }
.slip-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 16px; margin: 18px 0; }
.slip-meta div { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.slip-meta dt { color: var(--muted); font-size: 12px; }
.slip-meta dd { margin: 2px 0 0; font-weight: 700; }
.slip-table { margin-top: 8px; }
.slip-sign { margin-top: 48px; }
.slip-sign span { min-width: 180px; border-top: 1px solid var(--ink); padding-top: 6px; font-size: 13px; }

.a4-toolbar {
    width: 210mm;
    max-width: calc(100% - 24px);
    margin: 16px auto 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.a4-sheet {
    width: 210mm;
    height: 297mm;
    max-width: calc(100% - 24px);
    margin: 12px auto 24px;
    padding: 5mm;
    background: #fff;
    box-shadow: var(--shadow);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    page-break-after: always;
    break-after: page;
}

.a4-sheet:last-of-type {
    page-break-after: auto;
    break-after: auto;
}

.pay-slip {
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    line-height: 1.3;
    border: 2px solid #111;
    box-sizing: border-box;
}

.fp-sheet,
.fp-grid,
.fp-lines { width: 100%; border-collapse: collapse; }

.fp-brand,
.fp-title,
.fp-grid td,
.fp-lines th,
.fp-lines td {
    border: 1px solid #111;
    padding: 4px 6px;
    vertical-align: middle;
}

.fp-brand { width: 72%; }
.fp-title { width: 28%; text-align: center; }

.fp-brand strong { display: block; font-size: 13px; letter-spacing: 0.02em; }
.fp-brand p { margin: 1px 0 0; font-size: 8px; line-height: 1.25; }

.fp-title strong { display: block; font-size: 14px; letter-spacing: 0.06em; }
.fp-title span { display: block; margin-top: 3px; font-size: 10px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }

.fp-grid td { width: 50%; }
.fp-grid b { font-weight: 700; }

.fp-lines th {
    background: #d9d9d9;
    font-size: 11px;
    font-weight: 700;
    text-align: left;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

.fp-lines td:first-child,
.fp-lines th:first-child { width: 14mm; text-align: center; }

.fp-lines td:nth-child(3),
.fp-lines td:nth-child(4),
.fp-lines th:nth-child(3),
.fp-lines th:nth-child(4) { width: 28mm; text-align: right; }

.fp-lines tfoot td { font-weight: 700; }
.fp-lines tfoot td:last-child { text-align: right; }
.fp-lines tfoot tr:last-child td { font-weight: 400; text-align: left; text-transform: capitalize; }

.fp-sign {
    display: flex;
    justify-content: space-between;
    gap: 16mm;
    margin-top: auto;
    padding: 6mm 8mm 4mm;
}

.fp-sign span {
    flex: 1;
    border-top: 1px solid #111;
    padding-top: 3px;
    text-align: center;
    font-size: 11px;
}

.a4-cut {
    display: flex;
    align-items: center;
    flex: 0 0 4mm;
    gap: 8px;
    margin: 0;
    color: #b3a89a;
    font-size: 8px;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.a4-cut::before,
.a4-cut::after {
    content: "";
    flex: 1;
    border-top: 1px dashed #d9d0c3;
}

.report-sheet {
    width: 277mm;
    max-width: calc(100% - 24px);
    margin: 12px auto 24px;
    padding: 10mm;
    background: #fff;
    box-shadow: var(--shadow);
}

.report-sheet h1 { font-size: 26px; margin: 0; }

.report-table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 12px; }
.report-table th,
.report-table td { border-bottom: 1px solid var(--line); padding: 6px 8px; text-align: left; vertical-align: top; }
.report-table th { font-size: 10px; letter-spacing: 0.05em; text-transform: uppercase; color: var(--muted); }
.report-table .num { text-align: right; font-variant-numeric: tabular-nums; }

@page { size: A4 portrait; margin: 0; }
@page report-page { size: A4 landscape; margin: 8mm; }
.report-print { page: report-page; }

@media print {
    .no-print { display: none !important; }
    .print-body { background: #fff; }
    .slip { margin: 0; }
    .a4-sheet {
        width: 210mm;
        height: 297mm;
        max-width: none;
        margin: 0;
        padding: 5mm;
        box-shadow: none;
        overflow: hidden;
    }
    .report-sheet {
        width: auto;
        max-width: none;
        margin: 0;
        padding: 8mm;
        box-shadow: none;
    }
}

@media screen and (max-width: 860px) {
    .a4-sheet { width: auto; height: auto; }
    .pay-cols { grid-template-columns: 1fr; }
    .day-lists { grid-template-columns: 1fr; }
}

@media (max-width: 980px) {
    .shell { grid-template-columns: 1fr; }
    .sidebar {
        position: fixed;
        z-index: 20;
        transform: translateX(-105%);
        transition: transform 0.2s ease;
        width: min(84vw, 320px);
    }
    .sidebar.is-open { transform: none; }
    .backdrop.is-open {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(18, 24, 32, 0.45);
        z-index: 10;
    }
    .menu-btn {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 42px;
        height: 42px;
        border-radius: 12px;
        border: 1px solid var(--line);
        background: var(--card);
        padding: 0 11px;
    }
    .menu-btn span { display: block; height: 2px; background: var(--ink); }
    .stats, .split, .password-layout, .login { grid-template-columns: 1fr; }
    .login-panel { align-items: center; }
    .login-panel h1 { font-size: 24px; margin-top: 14px; }
    .hero { flex-direction: column; align-items: flex-start; }
    .hero h2 { font-size: 22px; }
    .topbar, .content { padding-left: 16px; padding-right: 16px; }
    .topbar time { display: none; }
    .form-grid, .shortcuts, .slip-meta { grid-template-columns: 1fr; }
    .action-bar { align-items: stretch; flex-direction: column; }
    .salary-sheet { max-height: none; }
}
