/* =========================================
   MUSIC ADMIN PANEL — DARK / ELECTRIC BLUE
   ========================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap');

:root {
    --bg: #080b12;
    --bg-secondary: #0d111b;
    --sidebar: #0b0f18;
    --surface: #111724;
    --surface-hover: #172131;
    --surface-light: #1b2638;

    --border: rgba(148, 163, 184, 0.12);
    --border-hover: rgba(59, 130, 246, 0.4);

    --primary: #3185ff;
    --primary-hover: #1e6fe8;
    --primary-soft: rgba(49, 133, 255, 0.12);

    --text: #f1f5f9;
    --text-secondary: #a0aec0;
    --text-muted: #64748b;

    --success: #22c55e;
    --success-soft: rgba(34, 197, 94, 0.12);

    --danger: #ef4444;
    --danger-soft: rgba(239, 68, 68, 0.12);

    --warning: #f59e0b;

    --radius: 12px;
    --radius-lg: 16px;

    --sidebar-width: 250px;

    --shadow: 0 10px 35px rgba(0, 0, 0, 0.25);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
    text-decoration: none;
}

/* =========================================
   SCROLLBAR
   ========================================= */

::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

::-webkit-scrollbar-track {
    background: var(--bg);
}

::-webkit-scrollbar-thumb {
    background: #29364a;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #3b82f6;
}

/* =========================================
   SIDEBAR
   ========================================= */

.sidebar,
aside {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--sidebar);
    border-right: 1px solid var(--border);
    padding: 25px 18px;
    z-index: 100;
    overflow-y: auto;
}

.logo,
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 4px 8px 30px;
    font-size: 19px;
    font-weight: 800;
    letter-spacing: -0.7px;
}

.logo-icon,
.brand-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    background: linear-gradient(135deg, #3185ff, #1554d1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 19px;
    box-shadow: 0 5px 20px rgba(49, 133, 255, 0.25);
}

.logo span,
.brand span {
    color: var(--primary);
}

.sidebar-title,
.nav-title {
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    padding: 12px 12px 9px;
}

.sidebar nav,
.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar a,
.sidebar nav a,
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 43px;
    padding: 10px 13px;
    color: var(--text-secondary);
    border-radius: 9px;
    font-size: 13px;
    font-weight: 500;
    transition: 0.2s ease;
}

.sidebar a:hover,
.sidebar nav a:hover,
.sidebar-nav a:hover {
    color: white;
    background: var(--surface);
}

.sidebar a.active,
.sidebar nav a.active,
.sidebar-nav a.active {
    color: white;
    background: var(--primary-soft);
    box-shadow: inset 3px 0 var(--primary);
}

.sidebar a svg,
.sidebar a i {
    width: 18px;
    font-size: 16px;
    text-align: center;
}

.sidebar-footer {
    position: absolute;
    bottom: 20px;
    left: 18px;
    right: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* =========================================
   MAIN CONTENT
   ========================================= */

main,
.main,
.main-content,
.content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    padding: 32px 38px;
    max-width: 1800px;
}

header,
.topbar,
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 30px;
}

h1 {
    font-size: 25px;
    font-weight: 700;
    letter-spacing: -0.8px;
    color: var(--text);
}

h2 {
    font-size: 17px;
    font-weight: 650;
    letter-spacing: -0.3px;
}

h3 {
    font-size: 14px;
    font-weight: 600;
}

.page-description,
.subtitle,
.description {
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 5px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* =========================================
   DASHBOARD CARDS
   ========================================= */

.stats,
.stats-grid,
.dashboard-stats,
.cards {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 17px;
    margin-bottom: 27px;
}

.stat-card,
.card,
.dashboard-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 21px;
    transition: border-color 0.2s, transform 0.2s;
}

.stat-card:hover,
.dashboard-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 19px;
}

.stat-icon {
    width: 39px;
    height: 39px;
    border-radius: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 17px;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
}

.stat-value {
    font-size: 27px;
    font-weight: 750;
    letter-spacing: -1px;
    color: white;
    line-height: 1.3;
}

.stat-description {
    margin-top: 7px;
    font-size: 11px;
    color: var(--text-muted);
}

/* =========================================
   CONTENT SECTIONS
   ========================================= */

.section,
.panel,
.content-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    margin-bottom: 23px;
    overflow: hidden;
}

.section-header,
.panel-header,
.content-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 20px 22px;
    border-bottom: 1px solid var(--border);
}

.section-body,
.panel-body,
.content-card-body {
    padding: 22px;
}

.section-title {
    font-size: 15px;
    font-weight: 650;
}

/* =========================================
   BUTTONS
   ========================================= */

