@font-face {
    font-family: "Inter";
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/Inter-VariableFont_opsz,wght.ttf") format("truetype");
}

@font-face {
    font-family: "Inter";
    font-style: italic;
    font-weight: 100 900;
    font-display: swap;
    src: url("../fonts/Inter-Italic-VariableFont_opsz,wght.ttf") format("truetype");
}

:root {
    --bg: #0b1220;
    --bg-elevated: #121b2d;
    --bg-soft: #19243a;
    --border: rgba(151, 167, 194, 0.18);
    --text: #edf2ff;
    --text-soft: #9caacd;
    --accent: #58c4dd;
    --accent-strong: #7de0f6;
    --danger: #ff7272;
    --success: #68d391;
    --shadow: 0 20px 60px rgba(0, 0, 0, 0.35);
}

* {
    box-sizing: border-box;
}

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

body {
    background:
        radial-gradient(circle at top left, rgba(88, 196, 221, 0.15), transparent 28%),
        radial-gradient(circle at bottom right, rgba(125, 224, 246, 0.1), transparent 22%),
        linear-gradient(180deg, #09101d 0%, #0e1626 100%);
    color: var(--text);
    font-family: "Inter", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    font-size: 16px;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    width: 100%;
    padding: 2rem;
}

.auth-card,
.card,
.sidebar {
    background: rgba(18, 27, 45, 0.92);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.auth-card {
    width: min(100%, 460px);
    border-radius: 24px;
    padding: 2rem;
}

.auth-card-wide {
    width: min(100%, 560px);
}

.auth-card-header h1,
.page-header h1,
.hero-card h2,
.card h3 {
    margin: 0 0 0.5rem;
}

.auth-card-header p,
.page-header p,
.card p,
.sidebar small,
.sidebar-user small {
    color: var(--text-soft);
}

.eyebrow {
    display: inline-block;
    margin-bottom: 0.75rem;
    color: var(--accent-strong);
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.stack-md {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.5rem;
}

.field span {
    font-weight: 600;
}

.field input {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-soft);
    color: var(--text);
    outline: none;
}

.field select,
.field textarea {
    width: 100%;
    padding: 0.9rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--bg-soft);
    color: var(--text);
    outline: none;
    font: inherit;
}

.field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(88, 196, 221, 0.12);
}

.field select:focus,
.field textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px rgba(88, 196, 221, 0.12);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.9rem 1.2rem;
    border: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #041019;
    cursor: pointer;
    font-weight: 700;
}

.button:hover {
    filter: brightness(1.05);
}

.button-secondary {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
}

.button-full {
    width: 100%;
}

.button-danger {
    background: linear-gradient(135deg, #ff7272, #ff9c72);
    color: #1a0909;
}

.button-large {
    width: 100%;
    min-height: 56px;
    font-size: 1rem;
}

.alert {
    margin-bottom: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 14px;
    border: 1px solid transparent;
}

.alert-error {
    background: rgba(255, 114, 114, 0.12);
    border-color: rgba(255, 114, 114, 0.3);
    color: #ffc0c0;
}

.alert-success {
    background: rgba(104, 211, 145, 0.12);
    border-color: rgba(104, 211, 145, 0.3);
    color: #c9f5d8;
}

.badge-warning {
    background: rgba(255, 166, 77, 0.14);
    border-color: rgba(255, 166, 77, 0.35);
    color: #ffd5a3;
}

.sidebar {
    width: 280px;
    padding: 1.5rem;
    border-right: 1px solid var(--border);
}

.brand {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--accent), #2d7ba7);
    color: #08131f;
    font-weight: 900;
}

.nav {
    display: grid;
    gap: 0.75rem;
}

.nav-link {
    padding: 0.85rem 1rem;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.02);
}

.nav-link:hover {
    border-color: rgba(88, 196, 221, 0.35);
}

.nav-link.disabled {
    opacity: 0.6;
    pointer-events: none;
}

.sidebar-user {
    margin: 2rem 0 1rem;
    display: grid;
}

.content {
    flex: 1;
    padding: 2rem;
}

.page-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

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

.status-pill {
    padding: 0.7rem 1rem;
    border-radius: 999px;
    background: rgba(104, 211, 145, 0.12);
    border: 1px solid rgba(104, 211, 145, 0.25);
    color: #d6ffe4;
    white-space: nowrap;
}

.hero-card {
    margin-bottom: 1.5rem;
}

.card {
    border-radius: 24px;
    padding: 1.5rem;
}

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

.simple-list {
    margin: 0.75rem 0 0;
    padding-left: 1.2rem;
}

.simple-list li + li {
    margin-top: 0.45rem;
}

.stream-list {
    display: grid;
    gap: 1rem;
}

.stream-card {
    display: grid;
    gap: 1rem;
}

.stream-card-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.45rem 0.7rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text-soft);
    font-size: 0.85rem;
}

.badge-status {
    color: #f9fbff;
}

.badge-status-planned,
.badge-status-confirmed {
    background: rgba(88, 196, 221, 0.18);
    border-color: rgba(88, 196, 221, 0.35);
}

.badge-status-postponed {
    background: rgba(255, 214, 102, 0.14);
    border-color: rgba(255, 214, 102, 0.3);
}

.badge-status-cancelled {
    background: rgba(255, 114, 114, 0.14);
    border-color: rgba(255, 114, 114, 0.3);
}

