
:root {
    --bg: #eef1ea;
    --panel: rgba(255, 255, 255, 0.8);
    --panel-strong: #ffffff;
    --line: rgba(48, 74, 98, 0.14);
    --text: #20344c;
    --muted: #6a7f93;
    --blue: #1a3fa8;
    --blue-soft: #6d88d4;
    --green: #3f7f4a;
    --olive: #899846;
    --wine: #874254;
    --danger: #b33636;
    --warning: #ab8614;
    --shadow: 0 14px 36px rgba(38, 57, 79, 0.1);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(157, 189, 90, 0.18), transparent 24%),
        radial-gradient(circle at bottom right, rgba(201, 218, 124, 0.24), transparent 22%),
        linear-gradient(135deg, #edf0ea 0%, #f9faf6 48%, #eef5e2 100%);
    min-height: 100vh;
    line-height: 1.45;
}

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

button,
input,
select {
    font: inherit;
}

.app-shell {
    display: grid;
    grid-template-columns: 270px 1fr;
    gap: 24px;
    min-height: 100vh;
    padding: 24px;
    align-items: start;
}

.sidebar,
.panel,
.chart-card,
.filter-panel,
.stat-card,
.indicator-pill,
.login-card {
    backdrop-filter: blur(12px);
    background: var(--panel);
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: var(--shadow);
}

.sidebar {
    border-radius: 28px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: sticky;
    top: 24px;
    height: calc(100vh - 48px);
}

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

.brand h1,
.brand p {
    margin: 0;
}

