*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: system-ui, sans-serif;
    background: #e8edf2;
    color: #1b2430;
    line-height: 1.5;
}

.page {
    max-width: 1120px;
    margin: 0 auto;
    padding: 32px 32px 72px;
}

.page.capture main {
    width: 420px;
    margin-inline: auto;
}

.phone {
    width: 420px;
    height: 640px;
    box-sizing: border-box;
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
    padding: 16px 16px 14px;
    background: #ffffff;
    border: 1px solid #d3dae3;
    border-radius: 28px;
}

.phone-notice {
    min-height: 1.2em;
    margin: 0 0 8px;
    color: #8a2a2a;
    font-size: 0.85rem;
}

.phone-head h2 {
    height: 4.4em;
    margin: 0;
    overflow: hidden;
    font-size: 1.05rem;
    line-height: 1.35;
}

.phone-head h2 .head-sub {
    display: block;
    overflow: hidden;
    color: #3d4b5c;
    font-size: 0.8rem;
    font-weight: 450;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.phone-head h2 .head-sub:empty {
    display: none;
}

.last-capture {
    margin-left: 8px;
    color: #3d4b5c;
    font-size: 0.75rem;
    font-weight: 450;
    line-height: 1.3;
    white-space: nowrap;
}

.last-capture.is-saved {
    color: #1f7a3a;
}

.last-capture.is-abort {
    color: #a32020;
}

.dots {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 10px;
}

.dot {
    width: 14px;
    height: 14px;
    padding: 0;
    border: 2px solid #c5ced8;
    border-radius: 50%;
    background: transparent;
}

.dot.is-on {
    border-color: #1b2430;
    background: #1b2430;
    cursor: pointer;
}

.dot:disabled {
    cursor: default;
}

.dot:focus-visible {
    outline: 3px solid #1b2430;
    outline-offset: 3px;
}

.phone-body {
    min-height: 0;
    margin-top: 12px;
    overflow: auto;
    scrollbar-gutter: stable;
}

.page.capture .step {
    padding: 0;
    border: 0;
    background: transparent;
}

.page.capture .choices {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    align-content: start;
}

.page.capture .choice {
    height: 56px;
    min-height: 56px;
    padding: 8px;
    font-size: 0.95rem;
}

.page.capture .choice-wide {
    grid-column: 1 / -1;
}

.page.capture .choice:disabled {
    color: inherit;
    opacity: 1;
    cursor: default;
}

.page.capture .choice:disabled[aria-pressed="true"] {
    background: #1b2430;
    border-color: #1b2430;
    color: #ffffff;
}

.phone-action {
    display: grid;
    min-height: 68px;
    margin-top: 12px;
}

.phone-action .save {
    grid-area: 1 / 1;
    min-height: 52px;
    font-size: 1rem;
}

.page.capture .detail-group {
    margin-top: 0;
}

.page.capture .detail-group h3 {
    margin: 0 0 8px;
    font-size: 0.85rem;
}

.page.capture .detail-group:first-child h3 {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.page.capture .choices + .detail-group,
.page.capture .detail-group + .detail-group {
    margin-top: 12px;
}

.summary-sector + .summary-sector {
    margin-top: 14px;
}

header {
    margin-bottom: 24px;
}

header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 650;
    letter-spacing: -0.02em;
}

.nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.nav a {
    color: inherit;
    text-decoration: none;
    font-weight: 650;
    padding: 10px 16px;
    border: 1px solid #d3dae3;
    border-radius: 999px;
    background: #ffffff;
}

.nav a[aria-current="page"] {
    background: #1b2430;
    border-color: #1b2430;
    color: #ffffff;
}

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

.summary p {
    margin: 0;
    padding: 20px 24px;
    background: #ffffff;
    border: 1px solid #d3dae3;
    border-radius: 12px;
}

.summary strong {
    display: block;
    font-size: 1.75rem;
    line-height: 1.2;
}

.records {
    display: grid;
    gap: 16px;
}

.record {
    background: #ffffff;
    border: 1px solid #d3dae3;
    border-radius: 12px;
    padding: 24px 28px;
}

.record-head,
.record-fields div {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: baseline;
}

.record-head {
    margin-bottom: 16px;
}

.record-id,
.record-time {
    margin: 0;
}

.record-id {
    font-weight: 650;
}

.record-fields {
    margin: 0;
    display: grid;
    gap: 12px;
}

.record-fields div {
    padding-top: 12px;
    border-top: 1px solid #e4e9ee;
}

.record-fields dt {
    font-weight: 650;
}

.record-fields dd {
    margin: 0;
    text-align: right;
}

.details {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.details li {
    padding: 4px 10px;
    border-radius: 999px;
    background: #f4f7fa;
}

.empty {
    margin: 0;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #d3dae3;
    border-radius: 12px;
}

main {
    display: grid;
    gap: 24px;
}

.notice {
    margin: 0;
    padding: 14px 18px;
    border: 1px solid #d3dae3;
    border-radius: 12px;
    background: #ffffff;
    color: #1b2430;
}

.notice[hidden] {
    display: none;
}

.notice[data-state="error"] {
    color: #7a3030;
    border-color: #e0c4c4;
}

.step {
    background: #ffffff;
    border: 1px solid #d3dae3;
    border-radius: 12px;
    padding: 40px;
}

.step[hidden] {
    display: none;
}

main h2 {
    margin: 0 0 24px;
    font-size: 1.25rem;
    font-weight: 650;
}

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

.choice {
    font: inherit;
    font-size: 1.25rem;
    font-weight: 650;
    min-height: 88px;
    padding: 20px 16px;
    border: 2px solid #c5ced8;
    border-radius: 12px;
    background: #f4f7fa;
    color: inherit;
    cursor: pointer;
}

.choice:hover {
    border-color: #7f93a8;
}

.choice:focus-visible {
    outline: 3px solid #1b2430;
    outline-offset: 3px;
}

.choice[aria-pressed="true"] {
    background: #1b2430;
    border-color: #1b2430;
    color: #ffffff;
}

.save-bar {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid #d3dae3;
}

.save {
    font: inherit;
    font-size: 1.25rem;
    font-weight: 650;
    width: 100%;
    min-height: 88px;
    padding: 20px 16px;
    border: 2px solid #1b2430;
    border-radius: 12px;
    background: #1b2430;
    color: #ffffff;
    cursor: pointer;
}

.save:disabled {
    background: #eef1f4;
    border-color: #d3dae3;
    color: #8b97a6;
    cursor: not-allowed;
}

.save:focus-visible {
    outline: 3px solid #1b2430;
    outline-offset: 3px;
}

.panel {
    background: #ffffff;
    border: 1px solid #d3dae3;
    border-radius: 12px;
    padding: 24px 28px;
}

.panel h2,
.panel h3 {
    margin: 0 0 12px;
    font-weight: 650;
}

.panel h2 {
    font-size: 1.25rem;
}

.panel h3 {
    margin-top: 20px;
    font-size: 1rem;
}

.panel-note,
.filter-state,
.filter-note {
    margin: 12px 0 0;
    color: #3d4b5c;
    font-size: 0.95rem;
}

.filter-note {
    margin-bottom: 0;
}

.filter {
    display: grid;
    gap: 16px;
}

.mode {
    margin: 0;
    padding: 0;
    border: 0;
}

.mode legend {
    font-weight: 650;
    margin-bottom: 8px;
}

.mode + .mode {
    margin-top: 14px;
}

.mode-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.zeitraum-row {
    display: flex;
    align-items: flex-start;
    gap: 8px;
}

.zeitraum-row .mode-options {
    flex: 1;
}

.page-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    flex: 0 0 auto;
    border: 1px solid #d3dae3;
    border-radius: 999px;
    background: #f4f7fa;
    color: #1b2430;
    font-size: 1.25rem;
    font-weight: 650;
    line-height: 1;
    text-decoration: none;
}

.page-arrow.is-disabled {
    opacity: 0.35;
}

.page-arrow:focus-visible {
    outline: 3px solid #1b2430;
    outline-offset: 3px;
}

.page.dashboard .heat-slot .heat.is-selected {
    z-index: 1;
    outline: 2px solid #1b2430;
    outline-offset: 1px;
    box-shadow: inset 0 0 0 2px #ffffff;
}

.mode-option {
    position: relative;
    cursor: pointer;
}

.mode-option input {
    position: absolute;
    opacity: 0;
}

.mode-option span {
    display: inline-block;
    padding: 10px 16px;
    border: 1px solid #d3dae3;
    border-radius: 999px;
    background: #f4f7fa;
    font-weight: 650;
}

.mode-option input:checked + span {
    background: #1b2430;
    border-color: #1b2430;
    color: #ffffff;
}

.mode-option input:focus-visible + span {
    outline: 3px solid #1b2430;
    outline-offset: 3px;
}

.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px 16px;
    align-items: end;
}

