/* ==========================================================================
   Urlaubsplanung – Design-System
   Ergänzt Bootstrap 5.3. Tokens zuerst, danach Komponenten.
   ========================================================================== */

:root {
    /* Marke: Meer & Sand */
    --u-teal-050: #e8f4f6;
    --u-teal-100: #cbe6ea;
    --u-teal-500: #0f7b8a;
    --u-teal-600: #0b6472;
    --u-teal-700: #084e59;
    --u-sun-500: #e8834a;
    --u-sun-100: #fdeee4;

    /* Flächen */
    --u-bg: #f2f6f7;
    --u-surface: #ffffff;
    --u-surface-2: #f7fafb;
    --u-border: #e0e8ea;
    --u-ink: #16242c;
    --u-muted: #5f7480;

    --u-radius: 14px;
    --u-radius-sm: 10px;
    --u-shadow: 0 1px 2px rgba(16, 40, 48, .04), 0 8px 24px -12px rgba(16, 40, 48, .18);
    --u-shadow-lg: 0 2px 4px rgba(16, 40, 48, .05), 0 18px 40px -18px rgba(16, 40, 48, .28);

    /* Bootstrap-Variablen überschreiben */
    --bs-primary: var(--u-teal-500);
    --bs-primary-rgb: 15, 123, 138;
    --bs-link-color: var(--u-teal-600);
    --bs-link-color-rgb: 11, 100, 114;
    --bs-link-hover-color: var(--u-teal-700);
    --bs-body-color: var(--u-ink);
    --bs-body-bg: var(--u-bg);
    --bs-border-color: var(--u-border);
    --bs-border-radius: var(--u-radius-sm);
    --bs-font-sans-serif: system-ui, -apple-system, "Segoe UI", Roboto,
        "Helvetica Neue", "Noto Sans", sans-serif;
}

[data-bs-theme="dark"] {
    --u-teal-050: #10323a;
    --u-teal-100: #14424c;
    --u-teal-500: #3fb3c4;
    --u-teal-600: #5cc6d6;
    --u-teal-700: #8adae6;
    --u-sun-500: #f0996a;
    --u-sun-100: #3a2418;

    --u-bg: #0e1719;
    --u-surface: #162327;
    --u-surface-2: #1b2b30;
    --u-border: #26383e;
    --u-ink: #e6eef0;
    --u-muted: #94a9b2;

    --u-shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px -12px rgba(0, 0, 0, .6);
    --u-shadow-lg: 0 2px 4px rgba(0, 0, 0, .35), 0 18px 40px -18px rgba(0, 0, 0, .7);

    --bs-primary: var(--u-teal-500);
    --bs-primary-rgb: 63, 179, 196;
    --bs-link-color: var(--u-teal-600);
    --bs-link-color-rgb: 92, 198, 214;
    --bs-link-hover-color: var(--u-teal-700);
    --bs-body-color: var(--u-ink);
    --bs-body-bg: var(--u-bg);
    --bs-border-color: var(--u-border);
    --bs-emphasis-color: #ffffff;
    --bs-secondary-color: var(--u-muted);
    --bs-tertiary-bg: var(--u-surface-2);
}

/* --------------------------------------------------------------- Grundlagen */

body {
    background-color: var(--u-bg);
    color: var(--u-ink);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
    letter-spacing: -.018em;
    font-weight: 650;
    color: var(--u-ink);
}

a {
    text-decoration-thickness: 1px;
    text-underline-offset: .18em;
}

.text-muted {
    color: var(--u-muted) !important;
}

:focus-visible,
.btn:focus-visible,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: none;
    border-color: var(--u-teal-500);
    box-shadow: 0 0 0 .22rem rgba(var(--bs-primary-rgb), .22);
}

/* ------------------------------------------------------------------ Header */

