:root {
    --app-bg: #0b0a0e;
    --panel-bg: #13111a;
    --panel-border: rgba(255,255,255,0.08);
    --ink: #f1f5f9;
    --muted: rgba(255,255,255,0.55);
    --danger: #ef4444;
    --offline: #6b7280;
    --accent: #ef4444;
    --accent-soft: rgba(239, 68, 68, 0.15);
    --success: #00ff87;
    --warning: #f59e0b;
    --shadow-sm: 0 6px 18px rgba(0,0,0,0.4);
    --shadow-md: 0 14px 34px rgba(0,0,0,0.55);
}

body {
    min-height: 100vh;
    background: #07050a;
    background-image: 
        radial-gradient(circle at 10% 20%, rgba(239, 68, 68, 0.06) 0%, transparent 40%),
        radial-gradient(circle at 90% 80%, rgba(239, 68, 68, 0.06) 0%, transparent 40%),
        radial-gradient(circle at top center, rgba(239, 68, 68, 0.10) 0%, transparent 60%);
    background-attachment: fixed;
    color: var(--ink);
    -webkit-font-smoothing: antialiased;
}

.app-navbar {
    background: rgba(11, 10, 14, 0.85);
    border-bottom: 1px solid rgba(255,255,255,0.08);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1020;
    animation: navDrop 360ms ease-out both;
}

.navbar-brand {
    position: relative;
}

.navbar-brand::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -5px;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 180ms ease;
}

.navbar-brand:hover::after {
    transform: scaleX(1);
}

.app-shell {
    padding: 24px;
    animation: contentIn 420ms ease-out both;
}

.panel {
    background: var(--panel-bg);
    border: 1px solid var(--panel-border);
    border-radius: 16px;
    padding: 22px;
    box-shadow: var(--shadow-sm);
    transform: translateY(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
    animation: panelIn 460ms ease-out both;
}

.panel:hover {
    border-color: rgba(239, 68, 68, 0.35);
    box-shadow: 0 14px 34px rgba(0,0,0,0.55), 0 0 20px rgba(239, 68, 68, 0.1);
    transform: translateY(-2px);
}

.panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 20px;
}

.panel-title {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    min-width: 92px;
    justify-content: center;
    border-radius: 999px;
    padding: 8px 14px;
    color: #fff;
    font-weight: 800;
    letter-spacing: 0;
    position: relative;
    overflow: visible;
    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.16);
    transition: background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.status-live {
    background: var(--danger);
    animation: livePulse 1.4s ease-in-out infinite;
}

.status-live::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: #fff;
    margin-right: 8px;
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.85);
    animation: liveDot 1.4s ease-out infinite;
}

.status-offline {
    background: var(--offline);
}

.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.stream-metrics {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.metric {
    border: 1px solid var(--panel-border);
    border-radius: 12px;
    padding: 16px;
    min-height: 96px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    background: rgba(255,255,255,0.03);
    transition: transform 180ms ease, border-color 180ms ease, background-color 180ms ease;
    position: relative;
    overflow: hidden;
}

.metric::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(239, 68, 68, 0.08), transparent);
    transform: translateX(-120%);
    transition: transform 520ms ease;
}

.metric:hover {
    border-color: rgba(239, 68, 68, 0.35);
    transform: translateY(-2px);
}

.metric:hover::before,
.metric.metric-updated::before {
    transform: translateX(120%);
}

.metric.metric-updated,
.stream-metric-box.metric-updated {
    animation: metricPop 420ms ease;
}

.metric-label {
    color: var(--muted);
    font-size: 0.875rem;
}

.metric-updated strong,
.stream-metric-box.metric-updated .smb-value {
    color: var(--accent);
}

.metric strong {
    font-size: 1.2rem;
    overflow-wrap: anywhere;
    position: relative;
    z-index: 1;
    transition: color 180ms ease;
}

.metric-updated strong {
    color: var(--accent);
}

.control-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 20px;
}

.btn {
    border-radius: 8px;
    transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

.btn:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(23, 32, 51, 0.12);
}

