@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);
}

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

.app-logo {
    margin-right: 0;
}

.app-header-logo {
    flex: 0 0 auto;
}

.app-header-logo img {
    height: 40px;
    width: auto;
    max-height: 40px;
    display: block;
}

.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;
}

.dashboard-header-side {
    display: grid;
    gap: 0.75rem;
    justify-items: end;
}

.dashboard-presence-compact {
    display: grid;
    gap: 0.45rem;
    max-width: 520px;
    justify-items: end;
    text-align: right;
}

.dashboard-presence-label {
    color: var(--text-soft);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.dashboard-presence-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.6rem;
    justify-content: flex-end;
}

.dashboard-presence-person {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.32rem 0.62rem;
    border-radius: 999px;
    border: 1px solid rgba(151, 167, 194, 0.14);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-soft);
    font-size: 0.88rem;
    line-height: 1.2;
}

.dashboard-presence-empty {
    color: var(--text-soft);
    font-size: 0.88rem;
}

.presence-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
}

.presence-dot--online {
    background: #68d391;
    box-shadow: 0 0 0 3px rgba(104, 211, 145, 0.14);
}

.presence-dot--recent {
    background: #f6c55f;
    box-shadow: 0 0 0 3px rgba(246, 197, 95, 0.14);
}

.presence-dot--offline {
    background: #97a7c2;
    box-shadow: 0 0 0 3px rgba(151, 167, 194, 0.12);
}

.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;
    padding: 1.65rem 1.75rem;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.045) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(18, 27, 45, 0.9);
    border-color: rgba(151, 167, 194, 0.16);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.24);
}

.dashboard-layout-toolbar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.dashboard-grid--editing .dashboard-widget {
    position: relative;
    border-style: dashed;
    border-color: rgba(125, 224, 246, 0.38);
}

.dashboard-widget {
    position: relative;
    display: grid;
    gap: 0.95rem;
    min-height: 100%;
    padding: 1.45rem 1.5rem;
    border-radius: 26px;
    border: 1px solid rgba(151, 167, 194, 0.16);
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(16, 24, 40, 0.9);
    box-shadow:
        0 16px 36px rgba(0, 0, 0, 0.22),
        inset 0 1px 0 rgba(255, 255, 255, 0.025);
    transition: all 0.2s ease;
}

.dashboard-widget--wide {
    grid-column: 1 / -1;
}

.dashboard-widget h3,
.hero-card h2 {
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.015em;
}

.dashboard-widget p,
.dashboard-widget small,
.hero-card p {
    margin: 0;
    line-height: 1.55;
}

.dashboard-widget small,
.dashboard-widget p:not(strong) {
    color: var(--text-soft);
}

.dashboard-widget:hover,
.hero-card:hover,
.stream-alert-box:hover,
.live-mode-panel:hover {
    transform: translateY(-2px);
    box-shadow:
        0 22px 44px rgba(0, 0, 0, 0.25),
        inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

[data-widget-id="next_stream"] {
    grid-column: 1 / -1;
    padding: 1.7rem 1.75rem;
    background:
        radial-gradient(circle at top right, rgba(123, 220, 255, 0.08), transparent 32%),
        linear-gradient(180deg, rgba(255, 255, 255, 0.055) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(16, 24, 40, 0.94);
}

[data-widget-id="next_stream"] h3 {
    font-size: 1.22rem;
}

[data-widget-id="next_stream"] strong {
    font-size: 1.08rem;
    font-weight: 700;
    color: var(--text);
}

[data-widget-id="unread_mentions"] {
    padding: 1.15rem 1.2rem;
    gap: 0.75rem;
    align-self: start;
}

[data-widget-id="unread_mentions"] h3 {
    font-size: 1rem;
}

.dashboard-widget-controls {
    display: none;
    justify-content: flex-end;
    gap: 0.45rem;
    margin-bottom: 0.75rem;
}

.dashboard-grid--editing .dashboard-widget-controls {
    display: flex;
}

.dashboard-handle,
.dashboard-move-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    min-height: 36px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    cursor: pointer;
    font: inherit;
}

.dashboard-handle {
    cursor: grab;
}

.dashboard-widget--dragging {
    opacity: 0.72;
}

.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;
    color: var(--text-soft);
}

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

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

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

