/* Haushalt im Stil von iOS „Erinnerungen“ */

.rem-nav {
    margin-bottom: 22px;
}

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

.smart-card,
.list-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.smart-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.smart-card strong,
.list-card strong {
    font-size: 22px;
    font-weight: 600;
}

.list-card strong {
    margin-left: auto;
    font-size: 16px;
}

.smart-label {
    color: var(--muted);
    font-size: 13px;
}

.smart-card.active,
.list-card.active {
    border-color: var(--accent);
    background: var(--accent-soft);
}

.smart-card:focus-visible,
.list-card:focus-visible,
.rem-check:focus-visible,
.rem-body:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 2px;
}

.rem-nav-title {
    margin: 18px 0 8px;
    font-size: 15px;
}

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

.list-dot {
    flex: none;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--list-color);
}

.list-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rem-list {
    display: grid;
    gap: 18px;
}

.rem-group h3 {
    margin: 0 0 4px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rem-group.overdue h3 {
    color: #c0392b;
}

.rem {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.rem-check {
    flex: none;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    padding: 0;
    border: 2px solid var(--list-color);
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
}

.rem.done .rem-check {
    background: var(--list-color);
    box-shadow: inset 0 0 0 3px var(--surface);
}

.rem-body {
    display: grid;
    flex: 1;
    gap: 2px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.rem-title {
    font-size: 15px;
    overflow-wrap: anywhere;
}

.rem.done .rem-title {
    color: var(--muted);
}

.rem-prio {
    color: var(--list-color);
    font-weight: 700;
}

.rem-notes {
    overflow: hidden;
    color: var(--muted);
    font-size: 13px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.rem-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 10px;
    color: var(--muted);
    font-size: 12px;
}

.rem-due.overdue {
    color: #c0392b;
    font-weight: 600;
}

.rem-listname {
    color: var(--list-color);
}

/* Bearbeiten-Dialog */
.rem-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.rem-form > input,
.rem-form > textarea,
.rem-form .wide {
    grid-column: 1 / -1;
}

.rem-form .field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.rem-form .field input,
.rem-form .field select,
.rem-form textarea {
    width: 100%;
    min-width: 0;
}

.rem-form .field :disabled {
    opacity: 0.5;
}

.rem-form .hint:empty {
    display: none;
}

/* Namen und Benachrichtigungen (unverändert übernommen) */
.people-form {
    display: grid;
    gap: 10px;
}

.people-form input {
    width: 100%;
}

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

.task-form .field {
    display: grid;
    gap: 6px;
    color: var(--muted);
    font-size: 13px;
}

.notify-row {
    display: grid;
    gap: 8px;
}

.notify-row .check {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
}

.hint.warn {
    color: #b9770e;
}

@media (max-width: 700px) {
    .smart-lists {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .my-lists {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (max-width: 480px) {
    .rem-form {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Wochenübersicht (Startansicht): schmaler Bereich „Allgemein“, darunter kompakte Kalenderwoche */
.week-nav {
    display: flex;
    gap: 6px;
}

.smart-lists {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.wk-general {
    margin-bottom: 12px;
    padding: 10px 14px 12px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
}

.wk-general-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 6px;
}

.wk-general h3,
.wk-day h3 {
    margin: 0;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.wk-link {
    padding: 0;
    border: 0;
    background: none;
    color: var(--muted);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.wk-link:hover {
    color: var(--ink);
}

.wk-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 8px;
}

.wk-chip {
    display: inline-flex;
    align-items: baseline;
    gap: 6px;
    padding: 3px 10px;
    border: 1px solid var(--line);
    border-left: 3px solid var(--list-color);
    border-radius: 999px;
    background: var(--surface);
    color: var(--ink);
    font: inherit;
    font-size: 12px;
    cursor: pointer;
}

.wk-chip-area {
    font-weight: 600;
}

.wk-chip-person {
    color: var(--list-color);
    font-weight: 600;
}

.wk-chip-note {
    color: var(--muted);
}

.wk-todos {
    columns: 3 200px;
    column-gap: 18px;
}

.wk-todos .week-item {
    break-inside: avoid;
}

.wk-empty {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.wk-grid {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface);
    overflow: hidden;
}

.wk-day {
    min-height: 110px;
    padding: 8px 8px 10px;
    border-left: 1px solid var(--line);
}

.wk-day:first-child {
    border-left: 0;
}

.wk-day.today {
    background: var(--accent-soft);
}

.wk-day.past .week-title {
    opacity: 0.75;
}

.wk-day h3 {
    display: flex;
    align-items: baseline;
    gap: 6px;
    margin-bottom: 6px;
}

.wk-day.today h3 {
    color: var(--ink);
}

.wk-date {
    color: var(--muted);
    font-size: 11px;
    font-weight: 400;
    letter-spacing: 0;
}

.week-item {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    padding: 3px 0;
}

.week-item .rem-check {
    flex: none;
    width: 14px;
    height: 14px;
    margin: 0;
    border-width: 2px;
}

.week-item.done .rem-check {
    background: var(--list-color);
    box-shadow: inset 0 0 0 2px var(--surface);
}

.week-repeat-mark {
    flex: none;
    width: 14px;
    color: var(--list-color);
    font-size: 11px;
    text-align: center;
}

.week-body {
    display: flex;
    flex: 1;
    align-items: baseline;
    gap: 5px;
    min-width: 0;
    padding: 0;
    border: 0;
    background: none;
    color: var(--ink);
    font: inherit;
    font-size: 12.5px;
    line-height: 1.35;
    text-align: left;
    cursor: pointer;
}

.week-time {
    flex: none;
    color: var(--muted);
    font-size: 11px;
    font-variant-numeric: tabular-nums;
}

.week-title {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.week-item.projected .week-title {
    color: var(--muted);
}

.week-item.done .week-title {
    color: var(--muted);
    text-decoration: line-through;
}

.week-item.overdue .week-title {
    color: #c0392b;
    font-weight: 600;
}

@media (max-width: 900px) {
    .wk-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .wk-day:nth-child(5) {
        border-left: 0;
    }

    .wk-day:nth-child(n + 5) {
        border-top: 1px solid var(--line);
    }
}

@media (max-width: 700px) {
    .smart-lists {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .wk-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .wk-day {
        display: grid;
        grid-template-columns: 52px minmax(0, 1fr);
        gap: 0 8px;
        min-height: 0;
        border-left: 0;
        border-top: 1px solid var(--line);
    }

    .wk-day:first-child {
        border-top: 0;
    }

    .wk-day h3 {
        flex-direction: column;
        gap: 0;
        grid-row: span 20;
        margin: 0;
    }

    .wk-day .week-item {
        grid-column: 2;
    }

    .wk-day:not(:has(.week-item))::after {
        content: "–";
        grid-column: 2;
        color: var(--muted);
        font-size: 12px;
    }
}