.btn:active:not(:disabled) {
    transform: translateY(0) scale(0.98);
}

.btn.is-loading {
    pointer-events: none;
    position: relative;
}

.btn.is-loading::after {
    content: "";
    width: 1rem;
    height: 1rem;
    border: 2px solid rgba(255, 255, 255, 0.5);
    border-top-color: #fff;
    border-radius: 999px;
    display: inline-block;
    margin-left: 8px;
    vertical-align: -2px;
    animation: spin 800ms linear infinite;
}

.btn-outline-secondary.is-loading::after,
.btn-outline-primary.is-loading::after {
    border-color: rgba(239, 68, 68, 0.25);
    border-top-color: var(--accent);
}

.connected-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.youtube-icon {
    color: #ff0033;
    font-size: 1.6rem;
    animation: youtubeFloat 2.4s ease-in-out infinite;
}

.playlist-list {
    display: grid;
    gap: 10px;
    margin: 0;
    padding-left: 22px;
}

.playlist-list li {
    padding: 10px 0;
    border-bottom: 1px solid var(--panel-border);
    animation: listItemIn 360ms ease-out both;
    transition: background-color 160ms ease, padding-left 160ms ease;
}

.playlist-list li:nth-child(2) {
    animation-delay: 60ms;
}

.playlist-list li:nth-child(3) {
    animation-delay: 120ms;
}

.playlist-list li:nth-child(4) {
    animation-delay: 180ms;
}

.playlist-list li:hover {
    background: rgba(239, 68, 68, 0.06);
    padding-left: 8px;
}

.playlist-list li:last-child {
    border-bottom: 0;
}

.playlist-list span,
.playlist-list small {
    display: block;
    overflow-wrap: anywhere;
}

.playlist-list small {
    color: var(--muted);
}

.upload-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 14px;
    align-items: stretch;
}

