:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #d7dee8;
    --line-soft: #edf1f6;
    --border: #d7dee8;
    --text: #101828;
    --muted: #667085;
    --brand: #0f766e;
    --brand-dark: #0b5f59;
    --brand-soft: #e6f4f1;
    --accent: #344054;
    --danger: #be123c;
    --warning: #b45309;
    --success-bg: #dcfce7;
    --success-text: #166534;
    --error-bg: #ffe4e6;
    --error-text: #9f1239;
    --shadow: 0 18px 42px rgba(16, 24, 40, 0.10);
    --shadow-soft: 0 10px 26px rgba(16, 24, 40, 0.06);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Segoe UI", Arial, Helvetica, sans-serif;
    font-size: 15px;
    line-height: 1.45;
}

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

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

.app-shell {
    display: grid;
    grid-template-columns: 252px minmax(0, 1fr);
    min-height: 100vh;
}

.portal-body {
    min-height: 100vh;
    background: linear-gradient(180deg, #f8fafc 0%, #eef4f7 100%);
}

.portal-shell {
    display: grid;
    gap: 22px;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 44px;
}

.portal-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 0 18px;
    border-bottom: 1px solid var(--line);
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text);
}

.portal-brand strong {
    font-size: 20px;
    letter-spacing: 0;
}

.portal-title {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    padding-top: 12px;
}

.portal-title h1 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.05;
}

.portal-title p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 16px;
}

.sidebar {
    position: sticky;
    top: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr);
    height: 100vh;
    padding: 18px 14px;
    border-right: 1px solid #243044;
    background: #101828;
    color: #e7edf5;
    box-shadow: inset -1px 0 0 rgba(255, 255, 255, 0.03);
    overflow: hidden;
}

.brand,
.login-heading {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    margin-bottom: 16px;
    padding: 0 4px 14px;
    border-bottom: 1px solid rgba(203, 213, 225, 0.14);
    color: #ffffff;
}

.brand strong {
    min-width: 0;
    line-height: 1.15;
}

.brand-logo,
.auth-logo,
.report-logo,
.payslip-logo {
    display: block;
    flex: 0 0 auto;
    object-fit: contain;
}

.brand-logo {
    width: 42px;
    height: 42px;
    filter: drop-shadow(0 8px 18px rgba(15, 118, 110, 0.22));
}

.auth-logo {
    width: 68px;
    height: 68px;
}

.brand-mark {
    display: inline-grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border-radius: 8px;
    background: var(--brand);
    color: #ffffff;
    font-weight: 800;
    box-shadow: 0 8px 20px rgba(15, 118, 110, 0.24);
}

.nav-list {
    display: grid;
    align-content: start;
    gap: 5px;
    min-height: 0;
    overflow-y: auto;
    padding: 4px 2px 22px 0;
    scrollbar-width: thin;
    scrollbar-color: #475569 transparent;
}

.nav-list::-webkit-scrollbar {
    width: 8px;
}

.nav-list::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #475569;
}

.nav-link {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 8px 11px;
    border-radius: 6px;
    color: #c9d4e2;
    font-weight: 600;
    transition: background 140ms ease, color 140ms ease;
}

.nav-link span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

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

.nav-group > summary {
    cursor: pointer;
    list-style: none;
}

.nav-group > summary::-webkit-details-marker {
    display: none;
}

.nav-group > summary::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 140ms ease;
}

.nav-group[open] > summary::after {
    transform: rotate(225deg);
}

.nav-sublist {
    display: grid;
    gap: 2px;
    margin: 0 0 6px 28px;
    padding-left: 12px;
    border-left: 1px solid rgba(203, 213, 225, 0.24);
}

.nav-subheading {
    margin: 8px 0 2px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.nav-subgroup {
    display: grid;
    gap: 2px;
}

.nav-subgroup > summary {
    list-style: none;
}

.nav-subgroup > summary::-webkit-details-marker {
    display: none;
}

.nav-subgroup-button {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid rgba(203, 213, 225, 0.14);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.18);
    color: #d8e2ee;
    cursor: pointer;
    font-size: 14px;
    font-weight: 800;
}

.nav-subgroup-button::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: auto;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform 140ms ease;
}

.nav-subgroup[open] > .nav-subgroup-button::after {
    transform: rotate(225deg);
}

.nav-subgroup-button.active {
    border-color: rgba(20, 184, 166, 0.42);
    background: rgba(15, 118, 110, 0.22);
    color: #ffffff;
}

.nav-subgroup-button .icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

.nav-subgroup-links {
    display: grid;
    gap: 2px;
    padding: 2px 0 6px 12px;
}

.nav-sublink {
    position: relative;
    display: flex;
    min-height: 32px;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 6px;
    color: #c9d4e2;
    font-size: 14px;
    font-weight: 600;
    transition: background 140ms ease, color 140ms ease;
}

.nav-sublink .icon {
    width: 16px;
    height: 16px;
    flex-basis: 16px;
}

.nav-sublink span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link:hover,
.nav-sublink:hover,
.nav-link.active,
.nav-sublink.active {
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
}

.nav-link.active::before,
.nav-sublink.active::before {
    content: "";
    position: absolute;
    left: 4px;
    top: 9px;
    bottom: 9px;
    width: 3px;
    border-radius: 999px;
    background: var(--brand);
}

.content {
    width: 100%;
    min-width: 0;
    max-width: 1480px;
    margin: 0 auto;
    padding: 28px;
}

.icon {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
}

h2 .icon,
.section-head h2 .icon {
    vertical-align: -3px;
    margin-right: 8px;
    color: var(--brand);
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--line-soft);
}

.topbar h1,
.profile-head h2,
.panel h2,
.login-card h1 {
    margin: 0;
}

.topbar h1 {
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 0;
}

.topbar p,
.section-head p,
.profile-head p,
small,
.muted {
    margin: 4px 0 0;
    color: var(--muted);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
}

.user-menu span {
    display: grid;
    justify-items: end;
    color: var(--text);
    font-weight: 700;
    line-height: 1.2;
}

.user-menu small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.button {
    display: inline-flex;
    min-height: 38px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface);
    color: var(--text);
    cursor: pointer;
    font-weight: 700;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.button:hover {
    border-color: #98a2b3;
    box-shadow: 0 6px 14px rgba(16, 24, 40, 0.08);
}

.button:disabled,
.button:disabled:hover {
    cursor: not-allowed;
    opacity: 0.58;
    box-shadow: none;
}

.button:focus-visible,
button:focus-visible {
    outline: 3px solid rgba(15, 118, 110, 0.16);
    outline-offset: 2px;
}

.button.primary {
    border-color: var(--brand);
    background: var(--brand);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 118, 110, 0.18);
}

.button.primary:hover {
    background: var(--brand-dark);
}

.button.ghost {
    background: transparent;
    box-shadow: none;
}

.button.compact {
    min-height: 32px;
    padding: 5px 10px;
    font-size: 13px;
}

.button.danger {
    border-color: #fecdd3;
    background: #fff7f8;
    color: var(--danger);
}

.button.danger:hover {
    border-color: var(--danger);
}

.panel,
.stat-card,
.profile-head,
.login-card {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.panel {
    min-width: 0;
    margin-bottom: 18px;
    padding: 20px;
}

.panel h2 {
    margin-bottom: 16px;
    font-size: 18px;
    font-weight: 800;
}

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

.section-head h2 {
    margin-bottom: 0;
}

.payroll-head {
    align-items: flex-start;
}

.payroll-head > div {
    min-width: 0;
}

.payroll-close-form {
    flex: 0 0 auto;
}

.payroll-close-form .button {
    min-width: 124px;
    white-space: nowrap;
}

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

.module-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-bottom: 18px;
}

