/* components.css — populated by Plan 06-09 (toast, modal, buttons, spinner, states)
 * and Plan 06-10 (avatar). All values reference tokens in tokens.css.
 * Scope: UI-07 (toast), UI-09 (modal + empty/error states), UI-01 spinner.
 */

/* -- Toast ---------------------------------------------------- */
#toast-root {
    position: fixed;
    top: var(--space-6);
    right: var(--space-6);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    display: flex;
    align-items: center;
    gap: var(--space-3);
    min-width: 240px;
    max-width: 320px;
    padding: var(--space-3) var(--space-4);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    font-size: var(--font-size-sm);
    color: var(--color-text);
    opacity: 1;
    transform: translateY(0);
    transition: opacity 200ms ease, transform 200ms ease;
}
.toast--success { border-left-color: var(--color-success); }
.toast--error   { border-left-color: var(--color-danger);  }
.toast--warn    { border-left-color: var(--color-warning); }
.toast--info    { border-left-color: var(--color-accent);  }
.toast--leaving { opacity: 0; transform: translateY(-12px); }

.toast__message {
    flex: 1;
    line-height: var(--line-height-normal);
}
.toast__close,
.toast__action {
    flex: 0 0 auto;
    background: transparent;
    border: 0;
    color: var(--color-text-secondary);
    font-size: var(--font-size-base);
    min-height: 24px;
    min-width: 24px;
    padding: 0 var(--space-2);
    cursor: pointer;
}
.toast__close:hover,
.toast__action:hover { color: var(--color-text); }
.toast__action {
    color: var(--color-accent);
    font-weight: var(--font-weight-semibold);
}

/* Mobile: stack at bottom, full-width per 06-UI-SPEC §Toast */
@media (max-width: 639px) {
    #toast-root {
        top: auto;
        bottom: var(--space-4);
        right: var(--space-4);
        left: var(--space-4);
        align-items: stretch;
    }
    .toast { max-width: none; }
}

/* -- Modal ---------------------------------------------------- */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
}

.modal-dialog {
    background: var(--color-surface);
    border-radius: 8px;
    box-shadow: var(--card-shadow);
    padding: var(--space-6);
    width: 100%;
    max-width: 480px;
}

.modal-title {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-semibold);
    line-height: var(--line-height-tight);
    margin-bottom: var(--space-3);
}
.modal-message {
    color: var(--color-text);
    line-height: var(--line-height-normal);
    margin-bottom: var(--space-6);
}
.modal-input {
    width: 100%;
    box-sizing: border-box;
    background: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 6px;
    padding: var(--space-2) var(--space-3);
    font: inherit;
    color: var(--color-text);
    margin-bottom: var(--space-6);
}
.modal-input:focus {
    outline: none;
    border-color: var(--color-accent);
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: var(--space-3);
}

/* -- Buttons -------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 var(--space-4);
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: var(--font-size-base);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    cursor: pointer;
    transition: background-color 150ms ease, color 150ms ease, border-color 150ms ease;
}
.btn:focus-visible {
    outline: 2px solid var(--color-accent-subtle);
    outline-offset: 2px;
}
.btn:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.btn--primary {
    background: var(--btn-bg);
    color: var(--btn-text);
}
.btn--primary:hover { background: var(--btn-bg-hover); }

.btn--ghost {
    background: transparent;
    color: var(--color-text);
    border-color: var(--color-border-strong);
}
.btn--ghost:hover { background: var(--color-bg-subtle); }

.btn--danger {
    background: var(--color-danger);
    color: #fff;
}
.btn--danger:hover { background: var(--color-danger-hover); }

/* -- Spinner (UI-01 loading indicator) ----------------------- */
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-accent);
    border-radius: 50%;
    animation: spin 800ms linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Initial loading wrapper on the shell before app.js boots */
.initial-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: var(--color-text-secondary);
}