.drop-zone {
    border: 1px dashed rgba(255,255,255,0.2);
    border-radius: 12px;
    min-height: 86px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: var(--muted);
    cursor: pointer;
    padding: 18px;
    text-align: center;
    background: rgba(255,255,255,0.03);
    transition: border-color 180ms ease, background-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.drop-zone i {
    color: var(--accent);
    font-size: 1.6rem;
    transition: transform 180ms ease;
}

.drop-zone:hover,
.drop-zone.is-dragging {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 12px 28px rgba(239, 68, 68, 0.20);
    transform: translateY(-2px);
}

.drop-zone:hover i,
.drop-zone.is-dragging i {
    transform: translateY(-3px);
}

.upload-form.is-submitting .drop-zone {
    opacity: 0.72;
    pointer-events: none;
}

.action-buttons {
    display: inline-flex;
    gap: 6px;
    align-items: center;
}

.notification-host {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 1080;
    display: grid;
    gap: 10px;
    max-width: min(360px, calc(100vw - 36px));
}

.notification-item {
    margin: 0;
    animation: toastIn 280ms ease-out both;
}

.auth-page {
    background: #0b0a0e;
    background-image: radial-gradient(circle at top center, rgba(239, 68, 68, 0.10) 0%, transparent 60%);
}

.auth-shell {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(440px, 100%);
    background: #13111a;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 30px;
    box-shadow: var(--shadow-md);
    animation: authIn 480ms ease-out both;
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 8px;
    background: #101827;
    border: 1.5px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
    color: #fff;
    display: grid;
    place-items: center;
    font-weight: 800;
    margin-bottom: 16px;
    animation: brandPop 620ms ease-out both;
}

.auth-switch {
    margin-top: 20px;
    text-align: center;
    color: var(--muted);
}

tbody tr {
    animation: listItemIn 320ms ease-out both;
}

tbody tr:hover {
    background: rgba(239, 68, 68, 0.06);
}

.status-changing {
    animation: statusFlip 360ms ease;
}

.countdown-tick {
    animation: tickPop 260ms ease;
}

@keyframes pageBackdrop {
    from {
        background-position: 0 0, 0 0, 0 0;
    }

    to {
        background-position: 70% 40%, 18px 0, 0 0;
    }
}

@keyframes navDrop {
    from {
        opacity: 0;
        transform: translateY(-12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes contentIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes panelIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes livePulse {

    0%,
    100% {
        box-shadow: 0 8px 18px rgba(220, 38, 38, 0.18);
    }

    50% {
        box-shadow: 0 10px 30px rgba(220, 38, 38, 0.36);
    }
}

@keyframes liveDot {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.85);
    }

    80%,
    100% {
        box-shadow: 0 0 0 9px rgba(255, 255, 255, 0);
    }
}

@keyframes metricPop {
    0% {
        transform: scale(1);
    }

    42% {
        transform: scale(1.018);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes youtubeFloat {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-3px);
    }
}

@keyframes listItemIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes toastIn {
    from {
        opacity: 0;
        transform: translateX(18px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes authIn {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes brandPop {
    0% {
        opacity: 0;
        transform: scale(0.82);
    }

    70% {
        opacity: 1;
        transform: scale(1.06);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes statusFlip {
    0% {
        transform: scale(1);
    }

    45% {
        transform: scale(0.94);
    }

    100% {
        transform: scale(1);
    }
}

@keyframes tickPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.04);
    }

    100% {
        transform: scale(1);
    }
}

@media (max-width: 992px) {

    .metric-grid,
    .stream-metrics {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .app-shell {
        padding: 16px;
    }

    .panel {
        padding: 18px;
    }

    .panel-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .metric-grid,
    .stream-metrics,
    .upload-form {
        grid-template-columns: 1fr;
    }

    .upload-form .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 1ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 1ms !important;
    }
}

/* ===== DARK THEME OVERRIDES ===== */

/* Navbar links */
.app-navbar .nav-link,
.app-navbar .navbar-brand {
    color: rgba(255,255,255,0.85) !important;
}
.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
    color: #ffffff !important;
}
.app-navbar .navbar-brand {
    font-weight: 700;
    background: linear-gradient(90deg, #ef4444, #fca5a5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.app-navbar .btn-outline-secondary {
    color: rgba(255,255,255,0.75) !important;
    border-color: rgba(255,255,255,0.2) !important;
}
.app-navbar .btn-outline-secondary:hover {
    background: rgba(255,255,255,0.08) !important;
    color: #fff !important;
}

/* Form controls */
.form-control,
.form-select,
textarea.form-control {
    background-color: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    color: #f1f5f9 !important;
    border-radius: 10px !important;
}
.form-control:focus,
.form-select:focus,
textarea.form-control:focus {
    background-color: rgba(255,255,255,0.08) !important;
    border-color: rgba(239, 68, 68, 0.6) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
    color: #fff !important;
}
.form-control::placeholder,
textarea.form-control::placeholder {
    color: rgba(255,255,255,0.35) !important;
}
.form-select option {
    background: #1a1825;
    color: #f1f5f9;
}
.form-label {
    color: rgba(255,255,255,0.80);
    font-weight: 500;
}

/* Tables */
.table {
    color: var(--ink) !important;
    border-color: rgba(255,255,255,0.07) !important;
}
.table thead th {
    color: rgba(255,255,255,0.55) !important;
    border-color: rgba(255,255,255,0.07) !important;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.table td, .table th {
    border-color: rgba(255,255,255,0.06) !important;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: rgba(255,255,255,0.02) !important;
}

/* Alerts */
.alert {
    border-radius: 12px !important;
    border: 1px solid rgba(255,255,255,0.10) !important;
}
.alert-success {
    background: rgba(0,255,135,0.10) !important;
    color: #00ff87 !important;
}
.alert-danger {
    background: rgba(239,68,68,0.12) !important;
    color: #fca5a5 !important;
}
.alert-warning {
    background: rgba(245,158,11,0.12) !important;
    color: #fcd34d !important;
}
.alert-info {
    background: rgba(239, 68, 68, 0.12) !important;
    color: #fca5a5 !important;
}

/* Badges & small texts */
.text-secondary, .text-muted {
    color: rgba(255,255,255,0.55) !important;
}
.small, small {
    color: rgba(255,255,255,0.55);
}

.text-primary {
    color: var(--accent) !important;
}

/* Buttons */
.btn-primary {
    background: #ef4444 !important;
    border-color: #ef4444 !important;
    border-radius: 50px !important;
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.45) !important;
}
.btn-primary:hover {
    background: #dc2626 !important;
    border-color: #dc2626 !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.65) !important;
}
.btn-outline-primary {
    color: #fca5a5 !important;
    border-color: rgba(239, 68, 68, 0.5) !important;
    border-radius: 50px !important;
}
.btn-outline-primary:hover {
    background: rgba(239, 68, 68, 0.15) !important;
    color: #fff !important;
}

/* Card & Panel styling for profile/admin pages */
.card.stream-card {
    background: var(--panel-bg) !important;
    border: 1px solid var(--panel-border) !important;
    border-radius: 16px !important;
    padding: 22px !important;
    box-shadow: var(--shadow-sm) !important;
    color: var(--ink) !important;
    transform: translateY(0);
    transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.card.stream-card:hover {
    border-color: rgba(239, 68, 68, 0.35) !important;
    box-shadow: 0 14px 34px rgba(0,0,0,0.55), 0 0 20px rgba(239, 68, 68, 0.1) !important;
    transform: translateY(-2px);
}

/* Readonly fields & bg-light overrides */
.form-control[readonly],
.form-control.bg-light[readonly],
.form-control.bg-light {
    background-color: rgba(255, 255, 255, 0.02) !important;
    color: rgba(255, 255, 255, 0.45) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* Table overrides for dark theme */
.table-dark {
    --bs-table-bg: #13111a !important;
    --bs-table-color: var(--ink) !important;
    border-color: rgba(255, 255, 255, 0.08) !important;
}

/* ===== SIDEBAR LAYOUT STYLES ===== */
.app-layout {
    display: flex;
    min-height: 100vh;
}

.app-sidebar {
    width: 280px;
    height: 100vh;
    position: fixed;
    top: 0;
    left: 0;
    background: rgba(19, 17, 26, 0.75);
    border-right: 1px solid rgba(239, 68, 68, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 30px 24px;
    transition: transform 300ms ease;
    box-shadow: 4px 0 30px rgba(0,0,0,0.6);
}

.sidebar-top {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.35rem;
    font-weight: 800;
    text-decoration: none !important;
    background: linear-gradient(90deg, #ef4444, #fca5a5);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 0;
    list-style: none;
    margin: 0;
}

.sidebar-menu .nav-item {
    width: 100%;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    border-radius: 12px;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 500;
    text-decoration: none;
    transition: all 240ms ease;
    border: 1px solid transparent;
}

.sidebar-menu .nav-link i {
    font-size: 1.15rem;
    transition: transform 240ms ease;
}

.sidebar-menu .nav-link:hover {
    color: #fff !important;
    background: rgba(239, 68, 68, 0.08);
    border-color: rgba(239, 68, 68, 0.2);
    box-shadow: 0 0 15px rgba(239, 68, 68, 0.05);
}

.sidebar-menu .nav-link:hover i {
    transform: translateX(3px);
}

.sidebar-menu .nav-link.active {
    color: #fff !important;
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.05));
    border-color: rgba(239, 68, 68, 0.45);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.15), inset 0 1px 1px rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

.sidebar-menu .nav-link.active i {
    color: #ef4444;
}

/* Sidebar Obuna kartasi */
.sidebar-sub-card {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.08), rgba(255, 255, 255, 0.01));
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

.sidebar-sub-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(239, 68, 68, 0.08) 0%, transparent 60%);
    pointer-events: none;
}

.sub-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.sub-card-title {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.45);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.sub-badge {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
}

.sub-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-days {
    font-size: 1.1rem;
    font-weight: 700;
}

.sub-progress-bar {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 99px;
    overflow: hidden;
}

.sub-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #ef4444, #f97316);
    border-radius: 99px;
    box-shadow: 0 0 8px rgba(239, 68, 68, 0.5);
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.btn-sidebar-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: rgba(255,255,255,0.7);
    font-weight: 600;
    text-decoration: none;
    transition: all 200ms ease;
}

.btn-sidebar-logout:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
}

/* O'ng tomondagi asosiy kontent */
.main-wrapper {
    margin-left: 280px;
    flex: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    min-width: 0; /* flexbox bug fix */
}

.app-header {
    height: 80px;
    border-bottom: 1px solid var(--panel-border);
    background: rgba(11, 10, 14, 0.6);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 32px;
    position: sticky;
    top: 0;
    z-index: 990;
    transition: all 240ms ease;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.btn-sidebar-toggle {
    display: none;
    background: none;
    border: none;
    color: #fff;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 4px;
    transition: transform 200ms ease;
}

.header-search {
    position: relative;
    width: 280px;
}

.header-search i {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted);
    pointer-events: none;
}

.header-search .form-control {
    padding-left: 40px !important;
    height: 42px;
    border-radius: 20px !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-btn {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    width: 42px;
    height: 42px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    transition: all 200ms ease;
    text-decoration: none;
}

.header-btn:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #fff;
}

.header-user {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.user-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ef4444, #991b1b);
    display: grid;
    place-items: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    border: 2px solid rgba(239, 68, 68, 0.5);
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.3);
    overflow: hidden;
    transition: transform 200ms ease;
}

.user-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.header-user:hover .user-avatar {
    transform: scale(1.05);
}

.user-meta {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.9rem;
    font-weight: 600;
    color: #fff;
}

.user-role {
    font-size: 0.75rem;
    color: var(--muted);
}

/* Responsiveness for Sidebar */
@media (max-width: 992px) {
    .app-sidebar {
        transform: translateX(-100%);
        box-shadow: none;
    }
    
    .sidebar-open .app-sidebar {
        transform: translateX(0);
        box-shadow: 8px 0 40px rgba(0,0,0,0.8);
    }
    
    .main-wrapper {
        margin-left: 0;
    }
    
    .btn-sidebar-toggle {
        display: block;
    }
    
    .header-search {
        width: 200px;
    }
}

@media (max-width: 576px) {
    .header-search {
        display: none;
    }
    .user-meta {
        display: none;
    }
}

/* ===== PREMIUM SIDEBAR CARD & RED GLASSMORPHISM PROFILE ===== */
.premium-sidebar-card {
    background: linear-gradient(135deg, #4c0505, #991b1b);
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 16px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    overflow: hidden;
    margin-bottom: 20px;
    box-shadow: 0 8px 25px rgba(239, 68, 68, 0.3), inset 0 1px 1px rgba(255, 255, 255, 0.15);
}

.premium-sidebar-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 60%);
    pointer-events: none;
}

