:root {
    color-scheme: light;
    --bg: #f3f5f7;
    --panel: #ffffff;
    --text: #1f2933;
    --muted: #687383;
    --line: #d9e0e7;
    --accent: #0f766e;
    --accent-dark: #115e59;
    --warn: #b45309;
    --blue: #2563eb;
    --green: #16a34a;
    --amber: #d97706;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    grid-template-columns: 220px 1fr;
    background: var(--bg);
    color: var(--text);
    font-family: Arial, Helvetica, sans-serif;
}

body.login-body {
    display: block;
    min-height: 100vh;
    background:
        linear-gradient(90deg, rgba(0, 0, 0, 0.30), rgba(0, 0, 0, 0.74)),
        linear-gradient(135deg, #0f172a, #0f766e);
    background-size: cover;
    background-position: center;
}

.login-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 40px min(8vw, 140px);
}

.login-card {
    width: min(100%, 430px);
    padding: 34px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.58);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38);
    backdrop-filter: blur(8px);
}

.login-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.login-brand span {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: #0f766e;
    color: #ffffff;
    font-weight: 800;
}

.login-brand img {
    max-width: 150px;
    max-height: 64px;
    object-fit: contain;
}

.login-brand strong,
.login-brand small {
    display: block;
}

.login-brand strong {
    color: #ffffff;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: .2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.65);
}

.login-brand small,
.login-card p,
.login-help {
    color: rgba(255, 255, 255, 0.72);
}

.login-card h1 {
    margin: 0 0 8px;
    font-size: 30px;
    color: #ffffff;
    font-weight: 400;
}

.login-card p {
    margin: 0 0 22px;
}

.login-form {
    display: grid;
    gap: 16px;
}

.login-form label {
    display: grid;
    gap: 7px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.88);
}

.login-form input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    font: inherit;
}

.login-form input:focus {
    outline: 3px solid rgba(15, 118, 110, 0.18);
    border-color: #0f766e;
}

.login-form button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: #0ea5e9;
    color: #ffffff;
    font-weight: 800;
    cursor: pointer;
}

.login-form button:hover {
    background: #0284c7;
}

.login-reset-link {
    justify-self: start;
    border: 0;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 13px;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.login-error {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #fecaca;
    border-left: 5px solid #dc2626;
    border-radius: 8px;
    background: #fef2f2;
    color: #991b1b;
    font-weight: 700;
}

.login-success {
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #bbf7d0;
    border-left: 5px solid #16a34a;
    border-radius: 8px;
    background: #f0fdf4;
    color: #166534;
    font-weight: 700;
}

.login-help {
    display: block;
    margin-top: 18px;
    line-height: 1.5;
}

img,
svg,
video {
    max-width: 100%;
}

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

.sidebar {
    min-height: 100vh;
    padding: 18px 10px;
    background: #172026;
    color: #eef4f7;
    position: sticky;
    top: 0;
    align-self: start;
}

.brand {
    display: flex;
    gap: 12px;
    align-items: center;
    margin-bottom: 28px;
}

.brand-mark {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 8px;
    background: var(--accent);
    font-weight: 700;
}

.brand-logo {
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
}

.brand-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 4px;
}

.brand small,
.page-head p,
.page-head span,
.metrics span,
.module-card p {
    color: var(--muted);
}

.brand small {
    display: block;
    color: #9fb0ba;
    margin-top: 3px;
}

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

.nav a {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 40px;
    padding: 9px 10px;
    border-radius: 8px;
    color: #ffffff;
    font-size: 17px;
    font-weight: 300;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav a span {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 20px;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #ffffff;
    line-height: 1;
}

.nav a span svg {
    width: 17px;
    height: 17px;
    display: block;
    stroke: currentColor;
}

.nav a:hover,
.nav a.active {
    background: #2f455c;
    color: #ffffff;
    box-shadow: inset 3px 0 0 #14d6c2;
}

.main {
    padding: 32px;
    min-width: 0;
}

.page-head {
    margin-bottom: 24px;
}

.mobile-module-current {
    display: none;
}

.page-head p {
    margin: 0 0 7px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.page-head h1 {
    margin: 0 0 8px;
    font-size: clamp(27px, 3vw, 34px);
    line-height: 1.1;
}

.metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.metrics article,
.module-card,
.work-area {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
}

.metrics article {
    padding: 18px;
}

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

.metric-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 5px;
}

.metric-card.teal::before,
.bar-fill.teal {
    background: var(--accent);
}

.metric-card.amber::before,
.bar-fill.amber {
    background: var(--amber);
}

.metric-card.blue::before,
.bar-fill.blue {
    background: var(--blue);
}

.metric-card.green::before,
.bar-fill.green {
    background: var(--green);
}

.metrics strong {
    display: block;
    margin-top: 8px;
    font-size: 24px;
}

.dashboard-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(190px, 1fr));
    gap: 22px;
    margin-bottom: 22px;
}