.stream-card--live {
    border-color: rgba(255, 86, 86, 0.26);
    box-shadow: inset 0 0 0 1px rgba(255, 86, 86, 0.1);
}

.stream-card--top {
    border-color: rgba(255, 196, 92, 0.28);
    box-shadow: inset 0 0 0 1px rgba(255, 196, 92, 0.1);
}

.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.05);
    border: 1px solid rgba(151, 167, 194, 0.16);
    color: var(--text-soft);
    font-size: 0.85rem;
}

.badge-status {
    color: #f9fbff;
}

.badge-status-planned {
    background: rgba(255, 214, 102, 0.14);
    border-color: rgba(255, 214, 102, 0.28);
    color: #fff1cc;
}

.badge-status-confirmed {
    background: rgba(104, 211, 145, 0.14);
    border-color: rgba(104, 211, 145, 0.3);
    color: #e3f8eb;
}

.badge-status-postponed {
    background: rgba(255, 214, 102, 0.13);
    border-color: rgba(255, 214, 102, 0.26);
    color: #fff0c3;
}

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

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

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

.badge-status-live {
    background: rgba(104, 211, 145, 0.17);
    border-color: rgba(104, 211, 145, 0.32);
    color: #e8fff0;
}

.badge-status-past {
    background: rgba(156, 170, 205, 0.14);
    border-color: rgba(156, 170, 205, 0.24);
    color: #d8e0f4;
}

.badge-live {
    background: rgba(104, 211, 145, 0.17);
    border-color: rgba(104, 211, 145, 0.32);
    color: #e8fff0;
}

.badge-top-event {
    background: rgba(255, 196, 92, 0.16);
    border-color: rgba(255, 196, 92, 0.34);
    color: #ffe8b3;
}

.badge-prime {
    color: #f6fbff;
}

.prime-betze {
    background: rgba(237, 86, 86, 0.18);
    border-color: rgba(237, 86, 86, 0.34);
}

.prime-pixel {
    background: rgba(88, 196, 221, 0.18);
    border-color: rgba(88, 196, 221, 0.34);
}

.prime-tech {
    background: rgba(125, 224, 246, 0.16);
    border-color: rgba(125, 224, 246, 0.34);
}

.prime-taste {
    background: rgba(255, 184, 77, 0.18);
    border-color: rgba(255, 184, 77, 0.34);
}

.prime-home {
    background: rgba(140, 145, 255, 0.16);
    border-color: rgba(140, 145, 255, 0.34);
}

.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.28rem;
    padding: 0.95rem 1rem;
    background: rgba(255, 255, 255, 0.035);
    border: 1px solid rgba(151, 167, 194, 0.16);
    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);
}

.role-badge.role-host {
    background: rgba(123, 220, 255, 0.16);
    border-color: rgba(123, 220, 255, 0.32);
}

.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;
}

.form-section {
    display: grid;
    gap: 1rem;
    padding: 1.2rem;
    border: 1px solid rgba(151, 167, 194, 0.16);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.03);
}

.form-section-header h2,
.public-hero h1,
.public-empty-state h2 {
    margin: 0;
}

.form-section-header p,
.public-note-box p {
    color: var(--text-soft);
    margin: 0;
}

.form-hint {
    margin: -0.25rem 0 0;
    color: var(--text-soft);
    font-size: 0.92rem;
}

.stream-detail-tabs {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 0 0 1.25rem;
}

.stream-detail-tab {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1rem;
    border-radius: 999px;
    border: 1px solid rgba(151, 167, 194, 0.16);
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-soft);
    transition: all 0.2s ease;
}

.stream-detail-tab:hover {
    transform: translateY(-2px);
    border-color: rgba(88, 196, 221, 0.3);
    color: var(--text);
}

