:root {
    --primary: #FF2E93;
    --primary-hover: #E01A7C;
    --secondary: #00F0FF;
    --dark-bg: #07070C;
    --dark-panel: #0E0E16;
    --card-bg: rgba(255, 255, 255, 0.03);
    --card-border: rgba(255, 255, 255, 0.08);
    --card-hover-border: rgba(255, 255, 255, 0.16);
    --text: #F9FAFB;
    --text-muted: #9CA3AF;
    --success: #10B981;
    --danger: #EF4444;
    --gold: #F59E0B;
    --sidebar-width: 260px;
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

body {
    background-color: var(--dark-bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: 'Outfit', sans-serif;
    letter-spacing: 0.3px;
}

/* Base UI Elements */
.btn-primary, .btn-secondary, .btn-logout, .btn-tv, .btn-header {
    padding: 10px 20px;
    border: none;
    border-radius: 10px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.9rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), #D61B75);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 46, 147, 0.3);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 46, 147, 0.5);
    filter: brightness(1.1);
}

.btn-secondary {
    background: transparent;
    border: 1px solid var(--primary);
    color: var(--primary);
}
.btn-secondary:hover {
    background: rgba(255, 46, 147, 0.08);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.08);
    color: var(--danger);
    border: 1px solid rgba(239, 68, 68, 0.2);
}
.btn-logout:hover {
    background: var(--danger);
    color: white;
    box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.btn-tv {
    background: rgba(0, 240, 255, 0.08);
    color: var(--secondary);
    border: 1px solid rgba(0, 240, 255, 0.2);
}
.btn-tv:hover {
    background: var(--secondary);
    color: var(--dark-bg);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.3);
}

.badge {
    background: var(--primary);
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    color: white;
    display: inline-flex;
    align-items: center;
}
.badge-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--success);
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.glass-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--card-border);
    border-radius: 18px;
    padding: 24px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    transition: border-color var(--transition-speed);
}
.glass-card:hover {
    border-color: var(--card-hover-border);
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(8px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.modal.active {
    display: flex;
}
.modal-content {
    background: var(--dark-panel);
    border: 1px solid var(--card-border);
    border-radius: 20px;
    padding: 35px;
    width: 100%;
    max-width: 440px;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    animation: modalSlideIn 0.3s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.close-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
}
.close-btn:hover {
    color: white;
}

/* Input Fields */
.input-group {
    margin-bottom: 20px;
}
.input-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-muted);
    font-size: 0.88rem;
    font-weight: 500;
}
.input-group input[type="text"],
.input-group input[type="email"],
.input-group input[type="password"],
.input-group input[type="number"] {
    width: 100%;
    padding: 12px 16px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    transition: all 0.2s;
}
.input-group input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 46, 147, 0.15);
    background: rgba(0, 0, 0, 0.4);
}

.input-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* Views Management */
.view {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.view.active-view {
    display: block;
    opacity: 1;
}
#loading-view.active-view,
#owner-view.active-view {
    display: flex;
}

/* Login View */
#login-view {
    height: 100vh;
    display: none;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at center, #1b1122 0%, var(--dark-bg) 70%);
}
#login-view.active-view {
    display: flex;
}
.login-box {
    background: rgba(14, 14, 22, 0.7);
    border: 1px solid var(--card-border);
    border-radius: 24px;
    padding: 45px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    backdrop-filter: blur(15px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.4);
}
.login-box .logo {
    margin-bottom: 35px;
}
.login-box .logo i {
    font-size: 3.5rem;
    color: var(--primary);
    margin-bottom: 12px;
    text-shadow: 0 0 15px rgba(255, 46, 147, 0.4);
}
.login-box h1 {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: 1px;
}
.login-box h1 span {
    color: var(--secondary);
}
.login-box form {
    text-align: left;
}
.login-box button {
    width: 100%;
    margin-top: 15px;
    padding: 13px;
    font-size: 1rem;
}

/* Topbar for Super Admin */
.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    border-bottom: 1px solid var(--card-border);
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    position: sticky;
    top: 0;
    z-index: 100;
}

/* ============================================================
   OWNER VIEW - RESPONSIVE SIDEBAR LAYOUT
   ============================================================ */
#owner-view {
    display: flex;
    min-height: 100vh;
    background-color: var(--dark-bg);
}