.summary-card {
    position: relative;
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 16px;
    align-items: center;
    min-height: 112px;
    padding: 18px 20px;
    overflow: hidden;
    border: 3px solid transparent;
    border-radius: 18px;
    background: linear-gradient(#ffffff, #ffffff) padding-box, linear-gradient(135deg, #60a5fa, #c084fc, #f59e0b) border-box;
    box-shadow: 0 7px 16px rgba(31, 41, 51, .12);
}

.summary-card.permits {
    background: linear-gradient(90deg, #edf7ff, #f3f0ff) padding-box, linear-gradient(135deg, #38bdf8, #a78bfa, #f59e0b) border-box;
}

.summary-card.attendance {
    background: linear-gradient(90deg, #ecfdf5, #eff6ff) padding-box, linear-gradient(135deg, #34d399, #60a5fa, #fbbf24) border-box;
}

.summary-card.payments {
    background: linear-gradient(90deg, #fffbeb, #fff7ed) padding-box, linear-gradient(135deg, #38bdf8, #f59e0b, #fbbf24) border-box;
}

.summary-card.stock-alert {
    background: linear-gradient(90deg, #fef2f2, #fff7ed) padding-box, linear-gradient(135deg, #ef4444, #f59e0b, #22c55e) border-box;
}

.summary-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border: 3px solid currentColor;
    border-radius: 15px;
    background: rgba(255, 255, 255, .58);
    color: #2563eb;
    font-size: 28px;
}

.summary-card.attendance .summary-icon {
    color: #10b981;
}

.summary-card.payments .summary-icon {
    color: #d97706;
}

.summary-card.stock-alert .summary-icon {
    color: #dc2626;
}

.summary-card span {
    display: block;
    color: #334155;
    font-weight: 800;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.summary-card strong {
    display: block;
    margin-top: 5px;
    color: #111827;
    font-size: 34px;
    line-height: 1;
}

.summary-card small {
    color: #059669;
    font-size: 20px;
}

.summary-card small.danger {
    color: #dc2626;
}

.summary-card em {
    color: #64748b;
    font-style: normal;
    font-size: 22px;
}

.attendance-today-counts {
    display: inline-flex !important;
    align-items: center;
    gap: 12px;
    flex-wrap: nowrap;
    white-space: nowrap;
    width: auto;
}

.attendance-today-counts span {
    display: inline-flex;
    align-items: center;
    color: #059669;
    text-transform: none;
    letter-spacing: 0;
    white-space: nowrap;
}

.attendance-today-counts span.danger {
    color: #dc2626;
}

.attendance-today-counts b {
    display: inline-block;
    font-size: 34px;
    line-height: 1;
}

.attendance-today-counts em {
    color: #94a3b8;
    font-size: 24px;
    line-height: 1;
}

.summary-watermark {
    position: absolute;
    right: 18px;
    bottom: 10px;
    opacity: .12;
    font-size: 58px;
}

.dashboard-panels {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 24px;
}

.executive-panels {
    grid-template-columns: minmax(420px, 1.25fr) minmax(300px, .7fr) minmax(360px, .95fr);
    align-items: start;
}

.chart-panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(31, 41, 51, .14);
}

.chart-panel h2 {
    margin: 0 0 18px;
    font-size: 18px;
}

.chart-panel p {
    margin: 0 0 12px;
    color: var(--muted);
}

.compact-panel strong {
    display: block;
    font-size: 32px;
}

.bar-chart {
    display: grid;
    gap: 14px;
}

.bar-row {
    display: grid;
    grid-template-columns: 150px 1fr 48px;
    gap: 12px;
    align-items: center;
}

.bar-row span {
    color: #52606d;
    font-size: 13px;
    font-weight: 700;
}

.bar-row strong {
    text-align: right;
}

.bar-track {
    height: 14px;
    border-radius: 999px;
    background: #e7edf2;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: inherit;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.legend {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: 13px;
}

.legend::before {
    content: "";
    width: 34px;
    height: 12px;
    display: inline-block;
    border-radius: 3px;
}

.legend.gross::before {
    background: #67c7c4;
}

.legend.deductions::before {
    background: #fb923c;
}

.legend.net::before {
    background: #d1d5db;
}

.stacked-payroll-chart {
    display: grid;
    gap: 14px;
}

.payroll-row {
    display: grid;
    grid-template-columns: 145px 1fr;
    gap: 12px;
    align-items: center;
}

.payroll-row > span {
    color: #64748b;
    font-size: 13px;
}

.payroll-bar {
    display: flex;
    min-height: 52px;
    overflow: hidden;
    border-radius: 3px;
    background: #f1f5f9;
}

.payroll-segment {
    display: grid;
    place-items: center;
    min-width: 8px;
    overflow: hidden;
    padding: 0 8px;
    color: #111827;
    font-weight: 800;
    font-size: 13px;
    white-space: nowrap;
}

.payroll-segment.gross {
    background: #67c7c4;
}

.payroll-segment.deductions {
    background: #fb923c;
}

.payroll-segment.net {
    background: #d1d5db;
}

.vertical-chart {
    display: grid;
    grid-template-columns: repeat(4, minmax(58px, 1fr));
    gap: 14px;
    align-items: end;
    min-height: 280px;
    padding-top: 12px;
}

.vertical-bar {
    display: grid;
    grid-template-rows: 220px auto;
    gap: 10px;
    align-items: end;
    justify-items: center;
}

.vertical-fill {
    width: 48px;
    min-height: 18px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    border-radius: 13px 13px 4px 4px;
    box-shadow: inset 0 0 0 2px rgba(255, 255, 255, .22);
}

.vertical-fill span {
    writing-mode: vertical-rl;
    padding-top: 10px;
    color: #064e3b;
    font-size: 12px;
    font-weight: 900;
}

.vertical-fill.teal {
    background: #a7f3d0;
}

.vertical-fill.blue {
    background: #bfdbfe;
}

.vertical-fill.amber {
    background: #fde68a;
}

.vertical-fill.green {
    background: #bbf7d0;
}

.vertical-fill.red {
    background: #fecaca;
}

.vertical-bar strong {
    min-height: 42px;
    color: #475569;
    font-size: 12px;
    text-align: center;
}

.stock-donut-panel {
    display: grid;
    grid-template-columns: 150px 1fr;
    gap: 18px;
    align-items: center;
    padding: 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: linear-gradient(135deg, #f8fafc, #ffffff);
}

.stock-panel .stock-donut-panel {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
}

.stock-donut {
    --available: 0;
    --low: 0;
    --empty: 0;
    width: 132px;
    height: 132px;
    display: grid;
    place-items: center;
    place-content: center;
    border-radius: 50%;
    background:
        radial-gradient(circle, #ffffff 0 54%, transparent 55%),
        conic-gradient(
            #22c55e 0 calc(var(--available) * 1%),
            #f59e0b calc(var(--available) * 1%) calc((var(--available) + var(--low)) * 1%),
            #ef4444 calc((var(--available) + var(--low)) * 1%) 100%
        );
    box-shadow: inset 0 0 0 1px rgba(15, 23, 42, .08), 0 10px 22px rgba(15, 23, 42, .12);
}

.stock-donut strong {
    color: #111827;
    font-size: 30px;
    line-height: 1;
}

.stock-donut span {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.stock-donut-legend {
    display: grid;
    gap: 8px;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
}

.stock-donut-legend span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.stock-donut-legend span::before {
    content: "";
    width: 12px;
    height: 12px;
    border-radius: 999px;
}

.stock-donut-legend .available::before {
    background: #22c55e;
}

.stock-donut-legend .low::before {
    background: #f59e0b;
}

.stock-donut-legend .empty::before {
    background: #ef4444;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 16px;
}

.module-card {
    min-height: 170px;
    padding: 20px;
    transition: transform .16s ease, border-color .16s ease;
}

.module-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
}

.module-card span {
    display: grid;
    place-items: center;
    width: 42px;
    height: 34px;
    border-radius: 7px;
    background: #e4f4f1;
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 13px;
}

.module-card h2 {
    margin: 18px 0 8px;
    font-size: 18px;
}

.module-card p {
    margin: 0;
    line-height: 1.45;
}

.work-area {
    overflow: hidden;
    min-width: 0;
}

.toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.personal-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: #e5e7eb;
}

.personal-tabs a {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 0 16px;
    border: 1px solid #4b5563;
    border-radius: 7px;
    background: #f3f4f6;
    color: #111827;
    font-size: 15px;
    font-weight: 800;
}

.personal-tabs a.active {
    border-color: #1f2937;
    background: #1f2937;
    color: #ffffff;
}

.personal-tabs span {
    width: 23px;
    height: 23px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.personal-tabs svg {
    width: 22px;
    height: 22px;
}

.job-toolbar {
    justify-content: flex-end;
}

.job-table-shell table {
    min-width: 0;
}

.job-position-modal {
    width: min(1000px, 100%);
}

.person-modal {
    width: min(1100px, 100%);
    max-height: calc(100vh - 36px);
    overflow-y: auto;
}

.people-toolbar {
    display: grid;
    grid-template-columns: 220px 220px 1fr 220px 1fr auto;
    gap: 14px;
    align-items: end;
    padding: 16px;
    border-top: 3px solid #334155;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.people-toolbar input,
.people-toolbar select {
    min-height: 38px;
}

.people-table-shell {
    margin: 0 16px 16px;
    overflow-x: auto;
}

.people-table {
    min-width: 0;
    table-layout: fixed;
}

.people-table th,
.people-table td {
    padding: 14px 10px;
    white-space: normal;
    vertical-align: middle;
    line-height: 1.35;
    word-break: normal;
    overflow-wrap: anywhere;
}

.people-table th:nth-child(1),
.people-table td:nth-child(1) {
    width: 58px;
}

.people-table th:nth-child(2),
.people-table td:nth-child(2) {
    width: 80px;
}

.people-table th:nth-child(4),
.people-table td:nth-child(4) {
    width: 108px;
}

.people-table th:nth-child(5),
.people-table td:nth-child(5) {
    width: 126px;
}

.people-table th:nth-child(7),
.people-table td:nth-child(7) {
    width: 134px;
}

.people-table th:nth-child(8),
.people-table td:nth-child(8) {
    width: 225px;
}

.person-status {
    display: inline-flex;
    min-height: 24px;
    align-items: center;
    padding: 0 8px;
    border-radius: 5px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.person-status.activo {
    background: #334155;
}

.person-status.liquidado {
    background: #dc2626;
}

.person-status.suspendido {
    background: #f59e0b;
}

.person-status.lista-roja {
    background: #991b1b;
}

.person-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.person-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    min-height: 32px;
    padding: 0;
    border-radius: 5px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 900;
}

.person-action.state {
    background: #fbbf24;
    color: #111827;
}

.person-action.edit {
    background: #1f2937;
}

.person-action.view {
    background: #0891b2;
}

.person-action.history {
    background: #6b7280;
}

.person-action.contract {
    background: #16a34a;
}

.person-action.delete {
    background: #dc2626;
}

button,
.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    border: 0;
    border-radius: 7px;
    padding: 0 14px;
    background: var(--accent);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}

button.secondary,
.button.secondary {
    background: #edf2f5;
    color: var(--text);
}

.button.success {
    background: #16a34a;
    color: #ffffff;
}

button.success {
    background: #16a34a;
    color: #ffffff;
}

.notice {
    margin: 16px;
    padding: 12px 14px;
    border: 1px solid #b7e2d8;
    border-radius: 8px;
    background: #ecfdf7;
    color: #0f5b4e;
    font-weight: 700;
}

.record-form {
    margin: 16px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafb;
}

.record-form h2 {
    margin: 0 0 16px;
    font-size: 18px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 14px;
}

label {
    display: grid;
    gap: 7px;
    color: #52606d;
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 9px 10px;
    color: var(--text);
    font: inherit;
    background: #ffffff;
}

textarea {
    min-height: 88px;
    resize: vertical;
}

input[type="file"] {
    padding: 7px 10px;
}

input:focus,
select:focus,
textarea:focus {
    outline: 2px solid rgba(15, 118, 110, .22);
    border-color: var(--accent);
}

.field-help,
.form-note {
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.form-note {
    margin: -8px 0 16px;
}

.check-field {
    align-content: start;
}

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

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 16px;
}

.table-shell {
    overflow-x: auto;
    max-width: 100%;
    -webkit-overflow-scrolling: touch;
}

table {
    width: 100%;
    min-width: 980px;
    border-collapse: collapse;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    white-space: nowrap;
}

th {
    background: #f8fafb;
    color: #52606d;
    font-size: 13px;
}

.worker-photo {
    width: 44px;
    height: 44px;
    display: block;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--line);
    background: #edf2f5;
}

.file-link {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 10px;
    border-radius: 7px;
    background: #e4f4f1;
    color: var(--accent-dark);
    font-size: 13px;
    font-weight: 700;
}

.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    min-width: 260px;
}

.attendance-tabs {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: linear-gradient(90deg, #eef6f4, #eef2ff);
}

.attendance-tabs a {
    display: inline-flex;
    align-items: center;
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #f8fafb;
    font-weight: 700;
    box-shadow: 0 1px 2px rgba(31, 41, 51, .08);
}

.attendance-tabs a.active {
    border-color: #203039;
    background: #203039;
    color: #ffffff;
}

.attendance-tabs a:nth-child(1).active {
    background: #0f766e;
    border-color: #0f766e;
}

.attendance-tabs a:nth-child(2).active {
    background: #1f2937;
    border-color: #1f2937;
}

.attendance-tabs a:nth-child(3).active {
    background: #7c3aed;
    border-color: #7c3aed;
}

.attendance-tabs a:nth-child(4).active {
    background: #2563eb;
    border-color: #2563eb;
}

.payroll-tabs {
    gap: 15px;
    align-items: center;
    background: #e5e7eb;
}

.permissions-tabs {
    background: #e5e7eb;
}

.payroll-tabs a {
    min-height: 46px;
    border-color: #4b5563;
    background: #f3f4f6;
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    box-shadow: none;
}

.payroll-tabs a.active,
.payroll-tabs a:nth-child(1).active,
.payroll-tabs a:nth-child(2).active,
.payroll-tabs a:nth-child(3).active,
.payroll-tabs a:nth-child(4).active {
    border-color: #1f2937;
    background: #1f2937;
    color: #ffffff;
}

.permissions-tabs a.active,
.permissions-tabs a:nth-child(1).active,
.permissions-tabs a:nth-child(2).active,
.permissions-tabs a:nth-child(3).active {
    border-color: #203039;
    background: #203039;
    color: #ffffff;
}

.tab-icon {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-right: 8px;
    color: currentColor;
    font-size: 20px;
    line-height: 1;
}

.payroll-filter {
    grid-template-columns: minmax(260px, 1fr) auto auto;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .03em;
}

.status-badge.pending {
    background: #fef3c7;
    color: #92400e;
}

.status-badge.paid {
    background: #dcfce7;
    color: #166534;
}

.money-deduction {
    color: #dc2626 !important;
    font-weight: 900;
}

.payroll-detail-modal {
    width: min(1040px, 100%);
}

.payroll-detail-body {
    display: grid;
    gap: 18px;
    padding: 22px;
    overflow-y: auto;
    min-height: 0;
}

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

.detail-kpis span {
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
    color: var(--muted);
    font-weight: 800;
}

.detail-kpis strong {
    display: block;
    margin-top: 4px;
    color: var(--text);
    font-size: 20px;
}

.table-shell.compact {
    margin: 0;
    box-shadow: none;
}

.payslip-modal {
    width: min(980px, 100%);
}

.payslip-sheet {
    width: min(794px, 100%);
    margin: 0 auto 18px;
    padding: 18px;
    background: #ffffff;
    border: 1px solid var(--line);
}

.payslip-copy {
    position: relative;
    min-height: 500px;
    padding: 14px 18px;
    color: #0f172a;
}

.payslip-copy-label {
    position: absolute;
    top: 8px;
    right: 16px;
    color: #64748b;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.payslip-top {
    display: grid;
    grid-template-columns: 170px 1fr;
    align-items: center;
    gap: 18px;
}

.payslip-brand {
    color: #0f766e;
    font-size: 22px;
    font-weight: 900;
}

.payslip-top h3 {
    margin: 0;
    text-align: center;
    font-size: 17px;
}

.payslip-company,
.payslip-period {
    margin: 12px 0;
    padding: 10px;
    background: #e0f2fe;
    text-align: center;
    font-size: 17px;
    font-weight: 900;
}

.payslip-info {
    display: grid;
    grid-template-columns: 1.3fr 1fr 1.2fr;
    gap: 8px 14px;
    font-size: 14px;
}

.payslip-table {
    width: 100%;
    margin-top: 14px;
    border-collapse: collapse;
    font-size: 13px;
}

.payslip-table th,
.payslip-table td {
    border: 1px solid #cbd5e1;
    padding: 8px;
    text-align: right;
}

.payslip-table th:nth-child(2),
.payslip-table td:nth-child(2) {
    text-align: left;
}

.payslip-table th {
    background: #e5e7eb;
}

.payslip-total-row td {
    font-weight: 900;
}

.payslip-paid {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 18px;
    margin-top: 14px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    font-size: 16px;
}

.payslip-paid span {
    font-weight: 900;
}

.payslip-footer {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-top: 24px;
}

.payslip-sign {
    width: 280px;
    text-align: center;
}

.payslip-sign span {
    display: block;
    height: 28px;
    border-bottom: 1px solid #111827;
}

.payslip-sign small {
    display: block;
    margin-top: 10px;
    font-size: 11px;
}

.payslip-qr {
    display: grid;
    width: 76px;
    height: 76px;
    place-items: center;
    border: 8px solid #111827;
    background: repeating-linear-gradient(45deg, #111827 0 6px, #ffffff 6px 12px);
    color: #ffffff;
    font-weight: 900;
}

.payslip-date {
    margin-top: 14px;
    text-align: center;
    font-size: 12px;
}

.payslip-cut-line {
    margin: 12px 0;
    border-top: 2px dashed #94a3b8;
}

.send-payslip-body {
    display: grid;
    gap: 10px;
    padding: 18px;
}

.payroll-payment-modal {
    width: min(920px, calc(100vw - 28px));
}

.payroll-payment-modal .modal-head {
    padding: 14px 18px;
}

.payroll-payment-modal .modal-head h2 {
    font-size: 21px;
}

.payroll-payment-modal .modal-actions {
    padding: 12px 18px;
}

.payroll-payment-body {
    display: grid;
    gap: 12px;
    padding: 14px 18px;
}

.payment-worker-line {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    color: var(--text);
    font-size: 16px;
}

.payment-validation-message {
    display: grid;
    grid-template-columns: 28px 1fr;
    gap: 2px 10px;
    align-items: center;
    padding: 11px 12px;
    border: 1px solid #f87171;
    border-left: 7px solid #b91c1c;
    border-radius: 8px;
    background: #fee2e2;
    color: #7f1d1d;
    box-shadow: 0 12px 24px rgba(185, 28, 28, .18);
    animation: paymentWarningPulse .9s ease-out;
}

.payment-validation-message::before {
    content: "!";
    display: grid;
    width: 24px;
    height: 24px;
    place-items: center;
    border-radius: 999px;
    background: #b91c1c;
    color: #ffffff;
    font-weight: 900;
}

.payment-validation-message strong {
    color: #7f1d1d;
    font-size: 15px;
    text-transform: uppercase;
}

.payment-validation-message span {
    grid-column: 2;
    color: #7f1d1d;
    font-weight: 700;
}

.payment-validation-message[hidden] {
    display: none;
}

@keyframes paymentWarningPulse {
    0% {
        transform: translateY(-3px);
        box-shadow: 0 0 0 0 rgba(185, 28, 28, .32);
    }

    100% {
        transform: translateY(0);
        box-shadow: 0 12px 24px rgba(185, 28, 28, .18);
    }
}

.payment-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 240px;
    gap: 16px;
    align-items: start;
}

.payment-methods-panel {
    display: grid;
    gap: 10px;
    min-width: 0;
    overflow: hidden;
}

.payment-method-picker {
    position: relative;
    display: grid;
    gap: 6px;
}

.payment-method-picker span {
    color: #526171;
    font-weight: 900;
}

.payment-method-toggle {
    justify-content: space-between;
    width: 100%;
    min-height: 40px;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: var(--text);
}

.payment-method-toggle::after {
    content: "v";
    margin-left: auto;
    color: #526171;
    font-size: 12px;
}

.payment-method-menu {
    position: absolute;
    z-index: 5;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    overflow: hidden;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #ffffff;
    box-shadow: 0 12px 22px rgba(15, 23, 42, .16);
}

.payment-method-menu button {
    justify-content: flex-start;
    width: 100%;
    min-height: 34px;
    border-radius: 0;
    background: #ffffff;
    color: var(--text);
}

.payment-method-menu button:hover {
    background: #eaf2ff;
}

.payment-methods-panel .table-shell {
    max-width: 100%;
    overflow: hidden;
}

.payment-method-table {
    min-width: 0 !important;
    table-layout: fixed;
    width: 100% !important;
}

.payment-method-table th,
.payment-method-table td {
    overflow: hidden;
    padding: 9px 8px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.payment-method-table th:nth-child(1),
.payment-method-table td:nth-child(1) {
    width: 38%;
}

.payment-method-table th:nth-child(2),
.payment-method-table td:nth-child(2) {
    width: 44%;
}

.payment-method-table th:nth-child(3),
.payment-method-table td:nth-child(3) {
    width: 18%;
    text-align: center;
}

.payment-method-table th {
    background: #333a40;
    color: #ffffff;
}

.payment-method-table input {
    width: 100%;
    min-height: 34px;
    padding: 6px 8px;
}

.payment-method-table .payment-remove-row {
    min-height: 30px;
    width: 32px;
    padding: 0;
    justify-content: center;
}

.payment-calculator {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    min-width: 0;
    width: 100%;
}

.payment-calculator strong {
    text-align: center;
}

.payment-calculator input {
    min-height: 38px;
    text-align: right;
    font-size: 16px;
    padding: 6px 10px;
}

.payment-calculator > button {
    min-height: 36px;
    background: #1ba7b8;
}

.calculator-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 5px;
}

.calculator-grid button {
    min-height: 34px;
    padding: 0;
    background: #f3f6f8;
    color: var(--text);
}

.calculator-grid button:last-child {
    background: #6b7280;
    color: #ffffff;
}

.button.disabled {
    pointer-events: none;
    opacity: .55;
}

.payroll-config-form {
    display: grid;
    gap: 18px;
    margin: 16px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.payroll-config-head h2,
.payroll-config-head p {
    margin: 0;
}

.payroll-config-head p {
    margin-top: 6px;
    color: var(--muted);
}

.payroll-config-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.payroll-config-grid label {
    gap: 7px;
}

.payroll-config-grid input,
.payroll-config-grid select,
.payroll-config-grid textarea {
    min-height: 40px;
}

.payroll-config-grid .wide-field {
    grid-column: 1 / -1;
}

.payroll-config-summary {
    display: grid;
    gap: 5px;
    padding: 14px;
    border-left: 4px solid #0f766e;
    background: #ecfdf5;
    color: #134e4a;
}

.company-form {
    margin: 20px;
    padding: 24px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

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

.company-column {
    display: grid;
    align-content: start;
    gap: 18px;
}

.company-column label {
    display: grid;
    gap: 8px;
}

.company-column span {
    color: #111827;
    font-weight: 900;
}

.company-column input,
.company-column select,
.company-column textarea {
    width: 100%;
    min-height: 38px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    color: #334155;
    font-size: 15px;
}

.company-column textarea {
    min-height: 98px;
    resize: vertical;
}

.company-assets {
    gap: 22px;
}

.asset-preview {
    display: grid;
    place-items: center;
    min-height: 92px;
    border-radius: 6px;
    background: #f8fafc;
    color: #64748b;
    overflow: hidden;
}

.asset-preview img {
    max-width: 100%;
    max-height: 120px;
    object-fit: contain;
}

.banner-preview {
    min-height: 118px;
}

.logo-preview {
    min-height: 72px;
}

.logo-preview strong {
    color: #0f172a;
    font-size: 20px;
}

.company-actions {
    display: flex;
    justify-content: flex-start;
    margin-top: 26px;
    padding-top: 24px;
    border-top: 1px solid #e5e7eb;
}

.company-actions button {
    background: #0ea5b7;
}

.users-toolbar {
    display: grid;
    grid-template-columns: 210px 1fr 1fr 1fr auto auto;
    gap: 14px;
    align-items: end;
    margin: 16px;
    padding: 16px;
    border-top: 3px solid #334155;
    background: #ffffff;
}

.users-toolbar label {
    gap: 6px;
}

.users-toolbar input,
.users-toolbar select {
    min-height: 38px;
}

.icon-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    min-height: 38px;
    padding: 0;
    border: 2px solid #111827;
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    font-weight: 900;
}

.users-table-shell {
    margin: 0 16px 16px;
    overflow-x: visible;
}

.users-table {
    min-width: 0;
    table-layout: fixed;
}

.users-table th,
.users-table td {
    padding: 12px 10px;
    white-space: normal;
    vertical-align: middle;
}

.users-table th:nth-child(1),
.users-table td:nth-child(1) {
    width: 48px;
}

.users-table th:nth-child(2),
.users-table td:nth-child(2) {
    width: 86px;
}

.users-table th:nth-child(8),
.users-table td:nth-child(8) {
    width: 100px;
}

.users-table th:nth-child(6),
.users-table td:nth-child(6) {
    width: 210px;
    word-break: break-word;
}

.users-table th:nth-child(7),
.users-table td:nth-child(7) {
    width: 150px;
}

.users-table th:nth-child(9),
.users-table td:nth-child(9) {
    width: 260px;
}

.user-photo {
    width: 42px;
    height: 42px;
    display: inline-grid;
    place-items: center;
    border-radius: 50%;
    background: #e5e7eb;
    color: #64748b;
    font-size: 10px;
    object-fit: cover;
}

.user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.user-action {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    padding: 0 9px;
    border-radius: 5px;
    color: #ffffff;
    font-size: 12px;
    font-weight: 900;
}

.user-action.toggle.active {
    background: #22c55e;
}

.user-action.toggle.inactive {
    background: #64748b;
}

.user-action.edit {
    background: #334155;
}

.user-action.password {
    background: #6b7280;
}

.user-action.delete {
    background: #dc2626;
}

.user-modal {
    width: min(640px, 100%);
}

.user-modal-grid .user-photo-field {
    grid-column: span 2;
}

.placeholder-panel {
    margin: 18px;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow);
}

.placeholder-panel h2 {
    margin: 0 0 8px;
    color: var(--text);
}

.placeholder-panel p {
    margin: 0;
    color: var(--muted);
    font-weight: 700;
}

.audit-panel,
.backup-panel {
    margin: 18px;
}

.audit-toolbar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    margin-bottom: 14px;
}

.audit-toolbar input {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font: inherit;
}

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

.backup-card {
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
}

.backup-card h2 {
    margin: 0 0 8px;
    color: #172033;
}

.backup-card p {
    margin: 0 0 16px;
    color: var(--muted);
    line-height: 1.45;
}

.backup-card form {
    display: grid;
    gap: 12px;
}

.backup-card input[type="file"] {
    min-height: 42px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f8fafc;
}

.attendance-filter,
.monitor-search {
    display: grid;
    grid-template-columns: 1fr 220px auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border-bottom: 1px solid var(--line);
}

.monitor-search {
    grid-template-columns: 1fr;
    background: linear-gradient(90deg, #a9b4ca, #eef08d);
}

.monitor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 22px;
    padding: 22px;
    background: linear-gradient(90deg, #a9b4ca, #eef08d);
}

.worker-card {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 8px;
    min-height: 235px;
    padding: 26px 18px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    box-shadow: 0 2px 7px rgba(31, 41, 51, .14);
    text-align: center;
}

.worker-card.payroll-locked-card {
    opacity: .68;
    background: #f1f5f9;
    border-color: #cbd5e1;
    filter: grayscale(.25);
}

.worker-card.payroll-locked-card::after {
    content: "PAGADO";
    position: absolute;
    left: 14px;
    top: 14px;
    padding: 3px 8px;
    border-radius: 999px;
    background: #334155;
    color: #ffffff;
    font-size: 11px;
    font-weight: 900;
}

.status-pill {
    position: absolute;
    top: 12px;
    right: 18px;
    padding: 2px 7px;
    border-radius: 999px;
    background: #e11d48;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
}

.status-pill.inside {
    background: #16a34a;
}

.status-pill.justified {
    background: #d97706;
}

.status-pill.outside {
    background: #e11d48;
}

.worker-card-photo {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--line);
}

.worker-card-photo.placeholder {
    display: grid;
    place-items: center;
    background: #e6eef1;
    color: #60707b;
    font-size: 13px;
}

.worker-card small {
    color: var(--muted);
    font-weight: 700;
}

.worker-card strong {
    font-size: 15px;
}

.worker-card p {
    min-height: 38px;
    margin: 0;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 30;
    display: grid;
    align-items: start;
    justify-items: center;
    padding: 18px;
    overflow-y: auto;
    background: rgba(23, 32, 38, .48);
    -webkit-overflow-scrolling: touch;
}

.modal-box {
    width: min(480px, 100%);
    display: grid;
    gap: 14px;
    padding: 22px;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .24);
    max-height: calc(100dvh - 36px);
    overflow-y: auto;
}

.modal-form {
    width: min(680px, 100%);
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 0;
    overflow: hidden;
    max-height: calc(100dvh - 36px);
}

.modal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex: 0 0 auto;
    padding: 20px 22px;
    border-bottom: 1px solid var(--line);
}

.modal-head h2 {
    color: #1f2937;
    font-size: 22px;
    font-weight: 900;
}

.modal-head a {
    color: #777;
    font-size: 22px;
    font-weight: 900;
    line-height: 1;
}

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 22px 30px;
    padding: 24px 22px;
    overflow-y: auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
}

.modal-grid label {
    display: grid;
    gap: 8px;
}

.modal-grid label:has(textarea),
.modal-grid label:has(input[type="month"]),
.modal-grid label:has(input[type="date"]) {
    grid-column: span 2;
}

.modal-grid span {
    color: #1f2937;
    font-weight: 900;
}

.modal-grid input,
.modal-grid select,
.modal-grid textarea {
    min-height: 46px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    background: #ffffff;
    color: #334155;
    font-size: 16px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex: 0 0 auto;
    padding: 14px 22px 20px;
    border-top: 1px solid var(--line);
}

.modal-box h2,
.modal-box p {
    margin: 0;
}

.modal-box p {
    color: var(--muted);
}

.session-timeout-backdrop {
    position: fixed;
    inset: 0;
    z-index: 4000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(15, 23, 42, 0.62);
    backdrop-filter: blur(4px);
}

.session-timeout-backdrop[hidden] {
    display: none;
}

.session-timeout-box {
    width: min(520px, 100%);
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    padding: 24px;
    border: 1px solid #fde68a;
    border-left: 7px solid #f59e0b;
    border-radius: 12px;
    background: #fffbeb;
    box-shadow: 0 24px 70px rgba(15, 23, 42, 0.32);
    color: #1f2937;
}

.session-timeout-icon {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 999px;
    background: #f59e0b;
    color: #ffffff;
    font-size: 24px;
    font-weight: 900;
}

.session-timeout-box h2 {
    margin: 0 0 8px;
    color: #92400e;
    font-size: 24px;
}

.session-timeout-box p {
    margin: 0 0 12px;
    color: #4b5563;
    line-height: 1.45;
}

.session-timeout-box strong {
    color: #111827;
}

.session-timeout-actions {
    grid-column: 1 / -1;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 10px;
}

.session-timeout-actions button,
.session-timeout-actions a {
    min-height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    border-radius: 8px;
    font-weight: 800;
}

.session-timeout-actions button {
    border: 0;
    background: #0f766e;
    color: #ffffff;
    cursor: pointer;
}

.session-timeout-actions button:disabled {
    opacity: .72;
    cursor: wait;
}

.session-timeout-actions a {
    background: #e5e7eb;
    color: #1f2937;
}

.table-action {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 9px;
    border-radius: 7px;
    background: #edf2f5;
    color: var(--text);
    font-size: 12px;
    font-weight: 700;
}

.table-action.warning {
    background: #fff4dd;
    color: #8a4b06;
}

.table-action.success {
    background: #dcfce7;
    color: #15803d;
}

.table-action.disabled {
    pointer-events: none;
    background: #e5e7eb;
    color: #94a3b8;
    cursor: not-allowed;
}

.table-action.danger {
    background: #fee2e2;
    color: #991b1b;
}

.stock-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 42px;
    min-height: 26px;
    border-radius: 999px;
    background: #eef6ff;
    color: #1f3b57;
    font-weight: 800;
}