.filter-grid label {
    display: grid;
    gap: 6px;
    font-weight: 650;
}

.filter-grid select,
.filter-grid input,
.apply {
    font: inherit;
    color: inherit;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #c5ced8;
    border-radius: 10px;
    background: #ffffff;
}

.filter-grid input[type="date"]:disabled {
    color: inherit;
    opacity: 1;
    -webkit-text-fill-color: inherit;
}

.page.dashboard .filter-grid {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr) auto;
    grid-template-areas:
        "dates dates states states"
        "herkunft interesse detail apply";
}

.page.dashboard .filter-dates {
    grid-area: dates;
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px 16px;
}

.page.dashboard .filter-herkunft {
    grid-area: herkunft;
}

.page.dashboard .filter-interesse {
    grid-area: interesse;
}

.page.dashboard .filter-detail {
    grid-area: detail;
}

.page.dashboard .filter-grid .apply {
    grid-area: apply;
}

.page.dashboard .filter-states {
    grid-area: states;
    display: grid;
    gap: 6px;
    align-content: end;
    font-weight: 650;
}

.page.dashboard .state-options {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 44px;
}

.page.dashboard .state-option {
    position: relative;
    cursor: pointer;
}

.page.dashboard .state-option input {
    position: absolute;
    opacity: 0;
}

