:root {
    --bg: #f5f7fa;
    --surface: #ffffff;
    --surface-soft: #f8fafc;
    --line: #d7dee8;
    --line-soft: #edf1f6;
    --border: #d7dee8;
    --text: #101828;
    --muted: #667085;
    --brand: #D80810;
    --brand-dark: #AF060D;
    --brand-soft: #FFF0F1;
    --accent: #00A8C0;
    --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;
}

[hidden] {
    display: none !important;
}

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 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;
}

.global-system-search {
    position: relative;
    z-index: 45;
    margin: 0 0 12px;
}

.global-system-search-field {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 9px;
    border: 1px solid rgba(148, 163, 184, 0.34);
    border-radius: 8px;
    background: rgba(15, 23, 42, 0.82);
    color: #cbd5e1;
    transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.global-system-search-field:focus-within {
    border-color: #2dd4bf;
    background: #0f172a;
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.14);
}

.global-system-search-field .icon {
    width: 17px;
    height: 17px;
}

.global-system-search-field input {
    width: 100%;
    min-width: 0;
    height: 38px;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #f8fafc;
    font: inherit;
    font-size: 13px;
}

.global-system-search-field input::placeholder {
    color: #94a3b8;
}

.global-system-search-field kbd {
    padding: 3px 5px;
    border: 1px solid rgba(148, 163, 184, 0.26);
    border-radius: 5px;
    background: rgba(30, 41, 59, 0.92);
    color: #94a3b8;
    font-size: 9px;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.global-system-search-results {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    width: min(430px, calc(100vw - 28px));
    max-height: min(520px, calc(100vh - 150px));
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #dbe3ec;
    border-radius: 10px;
    background: #ffffff;
    box-shadow: 0 22px 50px rgba(15, 23, 42, 0.26);
}

.global-system-search-results[hidden] {
    display: none;
}

.global-system-search-result {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    border-radius: 7px;
    color: #0f172a;
    text-decoration: none;
}

.global-system-search-result + .global-system-search-result {
    border-top: 1px solid #eef2f7;
}

.global-system-search-result:hover,
.global-system-search-result.active {
    background: #ecfdf9;
    color: #0f766e;
}

.global-system-search-result strong {
    font-size: 13px;
    line-height: 1.25;
}

.global-system-search-result small {
    margin: 0;
    color: #64748b;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.25;
}

.global-system-search-empty {
    padding: 13px 12px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.35;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.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-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    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: 13px;
    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: flex-start;
    gap: 8px;
    padding: 7px 10px;
    border-radius: 6px;
    color: #c9d4e2;
    font-size: 13px;
    font-weight: 600;
    transition: background 140ms ease, color 140ms ease;
}

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

.nav-sublink span,
.nav-subgroup-button span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    line-height: 1.25;
}

.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-head .inline-actions {
    align-items: flex-end;
}

.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-access {
    border-top: 4px solid #16a34a;
}

.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-access .module-card-icon {
    background: #dcfce7;
    color: #15803d;
}

.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-link.active {
    border-color: var(--brand);
    box-shadow: 0 10px 22px rgba(15, 118, 110, 0.12);
}

.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;
}

.vt-close-table {
    min-width: 0;
    font-size: 13px;
}

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

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

.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: 1420px;
    table-layout: fixed;
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
}

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

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

/* 16 colunas: Funcionário, Cargo, Salário, Proventos, Quebra de caixa, INSS, IRRF,
   Adiant., Convênio, Vale Transporte, Ocorrências, Férias, Admissão, Outros, Líquido, ações.
   Cada uma tem largura própria para caber o rótulo sem quebrar letra a letra - a tabela
   toda pode ficar mais larga que a tela porque .table-wrap já rola horizontalmente. */
.payroll-table th:nth-child(1),
.payroll-table td:nth-child(1) {
    width: 132px;
}

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

.payroll-table th:nth-child(n+3):nth-child(-n+15),
.payroll-table td:nth-child(n+3):nth-child(-n+15) {
    text-align: right;
    white-space: normal;
    overflow-wrap: break-word;
}

.payroll-table th:nth-child(16),
.payroll-table td:nth-child(16) {
    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 {
    display: block;
    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;
}

.vacancy-table {
    table-layout: fixed;
    min-width: 920px;
}

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

.vacancy-table .vacancy-col,
.vacancy-table td.vacancy-cell {
    width: 26%;
}

.vacancy-table .status-cell {
    text-align: center;
}

.vacancy-cell strong {
    display: block;
}

.vacancy-preview {
    margin: 4px 0;
    color: var(--muted);
    font-size: 12.5px;
    line-height: 1.4;
}

.link-button {
    border: 0;
    background: none;
    padding: 0;
    color: var(--brand);
    font-size: 12.5px;
    font-weight: 700;
    cursor: pointer;
}

.link-button:hover {
    text-decoration: underline;
}

.vacancy-detail-section {
    margin-top: 16px;
}

.vacancy-detail-section h3 {
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: 0.02em;
}

.vacancy-detail-section p {
    margin: 0;
    white-space: pre-wrap;
}

@media (max-width: 860px) {
    .vacancy-table th:nth-child(2),
    .vacancy-table td:nth-child(2),
    .vacancy-table th:nth-child(6),
    .vacancy-table td:nth-child(6),
    .vacancy-table th:nth-child(7),
    .vacancy-table td:nth-child(7) {
        display: none;
    }
}

tbody tr.highlight {
    background: #eefaf1;
}

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;
    flex-wrap: wrap;
    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;
}

/* Barra de rolagem horizontal única, fixa na parte inferior da tela (seção 2
   do pedido de melhorias) - fica visível enquanto a tabela larga estiver
   visível na tela, sem precisar descer até o rodapé para alcançar a rolagem
   nativa do .table-wrap. Injetada via JS (ver layout()) só quando a tabela
   realmente é mais larga que o wrapper, e acompanha a posição de rolagem da
   página (aparece/some conforme a tabela entra e sai da tela). */
.table-wrap-bottomscroll {
    position: fixed;
    left: 0;
    bottom: 0;
    height: 14px;
    overflow-x: auto;
    overflow-y: hidden;
    background: #ffffff;
    border-top: 1px solid var(--line-soft);
    box-shadow: 0 -2px 8px rgba(16, 24, 40, 0.06);
    scrollbar-width: thin;
    scrollbar-color: #a8b3c2 transparent;
    z-index: 35;
}

.table-wrap-bottomscroll[hidden] {
    display: none;
}

.table-wrap-bottomscroll > div {
    height: 1px;
}

.table-wrap-bottomscroll::-webkit-scrollbar {
    height: 10px;
}

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

.payslip-table {
    table-layout: fixed;
    min-width: 1180px;
    font-size: 13px;
}

.payslip-table th,
.payslip-table td {
    padding: 9px 8px;
    line-height: 1.3;
    vertical-align: top;
    overflow-wrap: anywhere;
}

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

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

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

