/*
 * Tempalo-Gestaltung für Admin- und Kundenbereich.
 * Ergänzt das Filament-Design, ohne Build-Schritt. Farben der Ampel kommen
 * als --tp-status direkt von der Kachel (RoomStatus::color()).
 */

:root {
    --tp-brand: #f26b1f;
    --tp-brand-light: #ff8a24;
    --tp-card: #ffffff;
    --tp-border: rgba(24, 24, 27, 0.08);
    --tp-muted: #71717a;
    --tp-text: #18181b;
}

.dark {
    --tp-card: #18181b;
    --tp-border: rgba(255, 255, 255, 0.08);
    --tp-muted: #a1a1aa;
    --tp-text: #fafafa;
}

/* Anmeldeseite: dezenter Markenhintergrund */
.fi-simple-layout {
    background:
        radial-gradient(60rem 30rem at 85% -10%, rgba(255, 138, 36, 0.14), transparent 60%),
        radial-gradient(40rem 25rem at -10% 110%, rgba(242, 107, 31, 0.10), transparent 60%);
}

.fi-simple-main {
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -12px rgba(0, 0, 0, 0.12);
}

/* Kennzeichnung des Admin-Bereichs neben dem Logo */
.tp-admin-badge {
    display: inline-flex;
    align-items: center;
    margin-inline-start: 0.5rem;
    padding: 0.1rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #ffffff;
    background: #27272a;
}

.dark .tp-admin-badge {
    color: #18181b;
    background: #e4e4e7;
}

/* ---------- Übersicht: Kopfzeile ---------- */

.tp-summary {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 1rem;
    font-size: 0.875rem;
    color: var(--tp-muted);
}

.tp-summary__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.tp-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
    border: 1px solid var(--tp-border);
    background: var(--tp-card);
    color: inherit;
    font-weight: 500;
    white-space: nowrap;
}

.tp-chip strong {
    color: var(--tp-text);
    font-weight: 700;
}

.tp-dot {
    width: 0.6rem;
    height: 0.6rem;
    flex-shrink: 0;
    border-radius: 9999px;
    background: var(--tp-status, #9ca3af);
}

.tp-summary__time {
    margin-inline-start: auto;
}

/* Hinweis zur Vorschau für den nächsten Öffnungstag */
.tp-notice {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
    padding: 0.85rem 1rem;
    border-radius: 0.75rem;
    border: 1px solid color-mix(in srgb, var(--tp-status) 35%, transparent);
    background: color-mix(in srgb, var(--tp-status) 10%, var(--tp-card));
    font-size: 0.9rem;
}

.tp-notice__icon {
    width: 1.25rem;
    height: 1.25rem;
    flex-shrink: 0;
    margin-top: 0.1rem;
    color: var(--tp-status);
}

.tp-notice strong {
    display: block;
    margin-bottom: 0.1rem;
}

/* ---------- Übersicht: Raumkacheln ---------- */

.tp-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}

.tp-tile {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    padding: 1.1rem 1.15rem 1rem;
    overflow: hidden;
    border-radius: 1rem;
    border: 1px solid var(--tp-border);
    background: var(--tp-card);
    color: inherit;
    text-decoration: none;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.tp-tile::before {
    content: "";
    position: absolute;
    inset: 0 0 auto 0;
    height: 4px;
    background: var(--tp-status);
}

.tp-tile:hover,
.tp-tile:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -12px rgba(0, 0, 0, 0.25);
}

.tp-tile:focus-visible {
    outline: 2px solid var(--tp-brand);
    outline-offset: 2px;
}

.tp-tile__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}

.tp-tile__name {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tp-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.55rem;
    flex-shrink: 0;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: color-mix(in srgb, var(--tp-status) 75%, var(--tp-text));
    background: color-mix(in srgb, var(--tp-status) 14%, transparent);
    white-space: nowrap;
}

.tp-tile__value {
    display: flex;
    align-items: baseline;
    gap: 0.25rem;
    margin-top: 0.35rem;
    font-size: 2.6rem;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.02em;
    font-variant-numeric: tabular-nums;
}

