:root {
    --bg: #ffffff;
    --card: #ffffff;
    --text: #1a1a1a;
    --muted: #737373;
    --line: #e5e7eb;
    --green: #00a344;
    --green-dark: #007d1e;
    --green-soft: rgba(0, 163, 68, .10);
    --danger: #b42318;
    --shadow: 0 20px 50px rgba(20, 49, 34, .10);
    --topbar: rgba(255,255,255,.92);
}
html[data-theme="dark"] {
    --bg: #101915;
    --card: #17231d;
    --text: #edf6f0;
    --muted: #a9b8ae;
    --line: #2a3b31;
    --green: #5fca82;
    --green-dark: #8be5a7;
    --green-soft: rgba(95, 202, 130, .15);
    --danger: #ff938a;
    --shadow: 0 20px 50px rgba(0, 0, 0, .24);
    --topbar: rgba(16,25,21,.92);
}
*,
*::before,
*::after { box-sizing: border-box; }
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}
body {
    margin: 0;
    background: radial-gradient(circle at top left, rgba(0,163,68,.10), transparent 34%), var(--bg);
    color: var(--text);
    font-family: Montserrat, "Segoe UI", Arial, sans-serif;
}
a { color: inherit; }
.app-shell {
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
    min-height: 100vh;
    max-width: 100%;
}
.app-shell.sidebar-collapsed {
    grid-template-columns: 82px minmax(0, 1fr);
}
.sidebar {
    background: linear-gradient(180deg, var(--card) 0%, rgba(228,244,234,.78) 100%);
    border-right: 1px solid var(--line);
    box-shadow: 10px 0 35px rgba(20,49,34,.08);
    display: flex;
    flex-direction: column;
    gap: 1rem;
    height: 100vh;
    overflow: hidden;
    padding: 1.1rem;
    position: sticky;
    top: 0;
    z-index: 30;
}
html[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, #122019 0%, #17231d 100%);
}
.sidebar-head {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
}
.brand-lockup {
    align-items: center;
    display: flex;
    gap: .8rem;
    min-width: 0;
    text-decoration: none;
}
.brand-copy {
    display: grid;
    line-height: 1.15;
    white-space: nowrap;
}
.brand-copy small, .topbar small {
    color: var(--muted);
    font-weight: 700;
}
.brand-logo {
    background: var(--card);
    border: 1px solid var(--line);
    object-fit: contain;
    padding: .25rem;
}
.menu-toggle {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 8px 18px rgba(20,49,34,.08);
    cursor: pointer;
    display: inline-grid;
    flex: 0 0 auto;
    gap: 4px;
    height: 42px;
    place-content: center;
    width: 42px;
}
.menu-toggle span {
    background: var(--green-dark);
    border-radius: 99px;
    display: block;
    height: 2px;
    width: 18px;
}
.nav {
    display: grid;
    gap: .35rem;
    overflow-y: auto;
    padding-right: .15rem;
}
.nav a, .logout-link {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 16px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    font-weight: 800;
    gap: .75rem;
    min-height: 46px;
    padding: .75rem .85rem;
    text-decoration: none;
}
.nav a:hover, .nav a.active, .logout-link:hover {
    background: var(--green-soft);
    color: var(--green-dark);
}
.nav-group {
    display: grid;
    gap: .25rem;
}
.nav-parent {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 16px;
    color: var(--muted);
    cursor: pointer;
    display: flex;
    font: inherit;
    font-weight: 800;
    gap: .75rem;
    min-height: 46px;
    padding: .75rem .85rem;
    text-align: left;
    width: 100%;
}
.nav-parent:hover,
.nav-group.active .nav-parent {
    background: var(--green-soft);
    color: var(--green-dark);
}
.nav-parent b {
    margin-left: auto;
    transition: transform .18s ease;
}
.nav-group.open .nav-parent b {
    transform: rotate(180deg);
}
.nav-submenu {
    display: none;
    gap: .2rem;
    padding-left: 2.15rem;
}
.nav-group.open .nav-submenu {
    display: grid;
}
.nav-submenu a {
    border-radius: 12px;
    font-size: .86rem;
    min-height: 36px;
    padding: .55rem .7rem;
}
.nav-ico {
    background: linear-gradient(145deg, var(--green), var(--green-dark));
    border-radius: 9px;
    color: #fff;
    display: inline-grid;
    flex: 0 0 auto;
    font-size: .92rem;
    height: 26px;
    place-items: center;
    width: 26px;
}
.logout-link { margin-top: auto; }
.app-main { min-width: 0; }
.content { min-width: 0; }
.app-shell.sidebar-collapsed .brand-copy,
.app-shell.sidebar-collapsed .nav a span:not(.nav-ico),
.app-shell.sidebar-collapsed .nav-parent span:not(.nav-ico),
.app-shell.sidebar-collapsed .nav-parent b,
.app-shell.sidebar-collapsed .nav-submenu,
.app-shell.sidebar-collapsed .logout-link span:not(.nav-ico) {
    display: none;
}
.app-shell.sidebar-collapsed .sidebar-head { justify-content: center; }
.app-shell.sidebar-collapsed .brand-lockup { display: none; }
.app-shell.sidebar-collapsed .nav a,
.app-shell.sidebar-collapsed .nav-parent,
.app-shell.sidebar-collapsed .logout-link {
    justify-content: center;
    padding-inline: .55rem;
}
.topbar {
    align-items: center;
    background: var(--topbar);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.4rem;
    position: sticky;
    top: 0;
    z-index: 10;
    backdrop-filter: blur(12px);
}
.topbar h2 {
    color: var(--text);
    font-size: 1.35rem;
    font-weight: 900;
    margin: .15rem 0 .1rem;
}
.userbar {
    align-items: center;
    color: var(--muted);
    display: inline-flex;
    font-weight: 800;
    gap: .55rem;
    white-space: nowrap;
}
.notify-bell, .theme-toggle {
    align-items: center;
    border-radius: 999px;
    display: inline-grid;
    height: 42px;
    justify-content: center;
    place-items: center;
    position: relative;
    text-decoration: none;
    width: 42px;
}
.notify-bell {
    background: #fff4d8;
    border: 1px solid rgba(104, 67, 29, .12);
    box-shadow: 0 10px 24px rgba(104, 67, 29, .10);
    color: #68431d;
}
.notify-bell b {
    background: #fff4d8;
    border-radius: 999px;
    color: #68431d;
    display: inline-grid;
    font-size: .72rem;
    min-width: 22px;
    padding: .18rem .35rem;
    place-items: center;
    position: absolute;
    right: -6px;
    top: -6px;
}
.theme-toggle {
    background: var(--green-soft);
    border: 0;
    box-shadow: 0 8px 18px rgba(20,49,34,.08);
    color: var(--muted);
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    padding: 0;
}
.theme-toggle:hover {
    color: var(--green-dark);
    transform: translateY(-1px);
}
.brand {
    align-items: center;
    display: inline-flex;
    gap: .75rem;
    text-decoration: none;
}
.brand-mark {
    background: linear-gradient(135deg, var(--green), var(--green-dark));
    border-radius: 16px;
    color: #fff;
    display: grid;
    font-weight: 900;
    height: 42px;
    place-items: center;
    width: 42px;
}
.brand small, .scope-card span, small, .muted { color: var(--muted); display: block; }
.button, .ghost-button {
    border-radius: 999px;
    font-weight: 800;
    padding: .7rem 1rem;
    text-decoration: none;
}
.ghost-button {
    background: #fff;
    border: 1px solid var(--line);
}
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    background: #101915;
}
.button {
    background: var(--green);
    border: 0;
    color: #fff;
    cursor: pointer;
}
.ghost-button { color: var(--green-dark); cursor: pointer; }
.shell { margin: 0 auto; max-width: min(1320px, 100%); min-width: 0; padding: clamp(1rem, 2vw, 1.8rem); width: 100%; }
.hero-card, .admin-card {
    background: rgba(255,255,255,.94);
    border: 1px solid var(--line);
    border-radius: 28px;
    box-shadow: var(--shadow);
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    overflow-wrap: anywhere;
}
.hero-card {
    align-items: center;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding: 1.6rem;
}
.hero-card h1 { font-size: clamp(1.8rem, 3vw, 3rem); margin: .2rem 0; }
.hero-card p { color: var(--muted); margin: 0; max-width: 720px; }
.eyebrow {
    color: var(--green-dark);
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}
.scope-card {
    background: var(--green-soft);
    border-radius: 22px;
    min-width: 220px;
    padding: 1rem;
}
.action-grid {
    align-items: start;
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
    margin-bottom: 1.25rem;
    min-width: 0;
}
.admin-card { padding: clamp(1.1rem, 1.8vw, 1.55rem); }
.admin-card + .admin-card { margin-top: 1.25rem; }
.action-grid > .admin-card,
.metric-grid > .admin-card {
    margin-top: 0;
}
.admin-card h2 { margin: 0 0 1rem; }
label { color: var(--muted); display: grid; font-size: .9rem; font-weight: 800; gap: .35rem; margin-bottom: .8rem; }
input, select, textarea {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    color: var(--text);
    font: inherit;
    max-width: 100%;
    min-width: 0;
    padding: .85rem .9rem;
    width: 100%;
}
textarea {
    overflow-wrap: anywhere;
    resize: vertical;
}
.button,
.ghost-button,
.table-link,
button,
a {
    max-width: 100%;
}
.flash {
    background: var(--green-soft);
    border: 1px solid #b7dfc5;
    border-radius: 18px;
    color: var(--green-dark);
    font-weight: 800;
    margin-bottom: 1rem;
    padding: .9rem 1rem;
}
.section-title {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 1rem;
    min-width: 0;
}
.section-title > div { min-width: 0; }
.section-title .table-actions { flex-shrink: 0; }
.section-title h2 { margin: 0; }
.section-title p { color: var(--muted); margin: .2rem 0 0; }
.filter-bar {
    align-items: end;
    background: rgba(247,250,248,.88);
    border: 1px solid var(--line);
    border-radius: 22px;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr));
    margin-bottom: 1.25rem;
    min-width: 0;
    overflow: hidden;
    padding: 1rem;
}
.filter-bar label { margin-bottom: 0; min-width: 0; }
.employee-filter-bar {
    grid-template-columns: minmax(260px, 1.35fr) minmax(150px, .65fr) minmax(240px, 1fr) minmax(230px, 1fr) auto;
}
.employee-search-table {
    min-width: 1120px;
    table-layout: fixed;
}
.employee-search-table th:nth-child(1),
.employee-search-table td:nth-child(1) { width: 24%; }
.employee-search-table th:nth-child(2),
.employee-search-table td:nth-child(2) { width: 9%; }
.employee-search-table th:nth-child(3),
.employee-search-table td:nth-child(3) { width: 16%; }
.employee-search-table th:nth-child(4),
.employee-search-table td:nth-child(4) { width: 17%; }
.employee-search-table th:nth-child(5),
.employee-search-table td:nth-child(5) { width: 16%; }
.employee-search-table td {
    overflow-wrap: anywhere;
}
.employee-name-cell strong {
    line-height: 1.25;
}
.employee-name-cell small {
    color: var(--muted);
    display: block;
    margin-top: .25rem;
}
.evolution-filter-bar {
    align-items: stretch;
    grid-template-columns: 1fr;
}
.filter-row {
    display: grid;
    gap: .8rem;
    min-width: 0;
}
.filter-row-main {
    grid-template-columns: minmax(240px, 1.1fr) minmax(260px, 1.2fr) minmax(240px, 1fr) minmax(220px, 1fr);
}
.filter-row-dates {
    align-items: end;
    grid-template-columns: minmax(180px, 220px) minmax(180px, 220px) auto;
    justify-content: start;
}
.compact-form {
    margin-bottom: 1rem;
    max-width: 620px;
}
.compact-form h2 { margin-bottom: .8rem; }
.stack-form {
    display: grid;
    gap: 1rem;
}
.stack-form label { margin-bottom: 0; }
.metric-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr));
    margin-bottom: 1.25rem;
}
.metric-card {
    background: rgba(255,255,255,.94);
    border: 1px solid var(--line);
    border-radius: 24px;
    box-shadow: var(--shadow);
    padding: 1rem;
}
.metric-card span {
    color: var(--muted);
    display: block;
    font-weight: 800;
}
.metric-card strong {
    display: block;
    font-size: 1.8rem;
    margin-top: .35rem;
}
.quota-form {
    align-items: end;
    display: grid;
    gap: .8rem;
    grid-template-columns: 1fr 1fr .6fr auto;
    margin-bottom: 1rem;
}
.quota-form label { margin-bottom: 0; }
.storage-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.storage-card {
    background: rgba(247,250,248,.88);
    border: 1px solid var(--line);
    border-radius: 22px;
    display: grid;
    gap: .75rem;
    padding: 1rem;
}
.storage-card h3 { margin: .2rem 0 0; }
.storage-card strong { font-size: 1.4rem; }
.storage-card.is-warning {
    background: #fff7ed;
    border-color: #fed7aa;
}
.folder-panel { margin-bottom: 1rem; }
.folder-grid {
    display: grid;
    gap: .85rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
}
.folder-card {
    background: rgba(247,250,248,.88);
    border: 1px solid var(--line);
    border-radius: 20px;
    display: grid;
    gap: .35rem;
    padding: 1rem;
    text-decoration: none;
    transition: transform .16s ease, border-color .16s ease;
}
.folder-card:hover {
    border-color: #9bcfaf;
    transform: translateY(-2px);
}
.folder-icon { font-size: 1.4rem; }
.denied-card {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 28px;
    box-shadow: var(--shadow);
    margin: 3rem auto;
    max-width: 760px;
    padding: 2rem;
    text-align: center;
}
.denied-card h1 { margin: .4rem 0; }
.denied-card p {
    color: var(--danger);
    font-size: 1.08rem;
    font-weight: 900;
    margin: 0 auto 1.2rem;
    max-width: 620px;
}
.denied-icon { font-size: 2.4rem; }
.meter {
    background: #dbe7df;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}
.meter span {
    background: linear-gradient(90deg, var(--green), var(--green-dark));
    display: block;
    height: 100%;
}
.danger-badge {
    color: var(--danger);
    font-size: .78rem;
    font-weight: 900;
}
.detail-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: .9fr 1.1fr;
    margin-bottom: 1rem;
}
.info-list {
    display: grid;
    gap: .65rem;
    grid-template-columns: 120px 1fr;
    margin: 0 0 1rem;
}
.info-list dt {
    color: var(--muted);
    font-weight: 900;
}
.info-list dd { margin: 0; }
.ficha-card {
    display: grid;
    gap: 1rem;
}
.ficha-card h3 {
    border-top: 1px solid var(--line);
    margin: .25rem 0 0;
    padding-top: 1rem;
}
.ficha-card h3:first-of-type {
    border-top: 0;
    padding-top: 0;
}
.ficha-grid {
    display: grid;
    gap: .75rem;
    grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
}
.ficha-row {
    background: rgba(247,250,248,.88);
    border: 1px solid var(--line);
    border-radius: 16px;
    min-height: 72px;
    padding: .8rem;
}
.ficha-row .k {
    color: var(--muted);
    font-size: .76rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.ficha-row .v {
    color: var(--text);
    font-size: .95rem;
    font-weight: 800;
    margin-top: .35rem;
    overflow-wrap: anywhere;
}
.ficha-hero .table-actions {
    justify-content: flex-end;
}
.table-wrap { overflow-x: visible; }
table { border-collapse: collapse; width: 100%; }
th, td { border-bottom: 1px solid var(--line); padding: .85rem; text-align: left; vertical-align: middle; }
th {
    color: var(--muted);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
td strong { display: block; }
.professional-table {
    table-layout: auto;
}
.professional-table th,
.professional-table td {
    line-height: 1.35;
    overflow-wrap: normal;
    word-break: normal;
}
.professional-table th {
    white-space: normal;
}
.professional-table td small {
    color: var(--muted);
    display: block;
    font-size: .78rem;
    line-height: 1.35;
    margin-top: .22rem;
}
.professional-table td:nth-child(n+3):not(.wide-text-cell),
.professional-table th:nth-child(n+3) {
    white-space: normal;
}
.professional-table .status,
.professional-table .table-link {
    white-space: nowrap;
}
.evolution-compare-table th:nth-child(1),
.evolution-compare-table td:nth-child(1) { width: 46%; }
.evolution-compare-table th:nth-child(2),
.evolution-compare-table td:nth-child(2),
.evolution-compare-table th:nth-child(3),
.evolution-compare-table td:nth-child(3) { text-align: center; width: 12%; }
.evolution-compare-table th:nth-child(4),
.evolution-compare-table td:nth-child(4),
.evolution-compare-table th:nth-child(5),
.evolution-compare-table td:nth-child(5) { text-align: center; width: 15%; }
.talent-table { min-width: 0; }
.talent-table th:nth-child(1),
.talent-table td:nth-child(1) { width: 28%; }
.talent-table th:nth-child(2),
.talent-table td:nth-child(2) { width: 34%; }
.talent-table th:nth-child(3),
.talent-table td:nth-child(3),
.talent-table th:nth-child(4),
.talent-table td:nth-child(4) { text-align: center; width: 13%; }
.talent-table th:nth-child(5),
.talent-table td:nth-child(5) { text-align: right; width: 12%; }
.action-plan-table { min-width: 0; }
.action-plan-table th:nth-child(1),
.action-plan-table td:nth-child(1) { width: 20%; }
.action-plan-table th:nth-child(2),
.action-plan-table td:nth-child(2) { width: 14%; }
.action-plan-table th:nth-child(3),
.action-plan-table td:nth-child(3) { text-align: center; width: 7%; }
.action-plan-table th:nth-child(4),
.action-plan-table td:nth-child(4) {
    overflow-wrap: anywhere;
    white-space: normal;
    width: 28%;
}
.action-plan-table th:nth-child(5),
.action-plan-table td:nth-child(5),
.action-plan-table th:nth-child(7),
.action-plan-table td:nth-child(7) { text-align: center; width: 10%; }
.action-plan-table th:nth-child(6),
.action-plan-table td:nth-child(6) { width: 14%; }
.action-plan-table th:nth-child(8),
.action-plan-table td:nth-child(8) { text-align: right; width: 12%; }
.requirements-table { min-width: 0; }
.requirements-table th:nth-child(1),
.requirements-table td:nth-child(1) { width: 20%; }
.requirements-table th:nth-child(2),
.requirements-table td:nth-child(2) { width: 20%; }
.requirements-table th:nth-child(3),
.requirements-table td:nth-child(3) { width: 18%; }
.requirements-table th:nth-child(4),
.requirements-table td:nth-child(4),
.requirements-table th:nth-child(5),
.requirements-table td:nth-child(5),
.requirements-table th:nth-child(6),
.requirements-table td:nth-child(6) { text-align: center; width: 10%; }
.requirements-table th:nth-child(7),
.requirements-table td:nth-child(7) {
    white-space: normal;
    width: 22%;
}
.requirements-table .inline-action-form {
    align-items: center;
    display: grid;
    gap: .45rem;
    grid-template-columns: minmax(180px, 1fr) auto auto;
}
.requirements-table select {
    min-width: 180px;
}
.action-plan-list {
    display: grid;
    gap: 1rem;
}
.action-plan-card {
    background: rgba(247,250,248,.88);
    border: 1px solid var(--line);
    border-radius: 22px;
    display: grid;
    gap: 1rem;
    padding: 1.1rem;
}
.action-plan-card.is-late {
    border-color: rgba(180,35,24,.35);
    box-shadow: 0 16px 36px rgba(180,35,24,.08);
}
.action-plan-card header,
.action-plan-card footer {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}
.action-plan-card h3 {
    font-size: 1.15rem;
    margin: .2rem 0;
}
.action-plan-card p {
    color: var(--muted);
    margin: 0;
}
.action-plan-status {
    flex-shrink: 0;
}
.action-plan-body {
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(0, 1.5fr) minmax(240px, .7fr);
}
.action-plan-body section {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .9rem;
}
.action-plan-body section strong {
    display: block;
    margin-bottom: .35rem;
}
.action-plan-body section p {
    color: var(--text);
    line-height: 1.5;
    overflow-wrap: anywhere;
}
.action-plan-body dl {
    display: grid;
    gap: .75rem;
    margin: 0;
}
.action-plan-body dl div {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .85rem;
}
.action-plan-body dt {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}
.action-plan-body dd {
    font-weight: 850;
    margin: .2rem 0 0;
}
.action-plan-complete-form {
    align-items: center;
    display: grid;
    gap: .65rem;
    grid-template-columns: minmax(220px, 1fr) auto;
    min-width: min(100%, 520px);
}
.status {
    background: var(--green-soft);
    border-radius: 999px;
    color: var(--green-dark);
    display: inline-flex;
    font-size: .75rem;
    font-weight: 900;
    padding: .35rem .65rem;
}
.status.neutral {
    background: rgba(100,115,107,.14);
    color: var(--text);
}
html[data-theme="dark"] .hero-card,
html[data-theme="dark"] .admin-card,
html[data-theme="dark"] .metric-card,
html[data-theme="dark"] .filter-bar,
html[data-theme="dark"] .storage-card,
html[data-theme="dark"] .folder-card,
html[data-theme="dark"] .ficha-row {
    background: var(--card);
}
.table-actions { align-items: center; display: flex; flex-wrap: wrap; gap: .5rem; }
.inline-action-form {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .45rem;
}
.inline-action-form select {
    min-width: 220px;
    padding: .55rem .7rem;
}
.checkbox-line {
    align-items: center;
    display: flex;
    flex-direction: row;
    gap: .5rem;
}
.checkbox-line input {
    width: auto;
}
.table-link {
    background: transparent;
    border: 0;
    color: var(--green-dark);
    cursor: pointer;
    font: inherit;
    font-weight: 900;
    padding: 0;
    text-decoration: none;
}
.danger { color: var(--danger); }
.danger-status {
    background: rgba(180,35,24,.12);
    color: var(--danger);
}
.score-panel {
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 1rem;
}
.score-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
    width: 100%;
}
.score-item {
    background: rgba(255,255,255,.55);
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: .7rem;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: .9rem;
    width: 100%;
}
html[data-theme="dark"] .score-item {
    background: rgba(255,255,255,.04);
}
.score-item strong { display: block; }
.score-item small {
    color: var(--muted);
    display: block;
    line-height: 1.45;
    margin-top: .25rem;
}
.score-item textarea {
    min-height: 58px;
}
.rating-legend {
    background: color-mix(in srgb, var(--brand-soft) 72%, var(--surface));
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: .45rem .9rem;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    margin: 0 0 1rem;
    padding: .85rem 1rem;
}
.rating-legend span {
    color: var(--ink);
    font-size: .88rem;
}
.rating-legend b {
    color: #f7b500;
    letter-spacing: .06em;
}
.score-item.needs-justification textarea[name^="score_comments["] {
    border-color: #d28a00;
    box-shadow: 0 0 0 3px rgba(247,181,0,.14);
}
.score-item input,
.score-item select,
.score-item textarea,
.action-plan-box input,
.action-plan-box select,
.action-plan-box textarea {
    box-sizing: border-box;
    max-width: 100%;
    min-width: 0;
    width: 100%;
}
.score-item.is-invalid {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(180,35,24,.10);
}
.score-error {
    color: var(--danger);
    display: none;
    font-weight: 800;
}
.score-item.is-invalid .score-error {
    display: block;
}
.star-rating {
    direction: rtl;
    display: inline-flex;
    justify-content: flex-end;
    width: max-content;
}
.star-rating input {
    height: 1px;
    opacity: 0;
    position: absolute;
    width: 1px;
}
.star-rating label {
    color: rgba(150,150,150,.42);
    cursor: pointer;
    font-size: 1.65rem;
    line-height: 1;
    padding: 0 .08rem;
    transition: transform .15s ease, color .15s ease;
}
.star-rating label:hover,
.star-rating label:hover ~ label,
.star-rating input:checked ~ label {
    color: #f7b500;
    transform: translateY(-1px);
}
.star-rating input:disabled + label {
    cursor: default;
}
.stars-readonly {
    color: #f7b500;
    display: block;
    font-size: 1.1rem;
    letter-spacing: .05em;
}
.alert-line {
    border: 1px solid var(--line);
    border-radius: 14px;
    margin: .55rem 0;
    padding: .75rem .85rem;
}
.alert-line a {
    color: inherit;
    text-decoration: none;
}
.alert-line.warn {
    background: rgba(247,181,0,.12);
}
.alert-line.danger {
    background: rgba(180,35,24,.10);
    color: var(--danger);
}
.comparison-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    margin-top: .8rem;
}
.comparison-card {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: .9rem;
}
.comparison-card span {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: .45rem 0;
}
.comparison-card span:last-child {
    border-bottom: 0;
}
.timeline-bars {
    display: grid;
    gap: .8rem;
}
.timeline-bar {
    align-items: center;
    display: grid;
    gap: .75rem;
    grid-template-columns: minmax(180px, 1.2fr) 2fr auto;
}
.timeline-bar div {
    background: rgba(100,115,107,.16);
    border-radius: 999px;
    height: 12px;
    overflow: hidden;
}
.timeline-bar i {
    background: linear-gradient(90deg, var(--green), var(--green-dark));
    border-radius: inherit;
    display: block;
    height: 100%;
}
@media (max-width: 820px) {
    .hero-card, .topbar { align-items: stretch; flex-direction: column; }
    .action-grid { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .employee-filter-bar { grid-template-columns: 1fr; }
    .filter-row-main,
    .filter-row-dates { grid-template-columns: 1fr; }
    .quota-form { grid-template-columns: 1fr; }
    .detail-grid { grid-template-columns: 1fr; }
    .timeline-bar { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .app-shell, .app-shell.sidebar-collapsed { display: block; }
    .sidebar {
        height: auto;
        min-height: 64px;
        overflow: visible;
        position: sticky;
    }
    .sidebar .brand-lockup { display: none; }
    .sidebar-head { justify-content: center; }
    .nav, .logout-link { display: none; }
    .app-shell.mobile-menu-open .brand-lockup,
    .app-shell.mobile-menu-open .nav,
    .app-shell.mobile-menu-open .logout-link {
        display: flex;
    }
    .app-shell.mobile-menu-open .nav {
        align-items: stretch;
        display: grid;
        grid-template-columns: 1fr;
        width: 100%;
    }
    .app-shell.mobile-menu-open .sidebar-head {
        justify-content: space-between;
    }
    .app-shell.mobile-menu-open .sidebar {
        gap: .9rem;
    }
}
@media print {
    .sidebar,
    .topbar,
    .ficha-hero .table-actions,
    .admin-card:nth-of-type(n+3) {
        display: none !important;
    }
    body {
        background: #fff !important;
        color: #111 !important;
        font-size: 11px !important;
    }
    .app-shell {
        display: block !important;
        min-height: auto !important;
    }
    .shell {
        max-width: none !important;
        padding: 0 !important;
    }
    .hero-card,
    .admin-card,
    .ficha-row {
        background: #fff !important;
        border-color: #d8d8d8 !important;
        box-shadow: none !important;
    }
    .hero-card {
        border-radius: 0 !important;
        margin: 0 0 8px !important;
        padding: 0 0 8px !important;
    }
    .hero-card h1 {
        font-size: 20px !important;
    }
    .ficha-card {
        border: 0 !important;
        border-radius: 0 !important;
        padding: 0 !important;
    }
    .ficha-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 5px !important;
    }
    .ficha-row {
        break-inside: avoid;
        border-radius: 6px !important;
        min-height: auto !important;
        padding: 5px 7px !important;
    }
    .ficha-row .k {
        color: #555 !important;
        font-size: 9px !important;
    }
    .ficha-row .v {
        color: #111 !important;
        font-size: 10px !important;
        margin-top: 2px !important;
    }
}

.action-plan-box {
    background: rgba(247,181,0,.10);
    border: 1px dashed rgba(247,181,0,.55);
    border-radius: 14px;
    display: none;
    gap: .65rem;
    margin-top: .75rem;
    min-width: 0;
    overflow-wrap: anywhere;
    padding: .85rem;
    width: 100%;
}
.action-plan-box.is-visible {
    display: grid;
}
.action-plan-box strong {
    color: var(--warning, #9a6700);
    display: block;
}
.action-plan-box label {
    display: grid;
    gap: .3rem;
}
.action-plan-box textarea {
    min-height: 72px;
}
.bar-list {
    display: grid;
    gap: .75rem;
}
.bar-row {
    background: var(--green-soft);
    border: 1px solid var(--line);
    border-radius: 14px;
    display: grid;
    gap: .45rem;
    overflow: hidden;
    padding: .75rem;
    position: relative;
}
.bar-row span,
.bar-row strong {
    position: relative;
    z-index: 1;
}
.bar-row strong {
    color: var(--green-dark);
}
.bar-row i {
    background: linear-gradient(90deg, var(--green), var(--green-dark));
    border-radius: 999px;
    bottom: 0;
    display: block;
    height: 4px;
    left: 0;
    position: absolute;
}
.danger-bars .bar-row {
    background: rgba(180,35,24,.08);
}
.danger-bars .bar-row strong {
    color: var(--danger);
}
.danger-bars .bar-row i {
    background: linear-gradient(90deg, #ffb4ac, var(--danger));
}
.monthly-chart {
    align-items: end;
    display: flex;
    gap: .8rem;
    min-height: 220px;
    overflow-x: auto;
    padding: 1rem .25rem .25rem;
}
.month-bar {
    align-items: center;
    display: grid;
    flex: 0 0 74px;
    gap: .35rem;
    justify-items: center;
}
.month-bar span {
    align-self: end;
    background: linear-gradient(180deg, var(--green), var(--green-dark));
    border-radius: 999px 999px 8px 8px;
    box-shadow: 0 10px 22px rgba(0, 125, 30, .18);
    display: block;
    min-height: 8px;
    width: 34px;
}
.month-bar strong {
    color: var(--green-dark);
    font-size: .9rem;
}
.month-bar small {
    color: var(--muted);
    font-weight: 800;
}
.settings-grid {
    display: grid;
    gap: .8rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.settings-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 16px;
    box-shadow: 0 10px 24px rgba(20,49,34,.06);
    display: grid;
    gap: .35rem;
    padding: 1rem;
    text-decoration: none;
}
.settings-card:hover,
.settings-card.active {
    background: var(--green-soft);
    border-color: var(--green);
    color: var(--green-dark);
}
.settings-card small {
    color: var(--muted);
    font-weight: 700;
    line-height: 1.4;
}
.competency-evolution {
    display: grid;
    gap: .75rem;
}
.competency-row {
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 16px;
    display: grid;
    gap: 1rem;
    grid-template-columns: minmax(180px, 260px) minmax(0, 1fr);
    padding: .9rem;
}
.competency-row small {
    color: var(--muted);
    display: block;
    font-weight: 800;
    margin-top: .25rem;
}
.sparkline {
    align-items: end;
    display: flex;
    gap: .35rem;
    min-height: 92px;
    overflow-x: auto;
    padding-block: .35rem;
}
.sparkline span {
    background: linear-gradient(180deg, var(--green), var(--green-dark));
    border-radius: 999px 999px 8px 8px;
    display: block;
    flex: 0 0 18px;
}
.sparkline em {
    color: var(--muted);
    font-style: normal;
    font-weight: 800;
}
.danger-row strong {
    color: var(--danger);
}
.ninebox-grid {
    display: grid;
    gap: .7rem;
    grid-template-columns: repeat(3, minmax(190px, 1fr));
    position: relative;
}
.ninebox-cell {
    border: 1px solid var(--line);
    border-radius: 18px;
    display: grid;
    gap: .55rem;
    min-height: 210px;
    padding: .9rem;
}
.ninebox-cell header {
    display: grid;
    gap: .2rem;
}
.ninebox-cell header span {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 900;
    text-transform: uppercase;
}
.ninebox-cell header strong {
    font-size: 1rem;
}
.ninebox-cell a {
    background: rgba(255,255,255,.58);
    border: 1px solid rgba(0,0,0,.05);
    border-radius: 12px;
    display: grid;
    gap: .1rem;
    padding: .55rem;
    text-decoration: none;
}
html[data-theme="dark"] .ninebox-cell a {
    background: rgba(255,255,255,.05);
}
.ninebox-cell small,
.ninebox-cell em {
    color: var(--muted);
    font-size: .78rem;
    font-style: normal;
    font-weight: 800;
}
.high-potential.high-performance {
    background: rgba(0,163,68,.18);
    border-color: var(--green);
}
.high-potential.medium-performance,
.medium-potential.high-performance {
    background: rgba(95,202,130,.12);
}
.low-potential.low-performance {
    background: rgba(180,35,24,.10);
    border-color: rgba(180,35,24,.32);
}
.low-potential.medium-performance,
.medium-potential.low-performance {
    background: rgba(247,181,0,.10);
}
.ninebox-axis {
    color: var(--muted);
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.x-axis {
    grid-column: 1 / -1;
    text-align: center;
}
.y-axis {
    display: none;
}
@media (max-width: 900px) {
    .ninebox-grid {
        grid-template-columns: 1fr;
    }
    .action-plan-card header,
    .action-plan-card footer,
    .action-plan-body {
        grid-template-columns: 1fr;
        flex-direction: column;
    }
    .action-plan-complete-form {
        grid-template-columns: 1fr;
        width: 100%;
    }
}
@media (max-width: 760px) {
    .competency-row {
        grid-template-columns: 1fr;
    }
}