.module-card {
    display: grid;
    gap: 10px;
    min-height: 210px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.module-card[href]:hover {
    border-color: var(--brand);
    box-shadow: 0 16px 30px rgba(15, 118, 110, 0.14);
    transform: translateY(-2px);
}

.module-card-rh {
    border-top: 4px solid #0f766e;
}

.module-card-analysis {
    border-top: 4px solid #2563eb;
}

.module-card-disabled {
    border-top: 4px solid #94a3b8;
    background: #f8fafc;
    color: #64748b;
}

.module-card-icon {
    display: inline-grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 8px;
    background: #ecfeff;
    color: #0f766e;
}

.module-card-analysis .module-card-icon {
    background: #eff6ff;
    color: #2563eb;
}

.module-card-disabled .module-card-icon {
    background: #e2e8f0;
    color: #64748b;
}

.module-card > span:not(.module-card-icon) {
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.module-card strong {
    color: var(--text);
    font-size: 24px;
    line-height: 1.15;
}

.module-card small {
    max-width: 58ch;
    color: var(--muted);
    line-height: 1.45;
}

.analysis-hero {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.analysis-hero h1 {
    margin: 4px 0 8px;
    font-size: 34px;
    line-height: 1.1;
}

.analysis-hero p {
    margin: 0;
    max-width: 720px;
    color: var(--muted);
}

.analysis-meta {
    display: grid;
    gap: 4px;
    min-width: 220px;
    padding: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
    text-align: right;
}

.analysis-meta span,
.analysis-meta small,
.analysis-kpi-card span,
.analysis-kpi-card small,
.analysis-signal-card span,
.analysis-signal-card small {
    color: var(--muted);
}

.analysis-meta strong {
    color: #1d4ed8;
    font-size: 20px;
}

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

.analysis-signal-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.analysis-kpi-card,
.analysis-signal-card,
.analysis-section,
.analysis-empty {
    display: grid;
    gap: 8px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.analysis-kpi-card {
    min-height: 134px;
}

.analysis-kpi-card.primary {
    border-top: 4px solid #0f766e;
}

.analysis-kpi-card strong {
    font-size: 25px;
    color: var(--text);
}

.analysis-signal-card {
    border-top: 4px solid #f59e0b;
}

.analysis-signal-card:nth-child(2) {
    border-top-color: #2563eb;
}

.analysis-signal-card:nth-child(3) {
    border-top-color: #dc2626;
}

.analysis-signal-card strong {
    font-size: 19px;
}

.analysis-content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(360px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.analysis-section-wide {
    grid-row: span 2;
}

.analysis-section-head {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: center;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.analysis-section-head h2 {
    margin: 2px 0 0;
}

.analysis-section-head > span {
    color: var(--muted);
    font-size: 13px;
}

.analysis-store-list,
.analysis-category-list,
.analysis-trend-list {
    display: grid;
    gap: 10px;
}

.analysis-store-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) minmax(150px, auto);
    gap: 12px;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #edf2f7;
}

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

.analysis-rank {
    display: inline-grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    background: #ecfdf5;
    color: #047857;
    font-weight: 800;
}

.analysis-store-main {
    display: grid;
    gap: 5px;
    min-width: 0;
}

.analysis-store-main span,
.analysis-store-metrics span,
.analysis-store-metrics small,
.analysis-category-row span,
.analysis-category-row small {
    color: var(--muted);
    font-size: 13px;
}

.analysis-store-track,
.analysis-trend-row i {
    display: block;
    height: 8px;
    overflow: hidden;
    border-radius: 999px;
    background: #e5e7eb;
}

.analysis-store-track b,
.analysis-trend-row b {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #0f766e;
}

.analysis-store-metrics {
    display: grid;
    gap: 4px;
    text-align: right;
}

.analysis-category-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto auto;
    gap: 8px 10px;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #edf2f7;
}

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

.analysis-category-row strong {
    min-width: 0;
}

.analysis-category-row small {
    grid-column: 1 / -1;
}

.analysis-category-row i {
    font-style: normal;
    font-weight: 800;
}

.analysis-category-row i.positive {
    color: #047857;
}

.analysis-category-row i.negative {
    color: #dc2626;
}

.analysis-trend-row {
    display: grid;
    grid-template-columns: 86px minmax(0, 1fr) 92px;
    gap: 10px;
    align-items: center;
}

.analysis-trend-row span {
    color: var(--muted);
    font-size: 13px;
}

.analysis-trend-row b {
    background: #2563eb;
}

.analysis-trend-row strong {
    text-align: right;
}

.analysis-empty {
    align-items: center;
    grid-template-columns: minmax(0, 1fr) auto;
}

.analysis-module-nav {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.analysis-nav-card {
    display: grid;
    gap: 4px;
    min-height: 78px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.analysis-nav-card:hover,
.analysis-nav-card.active {
    border-color: #2563eb;
}

.analysis-nav-card.active {
    background: #eff6ff;
}

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

.analysis-nav-card span {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
}

.analysis-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.analysis-table th,
.analysis-table td {
    padding: 10px 8px;
    border-bottom: 1px solid #edf2f7;
    text-align: left;
    vertical-align: top;
}

.analysis-table th {
    color: var(--muted);
    font-size: 12px;
    text-transform: uppercase;
}

.analysis-table .numeric {
    text-align: right;
    white-space: nowrap;
}

.analysis-table td small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
}

.module-placeholder {
    display: grid;
    gap: 18px;
}

.module-roadmap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.module-roadmap article {
    display: grid;
    gap: 7px;
    min-height: 132px;
    padding: 16px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.module-roadmap span {
    display: inline-grid;
    width: 30px;
    height: 30px;
    place-items: center;
    border-radius: 8px;
    background: #eff6ff;
    color: #2563eb;
    font-weight: 800;
}

.module-roadmap strong {
    font-size: 17px;
}

.module-roadmap small {
    color: var(--muted);
    line-height: 1.35;
}

@media (max-width: 720px) {
    .portal-shell {
        width: min(100% - 20px, 1120px);
        padding-top: 16px;
    }

    .portal-topbar,
    .portal-title {
        align-items: flex-start;
        flex-direction: column;
    }

    .portal-topbar .user-menu {
        width: 100%;
        justify-content: space-between;
    }

    .analysis-hero,
    .analysis-section-head,
    .analysis-empty {
        align-items: stretch;
        flex-direction: column;
        grid-template-columns: 1fr;
    }

    .analysis-meta {
        min-width: 0;
        text-align: left;
    }

    .analysis-kpi-grid,
    .analysis-signal-grid,
    .analysis-content-grid,
    .analysis-module-nav {
        grid-template-columns: 1fr;
    }

    .analysis-section-wide {
        grid-row: auto;
    }

    .analysis-store-row {
        grid-template-columns: 36px minmax(0, 1fr);
    }

    .analysis-store-metrics {
        grid-column: 2;
        text-align: left;
    }

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

    .analysis-trend-row {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .analysis-trend-row strong {
        grid-column: 2;
        text-align: left;
    }
}

.stat-card {
    padding: 17px;
}

.stat-card-link {
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.stat-card-link:hover {
    border-color: var(--brand);
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
    transform: translateY(-1px);
}

.stat-card-warning {
    border-color: #fde68a;
    background: #fffbeb;
}

.stat-card-success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.stat-card-payroll {
    border-color: #0f766e;
    background: #0f766e;
    box-shadow: 0 14px 30px rgba(15, 118, 110, 0.20);
}

.stat-card.stat-card-success span {
    color: var(--success-text);
}

.stat-card.stat-card-success strong {
    color: var(--success-text);
}

.stat-card.stat-card-warning span {
    color: #92400e;
}

.stat-card.stat-card-warning strong {
    color: #92400e;
}

.stat-card.stat-card-payroll span {
    color: #ccfbf1;
}

.stat-card.stat-card-payroll strong {
    color: #ffffff;
}

.stat-card span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.birthday-panel {
    border-color: #bae6fd;
    background: #f0f9ff;
}

.birthday-panel h2 {
    color: #075985;
}

.birthday-panel .section-head p {
    color: #0369a1;
}

.birthday-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.birthday-item {
    display: grid;
    grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) auto auto;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-top: 1px solid var(--line-soft);
}

.birthday-item:first-child {
    border-top: 0;
    padding-top: 0;
}

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

.cap-summary-card {
    display: grid;
    gap: 6px;
    min-height: 138px;
    padding: 16px;
    border: 1px solid #bae6fd;
    border-radius: 8px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    box-shadow: var(--shadow-soft);
}

.cap-summary-card.pending {
    border-color: #fde68a;
    background: #fffbeb;
}

.cap-summary-card.done {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.cap-summary-card span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.cap-summary-card strong {
    margin: 0;
    color: var(--text);
    font-size: 34px;
    font-weight: 800;
    line-height: 1.1;
    overflow-wrap: anywhere;
}

.cap-summary-card small {
    color: var(--muted);
    line-height: 1.3;
}

.birthday-date,
.birthday-age {
    color: var(--accent);
    font-weight: 800;
}

.birthday-date small {
    display: block;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.birthday-age {
    white-space: nowrap;
}

.compact-empty {
    margin: 0;
    padding: 8px 0 0;
}

.stat-card strong {
    display: block;
    margin-top: 6px;
    font-size: 26px;
    letter-spacing: 0;
    overflow-wrap: anywhere;
}

.stat-card-money strong {
    font-size: clamp(18px, 1.6vw, 22px);
    line-height: 1.15;
    white-space: nowrap;
    overflow-wrap: normal;
}

.stat-card small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-wrap {
    width: 100%;
    min-width: 0;
    overflow-x: auto;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    scrollbar-width: thin;
    scrollbar-color: #a8b3c2 transparent;
}

.table-wrap.slim {
    max-height: 430px;
    overflow: auto;
}

.table-wrap.no-scroll-x {
    overflow-x: hidden;
}

.table-wrap::-webkit-scrollbar {
    width: 9px;
    height: 9px;
}

.table-wrap::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: #a8b3c2;
}

.table-wrap.slim thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
}

.employees-table {
    min-width: 1240px;
    font-size: 13px;
    table-layout: fixed;
}

.employees-table th,
.employees-table td {
    padding: 9px 8px;
    line-height: 1.26;
}

.employees-table th {
    font-size: 11px;
}

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

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

.employees-table th:nth-child(3),
.employees-table td:nth-child(3),
.employees-table th:nth-child(4),
.employees-table td:nth-child(4) {
    width: 125px;
}

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

.employees-table th:nth-child(6),
.employees-table td:nth-child(6) {
    width: 92px;
}

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

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

.employees-table .person-cell {
    gap: 8px;
    font-size: 13px;
    line-height: 1.18;
}

.employees-table .person-cell small {
    margin-top: 5px;
    font-size: 11px;
}

.employees-table .avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.employees-table .inline-actions {
    gap: 6px;
}

.employees-table .button.compact {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

.experience-table {
    min-width: 900px;
    font-size: 13px;
    table-layout: fixed;
}

.experience-table th,
.experience-table td {
    padding: 9px 8px;
    line-height: 1.26;
    vertical-align: middle;
}

.experience-table th {
    font-size: 11px;
}

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

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

.experience-table th:nth-child(3),
.experience-table td:nth-child(3) {
    width: 78px;
}

.experience-table th:nth-child(4),
.experience-table td:nth-child(4),
.experience-table th:nth-child(5),
.experience-table td:nth-child(5),
.experience-table th:nth-child(6),
.experience-table td:nth-child(6) {
    width: 88px;
}

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

.experience-table th:nth-child(8),
.experience-table td:nth-child(8) {
    width: 94px;
    text-align: center;
}

.experience-table .person-cell {
    gap: 8px;
    font-size: 13px;
    line-height: 1.18;
}

.experience-table .avatar {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
}

.experience-table .status {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 11px;
    line-height: 1.2;
}

.experience-table .actions {
    padding-left: 6px;
    padding-right: 6px;
    text-align: center;
    white-space: nowrap;
}

.experience-table .experience-row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: nowrap;
    gap: 0;
    width: 100%;
    min-height: 32px;
}

.experience-evaluation-table {
    min-width: 0;
    table-layout: fixed;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}

.experience-evaluation-table th,
.experience-evaluation-table td {
    padding: 7px 5px;
    line-height: 1.18;
    overflow-wrap: anywhere;
    vertical-align: middle;
}

.experience-evaluation-table th {
    font-size: 10px;
}

.experience-evaluation-table th:nth-child(1),
.experience-evaluation-table td:nth-child(1) {
    width: 20%;
}

.experience-evaluation-table th:nth-child(2),
.experience-evaluation-table td:nth-child(2) {
    width: 9%;
}

.experience-evaluation-table th:nth-child(3),
.experience-evaluation-table td:nth-child(3) {
    width: 10%;
}

.experience-evaluation-table th:nth-child(4),
.experience-evaluation-table td:nth-child(4) {
    width: 8%;
}

.experience-evaluation-table th:nth-child(5),
.experience-evaluation-table td:nth-child(5),
.experience-evaluation-table th:nth-child(6),
.experience-evaluation-table td:nth-child(6),
.experience-evaluation-table th:nth-child(7),
.experience-evaluation-table td:nth-child(7) {
    width: 9%;
}

.experience-evaluation-table th:nth-child(8),
.experience-evaluation-table td:nth-child(8) {
    width: 9%;
}

.experience-evaluation-table th:nth-child(9),
.experience-evaluation-table td:nth-child(9) {
    width: 8%;
}

.experience-evaluation-table th:nth-child(10),
.experience-evaluation-table td:nth-child(10) {
    width: 10%;
    text-align: center;
}

.experience-evaluation-table .person-cell {
    gap: 6px;
    font-size: 11.5px;
    line-height: 1.12;
}

.experience-evaluation-table .avatar {
    width: 30px;
    height: 30px;
    flex-basis: 30px;
}

.experience-evaluation-table .status {
    min-height: 20px;
    padding: 2px 5px;
    font-size: 10.5px;
    line-height: 1.2;
}

.experience-evaluation-table .actions {
    padding-left: 4px;
    padding-right: 8px;
    text-align: center;
    white-space: nowrap;
}

.experience-evaluation-table .experience-row-actions {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px;
    width: 100%;
    min-height: 32px;
}

.experience-row-actions .button.compact {
    width: 76px;
    min-height: 28px;
    padding: 4px 7px;
    font-size: 10.5px;
    line-height: 1;
    white-space: nowrap;
    border-radius: 6px;
    box-shadow: 0 8px 16px rgba(15, 118, 110, 0.14);
}

.experience-row-actions .muted {
    display: inline-grid;
    place-items: center;
    width: 76px;
    min-height: 28px;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: grid;
    place-items: center;
    padding: 18px;
    background: rgba(16, 24, 40, 0.38);
}

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

.modal-panel {
    width: min(640px, 100%);
    max-height: calc(100vh - 36px);
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow);
    padding: 20px;
}

.company-modal {
    width: min(920px, 100%);
}

.company-modal .section-head {
    align-items: flex-start;
}

.experience-modal .section-head {
    align-items: flex-start;
    margin-bottom: 16px;
}

.compact-data-list {
    grid-template-columns: 86px minmax(0, 1fr);
    margin-bottom: 16px;
}

.payroll-table {
    min-width: 900px;
    table-layout: fixed;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}

.payroll-table th,
.payroll-table td {
    padding: 8px 5px;
    line-height: 1.22;
}

.payroll-table th {
    font-size: 10.5px;
    letter-spacing: 0;
}

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

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

.payroll-table th:nth-child(3),
.payroll-table td:nth-child(3),
.payroll-table th:nth-child(4),
.payroll-table td:nth-child(4),
.payroll-table th:nth-child(5),
.payroll-table td:nth-child(5),
.payroll-table th:nth-child(7),
.payroll-table td:nth-child(7),
.payroll-table th:nth-child(8),
.payroll-table td:nth-child(8),
.payroll-table th:nth-child(10),
.payroll-table td:nth-child(10),
.payroll-table th:nth-child(11),
.payroll-table td:nth-child(11) {
    width: 62px;
}

.payroll-table th:nth-child(6),
.payroll-table td:nth-child(6),
.payroll-table th:nth-child(9),
.payroll-table td:nth-child(9) {
    width: 75px;
}

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

.payroll-table th:nth-child(n+3),
.payroll-table td:nth-child(n+3) {
    text-align: right;
    white-space: nowrap;
}

.payroll-table td:nth-child(1),
.payroll-table td:nth-child(2) {
    overflow-wrap: break-word;
}

.payroll-table td small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.15;
    white-space: normal;
}

.payroll-table td strong {
    font-size: 12.5px;
    white-space: nowrap;
}

th,
td {
    padding: 12px 10px;
    border-bottom: 1px solid var(--line-soft);
    text-align: left;
    vertical-align: middle;
}

th {
    background: #f8fafc;
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

th:first-child {
    border-top-left-radius: 8px;
}

th:last-child {
    border-top-right-radius: 8px;
}

tbody tr:hover {
    background: #fbfcfe;
}

td small,
td strong {
    display: block;
}

tr:last-child td {
    border-bottom: 0;
}

.actions {
    text-align: right;
    white-space: nowrap;
}

.inline-actions {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.inline-actions form {
    margin: 0;
}

.strong-link {
    color: var(--brand);
    font-weight: 800;
}

.copy-link {
    display: block;
    max-width: 420px;
    overflow-wrap: anywhere;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.companies-table th,
.companies-table td {
    vertical-align: top;
}

.companies-table {
    min-width: 1500px;
    table-layout: fixed;
    font-size: 13px;
}

.companies-table th,
.companies-table td {
    padding: 9px 10px;
    line-height: 1.25;
}

.companies-table th {
    font-size: 11px;
}

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

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

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

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

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

.companies-table th:nth-child(6),
.companies-table td:nth-child(6),
.companies-table th:nth-child(7),
.companies-table td:nth-child(7) {
    width: 58px;
    text-align: center;
}

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

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

.companies-table th:nth-child(10),
.companies-table td:nth-child(10) {
    width: 120px;
}

.companies-table th:nth-child(11),
.companies-table td:nth-child(11) {
    width: 230px;
}

.companies-table td:nth-child(1) strong,
.companies-table td:nth-child(1) small {
    overflow-wrap: break-word;
    word-break: normal;
}

.companies-table td:nth-child(2),
.companies-table td:nth-child(3),
.companies-table td:nth-child(4),
.companies-table td:nth-child(8),
.companies-table td:nth-child(9),
.companies-table td:nth-child(10) {
    white-space: nowrap;
}

.companies-table td:nth-child(8) {
    overflow: hidden;
    text-overflow: ellipsis;
}

.companies-table td:nth-child(9) small {
    margin-top: 5px;
    white-space: nowrap;
}

.companies-table .inline-actions {
    flex-wrap: nowrap;
    gap: 6px;
}

.companies-table .button.compact {
    min-height: 30px;
    padding: 5px 9px;
    font-size: 12px;
}

.companies-table .status {
    padding: 5px 8px;
    font-size: 11px;
}

.audit-table th,
.audit-table td {
    vertical-align: top;
}

.audit-details {
    min-width: 190px;
}

.audit-details summary {
    cursor: pointer;
    color: var(--brand);
    font-weight: 800;
}

.audit-json {
    max-width: 420px;
    max-height: 260px;
    margin: 8px 0 0;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--accent);
    padding: 10px;
    font-size: 12px;
    line-height: 1.35;
    white-space: pre-wrap;
}

.empty {
    color: var(--muted);
    text-align: center;
}

.person-cell {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
}

.avatar {
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface-soft);
}

.avatar.placeholder {
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--line);
    color: var(--accent);
    font-weight: 800;
}

.profile-head {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding: 18px;
}

.profile-head .avatar {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
}

.profile-head .button {
    margin-left: auto;
}

.profile-actions {
    display: flex;
    gap: 10px;
    margin-left: auto;
}

.profile-actions .button {
    margin-left: 0;
}

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

.data-list {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
    gap: 10px 14px;
    margin: 0;
}

.data-list dt {
    color: var(--muted);
    font-weight: 700;
}

.data-list dd {
    margin: 0;
    min-width: 0;
}

.maintenance-url-list,
.maintenance-steps {
    margin: 12px 0 0;
    padding-left: 22px;
}

.maintenance-url-list li,
.maintenance-steps li {
    margin: 8px 0;
}

.maintenance-url-list small {
    display: block;
    color: var(--muted);
}

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

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

.form-stack,
.compact-form,
.toolbar,
.inline-filter {
    display: flex;
    gap: 12px;
}

.form-stack {
    flex-direction: column;
}

.copy-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    align-items: end;
}

.payslip-receipt-form {
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    max-width: 260px;
}

.payslip-receipt-form input[type="file"] {
    max-width: 170px;
    font-size: 12px;
}

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

.form-tab-list {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    border-bottom: 1px solid var(--line-soft);
}

.form-tab {
    min-height: 38px;
    margin-bottom: -1px;
    padding: 8px 12px;
    border: 1px solid transparent;
    border-bottom-color: var(--line-soft);
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    font-weight: 800;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.form-tab:hover {
    color: var(--brand);
}

.form-tab[data-tab-button$="-data"] {
    border-color: #99f6e4;
    border-bottom-color: var(--line-soft);
    background: #f0fdfa;
    color: #0f766e;
}

.form-tab[data-tab-button$="-bank"] {
    border-color: #bfdbfe;
    border-bottom-color: var(--line-soft);
    background: #eff6ff;
    color: #1d4ed8;
}

.form-tab[data-tab-button$="-point"] {
    border-color: #a7f3d0;
    border-bottom-color: var(--line-soft);
    background: #ecfdf5;
    color: #047857;
}

.form-tab[data-tab-button$="-docs"] {
    border-color: #fed7aa;
    border-bottom-color: var(--line-soft);
    background: #fff7ed;
    color: #c2410c;
}

.form-tab[data-tab-button$="-contract"] {
    border-color: #c4b5fd;
    border-bottom-color: var(--line-soft);
    background: #f5f3ff;
    color: #6d28d9;
}

.form-tab[data-tab-button$="-benefits"] {
    border-color: #bbf7d0;
    border-bottom-color: var(--line-soft);
    background: #f0fdf4;
    color: #15803d;
}

.form-tab.active {
    border-color: var(--line-soft);
    border-bottom-color: #ffffff;
    background: #ffffff;
    color: var(--brand-dark);
}

.form-tab.active[data-tab-button$="-data"] {
    border-color: #0f766e;
    border-bottom-color: #ffffff;
    color: #0f766e;
    box-shadow: inset 0 3px 0 #0f766e;
}

.form-tab.active[data-tab-button$="-bank"] {
    border-color: #2563eb;
    border-bottom-color: #ffffff;
    color: #1d4ed8;
    box-shadow: inset 0 3px 0 #2563eb;
}

.form-tab.active[data-tab-button$="-point"] {
    border-color: #059669;
    border-bottom-color: #ffffff;
    color: #047857;
    box-shadow: inset 0 3px 0 #059669;
}

.form-tab.active[data-tab-button$="-docs"] {
    border-color: #ea580c;
    border-bottom-color: #ffffff;
    color: #c2410c;
    box-shadow: inset 0 3px 0 #ea580c;
}

.form-tab.active[data-tab-button$="-contract"] {
    border-color: #7c3aed;
    border-bottom-color: #ffffff;
    color: #6d28d9;
    box-shadow: inset 0 3px 0 #7c3aed;
}

.form-tab.active[data-tab-button$="-benefits"] {
    border-color: #16a34a;
    border-bottom-color: #ffffff;
    color: #15803d;
    box-shadow: inset 0 3px 0 #16a34a;
}

.form-tab-panel {
    min-width: 0;
}

.form-tab-panel[hidden] {
    display: none;
}

.compact-form,
.toolbar {
    align-items: end;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.repeat-section {
    display: grid;
    gap: 12px;
}

.repeat-section + .repeat-section {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid var(--line-soft);
}

.repeat-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.repeat-head h2 {
    margin: 0;
}

.repeat-list {
    display: grid;
    gap: 10px;
}

.repeat-row {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
    gap: 10px;
    align-items: end;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #f8fafc;
}

.benefit-row {
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
}

.repeat-row .span-2 {
    grid-column: span 2;
}

.repeat-remove {
    align-self: end;
}

.inline-filter {
    align-items: center;
}

label {
    display: grid;
    gap: 6px;
    color: var(--accent);
    font-size: 13px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;
    min-height: 42px;
    border: 1px solid #cfd8e3;
    border-radius: 6px;
    background: #ffffff;
    color: var(--text);
    padding: 9px 10px;
    box-shadow: inset 0 1px 0 rgba(16, 24, 40, 0.02);
    transition: border-color 140ms ease, box-shadow 140ms ease, outline-color 140ms ease;
}

input[readonly] {
    border-color: var(--line);
    background: var(--surface-soft);
    color: var(--accent);
    font-weight: 800;
    cursor: default;
}

textarea {
    resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--brand);
    outline: 3px solid rgba(15, 118, 110, 0.13);
    box-shadow: 0 0 0 1px rgba(15, 118, 110, 0.08);
}

input::placeholder,
textarea::placeholder {
    color: #98a2b3;
}

.span-2 {
    grid-column: span 2;
}

.form-section-title {
    margin: 8px 0 0;
    padding-top: 14px;
    border-top: 1px solid var(--line-soft);
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.optional-fields {
    border: 1px dashed var(--line);
    border-radius: 6px;
    padding: 12px;
    background: var(--surface-soft);
}

.optional-fields summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 800;
}

.optional-fields .muted {
    margin: 8px 0 12px;
}

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

.search-field {
    min-width: min(360px, 100%);
}

.check-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
}

.check-row input {
    width: auto;
    min-height: auto;
}

.field-label {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.evaluator-picker {
    display: grid;
    gap: 8px;
}

.evaluator-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
}

.evaluator-option {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid #d8e0e8;
    border-radius: 6px;
    background: #ffffff;
    color: var(--text);
}

.training-position-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 14px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface-soft);
}

.training-position-grid .check-row {
    min-width: 0;
    margin: 0;
}

.training-employee-grid .check-row span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.training-employee-grid .check-row small {
    color: var(--muted);
    font-weight: 500;
}

.training-player {
    width: 100%;
    aspect-ratio: 16 / 9;
    margin: 16px 0;
    overflow: hidden;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #101828;
}

.training-player video,
.training-player iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: #101828;
}