/* -- Empty / Error States (UI-09) ---------------------------- */
.state-empty,
.state-error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-12) var(--space-4);
    text-align: center;
    color: var(--color-text-secondary);
}
.state-empty h1,
.state-error h1 {
    font-size: var(--font-size-xl);
    margin-bottom: var(--space-3);
    color: var(--color-text);
}
.state-empty p,
.state-error p {
    margin-bottom: var(--space-4);
    max-width: 400px;
}

/* -- Stub views (Phase 7/8/9 will replace) ------------------- */
.stub {
    padding: var(--space-6);
    background: var(--color-surface);
    border: 1px dashed var(--color-border);
    border-radius: 8px;
}
.stub h1 { font-size: var(--font-size-xl); margin-bottom: var(--space-2); }
.stub p  { color: var(--color-text-secondary); }
.stub__param {
    font-family: 'Menlo', 'Consolas', monospace;
    font-size: var(--font-size-sm);
    background: var(--color-bg-subtle);
    padding: var(--space-1) var(--space-2);
    border-radius: 4px;
    display: inline-block;
    margin-top: var(--space-2);
}

/* -- Avatar (Plan 06-10, UI-04, 06-UI-SPEC §Avatar Component) --- */
/* Circular avatar primitive. Sizes (24/32/40) and per-fallback
 * background color are set inline on the element by createAvatar()
 * because they are data-driven (size arg + hashCode(displayName)).
 * Phase-9 SEC-01 note: style-src 'unsafe-inline' required OR switch
 * to 8 pre-defined classes (.avatar--color-0 through .avatar--color-7)
 * to close the inline-style hole. */
.avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    vertical-align: middle;
    font-size: var(--font-size-sm);
    font-weight: var(--font-weight-semibold);
    line-height: 1;
    overflow: hidden;
}

.avatar--fallback {
    color: #ffffff;
    user-select: none;
    /* background is set inline per createAvatar's deterministic PALETTE color */
}

.avatar--image {
    object-fit: cover;
}

/* Logged-in-user menu (top-right of #main-nav) ---------------------------- */
.user-menu {
    position: relative;
}

.user-menu__button {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 44px; /* touch target, matches nav links */
    padding: 0 var(--space-2);
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--color-text);
    cursor: pointer;
    font: inherit;
}

.user-menu__button:hover {
    background: var(--color-surface);
    border-color: var(--color-border);
}

.user-menu__name {
    max-width: 14ch;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-weight: var(--font-weight-normal);
}

.user-menu__caret {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

.user-menu__dropdown {
    position: absolute;
    top: calc(100% + 4px);
    right: 0;
    z-index: 200;
    min-width: 220px;
    padding: var(--space-2) 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.14);
}

.user-menu__dropdown[hidden] {
    display: none;
}

.user-menu__identity {
    padding: var(--space-2) var(--space-4) var(--space-3);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-2);
}

.user-menu__identity-name {
    font-weight: var(--font-weight-semibold);
    color: var(--color-text);
}

.user-menu__identity-email {
    font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu__item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    padding: var(--space-2) var(--space-4);
    background: transparent;
    border: none;
    color: var(--color-text);
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
}

.user-menu__item:hover {
    background: var(--color-bg-subtle);
}

.user-menu__item--logout {
    color: var(--color-danger);
}

/* ── Projektübersicht: Panel + Kacheln + Team (Welle C) ─────────────── */
.projects-layout { display: flex; align-items: flex-start; gap: var(--space-4); }
.projects-main { flex: 1 1 auto; min-width: 0; }
.project-panel { display: none; flex: 0 0 320px; position: sticky; top: 64px;
    max-height: calc(100vh - 80px); overflow-y: auto; border: 1px solid var(--color-border);
    border-radius: 10px; background: var(--color-surface); padding: var(--space-4); }