.premium-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.premium-card-title {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 700;
}

.premium-badge {
    background: #22c55e;
    color: #0b0a11;
    padding: 2px 7px;
    border-radius: 5px;
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    box-shadow: 0 0 8px rgba(34, 197, 94, 0.45);
}

.premium-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
}

.premium-days {
    font-size: 1.1rem;
    font-weight: 850;
    color: #fff;
}

.premium-progress-bar {
    width: 100%;
    height: 5px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 99px;
    overflow: hidden;
}

.premium-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #22c55e, #4ade80);
    border-radius: 99px;
    box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.btn-premium-manage {
    background: rgba(255, 255, 255, 0.15) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 0.76rem !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    transition: all 180ms ease !important;
    box-shadow: none !important;
    text-align: center;
    text-decoration: none;
}

.btn-premium-manage:hover {
    background: #fff !important;
    color: #0b0a11 !important;
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.3) !important;
}

.btn-premium-upgrade {
    background: #fff !important;
    color: #991b1b !important;
    font-weight: 800 !important;
    font-size: 0.76rem !important;
    border-radius: 8px !important;
    padding: 6px 12px !important;
    border: none !important;
    transition: all 180ms ease !important;
    box-shadow: 0 4px 10px rgba(255, 255, 255, 0.15) !important;
    text-align: center;
    text-decoration: none;
}