.training-content-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.training-content-fields[hidden] {
    display: none;
}

.inline-check {
    display: inline-flex;
    margin-left: 10px;
}

.training-sequence-table input[type="number"] {
    width: 78px;
}

.training-sequence-table td strong,
.training-sequence-table td small {
    display: block;
}

.training-pdf-viewer {
    display: grid;
    gap: 10px;
    margin: 16px 0;
}

.training-pdf-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
}

.training-pdf-toolbar span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.training-pdf-viewer iframe {
    width: 100%;
    min-height: 520px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #f8fafc;
}

.training-read-confirm {
    align-items: center;
}

.training-card-grid {
    display: grid;
    gap: 16px;
}

.training-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.training-card-head,
.training-card-actions,
.training-card-meta,
.training-metrics {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.training-card-head {
    justify-content: space-between;
}

.training-card-head h2 {
    margin: 0;
    font-size: 19px;
}

.training-card-head p {
    margin: 4px 0 0;
    color: var(--muted);
}

.training-card-meta {
    color: var(--muted);
    font-size: 13px;
}

.training-card-meta span {
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.training-metrics {
    gap: 8px;
}

.training-metrics span {
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.training-metrics strong {
    color: var(--text);
    font-size: 18px;
}

.training-card-details {
    display: grid;
    gap: 10px;
}

.training-card-details summary {
    cursor: pointer;
    color: var(--text);
    font-weight: 800;
}

.training-summary-table {
    min-width: 620px;
}

.public-training-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 16px;
}

.public-training-title {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.public-training-logo {
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    object-fit: contain;
}

.public-training-head h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.15;
}

.public-training-head p {
    margin: 5px 0 0;
    color: var(--muted);
}

.cap-progress-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0;
}

.cap-progress-card {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}

.cap-progress-card span,
.cap-progress-card small {
    color: var(--muted);
}

.cap-progress-card strong {
    font-size: 26px;
    line-height: 1.1;
}

.cap-progress-card.done {
    border-color: #86efac;
    background: #f0fdf4;
}

.cap-progress-card.pending {
    border-color: #fde68a;
    background: #fffbeb;
}

.public-cap-tabs {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
    margin: 0 0 16px;
}

.public-cap-tabs a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    padding: 9px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 800;
}