.stock-count.low {
    background: #fee2e2;
    color: #991b1b;
}

.stock-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.stock-status.disponible {
    background: #dcfce7;
    color: #15803d;
}

.stock-status.bajo,
.stock-status.agotado {
    background: #fee2e2;
    color: #991b1b;
}

.fotocheck-status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
}

.fotocheck-status.activo {
    background: #dcfce7;
    color: #15803d;
}

.fotocheck-status.por-vencer {
    background: #fef3c7;
    color: #92400e;
}

.fotocheck-status.vencido {
    background: #fee2e2;
    color: #991b1b;
}

.warehouse-return-field.is-hidden {
    display: none;
}

.cash-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
    margin: 16px;
}

.cash-summary article {
    padding: 16px;
    border: 1px solid #d7dee7;
    border-radius: 8px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.06);
}

.cash-summary span {
    display: block;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.cash-summary strong {
    display: block;
    margin-top: 6px;
    color: #0f172a;
    font-size: 24px;
}

.cash-closure-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(160px, 1fr));
    gap: 14px;
    margin: 16px;
}

.cash-closure-panel article {
    padding: 16px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
}

.cash-closure-panel span {
    display: block;
    color: #166534;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.cash-closure-panel strong {
    display: block;
    margin-top: 6px;
    color: #14532d;
    font-size: 24px;
}

