/**
 * xcasatv bannerbot — app-specific overrides (base theme from xcasatv.de)
 */

:root {
    --bb-sidebar-w: 14rem;
}

/* ── Sichtbarkeit: Inhalt NIEMALS per opacity verstecken ── */
.reveal,
.reveal:not(.reveal--visible) {
    opacity: 1 !important;
    transform: none !important;
}

.text-gradient,
.text-gradient-primary {
    color: var(--primary, #2dd4bf) !important;
    -webkit-text-fill-color: currentColor !important;
    background: none !important;
}

html, body {
    background-color: var(--bg-dark, #060809) !important;
    color: var(--text-main, #f0f4f8) !important;
}

/* Ambient-Hintergrund (auch wenn style.css nicht lädt) */
.page-ambient {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}
.page-ambient__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 64px 64px;
}
.page-ambient__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.45;
    pointer-events: none;
}
.page-ambient__orb--1 {
    top: -14rem;
    right: -6rem;
    width: 34rem;
    height: 34rem;
    background: radial-gradient(circle, rgba(45, 212, 191, 0.18) 0%, transparent 70%);
}
.page-ambient__orb--2 {
    bottom: -12rem;
    left: -12rem;
    width: 38rem;
    height: 38rem;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.1) 0%, transparent 70%);
}
.page-ambient__orb--3 {
    top: 35%;
    left: 45%;
    width: 24rem;
    height: 24rem;
    background: radial-gradient(circle, rgba(94, 234, 212, 0.08) 0%, transparent 70%);
}

/* Dashboard layout */
body.dashboard-app {
    display: flex !important;
    min-height: 100vh;
    height: 100vh;
    overflow: hidden;
    color: #f0f4f8 !important;
}

body.dashboard-app main,
body.dashboard-app aside,
body.dashboard-app .sidebar {
    position: relative;
    z-index: 10;
    color: #e2e8f0;
}

body.dashboard-app h1,
body.dashboard-app h2,
body.dashboard-app h3,
body.dashboard-app h4 {
    color: #ffffff;
}

body.dashboard-app p,
body.dashboard-app span,
body.dashboard-app label,
body.dashboard-app td,
body.dashboard-app th,
body.dashboard-app li {
    color: inherit;
}

body.dashboard-app .nav-item {
    color: #94a3b8;
}

body.dashboard-app .nav-item:hover,
body.dashboard-app .nav-item.active {
    color: #2dd4bf;
}

body.dashboard-app main {
    flex: 1 1 auto;
    min-width: 0;
    overflow-y: auto;
}

.dashboard-app .sidebar {
    background: rgba(8, 10, 12, 0.88);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
}