.stream-detail-tab--active {
    background: rgba(88, 196, 221, 0.12);
    border-color: rgba(88, 196, 221, 0.28);
    color: var(--text);
}

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

.stream-document-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.stream-document-header h2,
.stream-document-hosts h3 {
    margin: 0 0 0.4rem;
}

.stream-document-meta {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(151, 167, 194, 0.16);
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-soft);
}

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

.stream-document-editor {
    min-height: 420px;
    resize: vertical;
    line-height: 1.6;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.025) 0%, rgba(255, 255, 255, 0.01) 100%),
        rgba(13, 20, 34, 0.92);
}

.stream-document-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.stream-document-status {
    color: var(--text-soft);
    font-size: 0.92rem;
}

.stream-document-status[data-state="pending"] {
    color: #fff0c3;
}

.stream-document-status[data-state="saving"] {
    color: var(--accent-strong);
}

.stream-document-status[data-state="saved"] {
    color: #d9f6e3;
}

.stream-document-status[data-state="error"] {
    color: #ffd6d6;
}

.stream-document-readonly {
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(151, 167, 194, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

.stream-document-readonly pre {
    margin: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font: inherit;
    line-height: 1.65;
}

.stream-document-hosts {
    display: grid;
    gap: 0.75rem;
}

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

.documents-list-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    flex-wrap: wrap;
}

.documents-list-head h2 {
    margin: 0;
}

.documents-list {
    display: grid;
    gap: 0.9rem;
}

.documents-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(151, 167, 194, 0.16);
    background: rgba(255, 255, 255, 0.03);
}

.documents-item-main {
    display: grid;
    gap: 0.6rem;
}

.documents-item-main strong,
.documents-item-main small,
.documents-item-meta small {
    display: block;
}

.documents-item-meta {
    display: grid;
    gap: 0.35rem;
}

.documents-item-actions {
    display: flex;
    gap: 0.7rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

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

.legal-page {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: grid;
    gap: 1rem;
}

.legal-card {
    display: grid;
    gap: 0.85rem;
}

.legal-back-link {
    display: inline-flex;
    align-items: center;
    margin-bottom: 24px;
    color: #7bdcff;
    text-decoration: none;
    font-weight: 700;
}

.legal-back-link:hover {
    text-decoration: underline;
}

.legal-card h1,
.legal-card h2,
.legal-card p {
    margin: 0;
}

.legal-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-soft);
}

.legal-list li + li {
    margin-top: 0.35rem;
}

.public-hero {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
    background:
        radial-gradient(circle at top left, rgba(88, 196, 221, 0.18), transparent 35%),
        linear-gradient(160deg, rgba(18, 27, 45, 0.96) 0%, rgba(12, 19, 34, 0.95) 100%);
}

.public-hero-inner {
    display: grid;
    gap: 0.8rem;
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.public-live-hero {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.public-live-hero-title {
    display: grid;
    gap: 0.35rem;
}

.public-live-hero-title h2 {
    margin: 0;
}

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

.public-live-card {
    display: grid;
    gap: 0.9rem;
    border-color: rgba(255, 86, 86, 0.32);
    background:
        linear-gradient(180deg, rgba(88, 18, 18, 0.28) 0%, rgba(18, 27, 45, 0.92) 100%);
}

.public-live-card h3,
.public-live-time {
    margin: 0;
}

.public-channel-links {
    display: grid;
    gap: 0.75rem;
    text-align: center;
    margin: 0;
    max-width: 520px;
    padding: 1rem 1.1rem;
    background: rgba(255, 255, 255, 0.025);
}

.public-channel-links .eyebrow {
    margin-bottom: 0;
}

.public-channel-link-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
}

.public-channel-link-row .button {
    width: auto;
    padding: 0.7rem 1rem;
    font-size: 0.92rem;
}

.public-logo {
    width: 100%;
    max-width: 240px;
    height: auto;
    display: block;
}

.public-hero-logo {
    display: block;
    margin: 0 auto 16px auto;
    max-width: 240px;
}

.public-logo-text {
    font-size: clamp(2rem, 5vw, 3.25rem);
    font-weight: 900;
    letter-spacing: 0.08em;
    color: #f7fbff;
}

.public-hero-logo-text {
    margin: 0 auto 16px auto;
}

.public-empty-state {
    display: grid;
    gap: 0.8rem;
    text-align: center;
    place-items: center;
    min-height: 280px;
}

.site-footer {
    border-top: 1px solid var(--border);
    padding: 1.1rem 1.5rem 1.6rem;
}

.site-footer-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-footer-nav a {
    color: var(--text-soft);
    text-decoration: none;
}

.site-footer-nav a:hover,
.site-footer-nav a:focus-visible {
    color: var(--text);
}

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

.public-day-group {
    display: grid;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.public-day-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 1rem;
}

.public-day-header h2 {
    margin: 0;
}

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

.public-stream-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 24px;
    align-items: start;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.04) 0%, rgba(255, 255, 255, 0.02) 100%),
        rgba(18, 27, 45, 0.92);
}

