:root {
    --bg: #f2efe8;
    --panel: #f8f6f1;
    --surface: #ffffff;
    --line: #d4cdc1;
    --text: #1d2f2a;
    --muted: #5f6f6a;
    --accent: #2f5d50;
    --accent-soft: #e3ece8;
    --warn: #b1823f;
    --danger: #a14f4f;
    --ok: #4f7d60;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Lato', sans-serif;
    background: linear-gradient(180deg, #f5f2ec 0%, #ece7dd 100%);
    color: var(--text);
    line-height: 1.35;
    overflow-x: hidden;
}

h1,
h2,
h3 {
    margin: 0;
    font-weight: 700;
}

p {
    margin: 0;
}

.muted {
    color: var(--muted);
}

.hidden {
    display: none !important;
}

.app-shell {
    max-width: 1500px;
    margin: 0 auto;
    padding: 16px;
}

.app-shell--narrow {
    max-width: 900px;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    padding: 16px 18px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    box-shadow: 0 2px 8px rgba(47, 93, 80, 0.08);
}

.topbar-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px;
    min-width: 0;
}

.topbar-small-btn {
    padding: 6px 10px;
    font-size: 0.85rem;
}

.badge {
    border: 1px solid var(--line);
    background: #f3efe6;
    border-radius: 999px;
    padding: 6px 12px;
    font-size: 0.9rem;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.ghost-btn,
button {
    border: 1px solid var(--line);
    background: #f5f2e9;
    color: var(--text);
    border-radius: 10px;
    padding: 8px 14px;
    cursor: pointer;
    font-weight: 700;
    min-height: 36px;
}

button:hover,
.ghost-btn:hover {
    border-color: var(--accent);
    background: #e6efe9;
}

.layout {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 16px;
}

.layout > * {
    min-width: 0;
}

.layout--single {
    grid-template-columns: 1fr;
}

.panel--auto {
    min-height: auto;
}

.panel {
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    padding: 14px;
    min-height: 70vh;
    box-shadow: 0 2px 8px rgba(47, 93, 80, 0.06);
}

/* Left sidebar: sticky with independent scroll */
.project-list-panel {
    min-height: 0;
    position: sticky;
    top: 16px;
    align-self: start;
    max-height: calc(100vh - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.project-list-panel .project-list {
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    padding-right: 2px;
}

/* Search + filter controls in sidebar */
.sidebar-controls {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
    flex-shrink: 0;
}

.sidebar-controls input[type="search"],
.sidebar-controls select {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
    -webkit-appearance: none;
    appearance: none;
}

.sidebar-controls input[type="search"]:focus,
.sidebar-controls select:focus {
    border-color: var(--accent);
}

.sidebar-controls select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%235f6f6a'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 28px;
}

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

.admin-head-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.project-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: start;
}

.project-head-main {
    display: grid;
    gap: 4px;
    min-width: 0;
}

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

.project-item {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 12px;
    cursor: pointer;
}

.project-item:hover,
.project-item.active {
    border-color: var(--accent);
    background: #edf4f0;
}

.project-item-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.progress-track {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #d6ddd8;
    overflow: hidden;
    margin: 6px 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2f5d50, #4f7d60);
}

.project-item-bars {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin: 6px 0;
}

.project-bar-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.project-bar-label {
    font-size: 10px;
    color: var(--muted, #6b7c76);
    width: 40px;
    flex-shrink: 0;
}

.project-bar-track {
    flex: 1;
    margin: 0;
    height: 6px;
}

.project-bar-pct {
    font-size: 10px;
    color: var(--muted, #6b7c76);
    width: 36px;
    text-align: right;
    flex-shrink: 0;
}

.progress-fill--outdoor {
    background: linear-gradient(90deg, #2f5d50, #4f7d60);
}

.progress-fill--dataentry {
    background: linear-gradient(90deg, #3a5a7a, #5d7598);
}

.details-content {
    display: grid;
    gap: 12px;
    min-width: 0;
}

.details-content.details-is-loading {
    transition: min-height 0.18s ease;
}

#projectTitle {
    word-break: break-word;
}

#dashboardViewTabs {
    margin-left: 0;
    width: 100%;
}

.dashboard-switcher {
    display: flex;
    width: 100%;
    border: 1px solid #c8c1b3;
    border-radius: 999px;
    background: linear-gradient(180deg, #f2eee4 0%, #eae3d7 100%);
    padding: 3px;
    gap: 3px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dashboard-switch-btn {
    flex: 1 1 0;
    border: 1px solid transparent;
    background: transparent;
    border-radius: 999px;
    padding: 6px 14px;
    min-width: 0;
    font-size: 0.83rem;
    font-weight: 800;
    color: #4f5f5a;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.dashboard-switch-btn:hover {
    background: rgba(255, 255, 255, 0.55);
    border-color: #d8d1c4;
}

.dashboard-switch-btn.active {
    background: #ffffff;
    color: var(--accent);
    border-color: #bfc9c4;
    box-shadow: 0 1px 3px rgba(47, 93, 80, 0.16);
}

.project-list-panel .section-head {
    align-items: center;
    gap: 8px;
}

.project-list-panel .view-tab-btn {
    font-size: 0.8rem;
    padding: 5px 10px;
}

.inline-empty {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #f8f4ec;
    padding: 10px 12px;
    color: var(--muted);
}

.grid-two {
    display: grid;
    gap: 12px;
    grid-template-columns: 1fr 1fr;
    align-items: start;
}

.grid-two > * {
    min-width: 0;
}

.card {
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--surface);
    padding: 12px;
    overflow: hidden;
}

.card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

#burndownStatusTabs {
    margin-left: auto;
}

#burndownTabs {
    width: 100%;
    justify-content: flex-start;
}

.card-head h3 {
    margin: 0;
}

.mb-10 {
    margin-bottom: 10px;
}

.mt-8 {
    margin-top: 8px;
}

.mt-10 {
    margin-top: 10px;
}

.mt-12 {
    margin-top: 12px;
}

.view-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.view-tabs,
.tabs {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.view-tab-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 4px 10px;
    background: #f3efe6;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
}

.view-tab-btn:hover {
    border-color: var(--accent);
    background: #e6efe9;
}

.view-tab-btn.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

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

.status-card {
    border: 1px solid var(--line);
    border-left: 4px solid var(--accent);
    border-radius: 10px;
    padding: 10px;
    background: #faf8f3;
}

.status-card .value {
    font-size: 1.2rem;
    font-weight: 900;
    color: var(--text);
}

.status-card .label {
    color: var(--muted);
    font-size: 0.85rem;
}

.legend-grid {
    margin-top: 10px;
    display: grid;
    gap: 6px;
}

.legend-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 0.9rem;
    color: var(--muted);
    flex-wrap: wrap;
}

.legend-item-detail {
    display: flex;
    gap: 4px;
    align-items: baseline;
    font-size: 0.85rem;
}

.legend-item-sub {
    display: flex;
    gap: 12px;
    font-size: 0.75rem;
    padding: 1px 0 6px 18px;
    color: var(--muted);
    flex-wrap: wrap;
}

.sunburst-ring-labels {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.sunburst-ring-label {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 0.8rem;
    color: var(--muted);
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #f8f5ef;
}

.ring-swatch--inner {
    color: #8f9aa8;
    font-size: 0.9rem;
}

.ring-swatch--outer {
    color: #b0c4b8;
    font-size: 0.9rem;
}

.ring-swatch--bearbeitet {
    color: #90b09a;   /* lighter worker-green tone for bearbeitet */
    font-size: 0.9rem;
}

.ring-swatch--dateneingabe {
    color: #c0d5c8;   /* very light tone for dateneingabe */
    font-size: 0.9rem;
}

.ring-swatch--vorgemerkt {
    color: #b79a72;
    font-size: 0.9rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 6px;
}

#map {
    position: relative;
    height: 330px;
    border-radius: 10px;
    overflow: hidden;
}

#map.map-is-loading::after {
    content: attr(data-loading-text);
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    background: linear-gradient(135deg, rgba(242, 239, 232, 0.92), rgba(233, 227, 215, 0.92));
    color: var(--muted);
    font-weight: 700;
    text-align: center;
    z-index: 500;
}