.public-cap-tabs a.active {
    border-color: #0f766e;
    background: #ecfdf5;
    color: #0f766e;
}

.public-cap-tabs .icon {
    width: 17px;
    height: 17px;
}

.report-tabs {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 16px;
}

.report-tabs a,
.report-card {
    display: flex;
    align-items: center;
    gap: 9px;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    color: var(--muted);
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.report-tabs a {
    justify-content: center;
}

.report-tabs a.active {
    border-color: #1d4ed8;
    background: #eff6ff;
    color: #1d4ed8;
}

.report-tabs .icon,
.report-card .icon {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
}

.report-card-grid,
.allocation-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px;
}

.report-card {
    align-items: flex-start;
    flex-direction: column;
    min-height: 136px;
    color: var(--text);
}

.report-card small {
    color: var(--muted);
    font-weight: 600;
}

.reports-content .topbar {
    margin-bottom: 22px;
    padding-bottom: 16px;
}

.reports-content .topbar h1 {
    color: #101828;
    font-size: 27px;
    font-weight: 700;
}

.reports-content .topbar p {
    color: #667085;
    font-weight: 500;
}

.time-clock-grid {
    display: grid;
    grid-template-columns: minmax(320px, 1.15fr) minmax(280px, 0.85fr);
    gap: 16px;
    align-items: start;
}