.page.dashboard .state-option .heat {
    display: block;
    width: 28px;
    height: 28px;
    border-radius: 6px;
}

.page.dashboard .state-option input:checked + .heat {
    box-shadow: inset 0 0 0 2px #ffffff, 0 0 0 2px #1b2430;
}

.page.dashboard .state-option input:focus-visible + .heat {
    outline: 3px solid #1b2430;
    outline-offset: 3px;
}

.weekday-filter {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    margin-top: 14px;
    font-weight: 650;
}

.weekday-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.weekday-option {
    position: relative;
    cursor: pointer;
}

.weekday-option input {
    position: absolute;
    opacity: 0;
}

.weekday-option span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    min-height: 44px;
    padding: 0 10px;
    border: 1px solid #d3dae3;
    border-radius: 999px;
    background: #f4f7fa;
}

.weekday-option input:checked + span {
    background: #1b2430;
    border-color: #1b2430;
    color: #ffffff;
}

.weekday-option input:focus-visible + span {
    outline: 3px solid #1b2430;
    outline-offset: 3px;
}

.apply {
    font-weight: 650;
    background: #1b2430;
    border-color: #1b2430;
    color: #ffffff;
    cursor: pointer;
}

.apply:focus-visible,
.filter-grid select:focus-visible,
.filter-grid input:focus-visible {
    outline: 3px solid #1b2430;
    outline-offset: 2px;
}

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

.kpi p {
    margin: 0;
    padding: 16px 18px;
    background: #ffffff;
    border: 1px solid #d3dae3;
    border-radius: 12px;
}

.kpi strong {
    display: block;
    font-size: 1.35rem;
    line-height: 1.25;
}

.kpi span {
    display: block;
    color: #3d4b5c;
    font-size: 0.9rem;
}

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

.bars {
    display: grid;
    gap: 8px;
}

.bar-row {
    display: grid;
    grid-template-columns: 7.5rem minmax(0, 1fr) auto;
    gap: 8px 12px;
    align-items: center;
}

.bar-row-wide {
    grid-template-columns: 11rem minmax(0, 1fr) auto;
}

.bar-row-combo {
    grid-template-columns: minmax(0, 1.4fr) minmax(4rem, 0.8fr) auto;
}

.bar-label,
.bar-value {
    font-size: 0.95rem;
}

.bar-value {
    font-variant-numeric: tabular-nums;
    text-align: right;
    white-space: nowrap;
}

.bar-track {
    display: block;
    height: 10px;
    border-radius: 999px;
    background: #e8edf2;
    overflow: hidden;
}

.bar-fill {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: #1b2430;
}

.bar-fill-quiet {
    background: #5d6d80;
}

.detail-group {
    margin-top: 28px;
}

.detail-group h3 {
    margin: 0 0 12px;
    font-size: 1.05rem;
    font-weight: 650;
}

.duration-kpi {
    margin: 16px 0 8px;
}

.timing-block dd {
    text-align: left;
}

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

.timing-list li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
}

.timing-note {
    margin: 8px 0 0;
    color: #3d4b5c;
    font-size: 0.9rem;
}