.badge-status-online {
    background: rgba(104, 211, 145, 0.16);
    border-color: rgba(104, 211, 145, 0.35);
}

.badge-status-done {
    background: rgba(156, 170, 205, 0.14);
    border-color: rgba(156, 170, 205, 0.25);
}

.stream-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.stream-actions form {
    margin: 0;
}

.stream-meta-grid {
    display: grid;
    gap: 0.75rem;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stream-meta-item {
    display: grid;
    gap: 0.2rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 16px;
}

.stream-meta-item span {
    color: var(--text-soft);
    font-size: 0.85rem;
}

.stream-note {
    padding: 1rem;
    background: rgba(88, 196, 221, 0.06);
    border: 1px solid rgba(88, 196, 221, 0.18);
    border-radius: 18px;
}

.stream-note p {
    margin: 0;
}

.availability-summary-row {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.availability-badge {
    color: #f9fbff;
}

.availability-dabei,
.badge-active {
    background: rgba(104, 211, 145, 0.16);
    border-color: rgba(104, 211, 145, 0.35);
}

.availability-vielleicht {
    background: rgba(255, 214, 102, 0.16);
    border-color: rgba(255, 214, 102, 0.35);
}

.availability-nicht_dabei,
.badge-inactive {
    background: rgba(255, 114, 114, 0.16);
    border-color: rgba(255, 114, 114, 0.35);
}

.availability-open {
    background: rgba(156, 170, 205, 0.16);
    border-color: rgba(156, 170, 205, 0.35);
}

.role-badge.role-admin {
    background: rgba(88, 196, 221, 0.18);
    border-color: rgba(88, 196, 221, 0.35);
}

.role-badge.role-lead_mod {
    background: rgba(125, 224, 246, 0.15);
    border-color: rgba(125, 224, 246, 0.3);
}

.role-badge.role-mod {
    background: rgba(255, 255, 255, 0.08);
}

.role-badge.role-guest_mod {
    background: rgba(156, 170, 205, 0.16);
}

.form-card {
    padding: 1.75rem;
}

.stream-form {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.field-full {
    grid-column: 1 / -1;
}

.checkbox-field {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-height: 52px;
}

.checkbox-field input {
    width: 20px;
    height: 20px;
}

.form-actions {
    display: flex;
    justify-content: flex-start;
}

.quick-stream-page .page-header {
    align-items: stretch;
}

.quick-stream-card {
    max-width: 720px;
}

.quick-stream-form {
    display: grid;
    gap: 1rem;
}

.quick-stream-form .field input,
.quick-stream-form .field select,
.quick-stream-form .field textarea {
    min-height: 56px;
    font-size: 1rem;
}

.quick-stream-form .field textarea {
    min-height: 140px;
}

.public-home {
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.public-stream-list {
    display: grid;
    gap: 1rem;
}

.public-stream-card,
.support-card {
    display: grid;
    gap: 1rem;
}

.public-stream-top {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.public-stream-time {
    display: grid;
    gap: 0.2rem;
    min-width: 120px;
    text-align: right;
    color: var(--text-soft);
}

.public-stream-time strong {
    color: var(--text);
}

.public-card h2,
.public-stream-card h2,
.support-card h2 {
    margin: 0;
}

.user-list {
    display: grid;
    gap: 1rem;
}

.user-item {
    display: grid;
    gap: 0.85rem;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
}

.user-item-main {
    display: grid;
    gap: 0.2rem;
}

.user-item-main span,
.user-item-meta span,
.availability-column p,
.availability-list span {
    color: var(--text-soft);
}

.user-badges {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.user-item-meta {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.availability-overview-card {
    margin-top: 1rem;
}

.availability-columns {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.availability-column {
    padding: 1rem;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
}

.availability-column h3 {
    margin-top: 0;
}

.availability-list {
    margin: 0;
    padding-left: 1rem;
}

.availability-list li + li {
    margin-top: 0.45rem;
}

.stream-alert-box {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 112, 112, 0.35);
    background:
        linear-gradient(180deg, rgba(111, 20, 20, 0.35) 0%, rgba(76, 17, 17, 0.28) 100%),
        rgba(255, 255, 255, 0.02);
}

.stream-alert-box p,
.stream-alert-box small {
    margin: 0;
}

.stream-alert-box-dashboard {
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: auto;
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .page-header {
        flex-direction: column;
    }

    .status-pill {
        white-space: normal;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }

    .stream-card-top,
    .public-stream-top,
    .stream-meta-grid,
    .stream-form,
    .availability-columns {
        grid-template-columns: 1fr;
    }

    .stream-card-top,
    .public-stream-top {
        flex-direction: column;
    }

    .stream-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .auth-page,
    .content,
    .sidebar {
        padding: 1.25rem;
    }

    .auth-card,
    .card {
        border-radius: 18px;
    }

    .page-actions,
    .stream-actions,
    .form-actions,
    .user-item-meta,
    .availability-summary-row {
        flex-direction: column;
    }

    .page-actions .button,
    .stream-actions .button,
    .stream-actions form,
    .stream-actions button,
    .form-actions .button,
    .user-item-meta .button {
        width: 100%;
    }

    .stream-meta-item {
        padding: 0.85rem 0.9rem;
    }

    .public-stream-time {
        min-width: 0;
        text-align: left;
    }
}