.time-clock-form,
.time-clock-status,
.time-clock-steps,
.org-chart {
    display: grid;
    gap: 12px;
}

.time-clock-camera {
    aspect-ratio: 4 / 3;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #111827;
}

.time-clock-camera video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: #111827;
}

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

.time-clock-status > div,
.time-clock-next,
.time-clock-step {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.time-clock-status small,
.time-clock-next span,
.time-clock-next small,
.time-clock-step span {
    color: var(--muted);
}

.time-clock-next strong {
    font-size: 22px;
    line-height: 1.15;
}

.time-clock-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}

.time-clock-actions .button {
    width: 100%;
}

.time-clock-step strong {
    font-size: 24px;
    line-height: 1.1;
}

.time-clock-step.done {
    border-color: #86efac;
    background: #f0fdf4;
}

.org-tree-card,
.org-company,
.allocation-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.org-tree-card {
    gap: 22px;
    overflow-x: auto;
    padding: 18px;
}

.org-root-node {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    justify-self: center;
    min-width: min(300px, 100%);
    padding: 11px 15px;
    border: 1px solid #99f6e4;
    border-radius: 8px;
    background: #f0fdfa;
    color: #115e59;
    box-shadow: var(--shadow-soft);
}

.org-root-node::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -23px;
    width: 1px;
    height: 22px;
    background: #cbd5e1;
    transform: translateX(-50%);
}

.org-root-node .icon {
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
}

.org-root-node h2 {
    margin: 0;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.15;
}

.org-root-node span {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

.org-branches {
    position: relative;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 18px;
    align-items: start;
    min-width: min(100%, 720px);
    padding-top: 20px;
}

.org-branches::before {
    content: "";
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: #cbd5e1;
}

.org-branch {
    position: relative;
    display: grid;
    justify-items: center;
    gap: 12px;
    min-width: 0;
}

.org-branch::before {
    content: "";
    position: absolute;
    top: -18px;
    left: 50%;
    width: 1px;
    height: 18px;
    background: #cbd5e1;
    transform: translateX(-50%);
}

.org-position-node {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: min(100%, 230px);
    min-height: 48px;
    padding: 9px 11px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #f8fbff;
    color: #1e40af;
    font-size: 14px;
    font-weight: 600;
    box-shadow: var(--shadow-soft);
}

.org-position-node::after {
    content: "";
    position: absolute;
    left: 50%;
    bottom: -13px;
    width: 1px;
    height: 13px;
    background: #cbd5e1;
    transform: translateX(-50%);
}

.org-position-node span {
    min-width: 0;
    overflow-wrap: anywhere;
}

.org-position-node strong {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 26px;
    height: 26px;
    border-radius: 999px;
    background: #eff6ff;
    color: #2563eb;
    font-size: 12px;
    font-weight: 700;
}

.org-employee-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(136px, 1fr));
    gap: 8px;
    width: 100%;
    padding-top: 12px;
}

.org-employee-node {
    position: relative;
    display: grid;
    gap: 2px;
    min-height: 50px;
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.org-employee-node::before {
    content: "";
    position: absolute;
    left: 50%;
    top: -11px;
    width: 1px;
    height: 12px;
    background: #cbd5e1;
    transform: translateX(-50%);
}

.org-employee-node span {
    overflow-wrap: anywhere;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
}

.org-employee-node small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 500;
}

.org-company header,
.allocation-card header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: flex-start;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line-soft);
}

.org-company h2,
.allocation-card h2 {
    margin: 0;
    font-size: 20px;
}

.org-company header span,
.allocation-card header span {
    color: var(--muted);
    font-weight: 800;
}