button,
.btn {
    border: none;
    outline: none;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-height: 39px;
    padding: 9px 16px;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 600;
    transition: 0.2s ease;
    white-space: nowrap;
}

.btn-primary,
button[type="submit"] {
    color: white;
    background: var(--primary);
}

.btn-primary:hover,
button[type="submit"]:hover {
    background: var(--primary-hover);
    box-shadow: 0 5px 18px rgba(49, 133, 255, 0.2);
}

.btn-secondary {
    color: var(--text);
    background: var(--surface-light);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: #26344a;
}

.btn-danger {
    color: #ff7777;
    background: var(--danger-soft);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.2);
}

.btn-success {
    color: #4ade80;
    background: var(--success-soft);
}

.btn-sm {
    min-height: 31px;
    padding: 6px 11px;
    font-size: 11px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* =========================================
   FORMS
   ========================================= */

form {
    width: 100%;
}

.form-group {
    margin-bottom: 18px;
}

label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 8px;
}

input,
select,
textarea {
    width: 100%;
    min-height: 43px;
    padding: 11px 13px;
    color: var(--text);
    background: #0b111d;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    font-size: 12px;
    transition: 0.2s ease;
}

input::placeholder,
textarea::placeholder {
    color: #526177;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(49, 133, 255, 0.1);
}

input[type="file"] {
    padding: 9px;
    cursor: pointer;
}

input[type="file"]::file-selector-button {
    border: none;
    background: var(--primary-soft);
    color: #60a5fa;
    padding: 7px 11px;
    border-radius: 6px;
    margin-right: 12px;
    cursor: pointer;
    font-size: 11px;
    font-weight: 600;
}

input[type="checkbox"] {
    width: 16px;
    min-height: auto;
    accent-color: var(--primary);
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 15px;
}

.form-hint,
.help-text {
    color: var(--text-muted);
    font-size: 11px;
    margin-top: 7px;
}

/* =========================================
   SEARCH
   ========================================= */

.search-box {
    position: relative;
    width: 280px;
    max-width: 100%;
}

.search-box input {
    padding-left: 38px;
}

.search-box i,
.search-box svg {
    position: absolute;
    top: 50%;
    left: 13px;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 14px;
}

/* =========================================
   TABLE
   ========================================= */

.table-wrapper,
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

thead {
    background: rgba(255, 255, 255, 0.015);
}

th {
    padding: 13px 18px;
    color: var(--text-muted);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

td {
    padding: 14px 18px;
    color: var(--text-secondary);
    font-size: 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}

tbody tr {
    transition: background 0.15s;
}

tbody tr:hover {
    background: rgba(255, 255, 255, 0.025);
}

tbody tr:last-child td {
    border-bottom: none;
}

td strong {
    color: var(--text);
    font-weight: 600;
}

.song-name {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 180px;
}

.song-cover {
    width: 38px;
    height: 38px;
    flex-shrink: 0;
    border-radius: 8px;
    background: linear-gradient(135deg, #163c79, #0d1c36);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #60a5fa;
    font-size: 15px;
}

.song-info {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.song-info strong {
    color: var(--text);
    font-size: 12px;
}

.song-info span {
    color: var(--text-muted);
    font-size: 11px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 7px;
}

/* =========================================
   BADGES
   ========================================= */

.badge,
.status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 9px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 650;
}

.badge-primary {
    color: #60a5fa;
    background: var(--primary-soft);
}

.badge-success {
    color: #4ade80;
    background: var(--success-soft);
}

.badge-danger {
    color: #f87171;
    background: var(--danger-soft);
}

.badge-warning {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.12);
}

/* =========================================
   ALERTS / FLASH MESSAGES
   ========================================= */

.alert,
.flash {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 13px 16px;
    margin-bottom: 20px;
    border-radius: 10px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid transparent;
}

.alert-success,
.flash-success {
    color: #4ade80;
    background: var(--success-soft);
    border-color: rgba(34, 197, 94, 0.18);
}

.alert-danger,
.flash-error,
.flash-danger {
    color: #f87171;
    background: var(--danger-soft);
    border-color: rgba(239, 68, 68, 0.18);
}

.alert-warning {
    color: #fbbf24;
    background: rgba(245, 158, 11, 0.1);
    border-color: rgba(245, 158, 11, 0.2);
}

/* =========================================
   UPLOAD AREA
   ========================================= */

.upload-area,
.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 180px;
    padding: 30px;
    background: rgba(49, 133, 255, 0.035);
    border: 1px dashed rgba(49, 133, 255, 0.35);
    border-radius: 12px;
    text-align: center;
    transition: 0.2s ease;
}

.upload-area:hover,
.dropzone:hover {
    background: rgba(49, 133, 255, 0.08);
    border-color: var(--primary);
}