.payslip-table th:nth-child(4),
.payslip-table td:nth-child(4),
.payslip-table th:nth-child(5),
.payslip-table td:nth-child(5),
.payslip-table th:nth-child(6),
.payslip-table td:nth-child(6) {
    width: 110px;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.payslip-table th:nth-child(7),
.payslip-table td:nth-child(7),
.payslip-table th:nth-child(8),
.payslip-table td:nth-child(8) {
    width: 165px;
}

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

.payslip-table td strong {
    font-size: 13.5px;
}

.payslip-table td small {
    color: var(--muted);
    font-size: 11.5px;
}

.payslip-table .status {
    min-height: 22px;
    padding: 3px 7px;
    font-size: 11px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.payslip-table .inline-actions {
    justify-content: flex-start;
    margin-top: 4px;
}

.payslip-table .button.compact {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 12px;
}

/* Ações (Imprimir/Enviar) da lista de Holerites em pilha vertical, largura
   uniforme, mesma lógica já usada na tela de Vagas (ver .vacancy-table
   abaixo) - evita que a coluna fique alinhada à direita quando só há um
   botão e à esquerda quando há dois (botões empilhados). */
.payslip-table td:nth-child(9) .inline-actions {
    flex-direction: column;
    align-items: stretch;
}

.payslip-table td:nth-child(9) .button.compact {
    width: 100%;
    justify-content: center;
    text-align: center;
}

/* Seção 6 do pedido: Link/Ações da tela de Vagas em pilha vertical, largura
   uniforme, em vez de botões soltos lado a lado numa coluna estreita. */
.vacancy-table td:nth-child(7) .inline-actions,
.vacancy-table td:nth-child(8) .inline-actions {
    flex-direction: column;
    align-items: stretch;
}

.vacancy-table td:nth-child(7) .button.compact,
.vacancy-table td:nth-child(8) .button.compact {
    width: 100%;
    justify-content: center;
    text-align: center;
}

.candidate-table {
    table-layout: fixed;
    min-width: 980px;
    font-size: 13px;
}

.candidate-table th,
.candidate-table td {
    padding: 9px 8px;
    line-height: 1.3;
    vertical-align: top;
}

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

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

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

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

.candidate-table td small {
    color: var(--muted);
    font-size: 11.5px;
}

.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;
}

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

.toolbar-row .toolbar {
    margin-bottom: 0;
    flex: 1 1 auto;
}

.toolbar-row form:not(.toolbar) {
    margin: 0 0 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;
}

/* Acompanhamento de treinamentos: alinha ações à base dos selects. */
.training-follow-up-filter {
    align-items: flex-end;
    flex-wrap: wrap;
}

.training-follow-up-filter label {
    flex: 1 1 280px;
    min-width: 240px;
}

.training-follow-up-filter .button {
    min-height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: 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;
}

fieldset.span-2 {
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 14px;
}

fieldset legend {
    padding: 0 6px;
    color: var(--text);
    font-weight: 800;
}

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

.check-option {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 9px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 8px;
    background: #fff;
}

.check-option input {
    width: auto;
}

.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;
}

.fm-company-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    column-gap: 22px;
    row-gap: 4px;
    margin-top: 4px;
}

.fm-company-grid .check-row {
    min-height: 34px;
    margin: 0;
    white-space: normal;
}