.public-stream-card--live {
    border-color: rgba(255, 86, 86, 0.3);
    box-shadow: inset 0 0 0 1px rgba(255, 86, 86, 0.12);
}

.public-stream-card--top {
    border-color: rgba(255, 196, 92, 0.32);
    box-shadow: inset 0 0 0 1px rgba(255, 196, 92, 0.14);
}

.public-stream-main {
    min-width: 0;
}

.public-channel-line,
.stream-with-line {
    margin: 0.35rem 0 0;
    color: var(--text-soft);
}

.public-live-kicker,
.stream-live-kicker {
    margin: 0;
    color: #ffb4b4;
    font-size: 0.9rem;
    font-weight: 700;
}

.public-stream-title {
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    line-height: 1.15;
}

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

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

.platform-link-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    grid-column: 1 / -1;
}

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

.public-note-box {
    display: grid;
    gap: 0.55rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(88, 196, 221, 0.18);
    background: rgba(88, 196, 221, 0.06);
    grid-column: 1 / -1;
}

.public-support-card {
    max-width: 520px;
    margin: 0;
    gap: 0.75rem;
    padding: 22px 26px;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    background:
        radial-gradient(circle at top right, rgba(125, 224, 246, 0.14), transparent 28%),
        rgba(18, 27, 45, 0.92);
}

.public-support-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

.public-support-card .eyebrow {
    margin-bottom: 0.25rem;
    font-size: 0.72rem;
}

.public-support-card h2 {
    font-size: 1.02rem;
}

.public-support-card p {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.45;
    color: var(--text-soft);
}

.public-support-card .button {
    display: inline-flex;
    width: auto;
    margin: 16px auto 0 auto;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.public-support-card .button:hover {
    transform: translateY(-1px);
}

.public-support-card .button:active {
    transform: translateY(0);
}

.public-bottom-row {
    display: flex;
    gap: 24px;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    margin-top: 40px;
}

.public-bottom-row > div {
    flex: 1 1 320px;
    max-width: 520px;
}

.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;
}

.chat-layout {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(320px, 1fr);
    gap: 1rem;
    min-height: 0;
    flex: 1;
    overflow: hidden;
}

.chat-page {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 4rem);
    overflow: hidden;
}

.chat-popup-body .app-shell {
    display: block;
}

.chat-popup-shell {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 4rem);
    max-width: 100%;
}

.chat-layout-popup {
    grid-template-columns: 1fr;
}

.chat-card-popup {
    height: calc(100vh - 20rem);
}

.chat-compose-card-popup {
    position: sticky;
    bottom: 0;
    top: auto;
}

.chat-card,
.chat-compose-card {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.chat-card {
    min-height: 0;
    overflow: hidden;
    height: calc(100vh - 11rem);
}

.chat-compose-card {
    position: sticky;
    top: 2rem;
    align-self: start;
}

.chat-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: baseline;
    flex-wrap: wrap;
}