.u-nav {
    background: linear-gradient(120deg, var(--u-teal-700) 0%, var(--u-teal-500) 62%, #16909b 100%);
    box-shadow: 0 1px 0 rgba(255, 255, 255, .08) inset, var(--u-shadow);
    padding-block: .7rem;
}

[data-bs-theme="dark"] .u-nav {
    background: linear-gradient(120deg, #0a2b31 0%, #0f4d57 62%, #12626e 100%);
}

.u-nav .navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: .6rem;
    font-weight: 680;
    letter-spacing: -.02em;
    color: #fff;
}

.u-nav .navbar-brand:hover {
    color: #fff;
}

.u-brand-mark {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 11px;
    background: rgba(255, 255, 255, .16);
    border: 1px solid rgba(255, 255, 255, .22);
    flex: 0 0 auto;
}

.u-nav .nav-link {
    color: rgba(255, 255, 255, .82);
    font-weight: 520;
    border-radius: 999px;
    padding: .35rem .8rem;
    transition: background-color .15s ease, color .15s ease;
}

.u-nav .nav-link:hover,
.u-nav .nav-link:focus-visible {
    color: #fff;
    background: rgba(255, 255, 255, .14);
}

.u-nav .nav-link.active {
    color: #fff;
    background: rgba(255, 255, 255, .2);
}

.u-nav .navbar-toggler {
    border-color: rgba(255, 255, 255, .3);
    color: #fff;
}

.u-user {
    display: inline-flex;
    align-items: center;
    gap: .55rem;
    color: #fff;
}

.u-avatar {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .2);
    border: 1px solid rgba(255, 255, 255, .28);
    font-size: .8rem;
    font-weight: 650;
    color: #fff;
    flex: 0 0 auto;
    text-transform: uppercase;
}

.u-avatar--ink {
    background: var(--u-teal-050);
    border-color: var(--u-teal-100);
    color: var(--u-teal-600);
}

/* ------------------------------------------------------------- Seitenkopf */

main.u-main {
    flex: 1 0 auto;
    padding-bottom: 3rem;
}

.u-page-head {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 1.5rem;
}

.u-page-head h1 {
    margin-bottom: .25rem;
}

.u-page-head .u-sub {
    color: var(--u-muted);
    margin-bottom: 0;
}

.u-back {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .875rem;
    font-weight: 550;
    color: var(--u-muted);
    text-decoration: none;
    margin-bottom: 1rem;
}

.u-back:hover {
    color: var(--u-teal-600);
}

/* ------------------------------------------------------------------ Karten */

.u-card {
    background: var(--u-surface);
    border: 1px solid var(--u-border);
    border-radius: var(--u-radius);
    box-shadow: var(--u-shadow);
}

.u-card > .u-card-head {
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--u-border);
}

.u-card-head h2 {
    font-size: 1.02rem;
    margin: 0;
}

.u-card-body {
    padding: 1.25rem;
}

.u-card-body > :last-child {
    margin-bottom: 0;
}

/* Trip-Kacheln auf der Übersicht */
.u-trip-card {
    display: flex;
    flex-direction: column;
    height: 100%;
    background: var(--u-surface);
    border: 1px solid var(--u-border);
    border-radius: var(--u-radius);
    box-shadow: var(--u-shadow);
    text-decoration: none;
    color: inherit;
    overflow: hidden;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.u-trip-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--u-shadow-lg);
    border-color: var(--u-teal-100);
    color: inherit;
}

.u-trip-card__banner {
    height: 76px;
    background: linear-gradient(120deg, var(--u-teal-600), #17a2b0 55%, var(--u-sun-500));
    position: relative;
}

.u-trip-card__banner::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(120% 90% at 12% 120%, rgba(255, 255, 255, .28), transparent 60%);
}

.u-trip-card__body {
    padding: 1rem 1.15rem 1.15rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    flex: 1;
}

.u-trip-card__title {
    font-size: 1.08rem;
    font-weight: 650;
    margin: 0;
}