.cash-history-panel {
    margin: 16px;
    padding: 16px;
    border: 1px solid #d7dee7;
    border-left: 4px solid #334155;
    border-radius: 8px;
    background: #ffffff;
}

.cash-history-panel h2 {
    margin: 0 0 6px;
    color: #0f172a;
    font-size: 20px;
}

.cash-history-panel p {
    margin: 0;
    color: #64748b;
}

.cash-filter {
    display: grid;
    grid-template-columns: minmax(220px, 320px) minmax(260px, 1fr) auto;
    gap: 12px;
    align-items: end;
    margin: 16px;
    padding: 14px;
    border-top: 3px solid #334155;
    background: #ffffff;
}

.concept-guidance {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin: 0 16px 16px;
}

.concept-guidance article {
    padding: 14px 16px;
    border: 1px solid #bbf7d0;
    border-left: 4px solid #16a34a;
    border-radius: 8px;
    background: #f0fdf4;
}

.concept-guidance strong {
    display: block;
    margin-bottom: 5px;
    color: #14532d;
    font-size: 15px;
}

.concept-guidance span {
    color: #166534;
    font-size: 14px;
    line-height: 1.45;
}

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

.button.compact {
    min-height: 34px;
    padding: 0 12px;
    font-size: 13px;
}

.button.danger {
    background: #dc2626;
    color: #ffffff;
}