.status-card-loading {
    opacity: 0.8;
}

.loading-block {
    height: 100%;
    min-height: 260px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: linear-gradient(180deg, #fbf8f2 0%, #f3ede2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
    text-align: center;
    padding: 12px;
}

.loading-table {
    min-height: 220px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: #fbf8f2;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    font-weight: 700;
    text-align: center;
    padding: 12px;
}

.map-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 18px;
    margin-top: 10px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #faf8f3;
    font-size: 0.85rem;
    color: var(--muted);
}

.legend-item-map {
    display: flex;
    align-items: center;
    gap: 6px;
}

.overview-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

/* Bundesland grouping in admin overview */
.overview-bundesland-group {
    grid-column: 1 / -1;
}

.overview-bundesland-head {
    font-size: 0.82rem;
    font-weight: 900;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 4px 2px 8px;
    border-bottom: 1px solid var(--line);
    margin-bottom: 10px;
}

.overview-bundesland-items {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.overview-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #faf8f3;
    padding: 10px 12px;
    display: grid;
    gap: 4px;
}

.overview-item.clickable {
    cursor: pointer;
}

.overview-item.clickable:hover {
    border-color: var(--accent);
}

.overview-item.clickable:focus-within,
.overview-item.clickable:focus {
    border-color: var(--accent);
    outline: none;
}