.brand h1 {
    font-size: 1rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.brand p {
    color: var(--muted);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.brand-mark {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #cad76f, #3f7b4a);
    color: white;
    font-weight: 800;
    letter-spacing: 0.08em;
}

.client-chip {
    padding: 12px 14px;
    margin-bottom: 20px;
    background: rgba(244, 248, 236, 0.9);
    border-radius: 16px;
    font-weight: 600;
    font-size: 0.84rem;
}

.nav-links {
    display: grid;
    gap: 10px;
}

.nav-links a {
    padding: 11px 14px;
    border-radius: 14px;
    color: #234669;
    font-weight: 600;
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-links a i {
    font-size: 1rem;
    opacity: 0.9;
}

.nav-links a.active,
.nav-links a:hover {
    background: linear-gradient(90deg, #0e36af, #214fcf);
    color: white;
}

.sidebar-footer {
    padding-top: 18px;
    border-top: 1px solid var(--line);
}

.sidebar-footer p,
.sidebar-footer span {
    margin: 0;
}

.sidebar-footer span,
.subtitle,
.panel-header span,
.stat-card small {
    color: var(--muted);
}

.content-area {
    min-width: 0;
    display: grid;
    gap: 20px;
    align-content: start;
    align-items: start;
}

.topbar {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
    padding-top: 4px;
}

.topbar h2,
.panel-header h3 {
    margin: 0;
}

.topbar h2 {
    font-size: 1.35rem;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.subtitle {
    max-width: 720px;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.topbar-actions,
.filters-inline,
.search-inline {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

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

.inline-action-group {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.no-margin {
    margin-bottom: 0;
}

.client-form select,
.filters-inline select,
.search-inline input,
.login-form input {
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.95);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    min-width: 240px;
    font-size: 0.82rem;
}

.primary-btn,
.ghost-btn {
    border: 0;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 600;
    cursor: pointer;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ghost-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(93, 125, 222, 0.14);
    color: var(--blue);
    font-size: 0.82rem;
    font-weight: 700;
}

.primary-btn,
.ghost-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.primary-btn {
    background: linear-gradient(90deg, #0d39b0, #1e53e4);
    color: white;
}

.ghost-btn {
    background: rgba(255, 255, 255, 0.92);
    color: var(--blue);
    border: 1px solid rgba(22, 63, 190, 0.18);
}

.center-text {
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    align-items: start;
}

.stats-grid.compact {
    grid-template-columns: repeat(2, minmax(260px, 1fr));
}

.dashboard-gauge-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.dashboard-toolbar {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: end;
}

.dashboard-toolbar h3,
.overline,
.subtitle-inline {
    margin: 0;
}

.overline {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin-bottom: 6px;
}

.subtitle-inline {
    color: var(--muted);
    margin-top: 6px;
    font-size: 0.8rem;
}

.field-help {
    display: block;
    margin-top: 6px;
    color: var(--muted);
    font-size: 0.7rem;
    line-height: 1.4;
}

.form-errors,
.errorlist {
    margin: 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(179, 54, 54, 0.1);
    color: var(--danger);
    font-size: 0.74rem;
    list-style: none;
}

.modal-form .errorlist {
    margin-top: 6px;
}

.dashboard-filter-form {
    display: flex;
    gap: 12px;
    align-items: end;
    flex-wrap: wrap;
}

.month-switcher {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(26, 63, 168, 0.12);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.month-switcher-label {
    min-width: 84px;
    text-align: center;
    color: var(--blue);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.month-arrow {
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 999px;
    background: rgba(26, 63, 168, 0.08);
    color: var(--blue);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.16s ease, transform 0.16s ease;
}

.month-arrow:hover {
    background: rgba(26, 63, 168, 0.16);
    transform: translateY(-1px);
}

.dashboard-filter-form label {
    display: grid;
    gap: 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
}

.filter-label {
    display: grid;
    gap: 6px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: var(--muted);
}

.dashboard-filter-form input[type="month"] {
    min-width: 180px;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid rgba(26, 63, 168, 0.16);
    background: rgba(255, 255, 255, 0.94);
    color: var(--text);
}

.stat-card {
    border-radius: 20px;
    padding: 16px 18px;
    display: grid;
    gap: 5px;
}

.stat-card.highlight {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(226, 236, 188, 0.86));
}

.stat-card strong {
    font-size: 1.55rem;
    line-height: 1;
    color: var(--blue);
}

.stat-card span,
.indicator-pill span,
.bar-group span {
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.stat-card small {
    font-size: 0.72rem;
}

.indicator-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 12px;
}

.indicator-pill {
    border-radius: 16px;
    padding: 14px 16px;
    display: grid;
    gap: 6px;
}

.indicator-pill strong {
    font-size: 1.1rem;
    color: var(--blue);
}

.indicator-pill small {
    color: var(--muted);
    font-size: 0.72rem;
}

.indicator-link {
    transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.indicator-link:hover,
.indicator-link.is-selected {
    transform: translateY(-2px);
    border-color: rgba(26, 63, 168, 0.35);
    box-shadow: 0 18px 36px rgba(38, 57, 79, 0.12);
}

.indicator-link.is-selected {
    background: linear-gradient(135deg, rgba(24, 59, 154, 0.96), rgba(57, 92, 192, 0.9));
    color: white;
}

.indicator-link.is-selected strong,
.indicator-link.is-selected small,
.indicator-link.is-selected span {
    color: white;
}

.empty-card {
    padding: 22px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.76);
}

.panel-grid {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 16px;
    align-items: start;
}

.panel,
.chart-card,
.filter-panel {
    border-radius: 22px;
    padding: 20px 22px 18px;
}

.dashboard-indicators,
.dashboard-metrics,
.dashboard-panels,
.dashboard-chart-grid,
.task-drilldown {
    margin-top: 2px;
}

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

.panel-header h3 {
    font-size: 0.96rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.table-action-cell {
    width: 1%;
    white-space: nowrap;
}

.table-inline-actions {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.soft-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(109, 136, 212, 0.16);
    color: var(--blue);
    font-size: 0.76rem;
    font-weight: 700;
}

.row-selected {
    background: rgba(88, 126, 219, 0.08);
}

.text-danger {
    color: var(--danger);
    font-weight: 700;
}

.text-warning {
    color: var(--warning);
    font-weight: 700;
}

.text-success {
    color: var(--green);
    font-weight: 700;
}

.task-drilldown {
    display: grid;
    gap: 12px;
}

.task-list {
    display: grid;
    gap: 12px;
}

.task-card {
    border-radius: 18px;
    padding: 14px 16px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(26, 63, 168, 0.08);
}

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

.modal-close-btn {
    border: 0;
    background: transparent;
    cursor: pointer;
}

.worker-task-modal-card {
    display: grid;
    gap: 16px;
}

.worker-task-summary {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.summary-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(109, 136, 212, 0.12);
    color: var(--blue);
    font-size: 0.76rem;
    font-weight: 700;
}

.worker-task-list {
    display: grid;
    gap: 12px;
    max-height: 55vh;
    overflow: auto;
    padding-right: 4px;
}

.task-card-header {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: start;
}

.task-card-header strong,
.task-card-header p {
    margin: 0;
}

.task-card-header p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 0.78rem;
}

.task-card-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 12px;
    color: var(--muted);
    font-size: 0.76rem;
}

.empty-state-inline {
    padding: 16px 4px 10px;
    color: var(--muted);
}

.mini-chart {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 14px;
    align-items: end;
    min-height: 220px;
    padding: 16px 6px 8px;
}

.mini-chart-column {
    display: grid;
    gap: 10px;
    align-items: end;
    justify-items: center;
}

.mini-chart-bars {
    width: 100%;
    max-width: 54px;
    height: 180px;
    display: flex;
    align-items: end;
    justify-content: center;
    gap: 8px;
}

.mini-chart-bar {
    width: 18px;
    min-height: 8px;
    border-radius: 12px 12px 0 0;
}

.mini-chart-bar.olive {
    background: linear-gradient(180deg, rgba(137, 152, 70, 0.95), rgba(137, 152, 70, 0.65));
}

.mini-chart-bar.wine {
    background: linear-gradient(180deg, rgba(135, 66, 84, 0.95), rgba(135, 66, 84, 0.65));
}

.mini-chart-label {
    color: var(--muted);
    font-size: 0.72rem;
}

.mini-chart-legend {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    padding: 0 6px 10px;
    color: var(--muted);
    font-size: 0.76rem;
}

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

.legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 999px;
    display: inline-block;
}

.legend-swatch.olive {
    background: var(--olive);
}

.legend-swatch.wine {
    background: var(--wine);
}

.dashboard-chart-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    align-items: stretch;
}

.dashboard-chart-grid > .chart-card,
.dashboard-panels > .panel,
.dashboard-metrics > .stat-card,
.dashboard-gauge-grid > .gauge-card,
.dashboard-indicators > * {
    min-width: 0;
}

.analysis-kpis {
    margin-top: 2px;
}

.analysis-chart-grid,
.analysis-panels {
    margin-top: 2px;
}

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

.gauge-shell {
    position: relative;
    min-height: 220px;
    display: grid;
    place-items: center;
    padding: 8px 8px 0;
}

.gauge-canvas {
    width: 100%;
    height: 190px;
    min-height: 190px;
}

.gauge-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.gauge-track,
.gauge-progress {
    fill: none;
    stroke-width: 16;
    stroke-linecap: round;
    stroke-dashoffset: 0;
}

.gauge-track {
    stroke: rgba(255, 255, 255, 0.1);
}

.gauge-center {
    position: absolute;
    inset: auto 0 26px 0;
    display: grid;
    justify-items: center;
    gap: 4px;
    pointer-events: none;
}

.gauge-center strong {
    font-size: 2rem;
    line-height: 1;
    color: #ffffff;
    text-shadow: 0 0 18px rgba(255, 255, 255, 0.18);
}

.gauge-center span {
    font-size: 0.72rem;
    color: rgba(216, 232, 255, 0.72);
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.gauge-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    color: #d8e8ff;
    font-size: 0.76rem;
}

.gauge-meta span {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.neon-chart-card {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at top right, rgba(57, 213, 255, 0.12), transparent 26%),
        radial-gradient(circle at bottom left, rgba(255, 79, 216, 0.12), transparent 24%),
        rgba(12, 18, 34, 0.92);
    border: 1px solid rgba(102, 189, 255, 0.18);
    box-shadow: 0 24px 50px rgba(5, 13, 33, 0.28);
}

.neon-chart-card .panel-header h3,
.neon-chart-card .panel-header span,
.chart-intro,
.neon-legend {
    color: #d8e8ff;
}

.chart-intro {
    margin: 0 0 10px;
    font-size: 0.76rem;
    opacity: 0.82;
}

.line-chart-shell {
    position: relative;
    border-radius: 18px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)),
        rgba(8, 13, 26, 0.72);
    border: 1px solid rgba(132, 180, 255, 0.1);
    padding: 16px 16px 10px;
    min-height: 320px;
}

.line-chart-canvas {
    display: block;
    width: 100%;
    height: 290px;
}

.panel table,
.chart-card table {
    margin-top: 6px;
}

th:first-child,
td:first-child {
    padding-left: 14px;
}

th:last-child,
td:last-child {
    padding-right: 14px;
}

.neon-legend .legend-swatch {
    box-shadow: 0 0 14px currentColor;
}

.legend-swatch.neon-green {
    background: #7cffb2;
    color: #7cffb2;
}

.legend-swatch.neon-pink {
    background: #ff4fd8;
    color: #ff4fd8;
}

.legend-swatch.neon-cyan {
    background: #39d5ff;
    color: #39d5ff;
}

.legend-swatch.neon-lime {
    background: #b6ff3b;
    color: #b6ff3b;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid var(--line);
    font-size: 0.8rem;
}

th {
    color: #305b88;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.tag {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 0.68rem;
    font-weight: 600;
    color: white;
}

.tag.success {
    background: var(--green);
}

.tag.warning {
    background: var(--warning);
}

.tag.danger {
    background: var(--danger);
}

.tag.info {
    background: var(--blue-soft);
}

.bars {
    display: grid;
    gap: 14px;
    padding: 6px 2px 14px;
}

.bar-group {
    display: grid;
    gap: 10px;
}

.bar-track {
    height: 18px;
    border-radius: 999px;
    background: rgba(37, 61, 87, 0.08);
    overflow: hidden;
}

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

.bar-fill.olive {
    background: linear-gradient(90deg, #b8c163, var(--olive));
}

.bar-fill.green {
    background: linear-gradient(90deg, #82c06d, var(--green));
}

.bar-fill.wine {
    background: linear-gradient(90deg, #c7727d, var(--wine));
}

.login-page {
    display: grid;
    place-items: center;
    padding: 32px;
}

.login-card {
    width: min(520px, 100%);
    border-radius: 24px;
    padding: 28px;
}

.login-brand {
    margin-bottom: 24px;
}

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

.organization-badge {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(235, 241, 255, 0.9);
    border: 1px solid rgba(22, 63, 190, 0.14);
    color: var(--text);
}

.organization-badge span {
    color: var(--muted);
    font-size: 0.92rem;
}

.messages-stack {
    display: grid;
    gap: 10px;
}

.flash-message {
    padding: 14px 16px;
    border-radius: 16px;
    border: 1px solid rgba(58, 125, 68, 0.18);
    background: rgba(58, 125, 68, 0.1);
    color: #245c2d;
    font-weight: 600;
}

.form-control {
    width: 100%;
    border: 1px solid rgba(56, 84, 110, 0.18);
    background: rgba(255, 255, 255, 0.98);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    margin-top: 6px;
    font-size: 0.82rem;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(32, 52, 76, 0.38);
    backdrop-filter: blur(4px);
    display: grid;
    place-items: center;
    padding: 20px;
    overflow-y: auto;
    overscroll-behavior: contain;
    z-index: 30;
}

.modal-card {
    width: min(620px, 100%);
    max-height: calc(100vh - 40px);
    border-radius: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 30px 70px rgba(18, 32, 54, 0.22);
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-gutter: stable;
}

.modal-wide {
    width: min(860px, 100%);
}

body.modal-open {
    overflow: hidden;
}

.modal-header,
.modal-actions,
.assignment-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.modal-header {
    margin-bottom: 18px;
}

.modal-header h3,
.form-grid h4 {
    margin: 0;
}

.modal-close {
    font-size: 1.7rem;
    line-height: 1;
    color: #35506d;
}

.modal-form {
    display: grid;
    gap: 14px;
}

.form-row.single {
    display: grid;
}

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

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

.form-grid.three-cols {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.radio-row ul,
.weekday-grid ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.radio-row li,
.weekday-grid li,
.checkbox-field {
    display: flex;
    align-items: center;
    gap: 8px;
}

.assignment-entry-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px 20px;
    align-items: end;
}

.assignment-entry-main {
    display: grid;
    gap: 14px;
}

.assignment-value-field {
    max-width: 380px;
}

.checkbox-field-tight {
    align-self: end;
    justify-self: end;
    gap: 6px;
    white-space: nowrap;
}

.checkbox-field-tight input,
.checkbox-field-tight label {
    margin: 0;
}

.assignment-type-box {
    padding: 16px 18px;
    border: 1px solid rgba(56, 84, 110, 0.14);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.72);
}

.assignment-type-box ul {
    display: grid;
    gap: 10px;
}

.assignment-head {
    border: 1px solid rgba(24, 68, 190, 0.35);
    border-radius: 14px;
    padding: 10px 14px;
    background: rgba(243, 247, 255, 0.9);
}

.distribution-mode-panel {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(38, 78, 171, 0.14);
    background: linear-gradient(180deg, rgba(241, 246, 255, 0.95), rgba(255, 255, 255, 0.82));
}

.distribution-mode-panel[hidden],
.distribution-mode-card[hidden] {
    display: none !important;
}

.distribution-mode-header {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: start;
    flex-wrap: wrap;
}

.distribution-mode-header h4,
.distribution-mode-card strong {
    margin: 0;
}

.distribution-mode-header p,
.distribution-mode-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.distribution-mode-toggle {
    display: inline-flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mode-choice {
    border: 1px solid rgba(31, 76, 194, 0.16);
    background: rgba(255, 255, 255, 0.85);
    color: var(--blue);
    border-radius: 16px;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
}

.mode-choice.active {
    background: linear-gradient(90deg, #0d39b0, #1e53e4);
    color: #fff;
    box-shadow: 0 10px 24px rgba(30, 83, 228, 0.18);
}

.distribution-mode-card {
    display: grid;
    gap: 12px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(37, 74, 150, 0.12);
    background: rgba(255, 255, 255, 0.86);
}

.distribution-mode-card.active {
    border-color: rgba(30, 83, 228, 0.24);
}

.distribution-preview,
.distribution-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.distribution-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(109, 136, 212, 0.12);
    color: var(--blue);
    font-size: 0.8rem;
    font-weight: 700;
}

.manual-distribution-grid {
    display: grid;
    gap: 10px;
}

.manual-distribution-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 140px;
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.84);
    border: 1px solid rgba(37, 74, 150, 0.1);
}

.manual-distribution-row input {
    width: 100%;
    border: 1px solid rgba(56, 84, 110, 0.18);
    background: rgba(255, 255, 255, 0.96);
    color: var(--text);
    border-radius: 12px;
    padding: 10px 12px;
    font: inherit;
}

.distribution-actions {
    display: flex;
    justify-content: flex-end;
}

.assignment-toolbar {
    display: flex;
    justify-content: flex-end;
}

.assignment-add-btn {
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 0.82rem;
}

.team-detail-list {
    display: grid;
    gap: 16px;
    margin-top: 16px;
}

.team-detail-card {
    display: grid;
    gap: 14px;
    padding: 18px;
    border-radius: 20px;
    border: 1px solid rgba(31, 76, 194, 0.12);
    background: rgba(246, 249, 255, 0.88);
}

.team-detail-header {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: start;
}

.team-detail-header h4 {
    margin: 0;
}

.team-detail-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 0.78rem;
}

.team-detail-kpis {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.team-detail-table td:last-child {
    max-width: 280px;
    color: var(--muted);
}

.compact-table th,
.compact-table td {
    padding: 9px 10px;
}

.remove-assignment-btn {
    border: 0;
    cursor: pointer;
}

.login-form h2 {
    margin: 0 0 8px;
}

.full-width {
    width: 100%;
}

.alert {
    background: rgba(179, 54, 54, 0.12);
    color: var(--danger);
    border: 1px solid rgba(179, 54, 54, 0.18);
    padding: 12px 14px;
    border-radius: 14px;
}

.assignment-feedback {
    margin: 0;
}

.page-section-title {
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 8px;
}

.table-note {
    margin: 0 0 12px;
    color: var(--muted);
    font-size: 0.74rem;
    line-height: 1.5;
}

.worker-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top right, rgba(201, 218, 124, 0.22), transparent 18%),
        linear-gradient(180deg, #eef2e4 0%, #f8faf5 55%, #eef0eb 100%);
    display: grid;
    place-items: center;
    padding: 18px;
}

.worker-shell {
    width: min(1120px, 100%);
    min-height: min(860px, calc(100vh - 36px));
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 26px;
    box-shadow: var(--shadow);
    display: grid;
    grid-template-rows: auto 1fr auto;
    padding: 22px 20px 14px;
}

.worker-header {
    display: grid;
    gap: 14px;
    margin-bottom: 14px;
}

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

.worker-brand-row {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 0.74rem;
}

.worker-userbar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.worker-user-name {
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(48, 74, 98, 0.1);
    color: var(--blue);
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.worker-mini-logo {
    width: 28px;
    height: 28px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #cad76f, #3f7b4a);
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
}

.worker-topline h1 {
    margin: 0 0 4px;
    font-size: 1.25rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.worker-topline p {
    margin: 0;
    color: var(--blue);
    font-size: 0.8rem;
}

.worker-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-content: start;
}

.worker-card {
    background: rgba(255, 255, 255, 0.82);
    border-radius: 20px;
    border: 1px solid rgba(48, 74, 98, 0.12);
    box-shadow: 0 12px 28px rgba(38, 57, 79, 0.08);
    padding: 16px;
    display: grid;
    gap: 14px;
    align-content: start;
}

.worker-card-header {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    align-items: start;
}

.worker-card-header h2 {
    margin: 0;
    font-size: 0.94rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.worker-card-header span {
    color: var(--muted);
    font-size: 0.74rem;
}

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

.worker-task-item,
.worker-alert-item {
    border: 1px solid rgba(48, 74, 98, 0.12);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    gap: 5px;
    background: rgba(255, 255, 255, 0.74);
}

.worker-task-item.active {
    border-color: rgba(26, 63, 168, 0.34);
    background: rgba(238, 244, 255, 0.9);
}

.worker-task-link {
    display: grid;
    gap: 5px;
}

.worker-task-item strong,
.worker-alert-item strong {
    font-size: 0.84rem;
}

.worker-task-item span,
.worker-alert-item span {
    color: var(--blue);
    font-size: 0.74rem;
}

.worker-task-item small,
.worker-alert-item small {
    color: var(--muted);
    font-size: 0.72rem;
}

.worker-kpi-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.worker-kpi-row div,
.worker-result-box {
    background: rgba(243, 247, 255, 0.78);
    border: 1px solid rgba(48, 74, 98, 0.1);
    border-radius: 16px;
    padding: 12px;
    display: grid;
    gap: 4px;
}

.worker-kpi-row small,
.worker-result-box small {
    color: var(--muted);
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.worker-kpi-row strong,
.worker-result-box strong {
    color: var(--blue);
    font-size: 1.1rem;
}

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

.worker-actions {
    display: flex;
    justify-content: flex-end;
}

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

.worker-nav a {
    padding: 12px 10px;
    border-radius: 16px;
    text-align: center;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--blue);
    border: 1px solid rgba(26, 63, 168, 0.12);
    background: rgba(255, 255, 255, 0.7);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.worker-nav a.active {
    background: linear-gradient(90deg, #0d39b0, #1e53e4);
    color: #fff;
}

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

    .sidebar {
        position: static;
        height: auto;
    }

    .stats-grid,
    .panel-grid,
    .dashboard-chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .app-shell {
        padding: 14px;
        gap: 14px;
    }

    .topbar {
        flex-direction: column;
    }

    .dashboard-toolbar,
    .dashboard-filter-form,
    .task-card-header {
        grid-template-columns: 1fr;
        display: grid;
    }

    .dashboard-filter-form .primary-btn,
    .dashboard-filter-form input[type="month"],
    .month-switcher {
        width: 100%;
    }

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

    .client-form select,
    .filters-inline select,
    .search-inline input,
    .login-form input {
        min-width: 100%;
        width: 100%;
    }

    .filters-inline,
    .search-inline,
    .topbar-actions {
        width: 100%;
    }

    .form-grid,
    .form-grid.two-cols,
    .form-grid.three-cols,
    .assignment-entry-layout,
    .modal-header,
    .modal-actions,
    .assignment-head,
    .team-detail-header {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: stretch;
    }

    .checkbox-field-tight {
        justify-self: start;
        align-self: start;
    }

    .worker-shell {
        min-height: calc(100vh - 24px);
        padding: 16px 14px 12px;
    }

    .worker-navbar {
        flex-direction: column;
        align-items: stretch;
    }

    .worker-userbar {
        justify-content: space-between;
    }

    .worker-content,
    .worker-kpi-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 1200px) {
    .dashboard-chart-grid,
    .dashboard-gauge-grid {
        grid-template-columns: 1fr;
    }
}

/* Monthly results: collective totals and individual contributions. */
.results-page {
    min-width: 0;
    font-family: "Segoe UI", Arial, sans-serif;
    font-size: 0.95rem;
    line-height: 1.5;
    --result-muted: #50657a;
}
.results-page h3, .results-page h4 { text-transform: none; letter-spacing: 0; }
.results-page .panel-header h3 { font-size: 1.15rem; }
.results-toolbar h3 { margin: 0; font-size: 1.35rem; }
.results-toolbar .result-explanation { margin-bottom: 0; }
.results-intro { color: var(--result-muted); max-width: 75ch; margin: 0 0 24px; }
.period-explanation { padding: 20px 24px; background: #e7edf6; border-radius: 12px; margin: 20px 0 28px; }
.period-explanation.closed { background: #f6f0df; }
.period-explanation h3 { margin: 0 0 8px; font-size: 1.05rem; }
.period-explanation p { margin: 0 0 16px; max-width: 75ch; }
.period-explanation .ghost-chip { color: #1a3fa8; }
.closing-summary { display: flex; flex-wrap: wrap; gap: 20px 48px; margin: 24px 0 0; }
.closing-summary dt { color: #554c31; font-size: 0.85rem; }
.closing-summary dd { margin: 4px 0 0; font-size: 1.4rem; font-weight: 700; }
.problem-causes { margin: 0 0 28px; }
.problem-causes h3 { font-size: 1.05rem; margin: 0 0 12px; }
.problem-causes ul { list-style: none; margin: 0; padding: 0; max-width: 700px; }
.problem-causes li { display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--line); padding: 10px 0; }
.results-list { overflow: hidden; }
.action-result { padding: 28px 0; border-top: 1px solid var(--line); }
.action-result:last-child { padding-bottom: 0; }
.action-result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.action-result-heading h3 { font-size: 1.15rem; margin: 0; }
.result-indicator { color: var(--result-muted); font-size: 0.85rem; margin: 6px 0 0; }
.action-summary { display: grid; grid-template-columns: 1.2fr 1fr; gap: 24px 48px; padding: 24px 0; }
.result-label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--result-muted); margin-bottom: 6px; }
.result-total { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.result-total strong { font-size: 2rem; line-height: 1.2; color: var(--blue); font-variant-numeric: tabular-nums; }
.result-total span { font-size: 1rem; }
.result-explanation { color: var(--result-muted); font-size: 0.85rem; margin: 8px 0 0; max-width: 65ch; }
.action-coordinator > strong { display: block; font-size: 1.1rem; }
.contributions-title { font-size: 0.95rem; margin: 8px 0 10px; }
.results-table-scroll { width: 100%; overflow-x: auto; }
.contributions-table { width: 100%; min-width: 560px; border-collapse: collapse; }
.contributions-table th, .contributions-table td { padding: 14px 12px; vertical-align: top; font-size: 0.88rem; }
.contributions-table thead th { color: var(--result-muted); font-size: 0.8rem; text-transform: none; letter-spacing: 0; background: #f2f5f8; }
.contributions-table tbody th { font-weight: 400; color: var(--text); text-transform: none; letter-spacing: 0; text-align: left; }
.contributions-table td:not(.individual-cause) { font-variant-numeric: tabular-nums; white-space: nowrap; }
.person-name { display: block; font-weight: 600; }
.person-team { display: block; font-size: 0.8rem; margin-top: 3px; color: var(--result-muted); }
.person-production { font-weight: 700; }
.contributions-table tfoot th, .contributions-table tfoot td { color: var(--text); background: #edf2f8; font-size: 0.85rem; font-weight: 600; text-transform: none; letter-spacing: 0; white-space: normal; }
.individual-cause { min-width: 220px; max-width: 340px; }
.result-status { display: inline-block; padding: 4px 10px; border-radius: 6px; font-size: 0.78rem; font-weight: 600; background: #edf0f3; color: #44566a; white-space: nowrap; }
.result-status.info { color: #234b85; background: #e8effb; }
.result-status.warning { color: #73520a; background: #fbefcc; }
.result-status.success, .result-status.ativa, .result-status.concluida { color: #245632; background: #e6f1e7; }
.cause-detail { margin-top: 10px; font-size: 0.82rem; }
.cause-detail strong { display: block; }
.cause-detail p { margin: 4px 0; color: var(--result-muted); }
.cause-missing { color: #73520a; }
.result-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.results-empty { max-width: 65ch; padding: 20px 0; color: var(--result-muted); }
.results-page :is(a, button, select, [tabindex]):focus-visible { outline: 2px solid var(--blue); outline-offset: 4px; }
@media (max-width: 760px) {
    .action-summary { grid-template-columns: 1fr; gap: 20px; }
    .period-explanation { padding: 18px; }
    .results-toolbar { align-items: stretch; gap: 16px; }
    .results-toolbar .dashboard-filter-form { width: 100%; }
    .results-toolbar .month-switcher { width: 100%; }
    .action-result-heading h3 { font-size: 1.05rem; }
    .results-page .panel-header { align-items: flex-start; flex-wrap: wrap; }
}


/* Shared operational interface: clear monthly context and consistent controls. */
:root {
    --bg: #f3f5f8; --panel: #fff; --line: #dbe2eb;
    --text: #20344c; --muted: #52657a; --blue: #2454bc;
    --green: #267545; --warning: #855e08; --danger: #b33636;
    --shadow: 0 4px 16px rgba(32, 52, 76, .06);
}
body, .worker-body { background: var(--bg); font-size: 15px; line-height: 1.55; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid #2454bc; outline-offset: 3px; }
.app-shell { grid-template-columns: 248px minmax(0, 1fr); gap: 28px; }
.content-area, .worker-content, .worker-card, .panel, .chart-card { min-width: 0; }
.sidebar { padding: 24px 18px; border-radius: 16px; }
.sidebar, .panel, .chart-card, .filter-panel, .stat-card, .indicator-pill, .login-card, .worker-shell, .worker-card {
    background: #fff; backdrop-filter: none; border: 1px solid var(--line); box-shadow: none; border-radius: 12px;
}
.brand h1, .brand p, .topbar h2, .panel-header h3, .worker-topline h1, .worker-card-header h2, .overline,
.primary-btn, .ghost-btn, .soft-btn, .worker-user-name, .worker-kpi-row small, .worker-result-box small {
    text-transform: none; letter-spacing: normal;
}
.brand h1 { font-size: 17px; }
.brand p { font-size: 12px; line-height: 1.5; }
.brand-mark { width: 42px; height: 42px; flex-shrink: 0; background: var(--blue); border-radius: 10px; }
.topbar { align-items: flex-start; margin-bottom: 26px; gap: 20px; }
.topbar h2 { font-size: 30px; margin-bottom: 5px; line-height: 1.2; }
.subtitle { font-size: 15px; max-width: 75ch; }
.nav-links a { min-height: 44px; font-size: 14px; border-radius: 8px; }
.nav-links a:hover { background: #f2f5fa; }
.client-chip { font-size: 13px; line-height: 1.5; border-radius: 8px; background: #f2f5fa; color: var(--text); overflow-wrap: anywhere; }
.panel, .chart-card { padding: 24px; }
.panel-header { flex-wrap: wrap; gap: 12px; }
.panel-header h3 { font-size: 18px; }
.panel-header span, .table-note, .field-help, .subtitle-inline, .chart-intro { color: var(--muted); font-size: 14px; opacity: 1; }
.panel-header span { white-space: normal; }
.primary-btn, .ghost-btn, .soft-btn, .ghost-chip, .month-arrow, .modal-close, .worker-nav a { min-height: 44px; }
.primary-btn, .ghost-btn, .soft-btn { padding: 10px 16px; border-radius: 8px; font-size: 14px; font-weight: 600; }
.primary-btn { background: var(--blue); color: #fff; border: 1px solid var(--blue); box-shadow: none; }
.primary-btn:hover { background: #194396; }
.ghost-btn, .soft-btn { background: #fff; color: #214995; border: 1px solid #becce0; box-shadow: none; }
.ghost-btn:hover, .soft-btn:hover, .ghost-chip:hover { background: #ecf2fc; }
.ghost-chip { padding: 8px 12px; display: inline-flex; align-items: center; font-size: 14px; border-radius: 8px; }
button:disabled { opacity: .6; cursor: wait; }
input:not([type=checkbox]):not([type=radio]):not([type=hidden]), select, textarea { min-height: 44px; border: 1px solid #a8b8ca; border-radius: 8px; background: #fff; color: var(--text); padding: 10px 12px; max-width: 100%; }
input::placeholder, textarea::placeholder { color: #5f6e7d; opacity: 1; }
.form-control[aria-invalid=true] { border-color: var(--danger); }
.form-error-summary { background: #fff1f1; color: #922c2c; border: 1px solid #edbcbc; border-radius: 8px; padding: 14px 16px; }
.form-error-summary ul { margin: 8px 0 0; padding-left: 20px; }
.form-error-summary a { text-decoration: underline; }
.table-scroll { overflow-x: auto; max-width: 100%; }
table { font-size: 14px; }
th { font-size: 12px; text-transform: none; letter-spacing: normal; color: var(--muted); font-weight: 600; }
td, th { padding: 15px 12px; border-bottom-color: var(--line); }
td { line-height: 1.5; }
td:not(:first-child) { font-variant-numeric: tabular-nums; }
.text-progress { color: var(--blue); font-weight: 600; }
.tag { font-size: 12px; text-transform: none; letter-spacing: normal; padding: 5px 10px; border-radius: 6px; }
.tag.info { background: #e9f0fc; color: #214995; }
.tag.warning { background: #fff2cb; color: #775405; }
.tag.success { background: #e6f4eb; color: #23663a; }
.tag.danger { background: #fceaea; color: #942a2a; }
.period-explanation { color: var(--muted); margin: 0 0 20px; font-size: 14px; }
.neon-chart-card { background: #fff; border-color: var(--line); box-shadow: none; }
.neon-chart-card .panel-header h3, .neon-chart-card .panel-header span, .neon-legend { color: var(--text); }
.line-chart-shell { background: #fff; border-radius: 8px; }
.dashboard-progress { margin: 8px 0; color: var(--muted); }
.dashboard-progress strong { font-size: 32px; color: var(--text); margin-right: 6px; font-variant-numeric: tabular-nums; }
.monthly-progress { width: 100%; height: 12px; accent-color: var(--blue); border: none; border-radius: 8px; }
.monthly-progress::-webkit-progress-bar { background: #e7edf6; border-radius: 8px; }
.monthly-progress::-webkit-progress-value { background: var(--blue); border-radius: 8px; }
.gauge-meta { color: var(--text); font-size: 14px; }
.legend-swatch { box-shadow: none; }
.legend-swatch.neon-green { background: #267545; }
.legend-swatch.neon-pink, .legend-swatch.neon-cyan { background: #2454bc; }
.legend-swatch.neon-lime { background: #648076; }
.indicator-pill { border-radius: 8px; }
.indicator-pill.is-selected { border-color: var(--blue); background: #edf3ff; box-shadow: none; }
.modal-backdrop { padding: 24px; background: rgba(24, 37, 55, .45); backdrop-filter: none; }
.modal-card { background: #fff; border: none; border-radius: 12px; box-shadow: 0 18px 60px rgba(16, 34, 58, .2); max-height: calc(100dvh - 48px); overflow-y: auto; }
.modal-header h3 { font-size: 22px; text-transform: none; letter-spacing: normal; }
.modal-close { display: inline-grid; place-items: center; min-width: 44px; flex-shrink: 0; border: none; background: transparent; }
.dialog-open { overflow: hidden; }
.task-card { border-radius: 8px; background: #f7f9fc; }
.task-card-metrics { gap: 12px 24px; font-size: 14px; color: var(--muted); }
.task-card-metrics strong { color: var(--text); }
.summary-chip { background: #edf3ff; color: #214995; font-size: 13px; }
.worker-shell { padding: 28px; gap: 12px; }
.worker-navbar, .worker-userbar { flex-wrap: wrap; }
.worker-organization { margin: 0; color: var(--muted); font-size: 14px; }
.worker-topline h1 { font-size: 28px; }
.worker-topline p { font-size: 14px; color: var(--muted); }
.worker-user-name { font-size: 14px; background: transparent; border: none; padding: 0; }
.worker-card { padding: 22px; }
.worker-card-header h2 { font-size: 18px; }
.worker-task-item, .worker-alert-item { border-radius: 8px; background: transparent; }
.worker-task-item strong, .worker-alert-item strong { font-size: 15px; }
.worker-task-item span, .worker-alert-item span, .worker-task-item small, .worker-alert-item small { font-size: 14px; }
.worker-task-item a:hover { color: var(--blue); }
.worker-kpi-row div { border-radius: 8px; background: #f4f7fc; box-shadow: none; }
.worker-kpi-row small { font-size: 13px; }
.worker-nav { position: sticky; bottom: 0; background: #fff; padding-top: 12px; border-top: 1px solid var(--line); }
.worker-nav a { font-size: 14px; }
.worker-month-summary { margin: 0; font-size: 18px; }
.mobile-menu-toggle { display: none; }
.login-card { box-shadow: var(--shadow); border: none; }
@media (max-width: 1100px) {
    .app-shell { grid-template-columns: 210px minmax(0, 1fr); padding: 16px; gap: 20px; }
    .topbar { flex-wrap: wrap; }
    .dashboard-panels, .dashboard-chart-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 800px) {
    .app-shell { display: block; padding: 12px; }
    .sidebar { height: auto; position: static; padding: 16px; margin-bottom: 22px; }
    .brand { margin-bottom: 12px; }
    .mobile-menu-toggle { display: flex; align-items: center; gap: 10px; }
    .sidebar .nav-links, .sidebar-footer { display: none; }
    .sidebar.menu-expanded .nav-links { display: grid; margin-top: 12px; }
    .sidebar.menu-expanded .sidebar-footer { display: block; margin-top: 16px; }
    .topbar h2 { font-size: 26px; }
    .topbar-actions { flex-wrap: wrap; width: 100%; justify-content: flex-start; }
    .topbar-actions .client-form { width: 100%; }
    .panel, .chart-card, .filter-panel { padding: 18px; }
    .dashboard-gauge-grid, .panel-grid, .worker-content { grid-template-columns: minmax(0, 1fr); }
    .filters-inline, .search-inline, .panel-actions { flex-wrap: wrap; }
    .filter-label { max-width: 100%; min-width: 0; }
    .table-scroll table { min-width: 580px; }
    .worker-body { display: block; padding: 10px; }
    .worker-shell { padding: 18px 14px; min-height: calc(100dvh - 20px); }
    .worker-navbar { align-items: flex-start; gap: 16px; }
    .worker-userbar { gap: 12px; }
    .worker-card { padding: 18px; }
    .modal-backdrop { padding: 10px; }
    .modal-card { padding: 20px; max-height: calc(100dvh - 20px); }
    .form-grid { grid-template-columns: minmax(0, 1fr); }
    .modal-header { gap: 8px; }
    .modal-header h3 { font-size: 20px; }
    .task-card-header { flex-wrap: wrap; }
    .task-card-metrics { display: grid; gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

.content-area { grid-template-columns: minmax(0, 1fr); }
.content-area > *, .dashboard-toolbar > *, .filters-inline > * { min-width: 0; }
.subtitle, .filter-label span, .indicator-pill span, .worker-nav a { text-transform: none; letter-spacing: normal; }
.subtitle { margin: 8px 0 0; }
.indicator-link.is-selected strong, .indicator-link.is-selected small, .indicator-link.is-selected span { color: #214995; }
.indicator-pill small { color: var(--muted); }
.indicator-pill span { font-size: 14px; font-weight: 600; }
.indicator-pill small { font-size: 13px; }
.mini-chart-legend .legend-swatch { box-shadow: none; }
.choice-options { display: flex; gap: 12px 20px; flex-wrap: wrap; }
.choice-options > div { display: flex; align-items: center; }
.choice-options label, .checkbox-field label { display: inline-flex; align-items: center; gap: 8px; margin: 0; }
input.choice-control, .choice-options input { width: 18px; height: 18px; margin: 0; padding: 0; accent-color: var(--blue); }
.checkbox-field { justify-content: flex-start; }
.worker-nav { position: static; }
.worker-nav a.active { background: var(--blue); }
.worker-mini-logo { background: var(--blue); }
.modal-header { display: flex; flex-direction: row; align-items: flex-start; justify-content: space-between; }
.modal-actions { display: flex; flex-direction: row; align-items: center; justify-content: flex-end; flex-wrap: wrap; }
@media (max-width: 800px) {
    .stats-grid.compact { grid-template-columns: minmax(0, 1fr); }
    .filter-label { width: 100%; }
    .filter-label select { width: 100%; min-width: 0; }
    .worker-shell { padding-bottom: 100px; }
    .worker-nav { position: fixed; bottom: 10px; left: 24px; right: 24px; z-index: 20; margin: 0; padding: 8px; border: 1px solid var(--line); border-radius: 12px; gap: 6px; }
    .worker-nav a { font-size: 12px; padding: 10px 5px; gap: 5px; border-radius: 8px; }
    .modal-header > div { min-width: 0; }
}