.permission-request-filter {
    display: grid;
    grid-template-columns: auto minmax(280px, 1fr);
    align-items: end;
}

.permission-toolbar-left,
.permission-toolbar-search {
    display: flex;
    gap: 10px;
    align-items: end;
}

.permission-toolbar-search {
    justify-self: end;
}

.permission-toolbar-search label {
    min-width: 280px;
}

.small-note {
    margin: -4px 16px 14px;
    color: #92400e;
    font-size: 12px;
    font-weight: 700;
}

.danger-note {
    color: #b91c1c;
}

.locked-note {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    color: #7c2d12;
    font-weight: 800;
}

.locked-note::before {
    content: "!";
    display: inline-grid;
    width: 18px;
    height: 18px;
    place-items: center;
    border-radius: 999px;
    background: #f97316;
    color: #ffffff;
    font-size: 12px;
}

.permit-actions {
    min-width: 0;
    flex-wrap: nowrap;
}

.permit-actions .table-action {
    width: 38px;
    min-height: 34px;
    justify-content: center;
    padding: 0;
    border: 2px solid currentColor;
    background: #ffffff;
    font-size: 15px;
    font-weight: 900;
}

.permit-status {
    display: inline-flex;
    align-items: center;
    min-height: 22px;
    padding: 0 8px;
    border-radius: 5px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.permit-status.aprobado {
    background: #dcfce7;
    color: #15803d;
}

.permit-status.rechazado {
    background: #fee2e2;
    color: #991b1b;
}

.payroll-locked-row {
    background: #f1f5f9;
    color: #64748b;
}

.payroll-locked-row td {
    opacity: .72;
}

.turn-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #dbeafe;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 700;
}