/* Modul-Kacheln auf der Trip-Detailseite */
.u-tile {
    display: flex;
    align-items: center;
    gap: .85rem;
    height: 100%;
    padding: .95rem 1rem;
    background: var(--u-surface);
    border: 1px solid var(--u-border);
    border-radius: var(--u-radius);
    box-shadow: var(--u-shadow);
    text-decoration: none;
    color: inherit;
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

.u-tile:hover {
    transform: translateY(-2px);
    box-shadow: var(--u-shadow-lg);
    border-color: var(--u-teal-100);
    color: inherit;
}

.u-tile__icon {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: var(--u-teal-050);
    color: var(--u-teal-500);
    flex: 0 0 auto;
}

.u-tile--warm .u-tile__icon {
    background: var(--u-sun-100);
    color: var(--u-sun-500);
}

.u-tile__title {
    font-weight: 600;
    line-height: 1.2;
}

.u-tile__desc {
    font-size: .8rem;
    color: var(--u-muted);
    line-height: 1.3;
}

/* ------------------------------------------------------------- Leerzustand */

.u-empty {
    text-align: center;
    padding: 2.75rem 1.5rem;
    color: var(--u-muted);
}

.u-empty__icon {
    display: grid;
    place-items: center;
    width: 60px;
    height: 60px;
    margin: 0 auto .9rem;
    border-radius: 18px;
    background: var(--u-teal-050);
    color: var(--u-teal-500);
}

.u-empty p {
    margin-bottom: 0;
}

/* ---------------------------------------------------------------- Buttons */

.btn {
    --bs-btn-font-weight: 550;
    border-radius: var(--u-radius-sm);
    padding-inline: 1rem;
}

.btn-sm {
    border-radius: 8px;
    padding-inline: .65rem;
}

.btn-primary {
    --bs-btn-bg: var(--u-teal-500);
    --bs-btn-border-color: var(--u-teal-500);
    --bs-btn-hover-bg: var(--u-teal-600);
    --bs-btn-hover-border-color: var(--u-teal-600);
    --bs-btn-active-bg: var(--u-teal-700);
    --bs-btn-active-border-color: var(--u-teal-700);
    --bs-btn-color: #fff;
    --bs-btn-hover-color: #fff;
    --bs-btn-active-color: #fff;
    box-shadow: 0 1px 2px rgba(11, 100, 114, .28);
}

.btn-outline-primary {
    --bs-btn-color: var(--u-teal-600);
    --bs-btn-border-color: var(--u-teal-100);
    --bs-btn-hover-bg: var(--u-teal-500);
    --bs-btn-hover-border-color: var(--u-teal-500);
    --bs-btn-hover-color: #fff;
}

.btn-outline-secondary {
    --bs-btn-color: var(--u-muted);
    --bs-btn-border-color: var(--u-border);
    --bs-btn-hover-bg: var(--u-surface-2);
    --bs-btn-hover-border-color: var(--u-muted);
    --bs-btn-hover-color: var(--u-ink);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}

/* ---------------------------------------------------------------- Formulare */

.form-label {
    font-size: .85rem;
    font-weight: 580;
    color: var(--u-muted);
    margin-bottom: .3rem;
}

.form-control,
.form-select {
    background-color: var(--u-surface);
    border-color: var(--u-border);
    color: var(--u-ink);
    border-radius: var(--u-radius-sm);
    padding: .55rem .8rem;
}

.form-control::placeholder {
    color: var(--u-muted);
    opacity: .7;
}

.form-check-input {
    border-color: #c3d1d6;
}

.form-check-input:checked {
    background-color: var(--u-teal-500);
    border-color: var(--u-teal-500);
}

[data-bs-theme="dark"] .form-check-input {
    background-color: var(--u-surface-2);
    border-color: #3a5058;
}

/* --------------------------------------------------------------- Tabellen */

.u-table-wrap {
    background: var(--u-surface);
    border: 1px solid var(--u-border);
    border-radius: var(--u-radius);
    box-shadow: var(--u-shadow);
    overflow: hidden;
}

.u-table-wrap .table {
    --bs-table-bg: transparent;
    --bs-table-color: var(--u-ink);
    --bs-table-striped-bg: var(--u-surface-2);
    --bs-table-striped-color: var(--u-ink);
    --bs-table-border-color: var(--u-border);
    margin-bottom: 0;
}

.u-table-wrap .table > thead th {
    background: var(--u-surface-2);
    color: var(--u-muted);
    font-size: .74rem;
    font-weight: 650;
    letter-spacing: .06em;
    text-transform: uppercase;
    border-bottom-color: var(--u-border);
    padding: .7rem 1rem;
    white-space: nowrap;
}

.u-table-wrap .table > tbody td {
    padding: .8rem 1rem;
    vertical-align: middle;
    border-color: var(--u-border);
}

.u-table-wrap .table > tbody tr:last-child td {
    border-bottom: 0;
}

/* -------------------------------------------------------------- Listen */

.list-group {
    --bs-list-group-bg: var(--u-surface);
    --bs-list-group-color: var(--u-ink);
    --bs-list-group-border-color: var(--u-border);
    --bs-list-group-border-radius: var(--u-radius);
    --bs-list-group-action-hover-bg: var(--u-surface-2);
    --bs-list-group-action-hover-color: var(--u-ink);
    box-shadow: var(--u-shadow);
}

.list-group-item {
    padding: .85rem 1.1rem;
}

/* --------------------------------------------------------------- Badges */

.u-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .28rem .65rem;
    border-radius: 999px;
    font-size: .76rem;
    font-weight: 600;
    line-height: 1.2;
    background: var(--u-surface-2);
    border: 1px solid var(--u-border);
    color: var(--u-muted);
    white-space: nowrap;
}