.org-position-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.org-position {
    display: grid;
    gap: 8px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.org-position strong {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.org-position strong span {
    color: #047857;
}

.org-position ul,
.allocation-card ul {
    display: grid;
    gap: 7px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.org-position li,
.allocation-card li {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.org-position a,
.allocation-card a {
    color: var(--text);
    font-weight: 800;
}

.org-position small,
.allocation-card small {
    color: var(--muted);
}

.soft-report {
    display: grid;
    gap: 16px;
}

.soft-report .report-tabs {
    margin-bottom: 0;
}

.soft-report .report-tabs a {
    min-height: 42px;
    border-color: #d9e2ee;
    background: #ffffff;
    color: #667085;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.04);
}

.soft-report .report-tabs a.active {
    border-color: #93c5fd;
    background: #f8fbff;
    color: #2563eb;
}

.soft-report .report-tabs .icon {
    color: currentColor;
}

.soft-report .stats-grid {
    gap: 12px;
}

.soft-report .stat-card,
.soft-report .panel,
.soft-report .allocation-card {
    border-color: #d9e2ee;
    box-shadow: 0 8px 18px rgba(16, 24, 40, 0.045);
}

.soft-report .stat-card {
    padding: 16px 18px;
}

.soft-report .stat-card span {
    color: #667085;
    font-weight: 600;
}

.soft-report .stat-card strong {
    color: #101828;
    font-size: 24px;
    font-weight: 700;
}

.soft-report .stat-card-warning {
    border-color: #fedf89;
    background: #fffaf0;
}

.soft-report .stat-card-warning span,
.soft-report .stat-card-warning strong {
    color: #9a5b13;
}

.soft-report .panel {
    margin-bottom: 0;
    padding: 18px;
}

.soft-report .section-head {
    margin-bottom: 14px;
}

.soft-report .section-head h2 {
    color: #1d2939;
    font-size: 17px;
    font-weight: 700;
}

.soft-report .section-head p {
    color: #667085;
    font-size: 13px;
}

.soft-report .table-wrap {
    border-color: #e4e7ec;
    box-shadow: none;
}

.soft-report table {
    min-width: 680px;
}

.soft-report th,
.soft-report td {
    padding: 11px 10px;
}

.soft-report th {
    color: #667085;
    font-size: 11.5px;
    font-weight: 700;
}

.soft-report td strong {
    color: #1d2939;
    font-weight: 600;
}

.store-allocation-report .allocation-grid {
    gap: 12px;
}

.store-allocation-report .allocation-card {
    gap: 12px;
    padding: 16px;
}

.store-allocation-report .allocation-card header {
    align-items: center;
    padding-bottom: 9px;
}

.store-allocation-report .allocation-card h2 {
    color: #1d2939;
    font-size: 17px;
    font-weight: 700;
    line-height: 1.2;
}

.store-allocation-report .allocation-card header span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 30px;
    height: 30px;
    border-radius: 999px;
    background: #f2f4f7;
    color: #475467;
    font-size: 13px;
    font-weight: 700;
}

.store-allocation-report .allocation-card ul {
    gap: 8px;
}

.store-allocation-report .allocation-card li {
    padding: 8px 0;
    border-top: 1px solid #edf1f6;
}

.store-allocation-report .allocation-card li:first-child {
    padding-top: 0;
    border-top: 0;
}

.store-allocation-report .allocation-card a {
    color: #1d2939;
    font-size: 13.5px;
    font-weight: 600;
}

.store-allocation-report .allocation-card small {
    color: #667085;
    font-size: 12px;
    line-height: 1.35;
}

.cap-welcome {
    display: grid;
    grid-template-columns: minmax(260px, 1.05fr) minmax(280px, 0.95fr);
    align-items: stretch;
    gap: 0;
    margin: 0 0 16px;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.cap-welcome-media {
    min-height: 260px;
    background: #e6eef5;
}

.cap-welcome-media img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 260px;
    object-fit: cover;
}

.cap-welcome-copy {
    display: grid;
    align-content: center;
    gap: 10px;
    padding: 24px;
}

.cap-welcome-copy span {
    color: #0f766e;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
}

.cap-welcome-copy h2 {
    margin: 0;
    color: var(--text);
    font-size: 26px;
    line-height: 1.14;
}

.cap-welcome-copy p {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.55;
}

.integration-editor,
.integration-step-list,
.integration-acceptance {
    display: grid;
    gap: 14px;
}

.integration-item-editor {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.integration-step {
    display: grid;
    gap: 12px;
    padding: 14px 0;
    border-top: 1px solid var(--line-soft);
}

.integration-step:first-child {
    padding-top: 0;
    border-top: 0;
}

.integration-item-head {
    display: grid;
    grid-template-columns: 170px minmax(0, 1fr);
    gap: 12px;
}

.integration-step h3 {
    margin: 0;
    font-size: 17px;
}

.integration-step .training-player {
    margin: 8px 0;
}

.step-gate-message {
    display: block;
    max-width: 560px;
    margin-top: 6px;
    color: var(--muted);
    font-size: 13px;
}

.integration-document {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.integration-text {
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: var(--surface-soft);
}

.integration-text p {
    margin: 0;
}

.integration-acceptance {
    padding-top: 4px;
    border-top: 1px solid var(--line-soft);
}

.integration-acceptance-check {
    align-items: flex-start;
    padding: 12px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
}

.selfie-box {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.selfie-box video,
.selfie-box img {
    width: min(100%, 360px);
    aspect-ratio: 4 / 3;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    object-fit: cover;
    background: #111827;
}

.signature-box {
    display: grid;
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.signature-box[hidden] {
    display: none;
}

.signature-box canvas {
    width: 100%;
    max-width: 720px;
    aspect-ratio: 3 / 1;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    touch-action: none;
}

.portal-sign-form {
    display: grid;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--line-soft);
}

.portal-sign-form canvas {
    width: 100%;
    max-width: 720px;
    aspect-ratio: 3 / 1;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #ffffff;
    touch-action: none;
}

.timeline-list {
    display: grid;
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}

.timeline-list li {
    display: grid;
    grid-template-columns: 116px minmax(0, 1fr);
    gap: 10px 14px;
    padding: 12px 0;
    border-top: 1px solid var(--line-soft);
}

.timeline-list li:first-child {
    border-top: 0;
    padding-top: 0;
}

.timeline-list span {
    color: var(--accent);
    font-size: 13px;
    font-weight: 800;
}

.timeline-list strong,
.timeline-list small {
    min-width: 0;
}

.timeline-list small {
    grid-column: 2;
    margin-top: -4px;
}

.quiz-editor,
.quiz-answer-form {
    display: grid;
    gap: 14px;
}

.quiz-question,
.quiz-answer-card {
    display: grid;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
}

.quiz-question-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 12px;
}

.quiz-options,
.quiz-answer-options {
    display: grid;
    gap: 8px;
}

.quiz-option,
.quiz-answer-option {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    margin: 0;
}

.quiz-option input[type="radio"],
.quiz-answer-option input[type="radio"] {
    width: auto;
    min-height: auto;
}

.quiz-answer-card h2 {
    margin: 0;
    font-size: 17px;
}

.quiz-answer-option {
    min-height: 44px;
    padding: 10px;
    border: 1px solid var(--line-soft);
    border-radius: 6px;
    background: var(--surface-soft);
    color: var(--text);
    font-weight: 650;
}

.evaluator-option input {
    width: auto;
    min-height: auto;
}

.evaluator-option span {
    display: grid;
    min-width: 0;
    gap: 2px;
}

.evaluator-option strong,
.evaluator-option small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.evaluation-form {
    display: grid;
    gap: 18px;
}

.criteria-list {
    display: grid;
    gap: 10px;
}

.evaluation-criterion {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 14px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: var(--surface-soft);
}

.criterion-copy {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.criterion-copy strong {
    line-height: 1.35;
}

.criterion-copy small {
    color: var(--muted);
    font-weight: 700;
}

.radio-pair,
.evaluation-actions {
    flex-wrap: wrap;
}

.radio-pair {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.radio-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 36px;
    min-width: 78px;
    justify-content: center;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    color: var(--accent);
    font-size: 13px;
    transition: background 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}

.radio-pill input {
    width: auto;
    min-height: auto;
}

.radio-pill.pays {
    border-color: #16a34a;
    background: #dcfce7;
    color: #14532d;
    box-shadow: 0 0 0 2px rgba(22, 163, 74, 0.12);
}

.radio-pill.does-not-pay {
    border-color: #e11d48;
    background: #ffe4e6;
    color: #881337;
    box-shadow: 0 0 0 2px rgba(225, 29, 72, 0.10);
}

.evaluation-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    min-height: 62px;
    padding: 14px 16px;
    border: 1px solid #b9d8d4;
    border-radius: 6px;
    background: var(--brand-soft);
}

.evaluation-preview div {
    display: grid;
    gap: 2px;
}

.evaluation-preview span,
.evaluation-preview small {
    color: var(--muted);
    font-weight: 700;
}

.evaluation-preview strong {
    color: var(--brand-dark);
    font-size: 22px;
    line-height: 1.1;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.status {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    padding: 4px 8px;
    border-radius: 6px;
    background: #eef2f7;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
}

.status.active {
    background: var(--success-bg);
    color: var(--success-text);
}

.status.info {
    background: #dbeafe;
    color: #1d4ed8;
}

.status.warning {
    background: #fef3c7;
    color: #92400e;
}

.status.danger {
    background: #ffe4e6;
    color: #9f1239;
}

.status.inactive {
    background: #e5e7eb;
    color: #374151;
}

.flash {
    position: relative;
    z-index: 45;
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.flash.success {
    background: var(--success-bg);
    color: var(--success-text);
}

.flash.error {
    background: var(--error-bg);
    color: var(--error-text);
}

.notice {
    margin: 16px 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-left: 4px solid var(--accent);
    border-radius: 8px;
    background: var(--surface-soft);
}

.notice.success {
    border-left-color: var(--success-text);
    background: var(--success-bg);
}

.notice.warning {
    border-left-color: var(--warning);
    background: #fffbeb;
}

.notice strong {
    display: block;
    margin-bottom: 6px;
}

.notice p {
    margin: 0;
    color: var(--muted);
}

.import-errors {
    margin: 12px 0 0;
    color: var(--danger);
}

.doc-list {
    display: grid;
    gap: 4px;
}

.doc-list a {
    color: var(--brand);
    font-weight: 700;
}

.print-body {
    min-height: 100vh;
    background: #eef2f7;
    padding: 24px;
}

.print-toolbar {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    width: min(920px, 100%);
    margin: 0 auto 16px;
}

.print-stack {
    display: grid;
    gap: 18px;
    width: min(920px, 100%);
    margin: 0 auto;
}

.payslip-sheet {
    display: grid;
    gap: 8px;
    break-after: page;
    page-break-after: always;
}

.payslip-sheet:last-child {
    break-after: auto;
    page-break-after: auto;
}

.payslip-cut {
    position: relative;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0;
    text-align: center;
    text-transform: uppercase;
}

.payslip-cut::before,
.payslip-cut::after {
    content: "";
    position: absolute;
    top: 50%;
    width: calc(50% - 54px);
    border-top: 1px dashed #98a2b3;
}

.payslip-cut::before {
    left: 0;
}

.payslip-cut::after {
    right: 0;
}

.payslip-page {
    border: 1px solid #111827;
    border-radius: 4px;
    background: #ffffff;
    color: #111827;
    padding: 11px;
}

.payslip-title,
.payslip-meta,
.payslip-bases,
.payslip-signature {
    display: flex;
    gap: 12px;
    justify-content: space-between;
}

.payslip-title {
    align-items: flex-start;
    border-bottom: 2px solid #111827;
    padding-bottom: 7px;
}

.payslip-title-main {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.payslip-logo {
    width: 38px;
    height: 38px;
}

.payslip-title h2 {
    margin: 0;
    font-size: 16px;
}

.payslip-title p,
.payslip-note {
    margin: 4px 0 0;
    color: #475467;
}

.payslip-title-side {
    display: grid;
    justify-items: end;
    min-width: 190px;
}

.payslip-title-side span {
    color: #344054;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.payslip-title-side strong {
    font-size: 18px;
}

.payslip-meta {
    margin: 8px 0;
    border: 1px solid #98a2b3;
}

.payslip-meta div,
.payslip-bases div {
    flex: 1;
    min-width: 0;
    padding: 6px;
}

.payslip-meta div + div,
.payslip-bases div + div {
    border-left: 1px solid #d0d5dd;
}

.payslip-meta span,
.payslip-bases span {
    display: block;
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.payslip-meta strong,
.payslip-bases strong {
    display: block;
    margin-top: 3px;
}

.payslip-table {
    min-width: 0;
    border: 1px solid #98a2b3;
    font-size: 11px;
}

.payslip-table th,
.payslip-table td {
    border: 1px solid #d0d5dd;
    padding: 4px 6px;
}

.payslip-table th {
    color: #344054;
    background: #f2f4f7;
}

.payslip-table .money,
.payslip-table tfoot th {
    text-align: right;
}

.payslip-bases {
    margin-top: 8px;
    border: 1px solid #98a2b3;
}

.payslip-signature {
    align-items: end;
    margin-top: 22px;
}

.payslip-signature span {
    display: block;
    width: 42%;
    border-top: 1px solid #111827;
    padding-top: 6px;
    color: #475467;
    text-align: center;
}

.dossier-page {
    border: 1px solid #98a2b3;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    padding: 22px;
}

.dossier-title {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    border-bottom: 2px solid #111827;
    padding-bottom: 14px;
}

.dossier-identity {
    display: flex;
    align-items: center;
    gap: 14px;
}

.report-logo {
    width: 62px;
    height: 62px;
}

.dossier-identity .avatar {
    width: 58px;
    height: 58px;
    flex-basis: 58px;
}

.dossier-title h1 {
    margin: 2px 0;
    font-size: 24px;
}

.dossier-title span,
.dossier-print-meta span {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.dossier-title p {
    margin: 0;
    color: #475467;
}

.dossier-print-meta {
    display: grid;
    align-content: start;
    justify-items: end;
    min-width: 120px;
}

.dossier-section {
    margin-top: 18px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.dossier-section h2 {
    margin: 0 0 8px;
    font-size: 15px;
}

.acceptance-term {
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #f8fafc;
    padding: 14px;
}

.acceptance-term p {
    margin: 0;
    color: #111827;
    font-size: 14px;
    line-height: 1.65;
}

.acceptance-evidence {
    display: grid;
    justify-items: start;
    gap: 8px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #ffffff;
    padding: 14px;
}

.acceptance-evidence img {
    display: block;
    width: min(100%, 520px);
    max-height: 340px;
    object-fit: contain;
    border: 1px solid #eaecf0;
    border-radius: 6px;
    background: #ffffff;
}

.acceptance-validation-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #f8fafc;
    padding: 14px;
}

.acceptance-validation-box p {
    margin: 4px 0;
}

.acceptance-qr {
    width: 108px;
    height: 108px;
    object-fit: contain;
    border: 1px solid #d0d5dd;
    border-radius: 6px;
    background: #ffffff;
    padding: 6px;
}

.validation-result.valid {
    border-color: #86efac;
}

.validation-result.invalid {
    border-color: #fecdd3;
}

.dossier-table {
    min-width: 0;
    border: 1px solid #98a2b3;
    font-size: 12px;
}

.dossier-table th,
.dossier-table td {
    border: 1px solid #d0d5dd;
    padding: 6px 8px;
}

.dossier-table th {
    color: #344054;
    background: #f2f4f7;
}

.attachment-page {
    border: 1px solid #98a2b3;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    padding: 18px;
    break-before: page;
    page-break-before: always;
}

.attachment-title {
    border-bottom: 1px solid #98a2b3;
    margin-bottom: 14px;
    padding-bottom: 10px;
}

.attachment-title span {
    color: #667085;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
}

.attachment-title h2 {
    margin: 2px 0;
    font-size: 18px;
}

.attachment-title p,
.attachment-note {
    margin: 0;
    color: #667085;
}

.print-attachment-image {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 245mm;
    margin: 0 auto;
    object-fit: contain;
}

.print-attachment-pdf {
    display: block;
    width: 100%;
    height: 245mm;
    border: 1px solid #d0d5dd;
}

.attachment-note {
    margin-top: 8px;
    font-size: 12px;
}

.login-body {
    display: grid;
    min-height: 100vh;
    place-items: center;
    background: #eef4f8;
}

.auth-wrap {
    width: min(520px, calc(100vw - 32px));
}

.public-wrap {
    width: min(1040px, calc(100vw - 32px));
}

.login-card {
    padding: 26px;
    box-shadow: var(--shadow);
}

.caps-warning {
    margin: -4px 0 2px;
    color: var(--warning);
    font-size: 13px;
    font-weight: 800;
}

.public-card {
    width: 100%;
}

.employee-update-card {
    max-width: 1040px;
}

.public-card .login-heading {
    align-items: flex-start;
}

.public-card .auth-logo {
    width: 56px;
    height: 56px;
}

.public-form {
    margin-top: 18px;
}

.public-docs-form {
    margin-top: 18px;
}

.poster-workspace {
    display: grid;
    grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
    gap: 22px;
    align-items: start;
}

.poster-preview {
    display: block;
    width: min(100%, 420px);
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #ffffff;
    box-shadow: var(--shadow-soft);
}

.poster-tools {
    display: grid;
    gap: 14px;
    min-width: 0;
}

.interview-form {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--line-soft);
}

.simple-list {
    margin: 0;
    padding-left: 18px;
}

.login-heading {
    margin-bottom: 22px;
}

.login-heading h1 {
    font-size: 24px;
    min-width: 0;
}

.installer-card {
    width: min(640px, calc(100vw - 32px));
}

.installer-card h2 {
    margin: 8px 0 0;
    font-size: 16px;
}

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

    .sidebar {
        position: sticky;
        top: 0;
        z-index: 30;
        display: block;
        height: auto;
        padding: 10px 12px;
        overflow: visible;
    }

    .brand {
        margin-bottom: 10px;
        padding-bottom: 10px;
    }

    .nav-list {
        display: flex;
        align-items: flex-start;
        gap: 8px;
        overflow-x: auto;
        padding: 0 0 4px;
        scroll-snap-type: x proximity;
    }

    .nav-list > .nav-link,
    .nav-group {
        flex: 0 0 auto;
        scroll-snap-align: start;
    }

    .nav-group {
        min-width: 176px;
    }

    .nav-link {
        min-height: 38px;
        padding: 7px 10px;
    }

    .nav-sublist {
        margin: 5px 0 0;
        padding-left: 0;
        border-left: 0;
    }

    .nav-sublink {
        min-height: 34px;
        padding: 6px 10px;
    }

    .content {
        padding: 18px;
    }

    .stats-grid,
    .detail-grid,
    .cap-summary-grid,
    .cap-progress-grid,
    .time-clock-grid,
    .report-card-grid,
    .allocation-grid,
    .org-branches,
    .org-position-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .poster-workspace {
        grid-template-columns: 1fr;
    }

}

@media (max-width: 680px) {
    body {
        font-size: 14px;
    }

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

    .sidebar {
        padding: 9px 10px;
    }

    .brand {
        gap: 9px;
        margin-bottom: 8px;
        padding-bottom: 8px;
    }

    .brand strong {
        font-size: 14px;
    }

    .brand-logo {
        width: 38px;
        height: 38px;
    }

    .auth-logo,
    .public-card .auth-logo {
        width: 52px;
        height: 52px;
    }

    .topbar,
    .section-head,
    .profile-head,
    .public-training-head,
    .acceptance-validation-box {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
    }

    .topbar {
        margin-bottom: 16px;
        padding-bottom: 14px;
    }

    .topbar h1 {
        font-size: 24px;
        line-height: 1.15;
    }

    .panel {
        margin-bottom: 12px;
        padding: 14px;
    }

    .button {
        min-height: 42px;
    }

    .profile-head .button {
        margin-left: 0;
    }

    .profile-actions {
        margin-left: 0;
    }

    .user-menu,
    .profile-actions,
    .form-actions,
    .toolbar,
    .compact-form,
    .inline-filter {
        align-items: stretch;
        flex-direction: column;
    }

    .user-menu {
        gap: 8px;
        white-space: normal;
    }

    .user-menu span {
        justify-items: start;
    }

    .section-head .button,
    .copy-field .button,
    .toolbar .button,
    .compact-form .button,
    .form-actions .button,
    .user-menu .button {
        width: 100%;
    }

    .stats-grid,
    .detail-grid,
    .cap-summary-grid,
    .cap-progress-grid,
    .time-clock-grid,
    .time-clock-status,
    .time-clock-actions,
    .report-tabs,
    .report-card-grid,
    .allocation-grid,
    .org-branches,
    .org-position-grid,
    .form-grid,
    .form-grid.single,
    .copy-field,
    .optional-grid,
    .repeat-row,
    .benefit-row {
        grid-template-columns: 1fr;
    }

    .org-tree-card {
        padding: 16px;
    }

    .org-root-node {
        justify-self: stretch;
        min-width: 0;
    }

    .org-branches::before {
        display: none;
    }

    .public-cap-tabs,
    .report-tabs,
    .integration-item-head {
        grid-template-columns: 1fr;
    }

    .cap-welcome {
        grid-template-columns: 1fr;
    }

    .cap-welcome-media,
    .cap-welcome-media img {
        min-height: 210px;
    }

    .cap-welcome-copy {
        padding: 18px;
    }

    .cap-welcome-copy h2 {
        font-size: 22px;
    }

    .integration-document {
        align-items: stretch;
        flex-direction: column;
    }

    .evaluation-criterion {
        grid-template-columns: 1fr;
    }

    .radio-pair {
        justify-content: stretch;
    }

    .radio-pill {
        flex: 1 1 120px;
    }

    .evaluation-preview {
        align-items: stretch;
        flex-direction: column;
    }

    .span-2 {
        grid-column: span 1;
    }

    .data-list {
        grid-template-columns: 1fr;
    }

    .birthday-item {
        grid-template-columns: 1fr;
        align-items: stretch;
    }

    .birthday-age {
        white-space: normal;
    }

    input,
    select,
    textarea {
        min-height: 44px;
    }

    .modal-backdrop {
        align-items: stretch;
        padding: 0;
        place-items: stretch;
    }

    .modal-panel {
        width: 100%;
        max-height: 100dvh;
        min-height: 100dvh;
        border-radius: 0;
        padding: 14px;
    }

    .company-list-panel .table-wrap {
        overflow: visible;
        border: 0;
        background: transparent;
    }

    .companies-table {
        display: block;
        min-width: 0;
        background: transparent;
        table-layout: auto;
    }

    .companies-table thead {
        display: none;
    }

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

    .companies-table tr {
        margin-bottom: 12px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: var(--shadow-soft);
    }

    .companies-table td {
        display: grid;
        grid-template-columns: 96px minmax(0, 1fr);
        gap: 8px;
        padding: 8px 10px;
        border-bottom: 1px solid var(--line-soft);
        text-align: left !important;
        white-space: normal !important;
    }

    .companies-table td::before {
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .companies-table td:nth-child(1) {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .companies-table td:nth-child(1)::before,
    .companies-table td:nth-child(11)::before {
        display: none;
    }

    .companies-table td:nth-child(2)::before {
        content: "Tipo";
    }

    .companies-table td:nth-child(3)::before {
        content: "CNPJ";
    }

    .companies-table td:nth-child(4)::before {
        content: "Telefone";
    }

    .companies-table td:nth-child(5)::before {
        content: "Contábil";
    }

    .companies-table td:nth-child(6)::before {
        content: "Reg.";
    }

    .companies-table td:nth-child(7)::before {
        content: "Aloc.";
    }

    .companies-table td:nth-child(8)::before {
        content: "Aval.";
    }

    .companies-table td:nth-child(9)::before {
        content: "Ponto";
    }

    .companies-table td:nth-child(10)::before {
        content: "Remessa";
    }

    .companies-table td:nth-child(11)::before {
        display: none;
    }

    .companies-table td:nth-child(11) {
        display: block;
        border-bottom: 0;
    }

    .companies-table td:nth-child(11) > .inline-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    .companies-table td:nth-child(11) form.inline-actions {
        display: block;
    }

    .companies-table td:nth-child(11) .button,
    .companies-table td:nth-child(11) button {
        width: 100%;
    }
}

@media print {
    @page {
        margin: 8mm;
    }

    body,
    .print-body {
        background: #ffffff;
        padding: 0;
    }

    .print-toolbar,
    .sidebar,
    .topbar,
    .flash {
        display: none !important;
    }

    .print-stack {
        display: block;
        width: 100%;
        margin: 0;
    }

    .payslip-sheet {
        break-after: page;
        page-break-after: always;
        gap: 6px;
    }

    .payslip-page {
        border-radius: 0;
        box-shadow: none;
    }

    .payslip-logo {
        width: 32px;
        height: 32px;
    }

    .report-logo {
        width: 50px;
        height: 50px;
    }

    .dossier-page {
        border: 0;
        border-radius: 0;
        padding: 0;
    }

    .attachment-page {
        border: 0;
        border-radius: 0;
        padding: 0;
    }

    .payslip-sheet:last-child {
        break-after: auto;
        page-break-after: auto;
    }
}

/* Codex mobile overflow hardening */
@media screen {
    html,
    body {
        max-width: 100%;
    }

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

    .app-shell,
    .content,
    .sidebar,
    .panel,
    .profile-head,
    .topbar,
    .section-head,
    .stat-card,
    .form-tabs,
    .form-tab-panel,
    .table-wrap,
    .training-card,
    .public-card,
    .login-card {
        min-width: 0;
    }
}

@media screen and (max-width: 980px) {
    body {
        overflow-x: hidden;
    }

    .app-shell {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .sidebar {
        width: 100%;
        max-width: 100%;
    }

    .nav-list {
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        -webkit-overflow-scrolling: touch;
    }

    .nav-list > .nav-link,
    .nav-group {
        max-width: min(72vw, 260px);
    }

    .nav-sublist,
    .nav-subgroup-links {
        max-width: 100%;
        min-width: 0;
    }

    .nav-link span,
    .nav-sublink span {
        max-width: 100%;
    }
}

@media screen and (max-width: 680px) {
    .content {
        width: 100%;
        max-width: 100%;
        padding: 12px 10px 22px;
    }

    .sidebar {
        padding: 8px 10px;
    }

    .brand {
        max-width: 100%;
    }

    .brand strong,
    .topbar h1,
    .topbar p,
    .section-head h2,
    .section-head p,
    .profile-head h2,
    .profile-head p,
    .panel h2,
    .flash,
    .notice,
    .copy-link {
        overflow-wrap: anywhere;
    }

    .topbar > div,
    .section-head > div,
    .profile-head > div,
    .public-training-title,
    .training-card-head > div {
        min-width: 0;
    }

    .user-menu {
        width: 100%;
    }

    .user-menu span {
        justify-items: start;
        text-align: left;
    }

    .panel,
    .profile-head,
    .login-card,
    .public-card,
    .training-card {
        padding: 14px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card span,
    .stat-card strong,
    .stat-card small {
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .stat-card strong,
    .cap-summary-card strong,
    .cap-progress-card strong {
        font-size: 24px;
        line-height: 1.12;
    }

    .button {
        max-width: 100%;
        white-space: normal;
        text-align: center;
    }

    .button.compact {
        min-height: 36px;
    }

    .toolbar,
    .compact-form,
    .inline-filter,
    .form-actions {
        width: 100%;
    }

    .toolbar > *,
    .compact-form > *,
    .inline-filter > *,
    .form-actions > * {
        min-width: 0;
    }

    .search-field {
        width: 100%;
        min-width: 0;
    }

    .form-grid > *,
    .optional-grid > *,
    .repeat-row > *,
    .training-position-grid,
    .span-2 {
        min-width: 0;
        grid-column: 1 / -1;
    }

    .repeat-head {
        align-items: stretch;
        flex-direction: column;
    }

    input:not([type="checkbox"]):not([type="radio"]),
    select,
    textarea {
        max-width: 100%;
        min-width: 0;
    }

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

    .form-tab-list {
        flex-wrap: nowrap;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .form-tab {
        flex: 0 0 auto;
        max-width: calc(100vw - 32px);
        white-space: nowrap;
    }

    .public-cap-tabs {
        display: flex;
        max-width: 100%;
        overflow-x: auto;
        overflow-y: hidden;
        padding-bottom: 2px;
        -webkit-overflow-scrolling: touch;
    }

    .public-cap-tabs a {
        flex: 0 0 190px;
        white-space: nowrap;
    }

    .table-wrap,
    .table-wrap.slim,
    .table-wrap.no-scroll-x {
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table-wrap > table:not(.employees-table):not(.companies-table) {
        width: max-content;
        min-width: min(680px, calc(100vw - 36px));
    }

    .experience-evaluation-table {
        min-width: 760px;
    }

    .payroll-table {
        min-width: 900px;
    }

    .employees-table {
        display: block;
        min-width: 0;
        background: transparent;
        table-layout: auto;
    }

    .employees-table thead {
        display: none;
    }

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

    .employees-table tr {
        margin-bottom: 12px;
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 8px;
        background: #ffffff;
        box-shadow: var(--shadow-soft);
    }

    .employees-table td {
        display: grid;
        grid-template-columns: minmax(88px, 32%) minmax(0, 1fr);
        gap: 8px;
        padding: 9px 10px;
        border-bottom: 1px solid var(--line-soft);
        text-align: left !important;
        white-space: normal !important;
    }

    .employees-table td::before {
        color: var(--muted);
        font-size: 11px;
        font-weight: 800;
        text-transform: uppercase;
    }

    .employees-table td:nth-child(1) {
        grid-template-columns: 1fr;
        padding: 12px;
    }

    .employees-table td:nth-child(1)::before,
    .employees-table td:nth-child(8)::before {
        display: none;
    }

    .employees-table td:nth-child(2)::before {
        content: "Cargo";
    }

    .employees-table td:nth-child(3)::before {
        content: "Registro";
    }

    .employees-table td:nth-child(4)::before {
        content: "Alocada";
    }

    .employees-table td:nth-child(5)::before {
        content: "CPF";
    }

    .employees-table td:nth-child(6)::before {
        content: "Admissao";
    }

    .employees-table td:nth-child(7)::before {
        content: "Status";
    }

    .employees-table td:nth-child(8) {
        display: block;
        border-bottom: 0;
    }

    .employees-table td:nth-child(8) .inline-actions {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
        width: 100%;
    }

    .employees-table td:nth-child(8) .button,
    .employees-table td:nth-child(8) button {
        width: 100%;
    }

    .employees-table .person-cell {
        width: 100%;
        align-items: center;
        white-space: normal;
    }

    .employees-table .person-cell span,
    .employees-table .person-cell small {
        min-width: 0;
        overflow-wrap: anywhere;
        white-space: normal;
    }

    .employees-table .empty {
        display: block;
        padding: 14px;
        text-align: center !important;
    }

    .companies-table td {
        grid-template-columns: minmax(82px, 32%) minmax(0, 1fr);
    }

    .inline-actions {
        max-width: 100%;
        flex-wrap: wrap;
        justify-content: flex-start;
    }

    .training-card-head,
    .training-card-actions,
    .training-card-meta,
    .training-metrics,
    .public-training-head {
        align-items: stretch;
        flex-direction: column;
    }

    .training-card-meta span,
    .training-metrics span {
        max-width: 100%;
        white-space: normal;
    }

    .training-metrics span {
        width: 100%;
    }

    .training-player {
        margin: 12px 0;
    }

    .training-content-fields {
        grid-template-columns: 1fr;
    }

    .training-pdf-toolbar {
        align-items: stretch;
        flex-direction: column;
    }

    .training-pdf-viewer iframe {
        min-height: 420px;
    }

    .cap-welcome-copy h2,
    .public-training-head h1 {
        overflow-wrap: anywhere;
    }
}

@media screen and (max-width: 430px) {
    .content {
        padding-right: 8px;
        padding-left: 8px;
    }

    .panel,
    .profile-head,
    .login-card,
    .public-card,
    .training-card {
        padding: 12px;
    }

    .topbar h1,
    .public-training-head h1 {
        font-size: 22px;
    }

    .employees-table td,
    .companies-table td {
        grid-template-columns: 1fr;
    }

    .employees-table td::before,
    .companies-table td::before {
        margin-bottom: -2px;
    }

    .employees-table td:nth-child(8) .inline-actions,
    .companies-table td:nth-child(11) > .inline-actions {
        grid-template-columns: 1fr;
    }

    .public-cap-tabs a {
        flex-basis: 170px;
    }
}

.time-correction-filters {
    align-items: end;
}

.time-correction-table-wrap {
    overflow-x: auto;
}

.time-correction-table th,
.time-correction-table td {
    white-space: nowrap;
    vertical-align: middle;
}

.time-correction-table tr.has-issue td {
    background: #fff7ed;
}

.time-punch-button {
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #fff;
    color: #0f172a;
    cursor: pointer;
    font: inherit;
    min-width: 54px;
    padding: 5px 8px;
}

.time-punch-button:hover {
    border-color: #2563eb;
}

.time-punch-button.corrected {
    border-color: #f59e0b;
    background: #fffbeb;
}

.time-punch-button.missing {
    border-style: dashed;
    color: #b45309;
}

.time-punch-button:disabled {
    cursor: not-allowed;
    opacity: .65;
}

.time-issues {
    min-width: 220px;
    white-space: normal;
}

.time-correction-modal {
    max-width: 760px;
}

.time-correction-modal code {
    white-space: normal;
    word-break: break-word;
}