.stage-times {
    display: grid;
    gap: 0;
    margin: 8px 0 20px;
}

.stage-times div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    padding: 10px 0;
    border-top: 1px solid #e4e9ee;
}

.stage-times .is-total {
    font-weight: 650;
}

.year-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 8px 0 4px;
}

.year-switch a {
    color: #1b2430;
    font-weight: 650;
}

.year-switch a[aria-current="page"] {
    text-decoration: underline;
}

.level-pair {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #e4e9ee;
}

.level-pair h3,
.level-pair h4 {
    margin: 0;
    font-size: 1rem;
}

.level-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    align-items: baseline;
    margin-bottom: 8px;
}

.level-times {
    margin: 0;
    color: #3d4b5c;
    font-size: 0.9rem;
    text-align: right;
}

.level-times strong {
    color: #1b2430;
}

.level-total {
    margin-top: 12px;
    font-weight: 650;
}

.page main > .panel,
.page main > .split,
.compare article {
    min-width: 0;
}

.art-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
}

.art-switch form {
    margin: 0;
}

.art-switch button {
    font: inherit;
    font-weight: 650;
    padding: 10px 16px;
    border: 1px solid #d3dae3;
    border-radius: 999px;
    background: #f4f7fa;
    color: inherit;
    cursor: pointer;
}

.art-switch button[aria-current="true"] {
    background: #1b2430;
    border-color: #1b2430;
    color: #ffffff;
}

.art-switch button:focus-visible {
    outline: 3px solid #1b2430;
    outline-offset: 3px;
}