.u-badge--brand {
    background: var(--u-teal-050);
    border-color: var(--u-teal-100);
    color: var(--u-teal-600);
}

.u-badge--warm {
    background: var(--u-sun-100);
    border-color: rgba(232, 131, 74, .3);
    color: #b45f2c;
}

[data-bs-theme="dark"] .u-badge--warm {
    color: var(--u-sun-500);
}

.u-badge--dot::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    flex: 0 0 auto;
}

/* --------------------------------------------------------------- Hinweise */

.alert {
    border-radius: var(--u-radius);
    border-width: 1px;
    box-shadow: var(--u-shadow);
    display: flex;
    align-items: flex-start;
    gap: .7rem;
}

.alert > .u-alert-icon {
    flex: 0 0 auto;
    margin-top: .1rem;
}

.alert > .btn-close {
    margin-left: auto;
}

/* ----------------------------------------------------------- Auth-Seiten */

.u-auth {
    display: grid;
    grid-template-columns: 1.05fr .95fr;
    max-width: 940px;
    margin: 2rem auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--u-shadow-lg);
    border: 1px solid var(--u-border);
    background: var(--u-surface);
}

.u-auth__aside {
    position: relative;
    padding: 2.5rem 2.25rem;
    color: #fff;
    background: linear-gradient(150deg, var(--u-teal-700) 0%, var(--u-teal-500) 55%, var(--u-sun-500) 165%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2rem;
}

.u-auth__aside::after {
    content: "";
    position: absolute;
    inset: 0;
    background: radial-gradient(90% 60% at 10% 100%, rgba(255, 255, 255, .22), transparent 62%);
    pointer-events: none;
}

.u-auth__aside > * {
    position: relative;
    z-index: 1;
}

.u-auth__aside h2 {
    color: #fff;
    font-size: 1.6rem;
    line-height: 1.25;
}

.u-auth__aside p {
    color: rgba(255, 255, 255, .85);
    margin-bottom: 0;
}

.u-auth__points {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: .7rem;
}

.u-auth__points li {
    display: flex;
    align-items: center;
    gap: .6rem;
    color: rgba(255, 255, 255, .92);
    font-size: .92rem;
}

.u-auth__form {
    padding: 2.5rem 2.25rem;
}

@media (max-width: 767.98px) {
    .u-auth {
        grid-template-columns: 1fr;
        margin: 1rem auto;
    }

    .u-auth__aside {
        padding: 1.75rem;
    }

    .u-auth__aside .u-auth__points {
        display: none;
    }

    .u-auth__form {
        padding: 1.75rem;
    }
}

/* ------------------------------------------------------- Abstimmungsraster */

.u-poll td.u-slot {
    text-align: center;
    padding: .5rem .35rem;
}

.u-slot__box {
    display: block;
    border-radius: 10px;
    padding: .45rem .3rem;
    border: 1px solid var(--u-border);
    background: var(--u-surface-2);
    cursor: pointer;
    transition: background-color .14s ease, border-color .14s ease;
}

.u-slot__box:hover {
    border-color: var(--u-teal-100);
}

.u-slot__box.is-mine {
    background: var(--u-teal-050);
    border-color: var(--u-teal-100);
}

.u-slot__count {
    display: block;
    font-size: .72rem;
    font-weight: 600;
    color: var(--u-muted);
    margin-top: .2rem;
}

.u-heat-0 { background: var(--u-surface-2); }
.u-heat-1 { background: rgba(15, 123, 138, .10); }
.u-heat-2 { background: rgba(15, 123, 138, .20); }
.u-heat-3 { background: rgba(15, 123, 138, .32); }

.u-poll td.u-day {
    font-weight: 550;
    white-space: nowrap;
}

/* ------------------------------------------------------------------ Footer */

.u-footer {
    flex-shrink: 0;
    padding: 1.4rem 0;
    border-top: 1px solid var(--u-border);
    background: var(--u-surface);
    color: var(--u-muted);
    font-size: .85rem;
}

/* --------------------------------------------------------------- Sonstiges */

.u-theme-toggle {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, .25);
    background: rgba(255, 255, 255, .12);
    color: #fff;
    flex: 0 0 auto;
    transition: background-color .15s ease;
}