.btn-premium-upgrade:hover {
    background: rgba(255, 255, 255, 0.9) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 14px rgba(255, 255, 255, 0.3) !important;
}

.profile-mock-card {
    background: rgba(19, 17, 26, 0.65) !important;
    border: 1px solid rgba(239, 68, 68, 0.22) !important;
    border-radius: 16px !important;
    padding: 24px !important;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5), 0 0 20px rgba(239, 68, 68, 0.05) !important;
    backdrop-filter: blur(16px) !important;
    -webkit-backdrop-filter: blur(16px) !important;
    transition: border-color 220ms ease, box-shadow 220ms ease !important;
}

.profile-mock-card:hover {
    border-color: rgba(239, 68, 68, 0.38) !important;
    box-shadow: 0 15px 40px rgba(0,0,0,0.6), 0 0 30px rgba(239, 68, 68, 0.12) !important;
}

.avatar-neon-ring {
    position: relative;
    width: 110px;
    height: 110px;
    border-radius: 50%;
    padding: 3px;
    background: linear-gradient(135deg, #ef4444, #7f1d1d);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.45);
    margin: 0 auto;
    cursor: pointer;
    transition: transform 220ms ease, box-shadow 220ms ease;
}

.avatar-neon-ring:hover {
    transform: scale(1.04);
    box-shadow: 0 0 30px rgba(239, 68, 68, 0.65);
}

.avatar-neon-ring img, .avatar-neon-ring .avatar-placeholder {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #13111c;
}

.avatar-neon-ring .avatar-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.8rem;
    font-weight: 800;
    color: #fff;
    background: linear-gradient(135deg, #ef4444, #450a0a);
}

.profile-badge-admin {
    background: #ef4444;
    color: #fff;
    font-weight: 800;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
    display: inline-block;
}

.profile-badge-user {
    background: rgba(255, 255, 255, 0.08);
    color: rgba(255, 255, 255, 0.75);
    font-weight: 700;
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border: 1px solid rgba(255, 255, 255, 0.12);
    display: inline-block;
}

.profile-mock-input {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.09) !important;
    border-radius: 10px !important;
    color: #fff !important;
    padding: 10px 14px !important;
    font-size: 0.86rem !important;
    transition: all 180ms ease !important;
}