/* Sidebar Overlay (Mobile) */
.sidebar-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 450;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed) ease;
}
.sidebar-overlay.active {
    opacity: 1;
    pointer-events: all;
}

/* Sidebar styling */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--dark-panel);
    border-right: 1px solid var(--card-border);
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 500;
    transition: transform var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 24px 30px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.sidebar-header .logo-icon {
    font-size: 1.8rem;
    color: var(--primary);
    text-shadow: 0 0 10px rgba(255, 46, 147, 0.4);
}
.sidebar-header .logo-text {
    font-family: 'Outfit', sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: 1px;
}

.sidebar-menu {
    flex: 1;
    padding: 20px 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.menu-item {
    background: transparent;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    color: var(--text-muted);
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: all 0.2s ease;
}
.menu-item i {
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}
.menu-item:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
}
.menu-item.active {
    background: rgba(255, 46, 147, 0.1);
    color: var(--primary);
    border: 1px solid rgba(255, 46, 147, 0.15);
}

.sidebar-footer {
    padding: 20px 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}
.btn-sidebar-logout {
    width: 100%;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    border-radius: 12px;
    color: var(--danger);
    padding: 12px;
    cursor: pointer;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.2s;
}
.btn-sidebar-logout:hover {
    background: var(--danger);
    color: white;
}

/* Main Content area styling */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-width: 0; /* Prevents flex items from overflowing */
}

.main-header {
    background: rgba(14, 14, 22, 0.7);
    border-bottom: 1px solid var(--card-border);
    padding: 18px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    z-index: 400;
}
.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.4rem;
    cursor: pointer;
}

.header-actions {
    display: flex;
    gap: 12px;
}
.btn-header {
    font-size: 0.85rem;
    padding: 8px 16px;
    border-radius: 8px;
}
.btn-tv-launch {
    background: rgba(0, 240, 255, 0.08);
    color: var(--secondary);
    border: 1px solid rgba(0, 240, 255, 0.2);
}
.btn-tv-launch:hover {
    background: var(--secondary);
    color: var(--dark-bg);
}
.btn-client-launch {
    background: rgba(255, 255, 255, 0.06);
    color: white;
    border: 1px solid var(--card-border);
}
.btn-client-launch:hover {
    background: rgba(255, 255, 255, 0.12);
}

.content-wrapper {
    padding: 30px 40px;
    flex: 1;
}

/* Tab panes rendering */
.tab-pane {
    display: none;
    animation: tabFadeIn 0.35s ease forwards;
}
.tab-pane.active {
    display: block;
}
@keyframes tabFadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ============================================================
   TABS CONTENTS
   ============================================================ */

/* KPI Metrics */
.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 25px;
}
.metric-card {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px 24px;
}
.metric-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
}
.metric-data {
    display: flex;
    flex-direction: column;
}
.metric-label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}
.metric-value {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: 'Outfit', sans-serif;
    margin-top: 2px;
}

/* TV & Control Grid */
.overview-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
    gap: 25px;
}

/* TV Status Box */
.tv-status-box {
    margin-top: 15px;
    min-height: 110px;
    display: flex;
    align-items: center;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 16px;
}
.tv-status-empty {
    width: 100%;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}
.tv-status-empty i {
    font-size: 1.8rem;
    margin-bottom: 8px;
    opacity: 0.6;
}
.tv-status-active {
    display: flex;
    align-items: center;
    gap: 18px;
    width: 100%;
}
.tv-status-active img {
    width: 90px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
}
.tv-current-info {
    flex: 1;
    min-width: 0;
}
.tv-current-info h4 {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.tv-current-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.tv-current-badge {
    background: var(--primary);
    font-size: 0.68rem;
}

/* Control Panel */
.controls-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.playback-controls {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin: 20px 0;
}
.control-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.06);
    background: rgba(255, 255, 255, 0.04);
    color: white;
    font-size: 1.15rem;
    cursor: pointer;
    transition: all 0.2s;
}
.control-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(255, 46, 147, 0.3);
}
.control-btn.play-pause-btn {
    width: 58px;
    height: 58px;
    background: rgba(255, 255, 255, 0.08);
}
.control-btn.play-pause-btn:hover {
    background: var(--secondary);
    border-color: var(--secondary);
    box-shadow: 0 4px 12px rgba(0, 240, 255, 0.3);
    color: var(--dark-bg);
}
.controls-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    text-align: center;
}