.compare {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

.compare label {
    display: grid;
    gap: 6px;
    font-weight: 650;
}

.compare select,
.compare input {
    font: inherit;
    color: inherit;
    min-height: 44px;
    padding: 8px 12px;
    border: 1px solid #c5ced8;
    border-radius: 10px;
    background: #ffffff;
}

.compare .heat.is-selected {
    outline: 2px solid #1b2430;
    outline-offset: -2px;
    box-shadow: inset 0 0 0 2px #ffffff;
}

.compare fieldset {
    margin: 0;
    padding: 0;
    border: 0;
    display: grid;
    gap: 12px;
}

.compare legend {
    font-weight: 650;
    margin-bottom: 8px;
}

.compare-result article h3 {
    margin-bottom: 4px;
}

.compare-table {
    display: grid;
    gap: 0;
    margin: 8px 0 20px;
}

.compare-row {
    display: grid;
    grid-template-columns: minmax(8rem, 1.4fr) 1fr 1fr auto;
    gap: 12px;
    padding: 8px 0;
    border-top: 1px solid #e4e9ee;
}

.compare-head {
    color: #3d4b5c;
    font-size: 0.85rem;
}

.compare-form .apply {
    margin-top: 16px;
}

.lead {
    height: 408px;
    overflow: auto;
}

.page.dashboard .lead {
    height: auto;
    min-height: 408px;
    overflow: visible;
}

.lead.step {
    padding: 24px 28px;
}

.lead.step h2 {
    margin-bottom: 16px;
}

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

.lead .art-switch,
.lead .compare {
    margin-top: 12px;
}

.lead .compare {
    grid-template-columns: 1fr 1fr auto;
    align-items: end;
}

.lead .compare-form .apply {
    margin-top: 0;
}

.heat-slot .compare > * {
    min-width: 0;
}

.compare-page .heat-slot .cal-months,
.compare-page .heat-slot .cal-grid {
    grid-auto-columns: 7px;
    gap: 1px;
}

.compare-page .heat-slot .cal-months {
    margin-left: 18px;
    height: 12px;
    margin-bottom: 2px;
}

.compare-page .heat-slot .cal-months span {
    min-width: 0;
    font-size: 0.65rem;
    line-height: 12px;
}

.compare-page .heat-slot .cal-body {
    grid-template-columns: 16px auto;
    gap: 2px;
}

.compare-page .heat-slot .cal-names {
    grid-template-rows: repeat(7, 7px);
    gap: 1px;
    font-size: 0.55rem;
    line-height: 7px;
}

.compare-page .heat-slot .cal-grid {
    grid-template-rows: repeat(7, 7px);
}

.compare-page .heat-slot .heat {
    width: 7px;
    height: 7px;
    border-radius: 2px;
}

.compare-page .heat-slot .heat.is-selected {
    outline-width: 1px;
    outline-offset: 1px;
}

.compare-page .heat-slot .cal-legend .heat {
    width: 10px;
    height: 10px;
}

.lead .filter {
    display: grid;
    gap: 12px;
}

.lead .save-bar {
    margin-top: 16px;
    padding-top: 16px;
}

.lead .save {
    min-height: 56px;
    font-size: 1.05rem;
}

.heat-head {
    height: 68px;
    overflow: hidden;
    margin-bottom: 8px;
}

.heat-head h2,
.heat-slot h2 {
    margin: 0 0 4px;
}

.heat-head .panel-note {
    margin: 0;
}

.heat-slot > .compare,
.heat-slot .cal-scroll {
    margin-top: 0;
}

.cal-scroll {
    overflow-x: auto;
    max-width: 100%;
    margin-top: 16px;
    padding-bottom: 8px;
}

.cal-months,
.cal-grid {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 14px;
    gap: 3px;
}

.cal-months {
    margin-left: 28px;
    height: 18px;
    margin-bottom: 4px;
}

.cal-months span {
    font-size: 0.75rem;
    line-height: 18px;
    white-space: nowrap;
    overflow: visible;
}

.cal-body {
    display: grid;
    grid-template-columns: 24px auto;
    gap: 4px;
}

.cal-names {
    display: grid;
    grid-template-rows: repeat(7, 14px);
    gap: 3px;
    color: #3d4b5c;
    font-size: 0.7rem;
    line-height: 14px;
}

.cal-grid {
    grid-template-rows: repeat(7, 14px);
}

.heat {
    position: relative;
    width: 14px;
    height: 14px;
    padding: 0;
    border: 0;
    border-radius: 3px;
    background: #e8edf2;
}

button.heat,
a.heat {
    cursor: pointer;
    color: inherit;
    text-decoration: none;
}

a.heat {
    display: block;
}

.heat.is-selected {
    outline: 2px solid #1b2430;
    outline-offset: 2px;
}

.heat-1 {
    background: #c5d0dc;
}

.heat-2 {
    background: #8ea0b3;
}

.heat-3 {
    background: #4d6278;
}

.heat-4 {
    background: #1b2430;
}

.heat-out {
    background: transparent;
}

.heat-tip {
    display: none;
    position: absolute;
    left: 50%;
    bottom: calc(100% + 6px);
    transform: translateX(-50%);
    z-index: 2;
    width: max-content;
    max-width: 180px;
    padding: 6px 8px;
    border-radius: 8px;
    background: #1b2430;
    color: #ffffff;
    font-size: 0.75rem;
    line-height: 1.3;
    text-align: left;
    pointer-events: none;
}

.heat:hover .heat-tip,
.heat:focus .heat-tip,
.heat:focus-visible .heat-tip {
    display: block;
}

.heat:focus-visible {
    outline: 2px solid #1b2430;
    outline-offset: 1px;
}

.cal-legend {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: #3d4b5c;
    font-size: 0.85rem;
}

.cal-legend .heat {
    display: inline-block;
}

.legend-label {
    margin-right: 8px;
}

@media (max-width: 900px) {
    .page {
        padding: 32px 20px 48px;
    }

    header {
        margin-bottom: 24px;
    }

    header h1 {
        font-size: 1.75rem;
    }

    .summary,
    .record-head,
    .record-fields div {
        grid-template-columns: 1fr;
    }

    .record-fields div {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .record-fields dd,
    .details {
        text-align: left;
        justify-content: flex-start;
    }

    main {
        gap: 20px;
    }

    .step {
        padding: 28px;
    }

    .choices {
        gap: 12px;
        grid-template-columns: 1fr;
    }

    .lead .choices {
        grid-template-columns: 1fr 1fr;
    }

    .choice {
        min-height: 76px;
        font-size: 1.125rem;
    }

    .save-bar {
        margin-top: 24px;
        padding-top: 24px;
    }

    .save {
        min-height: 76px;
        font-size: 1.125rem;
    }

    .lead {
        height: auto;
        overflow: visible;
    }

    .filter-grid,
    .split,
    .kpi {
        grid-template-columns: 1fr;
    }

    .page.dashboard .filter-grid {
        grid-template-columns: 1fr;
        grid-template-areas:
            "dates"
            "states"
            "herkunft"
            "interesse"
            "detail"
            "apply";
    }

    .bar-row,
    .bar-row-wide,
    .bar-row-combo {
        grid-template-columns: minmax(4.5rem, 34%) 1fr auto;
    }

    .mode-options {
        display: grid;
    }

    .cal-months {
        margin-left: 24px;
    }

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

    .level-head {
        display: grid;
    }

    .level-times {
        text-align: left;
    }

    .page.capture main,
    .phone {
        width: min(100%, 420px);
    }

    .page.capture .choices {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 8px;
    }

    .page.capture .choice {
        height: 56px;
        min-height: 56px;
        font-size: 0.95rem;
    }

    .phone-action .save {
        min-height: 52px;
        font-size: 1rem;
    }
}

.page.admin main {
    max-width: 1080px;
}

.admin-note,
.admin-error,
.admin-ok {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 10px;
}

.admin-note {
    background: #fff8e8;
    border: 1px solid #ead7a4;
}

.admin-error {
    background: #fde8e8;
    border: 1px solid #e3b4b4;
}

.admin-ok {
    background: #e7f6ec;
    border: 1px solid #b7dfc3;
}

.admin-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0 0 24px;
}

.admin-nav a {
    padding: 8px 14px;
    border: 1px solid #c5ced8;
    border-radius: 999px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}

.admin-nav a[aria-current="page"] {
    background: #1b2430;
    border-color: #1b2430;
    color: #ffffff;
}

.admin-card,
.admin-switch {
    margin: 0 0 16px;
    padding: 16px;
    background: #ffffff;
    border: 1px solid #d3dae3;
    border-radius: 12px;
}

.admin-key {
    margin: 0 0 12px;
    color: #3d4b5c;
    font-size: 0.9rem;
}

.admin-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: end;
}