.profile-mock-input:focus {
    background: rgba(255, 255, 255, 0.06) !important;
    border-color: rgba(239, 68, 68, 0.55) !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15), 0 0 10px rgba(239, 68, 68, 0.1) !important;
}

.profile-mock-input[readonly] {
    background: rgba(255, 255, 255, 0.015) !important;
    border-color: rgba(255, 255, 255, 0.04) !important;
    color: rgba(255, 255, 255, 0.4) !important;
}

.btn-profile-solid-red {
    background: #ef4444 !important;
    border: none !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 0.85rem !important;
    padding: 10px 20px !important;
    transition: all 180ms ease !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3) !important;
}

.btn-profile-solid-red:hover {
    background: #dc2626 !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.45) !important;
}

.btn-profile-solid-red:active {
    transform: translateY(0) !important;
}

.btn-connect-yt {
    background: #ef4444 !important;
    border: none !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-weight: 700 !important;
    font-size: 0.82rem !important;
    padding: 8px 16px !important;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.35) !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 180ms ease;
}

.btn-connect-yt:hover {
    background: #dc2626 !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(239, 68, 68, 0.5) !important;
    color: #fff !important;
}

.btn-disconnect-yt {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    border-radius: 10px !important;
    color: rgba(255, 255, 255, 0.7) !important;
    font-weight: 600 !important;
    font-size: 0.82rem !important;
    padding: 8px 16px !important;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 180ms ease;
}

.btn-disconnect-yt:hover {
    background: rgba(239, 68, 68, 0.1) !important;
    border-color: rgba(239, 68, 68, 0.3) !important;
    color: #ef4444 !important;
}

/* Custom styles for inline update stream form */
.stream-update-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: center;
    background: rgba(255, 255, 255, 0.015);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 14px;
}

@media (max-width: 768px) {
    .stream-update-form {
        grid-template-columns: 1fr;
    }
}