.project-panel--open { display: block; }
.project-panel__head { display: flex; flex-direction: column; align-items: center; gap: 8px;
    text-align: center; padding-bottom: var(--space-3); border-bottom: 1px solid var(--color-border); }
.project-panel__title { margin: 4px 0; font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); }
.project-panel__avatar-btn, .project-panel__section { margin-top: var(--space-3); }
.project-panel__avatar-btn { background: transparent; border: 1px solid var(--color-border);
    border-radius: 6px; cursor: pointer; color: var(--color-text); padding: 3px 10px; font-size: var(--font-size-sm); }
.project-panel__section { display: flex; flex-direction: column; gap: 6px; }
.project-panel__label { font-weight: var(--font-weight-semibold); font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.project-panel__desc { width: 100%; box-sizing: border-box; padding: 6px 8px; border: 1px solid var(--color-border);
    border-radius: 6px; background: var(--color-bg-subtle); color: var(--color-text); font: inherit; resize: vertical; }
.project-panel__desc-ro { white-space: pre-wrap; color: var(--color-text); }
.tmpl-saveform { display: flex; gap: 6px; margin-top: 6px; }
.tmpl-saveform[hidden] { display: none; }
.tmpl-saveform .member-add__input { flex: 1; margin-top: 0; }

/* Tag-Chips in der „Meine Tasks"-Liste. */
.my-tasks__labels { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }

/* ── Projektübergreifende Aufgabensuche (/search) ──────────────────── */
.search-page { max-width: 760px; margin: 0 auto; padding: var(--space-5) var(--space-4); }
.search-page__heading { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); margin-bottom: var(--space-3); }
.search-page__input {
    width: 100%; box-sizing: border-box; font: inherit; font-size: var(--font-size-base);
    background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 8px;
    padding: var(--space-3) var(--space-4); color: var(--color-text);
}
.search-page__input:focus { outline: none; border-color: var(--color-accent); }
.search-page__results { margin-top: var(--space-4); display: flex; flex-direction: column; gap: 4px; }
.search-page__hint { color: var(--color-text-secondary); padding: var(--space-4) var(--space-2); font-size: var(--font-size-sm); }
.search-hit {
    display: flex; justify-content: space-between; align-items: center; gap: var(--space-4);
    padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: 8px;
    background: var(--color-surface); text-decoration: none; color: var(--color-text);
}
.search-hit:hover { background: var(--color-bg-subtle); border-color: var(--color-accent); }
.search-hit__title { font-weight: var(--font-weight-medium); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hit__meta { display: flex; align-items: center; gap: var(--space-3); flex: 0 0 auto; font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.search-hit__num { font-variant-numeric: tabular-nums; }

/* ── Vorlagen-Verwaltung (/templates) ──────────────────────────────── */
.templates-page { max-width: 760px; margin: 0 auto; padding: var(--space-5) var(--space-4); }
.templates-page__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.templates-page__heading { font-size: var(--font-size-xl); font-weight: var(--font-weight-semibold); }
.templates-list { display: flex; flex-direction: column; gap: var(--space-4); }
.template-card { border: 1px solid var(--color-border); border-radius: 10px; background: var(--color-surface); padding: var(--space-4); display: flex; flex-direction: column; gap: var(--space-2); }
.template-card__head { display: flex; align-items: center; gap: var(--space-3); }
.template-card__name { flex: 1; font: inherit; font-size: var(--font-size-base); font-weight: var(--font-weight-semibold); background: transparent; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; color: var(--color-text); }
.template-card__name:hover { border-color: var(--color-border); }
.template-card__name:focus { outline: none; border-color: var(--color-accent); background: var(--color-bg-subtle); }
.template-card__name--ro { border-color: transparent; }
.template-card__count { font-size: var(--font-size-sm); color: var(--color-text-secondary); flex: 0 0 auto; }
.template-card__del { background: transparent; border: none; cursor: pointer; font-size: var(--font-size-base); opacity: 0.7; flex: 0 0 auto; }
.template-card__del:hover { opacity: 1; }
.template-card__desc { width: 100%; box-sizing: border-box; font: inherit; font-size: var(--font-size-sm); resize: vertical; background: var(--color-bg-subtle); border: 1px solid var(--color-border); border-radius: 6px; padding: 6px 8px; color: var(--color-text); }
.template-card__desc-ro { font-size: var(--font-size-sm); color: var(--color-text-secondary); white-space: pre-wrap; }
.template-card__label { font-size: var(--font-size-xs); font-weight: var(--font-weight-semibold); color: var(--color-text-secondary); margin-top: 4px; }
.tmpl-sections { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tmpl-sections__item { display: flex; align-items: center; gap: 6px; }
.tmpl-sections__item.is-dragging { opacity: 0.5; }
.tmpl-sections__handle { cursor: grab; color: var(--color-text-secondary); opacity: 0.5; user-select: none; flex: 0 0 auto; }
.tmpl-sections__handle:hover { opacity: 1; }
.tmpl-sections__input { flex: 1; font: inherit; font-size: var(--font-size-sm); background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 6px; padding: 5px 8px; color: var(--color-text); }
.tmpl-sections__input:focus { outline: none; border-color: var(--color-accent); }
.tmpl-sections__del { background: transparent; border: none; cursor: pointer; color: var(--color-text-secondary); padding: 0 4px; flex: 0 0 auto; }
.tmpl-sections__del:hover { color: var(--color-danger); }
.tmpl-sections__add { display: flex; gap: 6px; margin-top: 4px; }
.tmpl-sections__ro { display: flex; flex-wrap: wrap; gap: 6px; }
.tmpl-sections__empty { font-size: var(--font-size-sm); color: var(--color-text-secondary); }

.project-avatar { border-radius: 50%; object-fit: cover; display: inline-flex; }
.project-avatar--initial { align-items: center; justify-content: center; color: #fff;
    font-weight: var(--font-weight-semibold); }

.project-card { display: flex; gap: 12px; align-items: flex-start; cursor: pointer;
    border: 1px solid var(--color-border); border-left: 4px solid var(--project-color, var(--color-accent));
    border-radius: 8px; padding: var(--space-3); background: var(--color-surface); text-decoration: none; }
.project-card:hover { background: var(--color-bg-subtle); }
.project-card.is-selected { border-color: var(--color-accent); box-shadow: 0 0 0 1px var(--color-accent); }
.project-card__avatar { flex: 0 0 auto; }
.project-card__main { min-width: 0; flex: 1; }

.member-list { list-style: none; margin: 4px 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.member-row { display: flex; align-items: center; gap: 8px; padding: 3px 2px; }
.member-row__avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; flex: 0 0 auto; }
.member-row__avatar--initial { display: inline-flex; align-items: center; justify-content: center;
    background: var(--color-accent-subtle); color: #fff; font-size: 11px; }
.member-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.member-row__role { font-size: 11px; color: var(--color-text-secondary); }
.member-row__del { background: transparent; border: none; cursor: pointer; color: var(--color-text-secondary); padding: 0 4px; }
.member-row__del:hover { color: var(--color-danger); }
.member-add { position: relative; margin-top: 6px; }
.member-add__input { width: 100%; box-sizing: border-box; padding: 5px 8px; border: 1px solid var(--color-border);
    border-radius: 6px; background: var(--color-bg-subtle); color: var(--color-text); font: inherit; }
.member-add__results { list-style: none; margin: 2px 0 0; padding: 4px 0; position: absolute; z-index: 50;
    left: 0; right: 0; background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 6px;
    box-shadow: 0 6px 20px rgba(0,0,0,.14); max-height: 220px; overflow-y: auto; }
.member-add__result { padding: 5px 10px; cursor: pointer; }
.member-add__result:hover { background: var(--color-bg-subtle); }
.member-add__empty { padding: 5px 10px; color: var(--color-text-secondary); }

@media (max-width: 720px) {
    .projects-layout { flex-direction: column; }
    .project-panel { position: static; max-height: none; width: 100%; flex-basis: auto; }
}

/* Notification-Glocke + Feed (V2-NOTIF-01) */
.notif-bell { position: relative; }
.notif-bell__button { position: relative; background: transparent; border: none; cursor: pointer; font-size: 18px; line-height: 1; padding: 6px; border-radius: 8px; }
.notif-bell__button:hover { background: var(--color-bg-subtle); }
.notif-bell__badge { position: absolute; top: 0; right: 0; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: #e0973f; color: #fff; font-size: 10px; line-height: 16px; text-align: center; font-weight: 700; box-sizing: border-box; }
.notif-bell__dropdown { position: absolute; right: 0; top: calc(100% + 6px); z-index: 200; width: 340px; max-height: 460px; overflow-y: auto; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: 10px; box-shadow: 0 8px 28px rgba(0,0,0,.2); }
.notif-feed__head { display: flex; align-items: center; justify-content: space-between; padding: 10px 12px; border-bottom: 1px solid var(--color-border); position: sticky; top: 0; background: var(--color-bg); }
.notif-feed__title { font-weight: 600; }
.notif-feed__readall { background: transparent; border: none; color: var(--color-accent); cursor: pointer; font-size: var(--font-size-sm); }
.notif-feed__readall:hover { text-decoration: underline; }
.notif-feed__empty { padding: 24px 12px; text-align: center; color: var(--color-text-secondary); font-size: var(--font-size-sm); }
.notif-item { display: flex; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--color-border); text-decoration: none; color: var(--color-text); }
.notif-item:last-child { border-bottom: none; }
.notif-item:hover { background: var(--color-bg-subtle); }
.notif-item.is-unread { background: color-mix(in srgb, var(--color-accent) 8%, transparent); }
.notif-item__main { min-width: 0; flex: 1; }
.notif-item__text { font-size: var(--font-size-sm); }
.notif-item__sub { font-size: var(--font-size-sm); color: var(--color-text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.notif-item__time { font-size: 11px; color: var(--color-text-secondary); margin-top: 2px; }

/* ── Admin: User-Tabelle + Status + Audit-Log (V2-ADMIN-01/02) ─────────── */
.admin-users { overflow-x: auto; }
.admin-users__table { width: 100%; border-collapse: collapse; font-size: var(--font-size-sm); }
.admin-users__th {
    text-align: left; padding: var(--space-2) var(--space-3);
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text-secondary); font-weight: var(--font-weight-semibold);
}
.admin-users__cell { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.admin-users__cell--status { display: flex; align-items: center; gap: var(--space-2); }
.admin-users__row--inactive { opacity: 0.55; }
.admin-users__status {
    display: inline-block; padding: 1px var(--space-2); border-radius: 10px;
    font-size: 11px; font-weight: var(--font-weight-semibold);
}
.admin-users__status.is-active { background: color-mix(in srgb, #22c55e 18%, transparent); color: #15803d; }
.admin-users__status.is-inactive { background: color-mix(in srgb, #ef4444 18%, transparent); color: #b91c1c; }
.admin-users__role-select {
    background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 6px;
    padding: 4px var(--space-2); font: inherit; font-size: var(--font-size-sm); color: var(--color-text);
}

.admin-audit { margin-top: var(--space-6); }
.admin-audit__title { font-size: var(--font-size-md); font-weight: var(--font-weight-semibold); margin-bottom: var(--space-2); }
.admin-audit__empty { color: var(--color-text-secondary); font-size: var(--font-size-sm); }
.admin-audit__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.admin-audit__item {
    display: flex; justify-content: space-between; gap: var(--space-3);
    padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-border);
    font-size: var(--font-size-sm);
}
.admin-audit__date { color: var(--color-text-secondary); white-space: nowrap; font-size: 11px; }

/* ── Settings: Seiten-Layout + Karten ─────────────────────────────────── */
.settings-page { max-width: 720px; margin: 0 auto; padding: var(--space-6) var(--space-4) var(--space-10); }
.settings-page__heading { font-size: var(--font-size-2xl); font-weight: 700; color: var(--color-text); margin: 0 0 var(--space-5); }
.settings-card {
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: 10px; box-shadow: var(--card-shadow);
    padding: var(--space-5); margin-bottom: var(--space-4);
}
.settings-card__title { font-size: var(--font-size-base); font-weight: 600; color: var(--color-text); margin: 0 0 var(--space-4); }
.settings-card__hint { font-size: var(--font-size-sm); color: var(--color-text-secondary); margin: 0 0 var(--space-3); }

/* Profil-Block: Avatar links, Textfelder rechts. */
.settings-profile { display: flex; align-items: center; gap: var(--space-4); }
.settings-profile__avatar { flex: 0 0 auto; }
.settings-profile__fields { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.settings-profile__name { font-size: var(--font-size-base); font-weight: 600; color: var(--color-text); }
.settings-profile__email { font-size: var(--font-size-sm); color: var(--color-text-secondary); word-break: break-all; }
.settings-profile__role { font-size: var(--font-size-sm); color: var(--color-text-secondary); margin-top: var(--space-1); }

/* ── Settings: Sprach-Umschalter (V2-I18N-02) ─────────────────────────── */
.settings-language { display: flex; align-items: center; gap: var(--space-3); flex-wrap: wrap; }
.settings-language__label { font-size: var(--font-size-sm); color: var(--color-text-secondary); }
.settings-language__select {
    background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 6px;
    padding: var(--space-2) var(--space-3); font: inherit; font-size: var(--font-size-sm); color: var(--color-text); cursor: pointer;
}

/* ── Settings: iCal-Feed-URL (V2-IMP-02) ──────────────────────────────── */
.settings-ical { display: flex; align-items: center; gap: var(--space-2); flex-wrap: wrap; }
.settings-ical__url {
    flex: 1 1 320px; min-width: 200px;
    background: var(--input-bg); border: 1px solid var(--input-border); border-radius: 6px;
    padding: var(--space-2) var(--space-3); font: inherit; font-size: var(--font-size-sm);
    color: var(--color-text-secondary);
}

/* ── Theme-Umschalter (Sonne/Mond, neben der Glocke) ──────────────────── */
.theme-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    background: transparent; border: none; cursor: pointer;
    padding: 6px; border-radius: 8px; line-height: 1;
    color: var(--color-text-secondary);
}
.theme-toggle:hover { background: var(--color-bg-subtle); color: var(--color-text); }
.theme-toggle svg { display: block; }

/* ── Rechtsklick-Kontextmenü (context-menu.js) ──────────────────────────── */
.ctx-menu {
    position: fixed;
    z-index: 3000;
    min-width: 190px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    box-shadow: var(--card-shadow, 0 8px 28px rgba(0, 0, 0, .35));
    padding: 4px;
    font-size: .85rem;
    animation: ctx-menu-in .12s ease-out both;
}
@keyframes ctx-menu-in { from { opacity: 0; transform: scale(.97); } to { opacity: 1; transform: none; } }
.ctx-menu__item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 7px 10px;
    border: none;
    background: none;
    color: var(--color-text);
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    font: inherit;
    white-space: nowrap;
}
.ctx-menu__item:hover:not(:disabled) { background: var(--color-bg-subtle); }
.ctx-menu__item:disabled { opacity: .45; cursor: default; }
.ctx-menu__icon { width: 1.1rem; text-align: center; flex: none; }
.ctx-menu__item--danger { color: var(--color-danger); }
.ctx-menu__sep { height: 1px; background: var(--color-border); margin: 4px 4px; }