#chatMessages {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    min-height: 0;
    height: 100%;
    max-height: calc(100vh - 16rem);
    flex: 1;
    overflow-y: auto;
    padding-right: 0.3rem;
    overscroll-behavior: contain;
    scroll-behavior: smooth;
}

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

.message--mentioned {
    border-color: rgba(123, 220, 255, 0.3);
    box-shadow: inset 0 0 0 1px rgba(123, 220, 255, 0.14);
    background:
        linear-gradient(180deg, rgba(123, 220, 255, 0.08) 0%, rgba(255, 255, 255, 0.03) 100%);
}

.chat-message.is-deleted {
    opacity: 0.8;
}

.chat-meta {
    display: flex;
    gap: 0.65rem;
    align-items: center;
    flex-wrap: wrap;
}

.chat-meta time,
.presence-item small {
    color: var(--text-soft);
}

.chat-body {
    word-break: break-word;
}

.chat-compose-card textarea {
    min-height: 180px;
    max-height: 240px;
    resize: vertical;
}

.chat-input-wrap {
    position: relative;
    margin-top: 0.55rem;
}

.chat-input-wrap--dropdown-open {
    margin-bottom: 228px;
}

.chat-delete-form {
    margin-left: auto;
}

.chat-enter-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.chat-enter-option span {
    font-weight: 500;
}

.mention-badge {
    background: rgba(123, 220, 255, 0.12);
    border-color: rgba(123, 220, 255, 0.32);
    color: #d5f7ff;
}

.mention-badge-nav {
    margin-left: 0.35rem;
}

.chat-message--anchor {
    border-color: rgba(123, 220, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(123, 220, 255, 0.12);
}

[data-chat-badge] {
    display: none;
    background: #d4af37;
    color: #000;
    border-radius: 999px;
    padding: 2px 6px;
    font-size: 12px;
    margin-left: 6px;
}

.notification-button {
    white-space: nowrap;
}

.chat-mention-dropdown[hidden] {
    display: none !important;
}

.chat-mention-dropdown {
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 8px);
    z-index: 100;
    display: grid;
    gap: 0.35rem;
    padding: 0.5rem;
    max-height: 220px;
    overflow-y: auto;
    border-radius: 14px;
    border: 1px solid rgba(125, 220, 255, 0.35);
    background: rgba(15, 25, 45, 0.98);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
}

.chat-mention-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    padding: 0.75rem 0.9rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: var(--text-main);
    text-align: left;
    cursor: pointer;
}

.chat-mention-item span {
    color: var(--text-soft);
}

.chat-mention-item:hover,
.chat-mention-item--active {
    background: rgba(123, 220, 255, 0.12);
}

@media (max-width: 760px) {
    .chat-input-wrap--dropdown-open {
        margin-bottom: 212px;
    }
}

.host-list {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.host-item {
    display: grid;
    gap: 1rem;
}

.host-item-header {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
    flex-wrap: wrap;
}

.host-item-header h2,
.host-meta-line {
    margin: 0;
}

.host-meta-line {
    color: var(--text-soft);
}

.presence-list {
    display: grid;
    gap: 0.85rem;
}

.presence-item {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: center;
    padding: 1rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(151, 167, 194, 0.14);
    background: rgba(255, 255, 255, 0.035);
    transition: all 0.2s ease;
}

.presence-badge.presence-online {
    background: rgba(104, 211, 145, 0.14);
    border-color: rgba(104, 211, 145, 0.35);
    color: #c9f5d8;
}

.presence-badge.presence-recently_active {
    background: rgba(255, 184, 77, 0.14);
    border-color: rgba(255, 184, 77, 0.35);
    color: #ffe0aa;
}

.presence-badge.presence-offline {
    background: rgba(156, 170, 205, 0.14);
    border-color: rgba(156, 170, 205, 0.3);
    color: #d8e0f4;
}

.mentions-card {
    display: grid;
    gap: 0.8rem;
    align-self: start;
}

.mentions-list {
    display: grid;
    gap: 0.7rem;
}

.mention-entry {
    display: grid;
    gap: 0.35rem;
    padding: 0.85rem 0.95rem;
    border-radius: 18px;
    border: 1px solid rgba(151, 167, 194, 0.14);
    background: rgba(255, 255, 255, 0.035);
    transition: all 0.2s ease;
}

.mention-entry:hover,
.presence-item:hover {
    border-color: rgba(123, 220, 255, 0.35);
    background: rgba(123, 220, 255, 0.07);
    transform: translateY(-2px);
}

.mention-entry-head {
    display: flex;
    justify-content: space-between;
    gap: 0.75rem;
    align-items: center;
}

.mention-entry-snippet {
    margin: 0;
    color: var(--text-soft);
}

.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;
}