@media (min-width: 1600px) {
    .fm-company-grid {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 1180px) {
    .fm-company-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .fm-company-grid {
        grid-template-columns: 1fr;
    }
}

.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.compact {
    gap: 10px;
    padding: 14px 16px;
}

.training-card.compact .training-metrics span {
    min-height: 28px;
    padding: 5px 9px;
    font-size: 12px;
}

.training-card.compact .training-metrics strong {
    font-size: 15px;
}

.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-thumb {
    width: 96px;
    height: 54px;
    object-fit: cover;
    border-radius: 6px;
    background: var(--surface-soft);
    flex-shrink: 0;
}

.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-position-node.org-color-0 { border-color: #bfdbfe; background: #f8fbff; color: #1e40af; }
.org-position-node.org-color-0 strong { background: #dbeafe; color: #1d4ed8; }

.org-position-node.org-color-1 { border-color: #bbf7d0; background: #f3fdf6; color: #166534; }
.org-position-node.org-color-1 strong { background: #dcfce7; color: #15803d; }

.org-position-node.org-color-2 { border-color: #e9d5ff; background: #fbf6ff; color: #6b21a8; }
.org-position-node.org-color-2 strong { background: #f3e8ff; color: #7e22ce; }

.org-position-node.org-color-3 { border-color: #fde68a; background: #fffcf0; color: #92400e; }
.org-position-node.org-color-3 strong { background: #fef3c7; color: #b45309; }

.org-position-node.org-color-4 { border-color: #fbcfe8; background: #fef6fa; color: #9d174d; }
.org-position-node.org-color-4 strong { background: #fce7f3; color: #be185d; }

.org-position-node.org-color-5 { border-color: #a5f3fc; background: #f0fdff; color: #155e75; }
.org-position-node.org-color-5 strong { background: #cffafe; color: #0e7490; }

.org-position-node.org-color-6 { border-color: #c7d2fe; background: #f5f6ff; color: #3730a3; }
.org-position-node.org-color-6 strong { background: #e0e7ff; color: #4338ca; }

.org-position-node.org-color-7 { border-color: #fecdd3; background: #fff8f8; color: #9f1239; }
.org-position-node.org-color-7 strong { background: #ffe4e6; color: #be123c; }

.org-position-node.org-color-8 { border-color: #d9f99d; background: #f9fdf0; color: #3f6212; }
.org-position-node.org-color-8 strong { background: #ecfccb; color: #4d7c0f; }

.org-position-node.org-color-9 { border-color: #e2e8f0; background: #f8fafc; color: #334155; }
.org-position-node.org-color-9 strong { background: #f1f5f9; color: #475569; }

.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-employee-node.org-color-0 { border-color: #bfdbfe; background: #f8fbff; }
.org-employee-node.org-color-0 span { color: #1e40af; }

.org-employee-node.org-color-1 { border-color: #bbf7d0; background: #f3fdf6; }
.org-employee-node.org-color-1 span { color: #166534; }

.org-employee-node.org-color-2 { border-color: #e9d5ff; background: #fbf6ff; }
.org-employee-node.org-color-2 span { color: #6b21a8; }

.org-employee-node.org-color-3 { border-color: #fde68a; background: #fffcf0; }
.org-employee-node.org-color-3 span { color: #92400e; }

.org-employee-node.org-color-4 { border-color: #fbcfe8; background: #fef6fa; }
.org-employee-node.org-color-4 span { color: #9d174d; }

.org-employee-node.org-color-5 { border-color: #a5f3fc; background: #f0fdff; }
.org-employee-node.org-color-5 span { color: #155e75; }

.org-employee-node.org-color-6 { border-color: #c7d2fe; background: #f5f6ff; }
.org-employee-node.org-color-6 span { color: #3730a3; }

.org-employee-node.org-color-7 { border-color: #fecdd3; background: #fff8f8; }
.org-employee-node.org-color-7 span { color: #9f1239; }

.org-employee-node.org-color-8 { border-color: #d9f99d; background: #f9fdf0; }
.org-employee-node.org-color-8 span { color: #3f6212; }

.org-employee-node.org-color-9 { border-color: #e2e8f0; background: #f8fafc; }
.org-employee-node.org-color-9 span { color: #334155; }

.org-employee-node.org-vacancy {
    align-items: center;
    justify-items: center;
    border: 1px dashed #fca5a5;
    background: #fef2f2;
}

.org-employee-node.org-vacancy span {
    color: #b91c1c;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.org-position-excess {
    color: #b45309;
    font-weight: 700;
    white-space: nowrap;
}

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

.org-hiring-list li {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 12px;
    border: 1px solid #fecdd3;
    border-radius: 8px;
    background: #fff5f5;
    color: #9f1239;
    font-weight: 700;
}

.org-hiring-total {
    margin: 0;
    font-weight: 700;
}

.org-chart-legend p {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 4px 0;
    color: var(--muted);
    font-size: 13px;
}

.org-legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 999px;
    flex: none;
}

.org-legend-dot.org-legend-filled {
    border: 1px solid var(--line-soft);
    background: #ffffff;
}

.org-legend-dot.org-legend-vacancy {
    border: 1px dashed #fca5a5;
    background: #fef2f2;
}

.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;
}

.print-stack-wide {
    width: min(1400px, 100%);
}

.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,
.dossier-section h3 {
    margin: 0 0 8px;
    font-size: 15px;
}

.dossier-section table + table {
    margin-top: 8px;
}

.dossier-net {
    margin: 6px 0 0;
    text-align: right;
    font-size: 13px;
}

.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;
}

.report-store-block {
    margin-top: 18px;
    break-inside: avoid;
    page-break-inside: avoid;
}

.report-store-block + .report-store-block {
    break-before: page;
    page-break-before: always;
}

.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;
    }

    .global-system-search {
        margin-bottom: 9px;
    }

    .global-system-search-results {
        width: min(520px, calc(100vw - 24px));
        max-height: 55vh;
    }

    .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;
    }

    .global-system-search-field kbd {
        display: none;
    }

    .global-system-search-results {
        width: calc(100vw - 20px);
    }

    .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;
    }

    .org-tree-card {
        break-inside: avoid;
        page-break-inside: avoid;
        box-shadow: none;
    }
}

/* 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;
}

.vacation-cal-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    margin-bottom: 14px;
}

.vacation-cal-nav strong {
    min-width: 160px;
    text-align: center;
    text-transform: capitalize;
}

.vacation-calendar {
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow-x: auto;
}

.vacation-cal-row {
    display: flex;
    align-items: stretch;
    border-bottom: 1px solid var(--line-soft);
}

.vacation-cal-row:last-child {
    border-bottom: none;
}

.vacation-cal-head {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-soft);
    font-weight: 700;
    font-size: 12px;
}

.vacation-cal-body {
    max-height: 68vh;
    overflow-y: auto;
}

.vacation-cal-name {
    flex: 0 0 210px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    padding: 6px 12px;
    color: var(--text);
    border-right: 1px solid var(--line-soft);
}

.vacation-cal-name small {
    color: var(--muted);
    font-size: 11px;
}

.vacation-cal-daynums,
.vacation-cal-bg {
    display: grid;
}

.vacation-cal-daynums {
    flex: 1 1 auto;
    min-width: 560px;
    align-items: center;
}

.vacation-cal-daynum {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    padding: 8px 0;
}

.vacation-cal-track {
    position: relative;
    flex: 1 1 auto;
    min-width: 560px;
}

.vacation-cal-bg {
    position: absolute;
    inset: 0;
}

.vacation-cal-bgcell {
    border-left: 1px solid var(--line-soft);
}

.vacation-cal-weekend {
    background: var(--surface-soft);
}

.vacation-cal-holiday {
    background: #fff1f2;
}

.vacation-bar {
    position: absolute;
    height: 20px;
    border-radius: 5px;
    font-size: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    white-space: nowrap;
    color: inherit;
    text-decoration: none;
}

.vacation-bar-draft {
    background: repeating-linear-gradient(45deg, #e5e7eb, #e5e7eb 6px, #f3f4f6 6px, #f3f4f6 12px);
    color: #374151;
    border: 1px dashed #9ca3af;
}

.vacation-bar-scheduled {
    background: #dbeafe;
    color: #1d4ed8;
    border: 1px solid #93c5fd;
}

.vacation-bar-in_progress {
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fcd34d;
}

.vacation-bar-completed {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid #86efac;
}

.vacation-bar-canceled {
    background: #f1f5f9;
    color: #94a3b8;
    border: 1px solid #e2e8f0;
    text-decoration: line-through;
    opacity: .7;
}

.clt-check {
    border-radius: 8px;
    padding: 12px 14px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
}

.clt-check ul {
    margin: 6px 0 0;
    padding-left: 18px;
}

.clt-check li.clt-error {
    color: #9f1239;
}

.clt-check li.clt-warning {
    color: #92400e;
}

.clt-check.clt-ok {
    background: var(--success-bg);
    border-color: #86efac;
    color: var(--success-text);
}


/* Backup local: mantém o card compacto mesmo com muitos arquivos. */
.backup-list-scroll {
    max-height: 340px;
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.backup-list-scroll thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--surface-soft);
}

/* Desempenho: terceiro nível para Modelos de Avaliações / Avaliações. */
.nav-subgroup {
    display: grid;
    gap: 2px;
}

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

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

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

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

.nav-subgroup > .nav-sublist {
    margin-left: 18px;
    padding-left: 10px;
}

.compact-input {
    width: 92px;
    min-width: 72px;
}

.wide-input {
    min-width: 320px;
    width: 100%;
}

@media (max-width: 900px) {
    .nav-subgroup > .nav-sublist {
        margin-left: 0;
        padding-left: 0;
    }
    .wide-input {
        min-width: 220px;
    }
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 14px;
    margin: 10px 0 18px;
}

/* Portal do Colaborador 2026.09.12.12 */
.employee-portal-dashboard {
    display: grid;
    gap: 18px;
}

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

.employee-dashboard-card,
.employee-attention-panel,
.employee-week-panel,
.employee-quick-panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 18px;
    box-shadow: var(--shadow-soft);
}

.employee-dashboard-card {
    min-width: 0;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.employee-dashboard-card > span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.employee-dashboard-card > span .icon {
    width: 18px;
    height: 18px;
}

.employee-dashboard-card strong {
    font-size: clamp(20px, 2.4vw, 28px);
    line-height: 1.15;
    overflow-wrap: anywhere;
}

.employee-dashboard-card small {
    color: var(--muted);
    line-height: 1.35;
}

.employee-dashboard-card-warning {
    border-color: #f0d7b5;
    background: #fffaf3;
}

.employee-attention-panel,
.employee-week-panel,
.employee-quick-panel {
    padding: 20px;
}

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

.employee-dashboard-section-head h2 {
    margin: 0;
    font-size: 19px;
}

.employee-dashboard-section-head p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.employee-dashboard-section-head > span {
    min-width: 34px;
    height: 30px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 10px;
    border-radius: 999px;
    background: var(--brand-soft);
    color: var(--brand-dark);
    font-weight: 800;
}

.employee-dashboard-section-head > a {
    color: var(--brand-dark);
    font-size: 13px;
    font-weight: 800;
}

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

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

.employee-attention-item:hover {
    border-color: #efc98f;
    background: #fffaf3;
}

.employee-attention-item > span:nth-child(2) {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.employee-attention-item strong,
.employee-attention-item small {
    overflow-wrap: anywhere;
}

.employee-attention-item small {
    color: var(--muted);
}

.employee-attention-item > b {
    color: var(--muted);
    font-size: 24px;
}

.employee-attention-icon {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff1dc;
    color: var(--warning);
    font-weight: 900;
}

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

.employee-week-card {
    min-width: 0;
    min-height: 112px;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.employee-week-card > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.employee-week-card strong {
    font-size: 14px;
}

.employee-week-card small {
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.employee-week-work {
    background: #f3fbf8;
}

.employee-week-off {
    background: var(--brand-soft);
    border-color: #bfded8;
}

.employee-week-empty {
    background: var(--surface-soft);
}

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

.employee-quick-link {
    min-width: 0;
    min-height: 86px;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 14px;
    background: var(--surface-soft);
}

.employee-quick-link:hover {
    border-color: #b9d9d4;
    background: var(--brand-soft);
}

.employee-quick-link > .icon {
    width: 24px;
    height: 24px;
    flex: 0 0 auto;
    color: var(--brand-dark);
}

.employee-quick-link > span {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.employee-quick-link small {
    color: var(--muted);
    line-height: 1.3;
}

.time-clock-alert-ignore-form input[type="text"] {
    width: 170px;
    min-width: 120px;
}

@media (max-width: 980px) {
    .employee-dashboard-cards,
    .employee-quick-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .employee-week-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .employee-dashboard-cards,
    .employee-quick-grid {
        grid-template-columns: 1fr;
    }

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

    .employee-dashboard-card,
    .employee-attention-panel,
    .employee-week-panel,
    .employee-quick-panel {
        border-radius: 15px;
    }

    .employee-attention-item {
        grid-template-columns: 34px minmax(0, 1fr) auto;
        padding: 12px;
    }

    .employee-dashboard-section-head {
        align-items: flex-start;
    }

    .time-clock-alert-ignore-form {
        display: grid;
        width: 100%;
    }

    .time-clock-alert-ignore-form input[type="text"] {
        width: 100%;
    }
}


/* Ajuste pontual da tela de manutenção: campo do pacote + botão alinhados na mesma linha. */
.maintenance-update-form {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
}

.maintenance-update-form label {
    margin: 0;
}

.maintenance-update-actions {
    justify-content: flex-start;
    align-self: end;
    margin-top: 22px;
}

.maintenance-update-actions .button {
    min-height: 42px;
}

@media (max-width: 900px) {
    .maintenance-update-form {
        grid-template-columns: 1fr;
    }

    .maintenance-update-actions {
        margin-top: 0;
    }
}


/* Menu lateral: tipografia padronizada; todos os itens herdam as mesmas regras. */

/* Gestão de Documentos e Medidas Disciplinares */
.hr-doc-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 14px;
  margin-top: 16px;
}
.hr-doc-type-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 170px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, border-color .15s ease;
}
.hr-doc-type-card:hover { transform: translateY(-2px); }
.hr-doc-type-card h3 { display: flex; align-items: center; gap: 8px; margin: 0; }
.hr-doc-type-card p { flex: 1; margin: 0; }
.hr-doc-type-card .button { align-self: flex-start; }
.hr-signed-upload { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.hr-signed-upload input[type="file"] { max-width: 190px; font-size: .82rem; }
@media (max-width: 720px) {
  .hr-doc-type-grid { grid-template-columns: 1fr; }
  .hr-signed-upload { display: flex; margin-top: 6px; }
}
.hr-wizard-step {
  border: 0;
  margin: 0;
  padding: 0;
  min-width: 0;
}
.hr-wizard-step legend {
  width: 100%;
  margin: 0 0 14px;
  padding: 0 0 10px;
  border-bottom: 1px solid var(--border, #d8e0e8);
  font-weight: 700;
  font-size: 1rem;
}
.hr-wizard-progress { display: grid; gap: 8px; margin-bottom: 4px; }
.hr-wizard-bar { height: 7px; overflow: hidden; border-radius: 999px; background: rgba(127,127,127,.18); }
.hr-wizard-bar > span { display: block; height: 100%; width: 33.333%; background: currentColor; opacity: .65; border-radius: inherit; transition: width .2s ease; }
.hr-wizard-actions [hidden], .hr-wizard-step[hidden] { display: none !important; }
.hr-wizard-actions > span { display: inline-flex; gap: 8px; flex-wrap: wrap; }

/* Assistente de Regimento Interno - múltiplas jornadas */
.reg-journey-list {
  display: grid;
  gap: 14px;
}
.reg-journey-card {
  border: 1px solid var(--border, #d8e0e8);
  border-radius: 14px;
  padding: 14px;
  background: rgba(127,127,127,.035);
}
.reg-journey-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.reg-journey-head > div:first-child {
  display: grid;
  gap: 3px;
}
.review-card {
  border: 1px solid var(--border, #d8e0e8);
  border-radius: 12px;
  padding: 14px;
  background: rgba(127,127,127,.03);
}
.review-card h3 { margin: 0 0 8px; }
@media (max-width: 720px) {
  .reg-journey-head { flex-direction: column; }
}

/* Funcionários — revisão 2026.09.15.46 */
.employees-filter-panel {
    padding-bottom: 14px;
}

.employees-section-head {
    margin-bottom: 12px;
}

.employee-filter-grid {
    display: grid;
    grid-template-columns: minmax(240px, 1.5fr) minmax(150px, .8fr) minmax(180px, 1fr) minmax(120px, .55fr) auto;
    gap: 10px;
    align-items: end;
}

.employee-filter-grid label {
    min-width: 0;
}

.employee-filter-actions,
.employee-secondary-actions,
.employee-row-actions {
    display: flex;
    gap: 7px;
    align-items: center;
    flex-wrap: wrap;
}

.employee-filter-actions {
    flex-wrap: nowrap;
}

.employee-secondary-actions {
    margin-top: 11px;
    padding-top: 10px;
    border-top: 1px solid var(--line-soft);
}

.employee-secondary-actions .muted {
    margin-right: 2px;
    font-size: 12px;
}

.employees-stats-grid {
    margin-top: 12px;
    margin-bottom: 12px;
}

.employees-list-panel .section-head {
    margin-bottom: 8px;
}

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

.employees-table th:nth-child(1),
.employees-table td:nth-child(1) { width: 210px; }
.employees-table th:nth-child(2),
.employees-table td:nth-child(2) { width: 185px; }
.employees-table th:nth-child(3),
.employees-table td:nth-child(3) { width: 220px; }
.employees-table th:nth-child(4),
.employees-table td:nth-child(4) { width: 115px; }
.employees-table th:nth-child(5),
.employees-table td:nth-child(5) { width: 92px; }
.employees-table th:nth-child(6),
.employees-table td:nth-child(6) { width: 78px; }
.employees-table th:nth-child(7),
.employees-table td:nth-child(7) { width: 190px; }

.employees-table .person-cell {
    gap: 9px;
    min-width: 0;
}

.employees-table .person-cell span {
    min-width: 0;
    overflow-wrap: anywhere;
    font-weight: 800;
}

.employee-company-stack {
    display: grid;
    gap: 5px;
    line-height: 1.15;
}

.employee-company-stack > span {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 5px;
    align-items: baseline;
    min-width: 0;
}

.employee-company-stack small {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.employee-row-actions {
    flex-wrap: nowrap;
    justify-content: flex-end;
}

.employee-actions-menu {
    position: relative;
    display: inline-block;
}

.employee-actions-menu > summary {
    list-style: none;
    cursor: pointer;
}

.employee-actions-menu > summary::-webkit-details-marker {
    display: none;
}

.employee-actions-popover {
    position: absolute;
    top: calc(100% + 5px);
    right: 0;
    z-index: 20;
    min-width: 120px;
    padding: 6px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    box-shadow: var(--shadow-soft);
}

.employee-menu-danger {
    display: block;
    padding: 8px 10px;
    border-radius: 6px;
    color: var(--danger);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.employee-menu-danger:hover {
    background: var(--danger-soft, #fff1f2);
}

.employees-table tbody tr:hover td {
    background: #fbfdfc;
}

@media (max-width: 1120px) {
    .employee-filter-grid {
        grid-template-columns: minmax(220px, 1.3fr) minmax(150px, .8fr) minmax(180px, 1fr) minmax(120px, .6fr);
    }
    .employee-filter-actions {
        grid-column: 1 / -1;
        justify-content: flex-end;
    }
}

@media (max-width: 760px) {
    .employee-filter-grid {
        grid-template-columns: 1fr;
    }
    .employee-filter-actions {
        grid-column: auto;
        justify-content: stretch;
    }
    .employee-filter-actions .button {
        flex: 1 1 0;
    }
    .employee-secondary-actions {
        align-items: stretch;
    }
    .employee-secondary-actions .muted {
        flex: 1 0 100%;
    }
    .employee-secondary-actions .button {
        flex: 1 1 150px;
    }

    .employees-table td:nth-child(1)::before,
    .employees-table td:nth-child(7)::before {
        display: none;
    }
    .employees-table td:nth-child(2)::before { content: "Cargo"; }
    .employees-table td:nth-child(3)::before { content: "Registro / Alocação"; }
    .employees-table td:nth-child(4)::before { content: "CPF"; }
    .employees-table td:nth-child(5)::before { content: "Admissão"; }
    .employees-table td:nth-child(6)::before { content: "Status"; }
    .employees-table td:nth-child(7) {
        display: block;
        border-bottom: 0;
    }
    .employees-table td:nth-child(7) .inline-actions {
        display: flex;
        flex-wrap: wrap;
        width: 100%;
    }
    .employees-table td:nth-child(7) .button,
    .employees-table td:nth-child(7) button {
        flex: 1 1 90px;
        width: auto;
    }
    .employee-company-stack > span {
        grid-template-columns: 62px minmax(0, 1fr);
    }
    .employee-actions-menu {
        flex: 1 1 90px;
    }
    .employee-actions-menu > summary {
        width: 100%;
        text-align: center;
    }
    .employee-actions-popover {
        position: static;
        margin-top: 6px;
    }
}

/* Dashboard aniversariantes - revisão 2026.09.15.48 */
.birthday-panel {
    background: linear-gradient(180deg, #f8fdff 0%, #f0f9ff 100%);
    border-color: #bae6fd;
}

.birthday-panel-head {
    margin-bottom: 14px;
}

.birthday-panel-head .eyebrow {
    margin: 0 0 3px;
    color: #0284c7;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.birthday-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}

.birthday-summary-card {
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: rgba(255, 255, 255, .92);
}

.birthday-summary-card span,
.birthday-summary-card small {
    display: block;
    color: var(--muted);
}

.birthday-summary-card span {
    font-size: 12px;
    font-weight: 700;
}

.birthday-summary-card strong {
    display: block;
    margin: 4px 0 1px;
    color: #0c4a6e;
    font-size: 24px;
    line-height: 1;
}

.birthday-summary-card small {
    font-size: 11px;
}

.birthday-summary-card.emphasis {
    border-color: #bbf7d0;
    background: #f0fdf4;
}

.birthday-summary-card.emphasis strong {
    color: #047857;
}

.birthday-summary-card.muted-card {
    border-color: #e5e7eb;
    background: #f8fafc;
}

.birthday-summary-card.muted-card strong {
    color: #475569;
}

.birthday-toolbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 12px;
    margin: 0 0 14px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    background: #ffffff;
}

.birthday-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.birthday-filter-button {
    min-height: 34px;
    padding: 7px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    background: #ffffff;
    color: #334155;
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
}

.birthday-filter-button:hover,
.birthday-filter-button.active {
    border-color: #0f766e;
    background: #ecfdf5;
    color: #0f766e;
}

.birthday-company-filter {
    display: grid;
    gap: 4px;
    min-width: 210px;
}

.birthday-company-filter span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.birthday-company-filter select {
    min-height: 36px;
    padding-top: 6px;
    padding-bottom: 6px;
}

.birthday-section {
    margin-top: 12px;
    border: 1px solid #dbeafe;
    border-radius: 10px;
    overflow: hidden;
    background: #ffffff;
}

.birthday-section-passed {
    border-color: #e5e7eb;
}

.birthday-section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}

.birthday-section-title > div {
    display: flex;
    align-items: center;
    gap: 8px;
}

.birthday-section-title strong {
    color: #0f172a;
    font-size: 13px;
}

.birthday-section-title small {
    color: var(--muted);
    font-size: 11px;
}

.birthday-section-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.birthday-section-dot.passed {
    background: #94a3b8;
}

.birthday-section .birthday-list {
    gap: 0;
}

.birthday-card-row {
    grid-template-columns: minmax(260px, 1.6fr) minmax(145px, .7fr) auto minmax(125px, auto) auto;
    gap: 12px;
    padding: 10px 12px;
    border-top: 1px solid #eef2f7;
}

.birthday-card-row:first-child {
    padding-top: 10px;
}

.birthday-person {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: inherit;
    text-decoration: none;
}

.birthday-person > span:last-child {
    min-width: 0;
}

.birthday-person strong,
.birthday-person small {
    display: block;
}

.birthday-person strong {
    color: #0f172a;
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.birthday-person small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.birthday-card-row .birthday-date strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
}

.birthday-card-row .birthday-date small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
    font-weight: 600;
}

.birthday-profile-link {
    white-space: nowrap;
}

@media (max-width: 980px) {
    .birthday-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .birthday-toolbar {
        align-items: stretch;
        flex-direction: column;
    }
    .birthday-company-filter {
        min-width: 0;
    }
    .birthday-card-row {
        grid-template-columns: minmax(220px, 1.5fr) minmax(135px, .7fr) auto auto;
    }
    .birthday-profile-link {
        display: none;
    }
}

@media (max-width: 640px) {
    .birthday-summary-grid {
        grid-template-columns: 1fr 1fr;
    }
    .birthday-card-row {
        grid-template-columns: 1fr;
        align-items: stretch;
    }
    .birthday-person strong,
    .birthday-person small {
        white-space: normal;
    }
}

/* Portal do Colaborador — mensagem de aniversário */
.employee-birthday-banner {
    position: relative;
    overflow: hidden;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    margin: 18px 0;
    padding: 22px 24px;
    border: 1px solid #a7dccb;
    border-radius: 18px;
    background: linear-gradient(135deg, #f0fbf7 0%, #ffffff 54%, #fff9e8 100%);
    box-shadow: 0 12px 30px rgba(5, 87, 69, .10);
}
.employee-birthday-banner[hidden] { display: none !important; }
.employee-birthday-icon {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 18px;
    background: #ffffff;
    font-size: 32px;
    box-shadow: 0 8px 20px rgba(5, 87, 69, .10);
}
.employee-birthday-copy { position: relative; z-index: 1; }
.employee-birthday-kicker {
    display: inline-block;
    margin-bottom: 3px;
    color: #0f766e;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.employee-birthday-copy h2 { margin: 0 0 6px; font-size: 24px; color: #073f35; }
.employee-birthday-copy p { max-width: 920px; margin: 0 0 8px; color: #365a53; line-height: 1.55; }
.employee-birthday-copy strong { color: #055745; font-size: 13px; }
.employee-birthday-close {
    position: relative;
    z-index: 2;
    align-self: start;
    width: 34px;
    height: 34px;
    border: 1px solid #cfe8df;
    border-radius: 10px;
    background: rgba(255,255,255,.86);
    color: #41665f;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
}
.employee-birthday-close:hover { background: #ffffff; color: #055745; }
.employee-birthday-sparkles {
    position: absolute;
    right: 66px;
    top: 8px;
    color: #d1a329;
    font-size: 20px;
    opacity: .55;
    transform: rotate(-5deg);
}
@media (max-width: 680px) {
    .employee-birthday-banner { grid-template-columns: auto minmax(0,1fr); padding: 18px; }
    .employee-birthday-close { position: absolute; top: 12px; right: 12px; }
    .employee-birthday-icon { width: 50px; height: 50px; border-radius: 14px; font-size: 26px; }
    .employee-birthday-copy h2 { font-size: 20px; padding-right: 26px; }
    .employee-birthday-copy p { grid-column: 1 / -1; }
    .employee-birthday-sparkles { display: none; }
}

/* Décimo terceiro — resumo executivo por parcela e por loja (.53) */

.thirteenth-config-panel {
    padding: 16px 18px;
}

.thirteenth-config-panel .section-head {
    margin-bottom: 10px;
}

.thirteenth-filter-grid {
    grid-template-columns: minmax(150px, .65fr) minmax(150px, .65fr) minmax(180px, .85fr) minmax(220px, 1.2fr) minmax(220px, 1.2fr) auto;
    gap: 10px 12px;
    align-items: end;
}

.thirteenth-filter-grid label {
    gap: 5px;
    font-size: 12px;
}

.thirteenth-filter-grid input,
.thirteenth-filter-grid select {
    min-height: 40px;
    padding-top: 8px;
    padding-bottom: 8px;
}

.thirteenth-filter-action {
    align-self: end;
}

.thirteenth-filter-action .button {
    min-height: 40px;
    white-space: nowrap;
}

.thirteenth-summary-panel {
    padding: 18px;
}

.thirteenth-summary-panel .section-head {
    margin-bottom: 12px;
}

.thirteenth-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
}

.thirteenth-summary-card {
    display: grid;
    gap: 3px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: var(--surface-soft);
}

.thirteenth-summary-card > span,
.thirteenth-summary-card > small {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.thirteenth-summary-card > strong {
    overflow: hidden;
    color: var(--text);
    font-size: 20px;
    line-height: 1.15;
    text-overflow: ellipsis;
}

.thirteenth-summary-card-total {
    border-color: #99d8cf;
    background: var(--brand-soft);
}

.thirteenth-summary-card-total > strong {
    color: var(--brand-dark);
}

.thirteenth-summary-card-people {
    background: #f8fafc;
}

.thirteenth-company-sections {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
}

.thirteenth-company-section {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line-soft);
    border-radius: 12px;
    background: #fbfcfe;
}

.thirteenth-company-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
}

.thirteenth-company-title h3 {
    margin: 0;
    font-size: 14px;
}

.thirteenth-company-title > span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

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

.thirteenth-company-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
}

.thirteenth-company-card header,
.thirteenth-company-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 9px 10px;
}

.thirteenth-company-card header {
    border-bottom: 1px solid var(--line-soft);
}

.thirteenth-company-card header > strong {
    overflow: hidden;
    font-size: 12px;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.thirteenth-company-card header > span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.thirteenth-company-values {
    display: grid;
    gap: 4px;
    padding: 7px 10px;
}

.thirteenth-company-values > div,
.thirteenth-company-card footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.thirteenth-company-values span,
.thirteenth-company-card footer span {
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.thirteenth-company-values strong,
.thirteenth-company-card footer strong {
    font-size: 12px;
}

.thirteenth-company-card footer {
    border-top: 1px solid var(--line-soft);
    background: var(--surface-soft);
}

.thirteenth-company-card footer strong {
    color: var(--brand-dark);
}

.thirteenth-installment-panel {
    padding: 16px 18px;
}

.thirteenth-installment-panel .section-head {
    margin-bottom: 10px;
}

.thirteenth-detail-toggle {
    margin: 8px 0 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--surface);
}

.thirteenth-detail-toggle > summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.thirteenth-detail-toggle > summary::-webkit-details-marker {
    display: none;
}

.thirteenth-detail-toggle > summary::after {
    content: "+";
    flex: 0 0 auto;
    color: var(--brand);
    font-size: 18px;
    line-height: 1;
}

.thirteenth-detail-toggle[open] > summary::after {
    content: "−";
}

.thirteenth-detail-toggle > summary span {
    margin-left: auto;
    color: var(--muted);
    font-size: 10px;
    font-weight: 700;
}

.thirteenth-detail-toggle .table-wrap {
    margin: 0;
    border-top: 1px solid var(--line-soft);
}

@media (max-width: 1380px) {
    .thirteenth-filter-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .thirteenth-filter-action {
        grid-column: auto;
    }
}

@media (max-width: 1100px) {
    .thirteenth-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .thirteenth-company-sections {
        grid-template-columns: 1fr;
    }
    .thirteenth-company-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .thirteenth-filter-grid,
    .thirteenth-company-grid,
    .thirteenth-summary-grid {
        grid-template-columns: 1fr;
    }
    .thirteenth-filter-action .button {
        width: 100%;
    }
    .thirteenth-company-card header > strong {
        white-space: normal;
    }
}

/* v2026.09.17.60 - cursos externos e certificados */
.training-external-link {
    margin: 12px 0;
}

.training-external-actions {
    display: grid;
    gap: 10px;
    width: 100%;
}

.training-certificate-form {
    align-items: end;
    width: 100%;
}

.certificate-upload-label {
    display: grid;
    gap: 5px;
    min-width: min(360px, 100%);
    color: var(--text);
    font-weight: 700;
    font-size: 13px;
}

.certificate-upload-label input[type="file"] {
    max-width: 100%;
    font-weight: 500;
}

@media (max-width: 720px) {
    .training-certificate-form {
        align-items: stretch;
    }

    .training-certificate-form .button {
        width: 100%;
        justify-content: center;
    }
}

/* Prestadores PJ / Fechamento PJ - 2026-09-25 v93 */
.pj-module-tabs {
    margin: 0 0 18px;
}

.pj-method-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.pj-method-chip {
    display: inline-flex;
    gap: 6px;
    align-items: center;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8fafc;
    color: var(--muted);
    font-size: 13px;
}

.pj-method-chip strong {
    color: var(--text);
}

.pj-contractor-total {
    display: grid;
    gap: 2px;
    min-width: 150px;
    text-align: right;
}

.pj-contractor-total span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.pj-contractor-total strong {
    font-size: 20px;
}

.pj-invoice-row {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: 12px;
    margin: -4px 0 14px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: #fafafa;
}

.pj-invoice-fields {
    margin: 0;
}

.pj-invoice-fields label {
    min-width: 150px;
}

.pj-installment {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-width: 290px;
    padding: 5px 0;
    border-bottom: 1px dashed var(--line-soft);
}

.pj-installment:last-child {
    border-bottom: 0;
}

.pj-paid {
    color: #047857;
}

.pj-pending {
    color: #b45309;
}

.pj-amount-input {
    min-width: 120px;
    max-width: 150px;
}

.pj-closure-contractor .table-wrap {
    margin-bottom: 0;
}

@media (max-width: 760px) {
    .pj-contractor-total {
        width: 100%;
        text-align: left;
    }
    .pj-installment {
        min-width: 240px;
        align-items: flex-start;
        flex-direction: column;
    }
    .pj-invoice-row {
        align-items: stretch;
    }
}


/* v95 - Prestadores PJ: cadastro mais leve e compacto */
.pj-register-page {
    display: grid;
    gap: 12px;
}

.pj-register-page .panel {
    padding: 14px 16px;
    border-radius: 8px;
}

.pj-register-page .section-head {
    margin-bottom: 10px;
    gap: 10px;
}

.pj-register-page .section-head h2 {
    margin-bottom: 2px;
    font-size: 18px;
}

.pj-register-page .section-head .muted {
    margin: 0;
    font-size: 13px;
}

.pj-register-page .form-stack {
    gap: 12px;
}

.pj-register-page .form-grid {
    gap: 10px 12px;
}

.pj-register-page .button.primary {
    box-shadow: none;
}


/* v97 - Prestadores: fluxo claro e checkboxes compactos */
.pj-register-page .pj-check-row {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: var(--surface-soft);
    color: var(--text);
    cursor: pointer;
}

.pj-register-page .pj-check-row input[type="checkbox"] {
    width: 18px;
    height: 18px;
    min-height: 18px;
    flex: 0 0 18px;
    margin: 2px 0 0;
    padding: 0;
    accent-color: var(--brand);
    box-shadow: none;
}

.pj-register-page .pj-check-row span {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.pj-register-page .pj-check-row strong {
    color: var(--accent);
    font-size: 13px;
}

.pj-register-page .pj-check-row small {
    color: var(--muted);
    font-size: 12px;
    font-weight: 500;
}

.pj-payment-preview {
    border-style: dashed;
    background: #fbfcfd;
}

.pj-payment-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 4px 0 10px;
}

.pj-payment-types span {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid var(--line-soft);
    border-radius: 999px;
    background: #fff;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
}

.pj-register-page .notice.compact {
    margin: 0;
    padding: 9px 11px;
    font-size: 12px;
}

/* v99 — identificação de prestadores no organograma */
.org-pj-node {
    border-style: dashed;
}
.org-pj-badge {
    display: inline-block;
    padding: 1px 6px;
    border-radius: 999px;
    background: #e0f2fe;
    color: #075985;
    font-size: 10px;
    font-weight: 800;
    line-height: 1.45;
    letter-spacing: .02em;
}


/* v100 — Prestadores PJ: layout reorganizado */
.pj-wizard-panel {
    padding: 16px 18px;
}

.pj-head-row {
    align-items: start;
}

.pj-step-line {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 2px 0 2px;
}

.pj-step-line span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 11px;
    border-radius: 999px;
    background: #f4f7fb;
    color: var(--muted);
    border: 1px solid var(--line-soft);
    font-size: 12px;
    font-weight: 700;
}

.pj-step-line .is-active {
    background: rgba(13, 148, 136, 0.10);
    color: var(--brand);
    border-color: rgba(13, 148, 136, 0.28);
}

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

.pj-card {
    padding: 14px;
    border: 1px solid var(--line-soft);
    border-radius: 10px;
    background: #fbfcfe;
}

.pj-card-title {
    margin-bottom: 10px;
}

.pj-card-title h3 {
    margin: 0 0 3px;
    font-size: 15px;
    color: var(--accent);
}

.pj-card-title p {
    margin: 0;
    font-size: 12px;
    color: var(--muted);
}

.pj-register-page .compact-grid {
    gap: 10px 12px;
}

.pj-register-page .compact-grid label > small,
.pj-register-page .compact-grid .field-note {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

.pj-register-page .compact-grid .field-note {
    padding: 8px 10px;
    border-radius: 8px;
    background: #f7fafc;
    border: 1px dashed var(--line-soft);
}

.pj-check-inline {
    margin-top: 2px;
}

.pj-footer-actions {
    margin-top: 2px;
    padding-top: 2px;
}

@media (max-width: 920px) {
    .pj-card-grid {
        grid-template-columns: 1fr;
    }
}


/* v101 — Prestadores PJ: ficha cadastral completa */
.pj-register-page .pj-readonly-info {
    background: #f7fafc;
    color: var(--accent);
    font-weight: 700;
}

.pj-validation-hint {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.pj-validation-hint.is-valid {
    color: #047857;
}

.pj-validation-hint.is-invalid {
    color: #b91c1c;
}


/* v102 — Prestadores PJ: layout compacto e equilibrado */
.pj-v102 {
    padding: 14px 16px 12px;
}

.pj-v102 .section-head {
    margin-bottom: 8px;
}

.pj-v102 .section-head h2 {
    font-size: 18px;
}

.pj-v102 .pj-step-line {
    margin: 0 0 10px;
    gap: 6px;
}

.pj-v102 .pj-step-line span {
    min-height: 26px;
    padding: 3px 9px;
    font-size: 11px;
}

.pj-section {
    padding: 12px 13px;
    border: 1px solid var(--line-soft);
    border-radius: 9px;
    background: #fff;
}

.pj-section-main {
    background: #fcfdfd;
}

.pj-section-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 9px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--line-soft);
}

.pj-section-title h3 {
    margin: 0 0 2px;
    font-size: 14px;
    color: var(--accent);
}

.pj-section-title p {
    margin: 0;
    font-size: 11.5px;
    color: var(--muted);
}

.pj-dense-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px 10px;
}

.pj-dense-grid label,
.pj-bank-grid label,
.pj-contract-grid label {
    min-width: 0;
}

.pj-dense-grid label,
.pj-bank-grid label,
.pj-contract-grid label:not(.pj-check-row) {
    font-size: 12px;
}

.pj-v102 input,
.pj-v102 select,
.pj-v102 textarea {
    min-height: 38px;
}

.pj-v102 textarea {
    min-height: 66px;
}

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

.pj-inline-note {
    margin-top: 9px;
    padding: 7px 9px;
    border-radius: 7px;
    background: #f7fafc;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.4;
}

.pj-metric {
    display: grid;
    align-content: center;
    gap: 1px;
    min-height: 62px;
    padding: 8px 10px;
    border: 1px solid var(--line-soft);
    border-radius: 7px;
    background: #f8fafc;
}

.pj-metric span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
}

.pj-metric strong {
    color: var(--accent);
    font-size: 15px;
    line-height: 1.2;
}

.pj-metric small {
    color: var(--muted);
    font-size: 10.5px;
}

.pj-split-row {
    display: grid;
    grid-template-columns: minmax(360px, .82fr) minmax(560px, 1.18fr);
    gap: 12px;
    align-items: start;
}

.pj-contract-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 10px;
}

.pj-contract-check,
.pj-notes {
    grid-column: 1 / -1;
}

.pj-contract-check {
    margin: 0;
    padding: 8px 10px;
}

.pj-contract-check strong {
    font-size: 12px;
}

.pj-contract-check small {
    font-size: 11px;
}

.pj-bank-grid {
    display: grid;
    grid-template-columns: 1.25fr .65fr 1fr 1.15fr;
    gap: 8px 10px;
}

.pj-footer-bar {
    position: sticky;
    bottom: 0;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 2px -4px -2px;
    padding: 10px 4px 4px;
    background: linear-gradient(to bottom, rgba(255,255,255,.78), #fff 36%);
}

.pj-footer-help {
    color: var(--muted);
    font-size: 11.5px;
}

.pj-v102 .pj-validation-hint {
    margin-top: 3px;
    font-size: 10.5px;
}

@media (max-width: 1180px) {
    .pj-dense-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .pj-split-row {
        grid-template-columns: 1fr;
    }
    .pj-bank-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .pj-dense-grid,
    .pj-contract-grid,
    .pj-bank-grid {
        grid-template-columns: 1fr;
    }
    .pj-span-2,
    .pj-contract-check,
    .pj-notes {
        grid-column: auto;
    }
    .pj-footer-bar {
        position: static;
        flex-direction: column;
        align-items: stretch;
    }
    .pj-footer-help {
        display: none;
    }
    .pj-footer-actions {
        justify-content: flex-end;
    }
}


/* ============================================================
   DROGARIA KOBAYASHI — identidade visual 2026.09.27
   Vermelho principal: #D80810 | Turquesa: #00A8C0
   ============================================================ */
:root {
    --kobayashi-red: #D80810;
    --kobayashi-red-dark: #AF060D;
    --kobayashi-aqua: #00A8C0;
    --kobayashi-aqua-dark: #00889B;
    --kobayashi-aqua-soft: #EAFBFD;
}

body {
    background: #f7f9fb;
}

.sidebar {
    border-right-color: rgba(0, 168, 192, 0.65);
    background: linear-gradient(180deg, #9C1016 0%, #720A0F 58%, #53070B 100%);
    box-shadow: inset -1px 0 0 rgba(255,255,255,.06), 10px 0 30px rgba(83,7,11,.08);
}

.brand {
    border-bottom-color: rgba(255,255,255,.16);
}

.brand-logo {
    width: 48px;
    height: 48px;
    padding: 2px;
    border-radius: 12px;
    background: rgba(255,255,255,.96);
    filter: drop-shadow(0 7px 15px rgba(0,0,0,.20));
}

.portal-brand .brand-logo {
    width: 44px;
    height: 44px;
}

.nav-link:hover,
.nav-sublink:hover,
.nav-link.active,
.nav-sublink.active,
.nav-subgroup-button:hover,
.nav-subgroup-button.active {
    background: rgba(0,168,192,.18);
}

.nav-link.active::before,
.nav-sublink.active::before {
    background: var(--kobayashi-aqua);
    box-shadow: 0 0 0 1px rgba(255,255,255,.10);
}

.global-system-search-field:focus-within {
    border-color: var(--kobayashi-aqua);
    background: rgba(67,5,9,.72);
    box-shadow: 0 0 0 3px rgba(0,168,192,.20);
}

.global-system-search-result:hover,
.global-system-search-result.active {
    background: var(--kobayashi-aqua-soft);
    color: var(--kobayashi-aqua-dark);
}

.button:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline-color: rgba(0,168,192,.32);
}

.button.primary {
    border-color: var(--kobayashi-red);
    background: var(--kobayashi-red);
    box-shadow: 0 8px 18px rgba(216,8,16,.20);
}

.button.primary:hover {
    border-color: var(--kobayashi-red-dark);
    background: var(--kobayashi-red-dark);
}

h2 .icon,
.section-head h2 .icon {
    color: var(--kobayashi-aqua);
}

.brand-mark {
    background: var(--kobayashi-aqua);
    box-shadow: 0 8px 20px rgba(0,168,192,.24);
}

.login-body {
    background:
        radial-gradient(circle at 18% 16%, rgba(216,8,16,.08), transparent 34%),
        radial-gradient(circle at 82% 84%, rgba(0,168,192,.11), transparent 38%),
        linear-gradient(180deg, #fbfcfd 0%, #eef5f7 100%);
}

.login-card {
    border-top: 4px solid var(--kobayashi-red);
    box-shadow: 0 22px 58px rgba(25,35,45,.13);
}

.kobayashi-login-brand {
    display: grid;
    justify-items: center;
    gap: 2px;
    margin: -8px 0 24px;
    text-align: center;
}

.login-logo {
    display: block;
    width: min(300px, 78vw);
    height: 150px;
    object-fit: contain;
}

.kobayashi-login-brand span {
    margin-top: -8px;
    color: var(--kobayashi-aqua-dark);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.auth-logo,
.report-logo,
.payslip-logo {
    padding: 2px;
    border-radius: 10px;
    background: #fff;
}

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

.report-logo,
.payslip-logo {
    object-fit: contain;
}

.panel,
.stat-card,
.profile-head {
    border-color: #e3e8ee;
}

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

.stat-card::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, var(--kobayashi-red), var(--kobayashi-aqua));
}

.portal-body {
    background: linear-gradient(180deg, #fbfcfd 0%, #eef7f8 100%);
}

.portal-brand strong,
.login-card h1 {
    color: #17212b;
}

@media (max-width: 980px) {
    .sidebar {
        background: linear-gradient(90deg, #8B0D13 0%, #65080D 100%);
    }
    .login-logo {
        width: min(260px, 78vw);
        height: 128px;
    }
}