.u-theme-toggle:hover {
    background: rgba(255, 255, 255, .22);
}

[data-bs-theme="dark"] .u-theme-toggle .u-icon-sun,
.u-theme-toggle .u-icon-moon {
    display: block;
}

[data-bs-theme="dark"] .u-theme-toggle .u-icon-moon,
.u-theme-toggle .u-icon-sun {
    display: none;
}

.u-stack-sm > * + * {
    margin-top: .75rem;
}

code {
    background: var(--u-surface-2);
    border: 1px solid var(--u-border);
    border-radius: 6px;
    padding: .12rem .4rem;
    color: var(--u-teal-600);
}

@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
    }
}

/* ------------------------------------------------------------------- Chat */

.u-chat {
    display: flex;
    flex-direction: column;
    gap: .7rem;
    height: 52vh;
    min-height: 300px;
    overflow-y: auto;
    padding: 1.25rem;
    background: var(--u-surface-2);
}

.u-msg {
    display: flex;
    align-items: flex-end;
    gap: .55rem;
    max-width: min(78%, 34rem);
}

.u-msg--own {
    margin-left: auto;
    flex-direction: row-reverse;
}

.u-msg__bubble {
    background: var(--u-surface);
    border: 1px solid var(--u-border);
    border-radius: 16px 16px 16px 5px;
    padding: .6rem .85rem;
    box-shadow: var(--u-shadow);
}

.u-msg--own .u-msg__bubble {
    background: var(--u-teal-500);
    border-color: var(--u-teal-500);
    color: #fff;
    border-radius: 16px 16px 5px 16px;
}

.u-msg__author {
    font-size: .78rem;
    font-weight: 650;
    color: var(--u-teal-600);
    margin-bottom: .1rem;
}