/* Add Song & Queue Grid */
.queue-tab-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 25px;
}

/* Search bar details */
.search-container {
    position: relative;
    margin-top: 15px;
}
.search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.95rem;
    pointer-events: none;
}
.search-input {
    width: 100%;
    padding: 12px 12px 12px 42px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    color: white;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}
.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(255, 46, 147, 0.15);
}
.search-results {
    list-style: none;
    margin-top: 12px;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.search-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
}
.search-item:hover {
    background: rgba(255, 46, 147, 0.06);
    border-color: rgba(255, 46, 147, 0.2);
    transform: translateX(4px);
}
.search-item .song-thumb {
    width: 64px;
    height: 44px;
    object-fit: cover;
    border-radius: 6px;
}
.search-item .song-info {
    flex: 1;
    min-width: 0;
}
.search-item .song-title {
    font-size: 0.88rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.search-item .song-channel {
    font-size: 0.78rem;
    color: var(--text-muted);
}

/* Queue List styling */
.admin-queue-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 5px;
}
.admin-queue-list::-webkit-scrollbar {
    width: 4px;
}
.admin-queue-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
    border-radius: 2px;
}
.admin-queue-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid transparent;
    border-radius: 12px;
}
.admin-queue-list img {
    width: 68px;
    height: 48px;
    object-fit: cover;
    border-radius: 6px;
}
.queue-info {
    flex: 1;
    min-width: 0;
}
.queue-info h4 {
    font-size: 0.92rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 3px;
}
.queue-info p {
    font-size: 0.78rem;
    color: var(--text-muted);
}
.btn-block {
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: var(--danger);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
}
.btn-block:hover {
    background: var(--danger);
    color: white;
    transform: scale(1.05);
}

/* Chat Moderation Module */
.admin-chat-moderation-container {
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    margin-top: 15px;
    overflow: hidden;
}
.admin-chat-header {
    display: flex;
    justify-content: space-between;
    padding: 12px 18px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--card-border);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
}
.admin-chat-messages-list {
    display: flex;
    flex-direction: column;
    max-height: 450px;
    overflow-y: auto;
}
.admin-chat-messages-list::-webkit-scrollbar {
    width: 4px;
}
.admin-chat-messages-list::-webkit-scrollbar-thumb {
    background: var(--card-border);
}
.admin-chat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    transition: background 0.2s;
}
.admin-chat-item:hover {
    background: rgba(255, 255, 255, 0.01);
}
.admin-chat-bubble-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
    max-width: 80%;
}
.admin-chat-nick {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--secondary);
}
.admin-chat-msg {
    font-size: 0.9rem;
    color: white;
    word-break: break-word;
}
.admin-chat-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Settings Form Grid */
.settings-grid-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 35px;
    margin-top: 20px;
}
.form-col {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.form-section-title {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 15px;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 8px;
}
.logo-preview-box {
    margin-top: 15px;
    background: rgba(0,0,0,0.2);
    border: 1px solid var(--card-border);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
}
.logo-preview-box img {
    max-height: 90px;
    max-width: 100%;
    margin-top: 8px;
    border-radius: 8px;
}
.preview-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.flex-label-val {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}
.flex-label-val label {
    margin-bottom: 0;
}
.val-badge {
    background: rgba(255, 46, 147, 0.12);
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 6px;
}

/* Sliders custom layout */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 5px;
    outline: none;
}
input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 8px var(--primary);
    transition: transform 0.1s;
}
input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Toggle Checkbox style */
.toggle-group {
    display: flex;
    align-items: center;
    margin-top: 10px;
}
.toggle-checkbox {
    display: none;
}
.toggle-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}
.toggle-switch {
    width: 44px;
    height: 22px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    position: relative;
    transition: background 0.3s;
    margin-right: 12px;
}
.toggle-switch::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: white;
    top: 2px;
    left: 2px;
    transition: left 0.3s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.toggle-checkbox:checked + .toggle-label .toggle-switch {
    background: var(--primary);
}
.toggle-checkbox:checked + .toggle-label .toggle-switch::after {
    left: 24px;
}
.toggle-text {
    font-size: 0.95rem;
    font-weight: 600;
}
.form-actions-full {
    grid-column: 1 / span 2;
    margin-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 20px;
    display: flex;
    justify-content: flex-end;
}
.btn-save-settings {
    min-width: 180px;
}