.admin-fields label,
.admin-switch label {
    display: grid;
    gap: 4px;
    font-size: 0.85rem;
}

.admin-fields input,
.admin-fields select,
.admin-switch select {
    min-width: 160px;
    padding: 8px 10px;
    border: 1px solid #c5ced8;
    border-radius: 8px;
    font: inherit;
    background: #ffffff;
}

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

.admin-card fieldset {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    margin: 12px 0 0;
    border: 1px solid #e1e7ee;
    border-radius: 8px;
}

.admin-card button,
.admin-switch button,
.admin-move button {
    min-height: 42px;
    padding: 8px 14px;
    border: 1px solid #1b2430;
    border-radius: 8px;
    background: #1b2430;
    color: #ffffff;
    font: inherit;
}

.admin-move {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin: -8px 0 16px;
}

.admin-move button:disabled {
    opacity: 0.45;
}

.admin-raster {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 8px;
    margin: 0 0 24px;
}

.admin-colhead {
    color: #5c6b7a;
    font-size: 0.8rem;
    text-align: center;
}

.admin-cell {
    min-height: 72px;
    padding: 10px;
    border: 1px dashed #b7c2ce;
    border-radius: 10px;
    background: #f7f9fb;
}

a.admin-cell.is-button {
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-style: solid;
    border-color: #1b2430;
    background: #ffffff;
    color: inherit;
    font-weight: 650;
    text-decoration: none;
}

a.admin-cell.is-button.is-selected {
    background: #1b2430;
    color: #ffffff;
}

a.admin-cell.is-button.is-selected small {
    color: #d5dde6;
}

.admin-inactive {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 12px;
    align-items: center;
    margin: 0 0 16px;
}

.admin-inactive a {
    color: inherit;
}

.admin-inactive a[aria-current="true"] {
    font-weight: 650;
}

.admin-cell small,
.admin-cell.is-empty {
    color: #5c6b7a;
    font-size: 0.8rem;
    font-weight: 400;
}

.page.login main {
    max-width: 560px;
}

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

.login-people button,
.login-choice,
.login-pin button,
.nav form button {
    min-height: 64px;
    padding: 16px 18px;
    border: 1px solid #1b2430;
    border-radius: 12px;
    background: #ffffff;
    color: #1b2430;
    font: inherit;
    font-size: 1.35rem;
    font-weight: 650;
    text-align: center;
    text-decoration: none;
}

.login-pin {
    display: grid;
    gap: 14px;
}

.login-pin label {
    display: grid;
    gap: 6px;
}

.login-pin input {
    min-height: 64px;
    padding: 12px 14px;
    border: 1px solid #c5ced8;
    border-radius: 12px;
    font: inherit;
    font-size: 1.5rem;
    letter-spacing: 0.4em;
}

.nav form {
    margin: 0;
}

.nav form button {
    min-height: 0;
    padding: 8px 14px;
    border-radius: 999px;
    font-size: 1rem;
}