.overview-item-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 8px;
}

.overview-item-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--muted);
}

.map-nav-link {
    display: inline-block;
    margin-top: 6px;
    color: var(--accent);
    font-weight: 700;
    text-decoration: none;
}

.map-nav-link:hover {
    text-decoration: underline;
}

/* Map legend swatches */
.legend-swatch {
    display: inline-block;
    width: 18px;
    height: 14px;
    border-radius: 3px;
    border: 1.5px solid transparent;
    flex-shrink: 0;
    background: #d8ddd8;
}

.legend-swatch--solid {
    background: #aeb7b0;
    border-color: #66726b;
}

/* Dateneingabe: diagonal lines */
.legend-swatch--diag {
    background: repeating-linear-gradient(
        45deg,
        rgba(120,128,123,0.18) 0px,
        rgba(120,128,123,0.18) 3px,
        rgba(92,100,95,0.82) 3px,
        rgba(92,100,95,0.82) 5px
    );
    border-color: #66726b;
}

/* Vorgemerkt: cross lines */
.legend-swatch--cross {
    background:
        repeating-linear-gradient(
            45deg,
            rgba(92,100,95,0.78) 0px,
            rgba(92,100,95,0.78) 1.5px,
            transparent 1.5px,
            transparent 6px
        ),
        repeating-linear-gradient(
            -45deg,
            rgba(92,100,95,0.78) 0px,
            rgba(92,100,95,0.78) 1.5px,
            transparent 1.5px,
            transparent 6px
        ),
        rgba(120,128,123,0.16);
    border-color: #66726b;
}

/* Offen: empty / faint */
.legend-swatch--empty {
    background: rgba(255,211,122,0.52);
    border: 1px solid #6f7b86;
}

.legend-swatch--empty-fb {
    background: rgba(245,163,163,0.46);
    border: 1px solid #6f7b86;
}

.legend-swatch--empty-flurst {
    background: rgba(138,180,255,0.46);
    border: 1px solid #6f7b86;
}

.legend-swatch--source-fb {
    background: rgba(47, 93, 80, 0.18);
    border-color: rgba(47, 93, 80, 0.55);
}

.legend-swatch--source-flurst {
    background: rgba(185, 95, 95, 0.12);
    border: 1.5px dashed rgba(185, 95, 95, 0.75);
}

.viz-block {
    height: 340px;
    min-height: 260px;
}

.sunburst-hover {
    margin-top: 8px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fcfaf6;
    padding: 8px 10px;
    font-size: 0.9rem;
}

.kpi {
    font-size: 1.8rem;
    font-weight: 900;
    color: var(--accent);
}

#kpiInfo {
    text-align: right;
    font-size: 0.8rem;
    line-height: 1.25;
}

.meta-note {
    font-size: 0.78rem;
    color: var(--muted);
}

.inline-form {
    display: grid;
    grid-template-columns: 1fr 130px auto;
    gap: 8px;
    margin-bottom: 10px;
}

.inline-form-two {
    grid-template-columns: 1fr auto;
    margin-bottom: 0;
}

input,
textarea {
    border: 1px solid var(--line);
    background: #fffdf9;
    color: #253631;
    border-radius: 10px;
    padding: 8px 10px;
    font-family: inherit;
    min-height: 38px;
}

textarea {
    width: 100%;
    resize: vertical;
    min-height: 130px;
}

#projectNote {
    min-height: 120px;
}

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

.deadline-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.deadline-meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.deadline-days.warn {
    color: var(--warn);
}

.deadline-days.danger {
    color: var(--danger);
}

.note-actions {
    margin-top: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

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

.feedback-form {
    display: grid;
    gap: 8px;
}

.feedback-tag-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(150px, 1fr));
    gap: 6px;
}

.feedback-tag-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 32px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 5px 8px;
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text);
    background: var(--surface);
    cursor: pointer;
    user-select: none;
    transition: border-color 0.15s ease, transform 0.12s ease, filter 0.15s ease;
}

.feedback-tag-button input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.feedback-tag-button span {
    line-height: 1.1;
    text-align: center;
}

.feedback-tag-button:hover {
    border-color: var(--accent);
    filter: brightness(0.98);
}

.feedback-tag-button:has(input:checked) {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
    background: var(--accent-soft);
    transform: translateY(-1px);
}

.feedback-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--muted);
}

.feedback-checkbox input {
    width: auto;
}

.worker-rows {
    display: grid;
    gap: 8px;
}

.worker-row {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 8px;
    background: #fbf9f5;
}