.dashboard-app .nav-item {
    transition: all 0.2s ease;
    color: var(--text-muted, #8b949e);
    border-radius: var(--radius-md, 0.875rem);
    display: flex;
    align-items: center;
}

.dashboard-app .nav-item:hover,
.dashboard-app .nav-item.active {
    background: rgba(45, 212, 191, 0.08);
    color: var(--primary, #2dd4bf);
}

.dashboard-app .card,
.dashboard-app .banner-card {
    background: linear-gradient(145deg, rgba(17, 20, 24, 0.75) 0%, rgba(17, 20, 24, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.dashboard-app .card:hover,
.dashboard-app .banner-card:hover {
    border-color: rgba(45, 212, 191, 0.25);
}

.dashboard-app main {
    position: relative;
    z-index: 1;
}

/* Forms in dashboard */
.dashboard-app input[type=text],
.dashboard-app input[type=number],
.dashboard-app input[type=email],
.dashboard-app input[type=password],
.dashboard-app select,
.dashboard-app textarea {
    background: var(--bg-input, rgba(8, 10, 12, 0.65));
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-md, 0.875rem);
    color: var(--text-main, #f0f4f8);
}

.dashboard-app input:focus,
.dashboard-app select:focus,
.dashboard-app textarea:focus {
    outline: none;
    border-color: rgba(45, 212, 191, 0.4);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.1);
}

/* Toast / notifications */
#toast-wrap {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 8px;
    pointer-events: none;
}

.toast {
    padding: 10px 18px;
    border-radius: var(--radius-md, 0.875rem);
    font-size: 0.82rem;
    font-weight: 600;
    pointer-events: auto;
    animation: bbSlideUp 0.3s ease;
}

@keyframes bbSlideUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.toast-success { background: rgba(52, 211, 153, 0.15); color: #34d399; border: 1px solid rgba(52, 211, 153, 0.3); }
.toast-info    { background: rgba(45, 212, 191, 0.1); color: #2dd4bf; border: 1px solid rgba(45, 212, 191, 0.25); }
.toast-error   { background: rgba(248, 113, 113, 0.12); color: #f87171; border: 1px solid rgba(248, 113, 113, 0.3); }

.notif {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    border-radius: var(--radius-lg, 1.25rem);
    margin-bottom: 24px;
    font-size: 0.85rem;
    font-weight: 500;
}

.notif-success { background: rgba(52, 211, 153, 0.12); border: 1px solid rgba(52, 211, 153, 0.25); color: #34d399; }
.notif-info    { background: rgba(45, 212, 191, 0.08); border: 1px solid rgba(45, 212, 191, 0.2); color: #2dd4bf; }
.notif-error   { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.25); color: #f87171; }

/* Auth pages */
.auth-shell {
    min-height: calc(100vh - 12rem);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 28rem;
    padding: 2.5rem;
    border-radius: var(--radius-2xl, 2rem);
}

/* Banner editor keeps its own dark UI */
body.editor-app {
    background: #0a0f1e !important;
}

/* Legacy alias compatibility */
.card-bg {
    background: linear-gradient(145deg, rgba(17, 20, 24, 0.75) 0%, rgba(17, 20, 24, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(16px);
}

a.btn-primary,
button.btn-primary,
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.625rem 1.25rem;
    border-radius: 0.875rem;
    font-weight: 700;
    color: #000;
    background: linear-gradient(135deg, var(--primary, #2dd4bf) 0%, var(--primary-dark, #14b8a6) 100%);
    box-shadow: 0 4px 20px var(--primary-glow, rgba(45, 212, 191, 0.35));
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--primary-glow, rgba(45, 212, 191, 0.35));
}

.page-content {
    position: relative;
    z-index: 10;
    flex: 1;
    color: var(--text-main, #f0f4f8);
}

.site-nav {
    position: sticky !important;
    top: 0;
    z-index: 50 !important;
    color: var(--text-main, #f0f4f8);
}

.site-nav__link {
    color: var(--text-muted, #8b949e);
}

.site-nav__link:hover,
.site-nav__link--active {
    color: var(--primary, #2dd4bf) !important;
}

.site-footer,
main {
    position: relative;
    z-index: 10;
}

/* Modals — NICHT global .hidden, sonst bricht Tailwind lg:flex im Header */
.modal-bg {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    z-index: 200;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-bg.hidden {
    display: none !important;
}

.modal-bg:not(.hidden) {
    display: flex !important;
}

.modal {
    background: var(--bg-card, #111418);
    border: 1px solid var(--border, rgba(255, 255, 255, 0.08));
    border-radius: var(--radius-xl, 1.75rem);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
}

.modal--wide {
    max-width: 560px;
}

.modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 22px 24px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.modal-header__icon {
    width: 42px;
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.1rem;
}

.modal-header__icon--server {
    background: rgba(45, 212, 191, 0.12);
    color: #2dd4bf;
    border: 1px solid rgba(45, 212, 191, 0.2);
}

.modal-header__icon--banner {
    background: rgba(59, 130, 246, 0.12);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.modal-title {
    font-size: 1.125rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.3;
}

.modal-subtitle {
    font-size: 0.8rem;
    color: var(--text-muted, #8b949e);
    margin-top: 4px;
    line-height: 1.45;
}

.modal-close {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.04);
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
    flex-shrink: 0;
}

.modal-close:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.modal-body {
    padding: 20px 24px 24px;
}

.modal-body > * + * {
    margin-top: 16px;
}

/* Alle Formularfelder in Modals: volle Breite (Fix schmale Inputs/Textareas) */
.modal input[type="text"],
.modal input[type="password"],
.modal input[type="number"],
.modal input[type="email"],
.modal select,
.modal textarea,
.modal .modal-input,
.modal .modal-select {
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    display: block;
}

.modal textarea {
    min-height: 140px;
    resize: vertical;
    line-height: 1.5;
}

.modal .grid > div {
    min-width: 0;
}

.modal-footer {
    display: flex;
    gap: 12px;
    padding-top: 8px;
}

.modal-input,
.modal-select,
.modal-body input[type="text"],
.modal-body input[type="password"],
.modal-body input[type="number"],
.modal-body select,
.modal-body textarea {
    width: 100%;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 11px 14px;
    font-size: 0.875rem;
    color: #f1f5f9;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.modal-input:focus,
.modal-select:focus,
.modal-body input:focus,
.modal-body select:focus,
.modal-body textarea:focus {
    outline: none;
    border-color: rgba(45, 212, 191, 0.45);
    box-shadow: 0 0 0 3px rgba(45, 212, 191, 0.12);
}

.modal-hint {
    font-size: 0.72rem;
    color: #64748b;
    margin-top: 6px;
    line-height: 1.4;
}

.type-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 4px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 14px;
}

.type-switch__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #94a3b8;
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.18s;
}

.type-switch__btn:hover {
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.04);
}

.type-switch__btn.active {
    color: #fff;
    background: linear-gradient(135deg, rgba(45, 212, 191, 0.22), rgba(20, 184, 166, 0.12));
    border: 1px solid rgba(45, 212, 191, 0.35);
    box-shadow: 0 4px 16px rgba(45, 212, 191, 0.1);
}

.type-switch__btn .badge-ts6.active,
.type-switch__btn[data-type="teamspeak6"].active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(79, 70, 229, 0.12));
    border-color: rgba(129, 140, 248, 0.35);
}

.modal-panel.hidden {
    display: none !important;
}

.modal-info {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 0.78rem;
    line-height: 1.45;
    color: #94a3b8;
    background: rgba(45, 212, 191, 0.06);
    border: 1px solid rgba(45, 212, 191, 0.15);
}

.modal-info--purple {
    background: rgba(99, 102, 241, 0.08);
    border-color: rgba(129, 140, 248, 0.2);
    color: #a5b4fc;
}

.modal-info i {
    margin-top: 2px;
    flex-shrink: 0;
}

.btn-modal-primary {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #042f2e;
    background: linear-gradient(135deg, #2dd4bf, #14b8a6);
    border: none;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
}

.btn-modal-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(45, 212, 191, 0.25);
}

.btn-modal-secondary {
    flex: 1;
    padding: 11px 16px;
    border-radius: 12px;
    font-size: 0.875rem;
    font-weight: 700;
    color: #e2e8f0;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    cursor: pointer;
    transition: background 0.15s;
}

.btn-modal-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
}

.server-type-pill {
    display: inline-flex;
    align-items: center;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.04em;
}

.server-type-pill--ts3 {
    background: rgba(45, 212, 191, 0.12);
    color: #5eead4;
    border: 1px solid rgba(45, 212, 191, 0.25);
}

.server-type-pill--ts6 {
    background: rgba(99, 102, 241, 0.12);
    color: #a5b4fc;
    border: 1px solid rgba(129, 140, 248, 0.25);
}

.slabel {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-muted, #8b949e);
    margin-bottom: 8px;
    display: block;
}

/* ── Admin Panel (bannerbot/admin/) ── */
body.admin-app .admin-sidebar {
    background: rgba(8, 10, 12, 0.92);
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    height: 100vh;
    position: sticky;
    top: 0;
    z-index: 20;
    flex-shrink: 0;
    overflow-y: auto;
}

body.admin-app main {
    flex: 1 1 auto;
    min-width: 0;
    overflow-y: auto;
    position: relative;
    z-index: 10;
    color: #e2e8f0;
}

body.admin-app h1,
body.admin-app h2,
body.admin-app h3,
body.admin-app h4 {
    color: #ffffff;
}

body.admin-app p,
body.admin-app span,
body.admin-app td,
body.admin-app th,
body.admin-app label,
body.admin-app .anav {
    color: inherit;
}

body.admin-app .anav {
    transition: all 0.18s ease;
    color: #94a3b8;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    font-size: 0.85rem;
    text-decoration: none;
}

body.admin-app .anav:hover {
    background: rgba(45, 212, 191, 0.1);
    color: #5eead4;
}

body.admin-app .anav.active {
    background: rgba(45, 212, 191, 0.16);
    color: #2dd4bf;
    font-weight: 600;
}

body.admin-app .acard {
    background: linear-gradient(145deg, rgba(17, 20, 24, 0.75) 0%, rgba(17, 20, 24, 0.5) 100%);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    backdrop-filter: blur(16px);
}

body.admin-app .acard:hover {
    border-color: rgba(45, 212, 191, 0.25);
}

body.admin-app .astat {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 14px;
    padding: 20px 22px;
    position: relative;
    overflow: hidden;
}

body.admin-app .astat::after {
    content: '';
    position: absolute;
    inset: 0;
    opacity: 0.05;
    border-radius: 14px;
    pointer-events: none;
}

body.admin-app .astat.amber::after { background: radial-gradient(circle at top right, #f59e0b, transparent 65%); }
body.admin-app .astat.blue::after  { background: radial-gradient(circle at top right, #14b8a6, transparent 65%); }
body.admin-app .astat.green::after { background: radial-gradient(circle at top right, #22c55e, transparent 65%); }
body.admin-app .astat.red::after   { background: radial-gradient(circle at top right, #ef4444, transparent 65%); }

body.admin-app .atable {
    width: 100%;
    border-collapse: collapse;
}

body.admin-app .atable th {
    padding: 10px 14px;
    text-align: left;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #64748b;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

body.admin-app .atable td {
    padding: 12px 14px;
    font-size: 0.83rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    color: #cbd5e1;
}

body.admin-app .atable tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

body.admin-app .badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
}

body.admin-app .badge-admin     { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.25); }
body.admin-app .badge-supporter { background: rgba(139, 92, 246, 0.12); color: #c4b5fd; border: 1px solid rgba(139, 92, 246, 0.22); }
body.admin-app .badge-user      { background: rgba(20, 184, 166, 0.12); color: #5eead4; border: 1px solid rgba(20, 184, 166, 0.22); }
body.admin-app .badge-info      { background: rgba(59, 130, 246, 0.12); color: #93c5fd; border: 1px solid rgba(59, 130, 246, 0.22); }
body.admin-app .badge-warning   { background: rgba(245, 158, 11, 0.12); color: #fcd34d; border: 1px solid rgba(245, 158, 11, 0.22); }
body.admin-app .badge-success   { background: rgba(34, 197, 94, 0.1); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.2); }
body.admin-app .badge-error     { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }
body.admin-app .badge-active    { background: rgba(34, 197, 94, 0.1); color: #86efac; border: 1px solid rgba(34, 197, 94, 0.2); }
body.admin-app .badge-inactive  { background: rgba(239, 68, 68, 0.1); color: #fca5a5; border: 1px solid rgba(239, 68, 68, 0.2); }

body.admin-app input[type=text],
body.admin-app input[type=email],
body.admin-app input[type=password],
body.admin-app input[type=number],
body.admin-app select,
body.admin-app textarea {
    background: var(--bg-input, rgba(8, 10, 12, 0.65));
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    color: #f0f4f8;
    padding: 8px 12px;
    font-size: 0.85rem;
    width: 100%;
    outline: none;
}

body.admin-app input:focus,
body.admin-app select:focus,
body.admin-app textarea:focus {
    border-color: #14b8a6;
}