.upload-icon {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-soft);
    color: var(--primary);
    font-size: 21px;
    margin-bottom: 13px;
}

.upload-area strong,
.dropzone strong {
    font-size: 13px;
    color: var(--text);
}

.upload-area p,
.dropzone p {
    margin-top: 5px;
    color: var(--text-muted);
    font-size: 11px;
}

/* =========================================
   MODAL
   ========================================= */

.modal,
dialog {
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow);
}

.modal {
    position: fixed;
    inset: 0;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
}

.modal.active,
.modal.show {
    display: flex;
}

.modal-content {
    width: 100%;
    max-width: 480px;
    max-height: 90vh;
    overflow-y: auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    animation: modalIn 0.2s ease;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 19px 22px;
    border-bottom: 1px solid var(--border);
}

.modal-header h2 {
    font-size: 16px;
}

.modal-close {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    color: var(--text-secondary);
    background: var(--surface-light);
    font-size: 18px;
}

.modal-close:hover {
    color: white;
    background: var(--danger-soft);
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 9px;
    padding: 16px 22px;
    border-top: 1px solid var(--border);
}

/* =========================================
   EMPTY STATE
   ========================================= */

.empty-state,
.no-results {
    padding: 55px 20px;
    text-align: center;
}

.empty-icon {
    width: 58px;
    height: 58px;
    margin: 0 auto 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 16px;
    background: var(--surface-light);
    color: var(--text-muted);
    font-size: 24px;
}

.empty-state h3,
.no-results h3 {
    color: var(--text);
    font-size: 14px;
    margin-bottom: 6px;
}

.empty-state p,
.no-results p {
    color: var(--text-muted);
    font-size: 12px;
}

/* =========================================
   PAGINATION
   ========================================= */

.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 18px;
}

.pagination a,
.pagination button {
    min-width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    background: var(--surface-light);
    border-radius: 7px;
    font-size: 11px;
}

.pagination a:hover,
.pagination button:hover,
.pagination .active {
    color: white;
    background: var(--primary);
}

/* =========================================
   UTILITIES
   ========================================= */

.text-muted {
    color: var(--text-muted);
}

.text-secondary {
    color: var(--text-secondary);
}

.text-primary {
    color: var(--primary);
}

.text-success {
    color: var(--success);
}

.text-danger {
    color: var(--danger);
}

.text-right {
    text-align: right;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 5px; }
.mt-2 { margin-top: 10px; }
.mt-3 { margin-top: 15px; }
.mt-4 { margin-top: 20px; }

.mb-1 { margin-bottom: 5px; }
.mb-2 { margin-bottom: 10px; }
.mb-3 { margin-bottom: 15px; }
.mb-4 { margin-bottom: 20px; }

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 10px;
}

/* =========================================
   RESPONSIVE — TABLET
   ========================================= */

@media (max-width: 1100px) {
    :root {
        --sidebar-width: 220px;
    }

    main,
    .main,
    .main-content,
    .content {
        padding: 27px 24px;
    }

    .stats,
    .stats-grid,
    .dashboard-stats,
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* =========================================
   RESPONSIVE — MOBILE
   ========================================= */

@media (max-width: 768px) {
    :root {
        --sidebar-width: 0px;
    }

    .sidebar,
    aside {
        display: none;
    }

    main,
    .main,
    .main-content,
    .content {
        margin-left: 0;
        padding: 22px 16px;
    }

    header,
    .topbar,
    .page-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 14px;
        margin-bottom: 23px;
    }

    h1 {
        font-size: 22px;
    }

    .header-actions {
        width: 100%;
    }

    .header-actions .btn {
        flex: 1;
    }

    .stats,
    .stats-grid,
    .dashboard-stats,
    .cards {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .stat-card,
    .dashboard-card {
        padding: 15px;
    }

    .stat-value {
        font-size: 23px;
    }

    .section-header,
    .panel-header {
        padding: 16px;
        flex-wrap: wrap;
    }

    .section-body,
    .panel-body {
        padding: 16px;
    }

    .search-box {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    table {
        min-width: 650px;
    }
}

/* =========================================
   RESPONSIVE — SMALL MOBILE
   ========================================= */

@media (max-width: 420px) {
    main,
    .main,
    .main-content,
    .content {
        padding: 18px 12px;
    }

    .stats,
    .stats-grid,
    .dashboard-stats,
    .cards {
        grid-template-columns: 1fr 1fr;
    }

    .stat-card {
        padding: 12px;
    }

    .stat-value {
        font-size: 20px;
    }

    .stat-label {
        font-size: 10px;
    }

    .btn {
        padding: 8px 11px;
        font-size: 11px;
    }

    .modal {
        padding: 12px;
    }
}