.worker-row-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.worker-row-grid {
    display: grid;
    grid-template-columns: 1fr 150px;
    gap: 8px;
}

.remove-worker-btn {
    padding: 4px 8px;
    font-size: 0.78rem;
}

@media (max-width: 900px) {
    .feedback-tag-grid {
        grid-template-columns: repeat(2, minmax(140px, 1fr));
    }
}

@media (max-width: 620px) {
    .feedback-tag-grid {
        grid-template-columns: 1fr;
    }

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

.tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.tab-btn {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 6px 12px;
    background: #f3efe6;
}

.tab-btn.active {
    border-color: var(--accent);
    background: var(--accent-soft);
    color: var(--accent);
}

.admin-settings-grid {
    display: grid;
    gap: 8px;
}

.admin-settings-split {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    align-items: start;
}

.admin-bindings-column {
    margin: 0;
}

.admin-inline-two {
    display: grid;
    grid-template-columns: 1fr 140px;
    gap: 8px;
}

.admin-worker-block {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px;
    display: grid;
    gap: 8px;
}

.admin-worker-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(200px, 260px);
    gap: 8px;
    align-items: center;
}

.admin-binding-cell {
    min-height: 34px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    padding: 4px 8px;
}

.admin-binding-empty {
    color: var(--muted);
    font-size: 0.82rem;
}

.admin-binding-account {
    font-size: 0.85rem;
    font-weight: 600;
}

.admin-binding-account.y { color: #8b6d1a; }
.admin-binding-account.r { color: #a04747; }
.admin-binding-account.g { color: #3f6b50; }
.admin-binding-account.b { color: #4d6285; }

.admin-worker-y {
    background: #f8f3e3;
    border-color: #e3d3a6;
}

.admin-worker-r {
    background: #f7e9e9;
    border-color: #dfb1b1;
}

.admin-worker-g {
    background: #eaf4ed;
    border-color: #b6d2bf;
}

.admin-worker-b {
    background: #eaf0f8;
    border-color: #b3c4df;
}

.small-btn {
    padding: 4px 8px;
    font-size: 0.78rem;
    min-height: 30px;
}

.archive-detail {
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fbf9f5;
    padding: 10px;
    white-space: pre-wrap;
    max-height: 340px;
    overflow: auto;
    font-size: 0.8rem;
}

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

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

#dailyTable {
    overflow-x: auto;
}

#dailyTable table {
    min-width: 640px;
}

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

thead th {
    color: var(--muted);
    font-weight: 700;
}

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

    .panel {
        min-height: auto;
    }

    /* Disable sticky sidebar on small screens */
    .project-list-panel {
        position: static;
        max-height: none;
        display: block;
        overflow: visible;
    }

    .project-list-panel .project-list {
        overflow: visible;
        max-height: none;
    }

    .grid-two {
        grid-template-columns: 1fr;
    }

    .status-grid {
        grid-template-columns: repeat(2, minmax(120px, 1fr));
    }

    .inline-form {
        grid-template-columns: 1fr;
    }

    .inline-form-two {
        grid-template-columns: 1fr;
    }

    .admin-inline-two {
        grid-template-columns: 1fr;
    }

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

    .admin-settings-split {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 820px) {
    .app-shell {
        padding: 10px;
    }

    .topbar {
        padding: 12px;
    }

    .topbar-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .badge {
        width: 100%;
        text-align: center;
    }

    .project-head {
        grid-template-columns: 1fr;
    }

    .project-head-main {
        gap: 6px;
    }

    #projectAdminSettingsBtn {
        justify-self: start;
    }

    #kpiInfo {
        text-align: left;
        font-size: 0.82rem;
    }

    .status-grid {
        grid-template-columns: 1fr 1fr;
    }

    #map,
    .viz-block {
        height: 280px;
        min-height: 220px;
    }

    .deadline-item {
        flex-direction: column;
        align-items: flex-start;
    }

    .note-actions {
        flex-direction: column;
        align-items: stretch;
    }

    .note-actions button {
        width: 100%;
    }

    .note-actions .muted {
        text-align: left;
    }

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

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

@media (max-width: 560px) {
    h1 {
        font-size: 1.2rem;
    }

    h2 {
        font-size: 1.05rem;
    }

    h3 {
        font-size: 0.98rem;
    }

    .panel,
    .card {
        padding: 10px;
    }

    .status-grid {
        grid-template-columns: 1fr;
    }

    #map,
    .viz-block {
        height: 240px;
        min-height: 200px;
    }

    .view-tab-btn,
    .dashboard-switch-btn,
    .topbar-small-btn {
        width: 100%;
    }

    .view-tabs,
    .dashboard-switcher,
    #dashboardViewTabs {
        width: 100%;
    }
}