.tp-tile__unit {
    font-size: 1.15rem;
    font-weight: 600;
    color: var(--tp-muted);
}

.tp-tile__meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.9rem;
    font-size: 0.8rem;
    color: var(--tp-muted);
}

.tp-tile__meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

.tp-tile__meta svg {
    width: 0.95rem;
    height: 0.95rem;
}

.tp-tile__forecast {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.35rem;
    margin-top: 0.5rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--tp-border);
    font-size: 0.85rem;
}

.tp-tile__forecast b {
    font-variant-numeric: tabular-nums;
}

.tp-tile--muted .tp-tile__value {
    color: var(--tp-muted);
}

/* Legende und leere Zustände */
.tp-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1rem;
    margin-top: 1.25rem;
    font-size: 0.8rem;
    color: var(--tp-muted);
}

.tp-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.tp-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--tp-muted);
}

.tp-empty img {
    width: 3rem;
    height: auto;
    opacity: 0.9;
}

.tp-empty strong {
    color: var(--tp-text);
    font-size: 1rem;
}

@media (max-width: 640px) {
    .tp-summary__time {
        margin-inline-start: 0;
        width: 100%;
    }

    .tp-tile__value {
        font-size: 2.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tp-tile {
        transition: none;
    }

    .tp-tile:hover {
        transform: none;
    }
}

/* ---------- Einladungsseite (eigenständig, ohne Filament) ---------- */

.tp-auth {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    box-sizing: border-box;
    font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--tp-text);
    background:
        radial-gradient(60rem 30rem at 85% -10%, rgba(255, 138, 36, 0.14), transparent 60%),
        radial-gradient(40rem 25rem at -10% 110%, rgba(242, 107, 31, 0.10), transparent 60%),
        #fafafa;
}

.tp-auth__card {
    width: 100%;
    max-width: 28rem;
    padding: 2rem;
    box-sizing: border-box;
    border-radius: 1rem;
    background: #ffffff;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 12px 32px -12px rgba(0, 0, 0, 0.12);
}

.tp-auth__logo {
    display: block;
    height: 2.25rem;
    width: auto;
    margin: 0 auto 1.5rem;
}

.tp-auth h1 {
    margin: 0 0 0.75rem;
    font-size: 1.35rem;
    text-align: center;
}

.tp-auth p {
    margin: 0 0 1rem;
    line-height: 1.5;
    font-size: 0.95rem;
}

.tp-auth__field {
    display: block;
    margin-bottom: 0.9rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.tp-auth__field span {
    display: block;
    margin-bottom: 0.3rem;
}

.tp-auth__field input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.6rem 0.75rem;
    border: 1px solid #d4d4d8;
    border-radius: 0.5rem;
    font: inherit;
    font-weight: 400;
}

.tp-auth__field input:focus {
    outline: 2px solid var(--tp-brand);
    outline-offset: 1px;
    border-color: var(--tp-brand);
}

.tp-auth__field input:disabled {
    background: #f4f4f5;
    color: var(--tp-muted);
}

.tp-auth__button {
    width: 100%;
    margin-top: 0.25rem;
    padding: 0.7rem 1rem;
    border: 0;
    border-radius: 0.5rem;
    background: var(--tp-brand);
    color: #ffffff;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.tp-auth__button:hover {
    background: #e05d14;
}

.tp-auth__button--secondary {
    background: #3f3f46;
}

.tp-auth__button--secondary:hover {
    background: #27272a;
}

.tp-auth__hint,
.tp-auth__small {
    color: var(--tp-muted);
}

.tp-auth .tp-auth__small {
    margin: 1.25rem 0 0;
    font-size: 0.8rem;
    text-align: center;
}

.tp-auth__error {
    margin-bottom: 1rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.5rem;
    background: #fef2f2;
    color: #991b1b;
    font-size: 0.9rem;
}

.tp-auth .tp-auth__field-error {
    margin: -0.5rem 0 0.9rem;
    color: #b91c1c;
    font-size: 0.85rem;
}

.tp-auth__links {
    text-align: center;
}

.tp-auth__links a {
    color: var(--tp-brand);
    font-weight: 600;
}