.u-msg__body {
    line-height: 1.45;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.u-msg__time {
    font-size: .68rem;
    color: var(--u-muted);
    margin-top: .25rem;
    text-align: right;
}

.u-msg--own .u-msg__time {
    color: rgba(255, 255, 255, .75);
}

/* ------------------------------------------------------------------ Fotos */

.u-photo {
    position: relative;
    display: block;
    border-radius: var(--u-radius);
    overflow: hidden;
    border: 1px solid var(--u-border);
    background: var(--u-surface);
    box-shadow: var(--u-shadow);
}

.u-photo img {
    display: block;
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

/* Platzhalter für ein Bild, das der Worker noch nicht anzeigbar gemacht hat.
   Genau dasselbe Seitenverhältnis wie das Bild, das später hier steht — sonst
   springt beim Neuladen die halbe Galerie. */
.u-photo__wartet {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    width: 100%;
    aspect-ratio: 4 / 3;
    background: color-mix(in srgb, var(--u-border) 45%, transparent);
    color: var(--u-muted, #6c757d);
    font-size: .875rem;
    text-align: center;
    padding: .75rem;
}

.u-photo__hinweis {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.u-photo__bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    padding: .6rem .8rem;
}

/* Zahlenblöcke in der Zusammenfassung */
.u-stat {
    background: var(--u-surface);
    border: 1px solid var(--u-border);
    border-radius: var(--u-radius);
    box-shadow: var(--u-shadow);
    padding: 1rem 1.15rem;
    height: 100%;
}

.u-stat__value {
    font-size: 1.6rem;
    font-weight: 680;
    line-height: 1.1;
    letter-spacing: -.02em;
}

.u-stat__label {
    font-size: .78rem;
    color: var(--u-muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    font-weight: 600;
}

/* ---- Reiseverlauf: Karte und Tag-für-Tag ---------------------------- */

.u-map {
    height: 380px;
    border-radius: var(--u-radius-sm);
    /* Leaflet zeichnet Kacheln in eigene Container; ohne das Clipping stehen
       die Ecken über den Kartenrahmen hinaus. */
    overflow: hidden;
    z-index: 0;
}

@media (max-width: 575.98px) {
    .u-map { height: 260px; }
}

/* OSM-Kacheln sind hell. Ungedämpft leuchtet die Karte im dunklen Design
   wie ein Scheinwerfer zwischen den Karten. */
[data-bs-theme="dark"] .u-map .leaflet-tile-pane {
    filter: brightness(.72) saturate(.75) contrast(1.08);
}

[data-bs-theme="dark"] .u-map .leaflet-control-attribution {
    background: rgba(22, 35, 39, .85);
    color: var(--u-muted);
}

/* Die Zeitleiste: eine durchgehende Linie, an der die Tage hängen. */
.u-timeline {
    position: relative;
    margin: 0;
    padding: 0 0 0 1.6rem;
    list-style: none;
}

.u-timeline::before {
    content: "";
    position: absolute;
    top: .6rem;
    bottom: .6rem;
    left: 6px;
    width: 2px;
    background: var(--u-border);
}

.u-day {
    position: relative;
    margin-bottom: 1rem;
}

.u-day::before {
    content: "";
    position: absolute;
    top: 1.35rem;
    left: calc(-1.6rem + 1px);
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--u-teal-500);
    box-shadow: 0 0 0 3px var(--u-bg);
}

.u-day--empty::before {
    background: var(--u-border);
}

.u-day__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: .5rem .75rem;
    padding: .85rem 1.1rem;
    border-bottom: 1px solid var(--u-border);
}

.u-day__num {
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--u-teal-600);
}

.u-day__date {
    font-weight: 650;
}

.u-day__place {
    display: inline-flex;
    align-items: center;
    gap: .3rem;
    color: var(--u-muted);
    font-size: .88rem;
}

.u-day__body {
    padding: .9rem 1.1rem;
}

.u-day__body > :last-child { margin-bottom: 0; }

/* Fotostreifen des Tages: waagerecht scrollbar, damit ein Tag mit zwanzig
   Bildern die Zeitleiste nicht sprengt. */
.u-daystrip {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: 148px;
    gap: .5rem;
    overflow-x: auto;
    padding-bottom: .35rem;
    scrollbar-width: thin;
}

.u-daystrip img {
    width: 100%;
    height: 108px;
    object-fit: cover;
    border-radius: var(--u-radius-sm);
    border: 1px solid var(--u-border);
    display: block;
}

/* Zeilen im Tag: Unterkunft, Transport, Ausgabe. */
.u-dayrow {
    display: flex;
    align-items: flex-start;
    gap: .55rem;
    font-size: .92rem;
    padding: .18rem 0;
}

.u-dayrow__icon {
    flex: 0 0 auto;
    color: var(--u-muted);
    line-height: 1;
    padding-top: .12rem;
}

.u-dayrow__amount {
    margin-left: auto;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

/* Warteschlange des Foto-Uploads. Sichtbar nur, solange JavaScript den Upload
   übernimmt — ohne JavaScript bleibt der Block leer und ausgeblendet. */
.u-queue {
    border-top: 1px solid var(--u-border);
    padding-top: .85rem;
}

.u-queue__head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: .5rem;
}

.u-queue__note {
    color: var(--u-muted);
    font-size: .86rem;
}

.u-queue__total {
    height: .5rem;
    border-radius: 999px;
    background: var(--u-surface-2);
}

.u-queue__list {
    list-style: none;
    margin: .7rem 0 0;
    padding: 0;
    /* Bei 500 Zeilen ist die Liste länger als jeder Bildschirm. Eigener
       Scrollbereich, damit Fortschrittsbalken und Knöpfe darüber stehen
       bleiben und nicht mit weggescrollt werden. */
    max-height: 15rem;
    overflow-y: auto;
    border: 1px solid var(--u-border);
    border-radius: var(--u-radius-sm);
}

.u-queue__row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "name state" "track track";
    gap: .1rem .6rem;
    align-items: center;
    padding: .35rem .6rem;
    font-size: .82rem;
    border-bottom: 1px solid var(--u-border);
}

.u-queue__row:last-child {
    border-bottom: 0;
}

.u-queue__name {
    grid-area: name;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.u-queue__state {
    grid-area: state;
    color: var(--u-muted);
    white-space: nowrap;
}

.u-queue__track {
    grid-area: track;
    display: block;
    height: 3px;
    border-radius: 999px;
    background: var(--u-surface-2);
    overflow: hidden;
}

.u-queue__fill {
    display: block;
    height: 100%;
    width: 0;
    background: var(--u-teal-500);
    transition: width .15s linear;
}

.u-queue__row--ok .u-queue__state { color: var(--u-teal-600); }
.u-queue__row--known .u-queue__state { color: var(--u-sun-500); }
.u-queue__row--bad .u-queue__state { color: var(--bs-danger); }
.u-queue__row--ok .u-queue__fill { background: var(--u-teal-600); }
.u-queue__row--known .u-queue__fill { background: var(--u-sun-500); }
.u-queue__row--bad .u-queue__fill { background: var(--bs-danger); }