.live-mode-panel {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding: 1.15rem 1.2rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 86, 86, 0.34);
    background:
        linear-gradient(180deg, rgba(86, 18, 18, 0.34) 0%, rgba(55, 15, 15, 0.24) 100%),
        rgba(255, 255, 255, 0.02);
    transition: all 0.2s ease;
}

.live-mode-panel h2,
.live-mode-panel p {
    margin: 0;
}

.stream-live-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    padding: 0.95rem 1.05rem;
    border-radius: 18px;
    border: 1px solid rgba(255, 86, 86, 0.32);
    background:
        linear-gradient(180deg, rgba(80, 17, 17, 0.26) 0%, rgba(255, 255, 255, 0.02) 100%);
}

.stream-live-strip p {
    margin: 0;
    color: var(--text-soft);
}

.stream-alert-box-live {
    border-color: rgba(255, 86, 86, 0.42);
    box-shadow: inset 0 0 0 1px rgba(255, 86, 86, 0.12);
}

@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;
    }

    .dashboard-widget--wide {
        grid-column: auto;
    }

    [data-widget-id="next_stream"] {
        grid-column: auto;
        padding: 1.45rem 1.35rem;
    }

    [data-widget-id="unread_mentions"] {
        padding: 1.2rem 1.15rem;
    }

    .dashboard-widget,
    .hero-card {
        padding: 1.25rem 1.2rem;
    }

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

    .public-hero {
        flex-direction: column;
    }

    .public-hero-logo {
        max-width: 190px;
    }

    .public-live-grid {
        grid-template-columns: 1fr;
    }

    .public-support-card {
        max-width: 100%;
    }

    .public-day-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .dashboard-header-side,
    .dashboard-presence-compact {
        justify-items: start;
        text-align: left;
    }

    .dashboard-presence-list {
        justify-content: flex-start;
    }

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

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

    .chat-page {
        min-height: auto;
        overflow: visible;
    }

    .chat-layout {
        overflow: visible;
    }

    .chat-layout-popup {
        grid-template-columns: 1fr;
    }

    .chat-compose-card {
        position: sticky;
        top: auto;
        bottom: 0;
        z-index: 3;
    }

    .chat-card {
        min-height: 55vh;
        height: auto;
    }

    .chat-card-popup {
        min-height: 48vh;
        height: auto;
    }

    #chatMessages {
        max-height: 55vh;
    }

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

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

    .stream-live-strip {
        flex-direction: column;
        align-items: flex-start;
    }

    .stream-document-header,
    .stream-document-toolbar,
    .documents-item {
        flex-direction: column;
        align-items: stretch;
    }
}

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

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

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

    .page-actions,
    .dashboard-layout-toolbar,
    .stream-actions,
    .form-actions,
    .user-item-meta,
    .availability-summary-row,
    .presence-item,
    .chat-meta {
        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;
    }

    .chat-delete-form {
        margin-left: 0;
        width: 100%;
    }

    .chat-compose-card textarea {
        min-height: 132px;
        max-height: 180px;
    }

    .stream-detail-tabs {
        gap: 0.55rem;
    }

    .stream-detail-tab {
        width: 100%;
    }

    .documents-item-actions .button {
        width: 100%;
    }

}