/* Finance Grid */
.finance-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 25px;
}

/* Custom Table style */
.table-responsive {
    overflow-x: auto;
    margin-top: 15px;
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.admin-table th, .admin-table td {
    padding: 14px 16px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}
.admin-table th {
    background: rgba(255, 255, 255, 0.02);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.78rem;
}
.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.01);
}
.empty-table-cell {
    text-align: center;
    color: var(--text-muted);
    padding: 30px !important;
}

/* Played History list */
.admin-history-list {
    list-style: none;
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-height: 400px;
    overflow-y: auto;
}
.admin-history-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 10px;
}
.admin-history-list img {
    width: 52px;
    height: 36px;
    object-fit: cover;
    border-radius: 4px;
}
.hist-info {
    flex: 1;
    min-width: 0;
}
.hist-info h5 {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 2px;
}
.hist-info p {
    font-size: 0.72rem;
    color: var(--text-muted);
}

/* Colors and text details */
.text-cyan { color: var(--secondary) !important; }
.text-pink { color: var(--primary) !important; }
.section-desc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 3px;
    line-height: 1.35;
}

.empty-state {
    padding: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

/* ============================================================
   RESPONSIVE DESIGN (Media Queries)
   ============================================================ */
@media (max-width: 1024px) {
    .metrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
    .metrics-grid .metric-card:last-child {
        grid-column: 1 / span 2;
    }
    .overview-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .queue-tab-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .finance-grid {
        grid-template-columns: minmax(0, 1fr);
    }
    .settings-grid-form {
        grid-template-columns: minmax(0, 1fr);
    }
    .form-actions-full {
        grid-column: 1;
    }
}

@media (max-width: 768px) {
    :root {
        --sidebar-width: 250px;
    }
    
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 10px 0 30px rgba(0, 0, 0, 0.7);
    }
    
    .main-content {
        margin-left: 0;
    }
    .hamburger-btn {
        display: block;
    }
    .main-header {
        padding: 12px 16px;
    }
    .content-wrapper {
        padding: 16px;
    }
    .metrics-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 12px;
    }
    .metrics-grid .metric-card:last-child {
        grid-column: 1;
    }
    .topbar {
        padding: 15px 20px;
    }
    .grid-cards {
        grid-template-columns: minmax(0, 1fr);
    }
    
    /* Responsive header tags */
    .btn-header span {
        display: none;
    }
    .btn-header {
        padding: 10px;
        border-radius: 50%;
        width: 40px;
        height: 40px;
    }
    
    /* Fix layout breaking on small screens */
    .glass-card {
        padding: 16px;
    }
    .playback-controls {
        gap: 8px;
    }
    .control-btn {
        width: 46px;
        height: 46px;
        font-size: 1rem;
    }
    .control-btn.play-pause-btn {
        width: 52px;
        height: 52px;
    }
    .tv-status-box {
        padding: 12px;
        min-width: 0;
    }
    .tv-status-active {
        gap: 12px;
    }
    .tv-status-active img {
        width: 70px;
        height: 48px;
    }
    .tv-current-info {
        min-width: 0; /* Ensure text truncates properly */
    }
}

/* Queue Action Buttons (Delete & Block) */
.btn-action-del, .btn-action-block {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-muted);
    cursor: pointer;
    padding: 8px 10px;
    border-radius: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
}
.btn-action-del:hover {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.35);
    color: var(--danger);
    transform: scale(1.05);
}
.btn-action-block:hover {
    background: rgba(245, 158, 11, 0.15);
    border-color: rgba(245, 158, 11, 0.35);
    color: var(--gold);
    transform: scale(1.05);
}

/* Blacklist Item styling */
.blocked-song-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 8px 12px;
    transition: background 0.2s;
}
.blocked-song-item:hover {
    background: rgba(255, 255, 255, 0.04);
}
.blocked-song-info {
    flex: 1;
    min-width: 0;
    margin-right: 12px;
}
.blocked-song-title {
    font-size: 0.85rem;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text);
}
.blocked-song-channel {
    font-size: 0.75rem;
    color: var(--text-muted);
}
.btn-unblock {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: var(--success);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-unblock:hover {
    background: var(--success);
    color: white;
}

