/* Gesamtlayout mit Sidebar */

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

/* Sidebar */

.sidebar {
    width: 260px;
    background: #020617;
    border-right: 1px solid #111827;
    padding: 16px 14px 20px;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
}

.sidebar-logo {
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: radial-gradient(circle at top, #4f46e5, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.sidebar-workspace {
    font-weight: 600;
    font-size: 16px;
    color: #e5e7eb;
}

.sidebar-sub {
    font-size: 13px;
    color: #9ca3af;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 18px;
}

.sidebar-nav-item {
    display: block;
    padding: 7px 10px;
    border-radius: 10px;
    font-size: 14px;
    color: #9ca3af;
    text-decoration: none;
}

.sidebar-nav-item:hover {
    background: rgba(15,23,42,0.9);
    color: #e5e7eb;
}

.sidebar-nav-item.active {
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #f9fafb;
}

/* Sidebar-Panel "Sichtbarkeit" */

.sidebar-panel {
    margin-top: auto;
    background: rgba(15,23,42,0.95);
    border-radius: 12px;
    border: 1px solid #1f2937;
    padding: 10px 11px;
}

.sidebar-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.sidebar-panel-title {
    font-size: 14px;
    font-weight: 600;
}

.sidebar-panel-tag {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 2px 7px;
    border-radius: 999px;
    border: 1px solid #374151;
    color: #9ca3af;
}

.sidebar-panel-text {
    font-size: 12px;
    color: #9ca3af;
    margin: 4px 0 8px;
}

.sidebar-messages {
    max-height: 220px;
    overflow-y: auto;
}

.sidebar-msg {
    padding: 5px 6px;
    border-radius: 8px;
    background: rgba(15,23,42,0.9);
    border: 1px solid #111827;
    margin-bottom: 6px;
}

.sidebar-msg-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2px;
}

.sidebar-msg-user {
    font-size: 13px;
    font-weight: 500;
}

.sidebar-msg-close {
    border: none;
    background: transparent;
    color: #9ca3af;
    font-size: 14px;
    cursor: pointer;
    padding: 0 3px;
}

.sidebar-msg-close:hover {
    color: #f9fafb;
}

.sidebar-msg-text {
    font-size: 13px;
    color: #e5e7eb;
}

.sidebar-muted {
    font-size: 13px;
    color: #9ca3af;
}

/* Hauptbereich rechts */