.turn-badge.noche {
    background: #ede9fe;
    color: #6d28d9;
}

.inline-turn-form {
    display: grid;
    grid-template-columns: minmax(120px, 180px) auto;
    gap: 8px;
    align-items: center;
}

.turns-table td {
    vertical-align: middle;
}

.rectify-form {
    display: grid;
    grid-template-columns: 180px minmax(180px, 1fr) 170px 190px auto;
    gap: 12px;
    align-items: end;
    padding: 16px;
    border-bottom: 1px solid var(--line);
    background: #f8fafb;
}

.report-title {
    display: grid;
    gap: 6px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--line);
    background: #ffffff;
}

.report-title strong {
    font-size: 17px;
}

.report-title span {
    color: var(--muted);
    font-size: 13px;
}

.rectify-form strong {
    align-self: center;
}

.attendance-report-shell table {
    min-width: 1320px;
}

.attendance-report-table th,
.attendance-report-table td {
    padding: 10px 9px;
    text-align: center;
}

.attendance-report-table th span,
.attendance-report-table th small {
    display: block;
}

.attendance-report-table th small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.attendance-report-table th:nth-child(2),
.attendance-report-table td:nth-child(2) {
    min-width: 170px;
    text-align: left;
}

.attendance-code {
    font-weight: 700;
}

.attendance-code.a {
    background: #dcfce7;
    color: #166534;
}

.attendance-code.f {
    background: #fee2e2;
    color: #991b1b;
}

.attendance-code.fj {
    background: #fef3c7;
    color: #92400e;
}

.attendance-code.pr,
.attendance-code.vr {
    background: #dbeafe;
    color: #1d4ed8;
}

.attendance-code.nr,
.attendance-code.vnr {
    background: #f1f5f9;
    color: #475569;
}