.main-area {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.main-inner {
    flex: 1;
    padding: 22px 18px 32px;
}

/* Karten zwischen sich mit gleichem Abstand */

.card {
    margin-bottom: 20px;
}

* {
    box-sizing: border-box;
}

/* Hintergrund im OBS-Stil */
body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: radial-gradient(circle at top, #111827 0, #020617 45%, #000000 100%);
    color: #e5e7eb;
    font-size: 16px; /* Basis etwas größer */
}

/* Links */
a {
    color: #60a5fa;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* Header */

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 22px;
    background: linear-gradient(90deg, #020617, #111827);
    border-bottom: 1px solid #1f2937;
    box-shadow: 0 4px 20px rgba(0,0,0,0.7);
}

.header h1 {
    margin: 0 0 2px 0;
    font-size: 22px;
    letter-spacing: 0.03em;
}

.header p {
    margin: 0;
    font-size: 14px;
    color: #9ca3af;
}

.header-actions .btn {
    margin-left: 6px;
}

/* Container */

.container {
    max-width: 1200px;
    margin: 22px auto 40px;
    padding: 0 16px;
}

/* Karten / Panels */

.card {
    background: radial-gradient(circle at top left, #0b1220 0, #020617 50%, #020617 100%);
    border-radius: 14px;
    padding: 16px 18px 18px;
    box-shadow: 0 18px 60px rgba(0,0,0,0.8);
    border: 1px solid #1f2937;
    position: relative;
    margin-bottom: 20px; /* NEU: gleicher Abstand nach unten */
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.card-header h2 {
    margin: 0;
    font-size: 18px;
}

.card-tag {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #9ca3af;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid #374151;
    background: rgba(15,23,42,0.6);
}

.card p {
    margin: 6px 0 10px;
    font-size: 15px;
}

/* Alert */

.alert {
    background: rgba(6, 78, 59, 0.85);
    border: 1px solid #22c55e;
    color: #bbf7d0;
    padding: 10px 12px;
    border-radius: 10px;
    margin-bottom: 18px;
    font-size: 15px;
}

/* Buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 7px 14px;
    border-radius: 999px;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #e5e7eb;
    font-size: 15px;
    font-weight: 500;
    white-space: nowrap;
}

.btn:hover {
    filter: brightness(1.1);
}

.btn-ghost {
    background: transparent;
    border: 1px solid #4b5563;
    color: #e5e7eb;
}

.btn-ghost:hover {
    border-color: #9ca3af;
}

.btn-small {
    padding: 4px 9px;
    font-size: 14px;
}

.btn-big {
    padding: 10px 20px;
    font-size: 18px;
}

/* Tabellen */

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 15px;
    margin-top: 8px;
}

.table th,
.table td {
    padding: 7px 9px;
    border-bottom: 1px solid #111827;
    text-align: left;
}

.table th {
    font-weight: 600;
    color: #9ca3af;
    background: #020617;
}

.table tr:nth-child(even) {
    background: rgba(15,23,42,0.35);
}

/* Formulare */

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 18px;
    margin-bottom: 12px;
}

.form-grid label {
    display: flex;
    flex-direction: column;
    font-size: 14px;
    color: #9ca3af;
}

.form-grid input[type="text"],
.form-grid input[type="number"],
.form-grid input[type="date"],
.form-grid input[type="time"],
.form-grid select,
.form-grid textarea {
    margin-top: 4px;
    padding: 7px 9px;
    border-radius: 8px;
    border: 1px solid #1f2937;
    background: #020617;
    color: #e5e7eb;
    font-size: 15px;
}

.form-grid textarea {
    resize: vertical;
    min-height: 70px;
}

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

/* Muted Text */

.muted {
    font-size: 14px;
    color: #9ca3af;
}

/* Badges */

.badge {
    display:inline-block;
    padding:3px 9px;
    border-radius:999px;
    font-size:13px;
}

.badge-red { background:#fee2e2; color:#b91c1c; }
.badge-green { background:#dcfce7; color:#166534; }
.badge-blue { background:#dbeafe; color:#1d4ed8; }
.badge-yellow { background:#fef9c3; color:#854d0e; }
.badge-gray { background:#e5e7eb; color:#374151; }

/* Status-Select */

.status-select {
    font-size:14px;
    padding:3px 7px;
    border-radius: 999px;
    background: #020617;
    color:#e5e7eb;
    border:1px solid #4b5563;
}

/* Preset Buttons */

.preset-buttons {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preset-buttons button {
    margin-left:4px;
}

/* Inline */

.inline {
    display: inline-block;
}

/* Tabs */

.tabs {
    display: inline-flex;
    background: rgba(15,23,42,0.9);
    border-radius: 999px;
    padding: 4px;
    border: 1px solid #111827;
    margin-bottom: 18px;
    box-shadow: 0 6px 20px rgba(0,0,0,0.6);
}

.tab-button {
    border: none;
    background: transparent;
    padding: 7px 16px;
    border-radius: 999px;
    font-size: 15px;
    color: #9ca3af;
    cursor: pointer;
}

.tab-button:hover {
    color: #e5e7eb;
}

.tab-button.active {
    background: linear-gradient(135deg, #4f46e5, #22c55e);
    color: #f9fafb;
}

/* Tab-Content */

.tab-contents {
    margin-top: 10px;
}

.tab-content {
    display: none;
    animation: fadeIn 0.18s ease-out;
    margin-bottom: 22px;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Login-Seite */

.login-body {
    display:flex;
    align-items:center;
    justify-content:center;
    height:100vh;
    background:#020617 radial-gradient(circle at top, #1d4ed8 0, transparent 55%);
}

.login-box {
    background:#020617;
    padding:24px 26px;
    border-radius:16px;
    box-shadow:0 20px 60px rgba(0,0,0,0.8);
    border:1px solid #1e293b;
    width:300px;
    text-align:center;
}

.login-box h1 {
    margin-top:0;
    margin-bottom:12px;
    font-size:22px;
}

.login-box input[type="text"] {
    width:100%;
    padding:9px 11px;
    border-radius:8px;
    border:1px solid #1e293b;
    background:#020617;
    color:#e5e7eb;
    margin-bottom:10px;
    font-size:15px;
}

.login-box button {
    width:100%;
    padding:9px 11px;
    border-radius:999px;
    border:none;
    background:#4f46e5;
    color:#e5e7eb;
    font-weight:500;
    cursor:pointer;
    font-size:15px;
}

.login-box button:hover {
    background:#6366f1;
}

.error {
    background:#fee2e2;
    color:#b91c1c;
    border-radius:8px;
    padding:7px 9px;
    font-size:14px;
}

/* Timer / Ampel / Messages (Streamer) */

.timer-display {
    font-size: 32px;
    font-weight: bold;
    margin: 10px 0;
}

.timer-label {
    font-size: 16px;
    margin-bottom: 5px;
}

.timer-label-big {
    font-size: 18px;
}

.timer-display-big {
    font-size: 44px;
}

.timer-status-big {
    font-size: 16px;
    color: #e5e7eb;
    margin-top: 6px;
}

.ampel {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: inline-block;
    margin-right: 10px;
    background: #4b5563;
}

.ampel-green { background:#00c853; }
.ampel-yellow{ background:#ffab00; }
.ampel-red   { background:#d50000; }

.messages-box {
    max-height: 220px;
    overflow-y:auto;
    background:#020617;
    padding:10px;
    border-radius:8px;
    border: 1px solid #1f2937;
}

.message-item {
    margin-bottom:8px;
    font-size:15px;
}

.message-time {
    font-size:13px;
    color:#6b7280;
}

.vdo-frame {
    width:100%;
    height:400px;
    border:none;
    border-radius:12px;
    box-shadow:0 4px 16px rgba(0,0,0,.6);
}

/* Status-Buttons */

.status-button-row .btn {
    margin-right: 6px;
    margin-bottom: 6px;
}

/* VDO-Link Vorschau */

.vdo-link-btn {
    position: relative;
    color: #60a5fa;
    cursor: pointer;
    font-size: 15px;
    text-decoration: underline;
    display: inline-block;
}

.vdo-link-btn .vdo-tooltip {
    display: none;
    position: absolute;
    z-index: 20;
    top: 110%;
    left: 0;
    width: 260px;
    height: 160px;
    background: #000;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,.7);
}

.vdo-link-btn .vdo-tooltip iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.vdo-link-btn:hover .vdo-tooltip {
    display: block;
}

.vdo-link-btn.copied {
    color: #16a34a;
}

/* Stream-Mute-Box */

.mute-frame {
    width: 100%;
    min-height: 220px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,.7);
}

/* Regie-Listen */

.regie-lists {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.regie-col h3 {
    margin: 0 0 6px 0;
    font-size: 15px;
}

.regie-item {
    padding: 7px 9px;
    border-radius: 8px;
    background: rgba(15,23,42,0.9);
    border: 1px solid #1f2937;
    margin-bottom: 6px;
    font-size: 15px;
}

.regie-title {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-weight: 500;
    margin-bottom: 2px;
}

.regie-time {
    font-size: 13px;
    color: #9ca3af;
}

.regie-msg {
    margin-bottom: 4px;
    font-size: 15px;
}

.small-hint {
    margin-top: 8px;
    font-size: 13px;
}

/* Status + Timer Layout in Streamer-Ansicht */

/* Status + Timer Layout in Streamer-Ansicht */

.status-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
    gap: 16px;
    margin-top: 12px;
}

/* Innere Boxen (Livestream / Timer) */
.status-inner-card {
    background: rgba(2, 6, 23, 0.9);
    border-radius: 12px;
    border: 1px solid #1f2937;
    padding: 12px 14px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

.status-stream-box h3,
.status-timer-box h3 {
    margin: 0 0 6px 0;
    font-size: 16px;
}

.status-timer-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Responsiv: untereinander auf kleineren Screens */
@media (max-width: 900px) {
    .status-layout {
        grid-template-columns: 1fr;
    }
}

.schedule-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: start;
}

.card-accordion {
    background: rgba(255,255,255,0.05);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
    border: 1px solid rgba(255,255,255,0.08);
}

.acc-header {
    padding: 14px 18px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.acc-header:hover {
    background: rgba(255,255,255,0.08);
}

.acc-content {
    display: none;
    padding: 18px;
    animation: fadeIn 0.2s ease-in-out;
}

.acc-content.active {
    display: block;
}

.acc-title {
    font-size: 16px;
    font-weight: 600;
}

.acc-time {
    opacity: 0.7;
    margin-left: 8px;
}

.entry-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.entry-actions form {
    margin: 0;
}

.entry-ended {
    opacity: 0.4;
}

.entry-ended .badge,
.entry-ended .btn {
    pointer-events: none;
}