.attendance-code.payroll-locked-cell {
    outline: 2px solid #475569;
    background: repeating-linear-gradient(135deg, #e2e8f0 0 6px, #f8fafc 6px 12px);
    color: #1f2937;
    opacity: .85;
}

@media (max-width: 980px) {
    .login-shell {
        justify-content: center;
        padding: 24px;
    }

    body {
        grid-template-columns: 1fr;
    }

    .sidebar {
        min-height: auto;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 2500;
        width: 100%;
        padding: 12px 14px;
        box-shadow: 0 12px 26px rgba(15, 23, 42, .22);
    }

    .brand {
        margin-bottom: 8px;
    }

    .sidebar-module-current {
        display: grid;
        gap: 3px;
        margin: 0 0 8px;
        padding: 8px 10px;
        border: 1px solid rgba(255, 255, 255, .15);
        border-left: 4px solid #14d6c2;
        border-radius: 8px;
        background: rgba(255, 255, 255, .08);
    }

    .sidebar-module-current span {
        color: #9fb0ba;
        font-size: 10px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .05em;
    }

    .sidebar-module-current strong {
        color: #ffffff;
        font-size: 17px;
        line-height: 1.15;
    }

    .main-module-current {
        display: none !important;
    }

    .nav {
        display: flex;
        gap: 8px;
        overflow-x: auto;
        padding-bottom: 3px;
        -webkit-overflow-scrolling: touch;
    }

    .nav a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .dashboard-panels,
    .dashboard-summary,
    .attendance-filter,
    .rectify-form,
    .form-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .executive-panels {
        grid-template-columns: 1fr;
    }

    .people-toolbar,
    .users-toolbar,
    .cash-filter,
    .warehouse-form,
    .attendance-filter {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .people-table-shell,
    .users-table-shell,
    .table-shell {
        overflow-x: auto;
    }

    .main {
        padding-top: 178px;
    }
}

@media (max-width: 640px) {
    .stock-donut-panel {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .login-card {
        padding: 26px;
    }

    body {
        display: block;
    }

    .sidebar {
        padding: 10px 12px;
    }

    .brand {
        align-items: flex-start;
        margin-bottom: 8px;
    }

    .brand-mark {
        width: 40px;
        height: 40px;
        flex: 0 0 40px;
    }

    .main {
        padding: 170px 12px 18px;
    }

    .mobile-module-current {
        display: grid;
        gap: 4px;
        margin-bottom: 14px;
        padding: 12px 14px;
        border: 1px solid #cbd5e1;
        border-left: 5px solid #0f766e;
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    }

    .main-module-current {
        display: none !important;
    }

    .sidebar-module-current {
        margin-bottom: 10px;
        box-shadow: none;
    }

    .mobile-module-current span {
        color: #64748b;
        font-size: 11px;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .04em;
    }

    .mobile-module-current strong {
        color: #0f172a;
        font-size: 19px;
        line-height: 1.2;
    }

    .page-head h1 {
        font-size: 26px;
    }

    .dashboard-panels,
    .dashboard-summary,
    .attendance-filter,
    .rectify-form,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .personal-tabs,
    .attendance-tabs,
    .payroll-tabs,
    .warehouse-tabs,
    .permission-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 10px;
        -webkit-overflow-scrolling: touch;
    }

    .personal-tabs a,
    .attendance-tabs a,
    .payroll-tabs a,
    .warehouse-tabs a,
    .permission-tabs a {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .people-toolbar,
    .users-toolbar,
    .cash-filter,
    .cash-closure-panel,
    .backup-panel,
    .warehouse-form,
    .attendance-filter,
    .rectify-form,
    .company-grid,
    .modal-grid {
        grid-template-columns: 1fr !important;
    }

    .people-toolbar label,
    .users-toolbar label,
    .cash-filter label,
    .warehouse-form label,
    .attendance-filter label,
    .rectify-form label {
        min-width: 0;
    }

    .payroll-row {
        grid-template-columns: 1fr;
    }

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

    .module-card {
        min-height: auto;
        padding: 16px;
    }

    .record-form {
        margin: 12px;
        padding: 14px;
    }

    .toolbar {
        padding: 12px;
    }

    .bar-row {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .bar-row strong {
        text-align: left;
    }

    .toolbar,
    .attendance-tabs,
    .inline-turn-form,
    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .inline-turn-form {
        display: flex;
    }

    button,
    .button {
        width: 100%;
    }

    th,
    td {
        padding: 12px;
    }

    .people-table-shell {
        margin: 0 12px 16px;
        overflow: visible;
    }

    .people-table {
        min-width: 0;
        border-collapse: separate;
        border-spacing: 0 12px;
    }

    .people-table thead {
        display: none;
    }

    .people-table,
    .people-table tbody,
    .people-table tr,
    .people-table td {
        display: block;
        width: 100% !important;
    }

    .people-table tr {
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 10px;
        background: #ffffff;
        box-shadow: 0 6px 18px rgba(15, 23, 42, .08);
    }

    .people-table td {
        min-height: 34px;
        display: grid;
        grid-template-columns: 112px minmax(0, 1fr);
        gap: 12px;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #eef2f7;
        white-space: normal;
        word-break: normal;
        overflow-wrap: anywhere;
    }

    .people-table td:last-child {
        border-bottom: 0;
    }

    .people-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 12px;
        font-weight: 900;
        text-transform: uppercase;
    }

    .people-table td[data-label="Foto"] {
        align-items: start;
    }

    .people-table td[data-label="Foto"] .worker-photo {
        width: 58px;
        height: 58px;
    }

    .people-table td[data-label="Nombres"] {
        font-size: 18px;
        font-weight: 800;
        color: #1f2937;
    }

    .person-actions {
        justify-content: flex-start;
    }

    .person-action {
        width: 34px;
        min-height: 34px;
    }
}

@media (max-width: 420px) {
    .main {
        padding: 14px 10px;
    }

    .page-head {
        margin-bottom: 16px;
    }

    .metrics {
        gap: 10px;
    }

    .metrics article,
    .chart-panel {
        padding: 14px;
    }

    .compact-panel strong {
        font-size: 28px;
    }
}

@media print {
    .sidebar,
    .topbar,
    .attendance-tabs,
    .payroll-filter,
    .no-print,
    .modal-head,
    .modal-actions,
    .message {
        display: none !important;
    }

    .layout,
    .main {
        display: block;
        padding: 0;
        margin: 0;
        background: #fff;
    }

    .table-shell {
        box-shadow: none;
        border: 1px solid #d7dde5;
        overflow: visible;
    }

    body {
        background: #fff;
    }

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

    .modal-box,
    .payslip-modal {
        width: 100%;
        max-width: none;
        border: 0;
        box-shadow: none;
    }

    .payslip-sheet {
        width: 210mm;
        min-height: 297mm;
        padding: 8mm;
        border: 0;
    }

    .payslip-copy {
        min-height: 134mm;
    }
}

/* Dashboard ejecutivo: reglas reforzadas para evitar que se vea como texto plano. */
body .dashboard-summary {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(230px, 1fr)) !important;
    gap: 26px !important;
    margin: 0 0 28px !important;
}

body .summary-card {
    position: relative !important;
    display: grid !important;
    grid-template-columns: 74px 1fr !important;
    gap: 18px !important;
    align-items: center !important;
    min-height: 112px !important;
    padding: 18px 22px !important;
    overflow: hidden !important;
    border: 3px solid transparent !important;
    border-radius: 18px !important;
    box-shadow: 0 12px 24px rgba(15, 23, 42, .13) !important;
}

body .summary-card.permits {
    background: linear-gradient(90deg, #eef8ff, #f5efff) padding-box, linear-gradient(135deg, #22d3ee, #a78bfa, #f59e0b) border-box !important;
}

body .summary-card.attendance {
    background: linear-gradient(90deg, #ecfdf5, #eff6ff) padding-box, linear-gradient(135deg, #10b981, #60a5fa, #fbbf24) border-box !important;
}

body .summary-card.payments {
    background: linear-gradient(90deg, #fff7d6, #fff1e6) padding-box, linear-gradient(135deg, #38bdf8, #f59e0b, #fcd34d) border-box !important;
}

body .summary-card.stock-alert {
    background: linear-gradient(90deg, #fef2f2, #fff7ed) padding-box, linear-gradient(135deg, #ef4444, #f59e0b, #22c55e) border-box !important;
}

body .summary-icon {
    width: 66px !important;
    height: 66px !important;
    display: grid !important;
    place-items: center !important;
    border: 3px solid currentColor !important;
    border-radius: 16px !important;
    background: rgba(255, 255, 255, .62) !important;
    color: #3b82f6 !important;
    font-size: 29px !important;
    line-height: 1 !important;
}

body .summary-card.attendance .summary-icon {
    color: #10b981 !important;
}

body .summary-card.payments .summary-icon {
    color: #d97706 !important;
}

body .summary-card.stock-alert .summary-icon {
    color: #dc2626 !important;
}

body .summary-card span {
    display: block !important;
    color: #334155 !important;
    font-size: 15px !important;
    font-weight: 900 !important;
    letter-spacing: .02em !important;
    text-transform: uppercase !important;
}

body .summary-card strong {
    display: block !important;
    margin-top: 7px !important;
    color: #111827 !important;
    font-size: 36px !important;
    line-height: 1 !important;
}

body .summary-watermark {
    position: absolute !important;
    right: 20px !important;
    bottom: 8px !important;
    opacity: .11 !important;
    font-size: 64px !important;
    pointer-events: none !important;
}

body .executive-panels {
    display: grid !important;
    grid-template-columns: minmax(460px, 1.2fr) minmax(280px, .68fr) minmax(360px, .95fr) !important;
    gap: 26px !important;
    align-items: start !important;
}

body .executive-panels .chart-panel {
    min-height: 405px !important;
    border: 1px solid #cbd5e1 !important;
    border-radius: 8px !important;
    background: #ffffff !important;
    box-shadow: 0 7px 18px rgba(15, 23, 42, .16) !important;
}

body .executive-panels .chart-panel h2 {
    margin: 8px 0 22px !important;
    color: #1e293b !important;
    font-size: 18px !important;
    font-weight: 900 !important;
    text-align: center !important;
}

body .stacked-payroll-chart {
    display: grid !important;
    gap: 16px !important;
}

body .payroll-row {
    display: grid !important;
    grid-template-columns: 145px 1fr !important;
    gap: 13px !important;
    align-items: center !important;
}

body .payroll-row > span {
    color: #64748b !important;
    font-size: 13px !important;
    text-align: right !important;
}

body .payroll-bar {
    display: flex !important;
    height: 48px !important;
    min-height: 48px !important;
    overflow: hidden !important;
    border-radius: 2px !important;
    background: #e5e7eb !important;
}

body .payroll-segment {
    display: grid !important;
    place-items: center !important;
    min-width: 10px !important;
    color: #0f172a !important;
    font-size: 13px !important;
    font-weight: 900 !important;
    white-space: nowrap !important;
}

body .payroll-segment.gross {
    background: #65c7c5 !important;
}

body .payroll-segment.deductions {
    background: #fb923c !important;
    color: #ffffff !important;
}

body .payroll-segment.net {
    background: #d1d5db !important;
}

body .vertical-chart {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(68px, 1fr)) !important;
    gap: 18px !important;
    align-items: end !important;
    min-height: 300px !important;
    padding: 12px 8px 0 !important;
}

body .vertical-bar {
    display: grid !important;
    grid-template-rows: 235px auto !important;
    gap: 12px !important;
    align-items: end !important;
    justify-items: center !important;
}

body .vertical-fill {
    width: 48px !important;
    min-height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px 12px 3px 3px !important;
    border: 2px solid rgba(15, 23, 42, .08) !important;
}

body .vertical-fill span {
    writing-mode: vertical-rl !important;
    color: #064e3b !important;
    font-size: 12px !important;
    font-weight: 900 !important;
}

body .vertical-bar strong {
    color: #334155 !important;
    font-size: 12px !important;
    font-weight: 900 !important;
    text-align: center !important;
}

@media (max-width: 900px) {
    .cash-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

    .cash-filter {
        grid-template-columns: 1fr;
    }

    .concept-guidance {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .cash-summary {
        grid-template-columns: 1fr;
    }

    .cash-closure-panel {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1180px) {
    body .dashboard-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    body .executive-panels {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .modal-backdrop {
        align-items: stretch !important;
        justify-items: stretch !important;
        z-index: 120000 !important;
        padding: 10px !important;
        overflow-y: auto !important;
        min-height: 100dvh !important;
        max-height: 100dvh !important;
    }

    .modal-box {
        width: 100% !important;
        max-width: none !important;
        max-height: calc(100dvh - 20px) !important;
        min-height: 0 !important;
        margin: 0 !important;
        overflow-y: auto !important;
        overscroll-behavior: contain !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .modal-form {
        display: flex !important;
        flex-direction: column !important;
        overflow: hidden !important;
        padding: 0 !important;
    }

    .modal-head {
        position: sticky !important;
        top: 0 !important;
        z-index: 2 !important;
        padding: 14px 16px !important;
        background: #ffffff !important;
    }

    .modal-head h2 {
        font-size: 20px !important;
        line-height: 1.15 !important;
    }

    .modal-grid {
        flex: 1 1 auto !important;
        min-height: 0 !important;
        max-height: none !important;
        overflow-y: auto !important;
        padding: 16px !important;
        gap: 16px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    .modal-grid input,
    .modal-grid select,
    .modal-grid textarea,
    .modal-box input,
    .modal-box select,
    .modal-box textarea {
        font-size: 16px !important;
        min-height: 48px !important;
    }

    .modal-actions {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 2 !important;
        padding: 12px 16px 14px !important;
        background: #ffffff !important;
        box-shadow: 0 -10px 20px rgba(15, 23, 42, .08) !important;
    }

    .modal-box > .form-actions {
        position: sticky !important;
        bottom: 0 !important;
        z-index: 2 !important;
        padding-top: 12px !important;
        background: #ffffff !important;
    }

    body .dashboard-summary,
    body .executive-panels {
        grid-template-columns: 1fr !important;
    }

    body .payroll-row {
        grid-template-columns: 1fr !important;
    }

    body .payroll-row > span {
        text-align: left !important;
    }

    body .vertical-chart {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .modal-grid,
    .modal-grid label:has(textarea),
    .modal-grid label:has(input[type="month"]),
    .modal-grid label:has(input[type="date"]) {
        grid-template-columns: 1fr;
        grid-column: auto;
    }

    .modal-actions {
        flex-direction: column-reverse;
    }

    .modal-actions .button,
    .modal-actions button {
        width: 100%;
        justify-content: center;
    }

    .payroll-filter,
    .detail-kpis,
    .payment-layout,
    .users-toolbar,
    .company-grid {
        grid-template-columns: 1fr;
    }

    .company-form {
        margin: 12px;
        padding: 16px;
    }

    .users-table th:nth-child(6),
    .users-table td:nth-child(6) {
        display: none;
    }

    .users-table th:nth-child(9),
    .users-table td:nth-child(9) {
        width: 190px;
    }

    .user-modal-grid .user-photo-field {
        grid-column: auto;
    }
}

@media (max-width: 1180px) {
    body {
        display: block !important;
        padding-top: 112px !important;
    }

    body .sidebar {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        z-index: 99999 !important;
        width: 100% !important;
        min-height: 0 !important;
        max-height: 112px !important;
        padding: 10px 12px !important;
        overflow: hidden !important;
        background: #172026 !important;
        box-shadow: 0 12px 26px rgba(15, 23, 42, .32) !important;
    }

    body .brand {
        margin-bottom: 8px !important;
        align-items: center !important;
    }

    body .brand strong {
        font-size: 16px !important;
        line-height: 1.1 !important;
    }

    body .brand small {
        font-size: 12px !important;
    }

    body .brand-mark {
        width: 38px !important;
        height: 38px !important;
        flex: 0 0 38px !important;
    }

    body .nav {
        display: flex !important;
        flex-wrap: nowrap !important;
        gap: 8px !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        padding-bottom: 4px !important;
        -webkit-overflow-scrolling: touch !important;
    }

    body .nav a {
        flex: 0 0 auto !important;
        min-height: 38px !important;
        padding: 8px 10px !important;
        white-space: nowrap !important;
    }

    body .main {
        padding-top: 18px !important;
    }
}

@media (max-width: 640px) {
    body {
        padding-top: 108px !important;
    }

    body .sidebar {
        max-height: 108px !important;
    }
}

body .summary-card strong.attendance-today-counts {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 12px !important;
    width: auto !important;
    margin-top: 7px !important;
    white-space: nowrap !important;
}

body .summary-card strong.attendance-today-counts span {
    display: inline-flex !important;
    flex-direction: row !important;
    align-items: center !important;
    width: auto !important;
    color: #059669 !important;
}

body .summary-card strong.attendance-today-counts span.danger {
    color: #dc2626 !important;
}

body .summary-card strong.attendance-today-counts b {
    display: inline-block !important;
    font-size: 34px !important;
    line-height: 1 !important;
}

body .summary-card strong.attendance-today-counts em {
    display: inline-block !important;
    color: #94a3b8 !important;
    font-size: 24px !important;
    line-height: 1 !important;
}

.payslip-paper {
    background: #fff;
    border: 1px solid #d8e0ea;
    border-radius: 8px;
    color: #111827;
    padding: 24px;
}

.payslip-paper h2 {
    background: #e7f4ff;
    border-radius: 6px;
    margin: 0 0 18px;
    padding: 12px;
    text-align: center;
}

.payslip-paper table {
    border-collapse: collapse;
    margin: 18px 0;
    width: 100%;
}

.payslip-paper th,
.payslip-paper td {
    border: 1px solid #d1d5db;
    padding: 10px;
}

.signature-line {
    border-top: 1px solid #111827;
    margin: 46px auto 0;
    padding-top: 8px;
    text-align: center;
    width: 260px;
}
