/* ===== Odev21 - Dark Purple Audio Theme & Sidebar Layout ===== */
:root {
    --primary: #c084fc;
    --primary-dark: #8b5cf6;
    --primary-light: #e9d5ff;
    --bg-body: #0d081b;
    --bg-card: #17102e;
    --bg-sidebar: #120924;
    --text-main: #f3e8ff;
    --text-muted: #c084fc;
    --border: #2c1b4d;
    --danger: #ef4444;
    --success: #10b981;
    --info: #06b6d4;
    --warning: #fbbf24;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ===== Layout Container ===== */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* ===== Sidebar ===== */
.app-sidebar {
    width: 280px;
    background-color: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}

.main-wrapper {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: var(--bg-body);
}

.content-container {
    flex-grow: 1;
}

/* Sidebar links */
.nav-link-custom {
    color: #a78bfa;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.nav-link-custom:hover {
    background-color: rgba(192, 132, 252, 0.1);
    color: var(--primary-light);
}

.nav-link-custom.active {
    background-color: var(--primary-dark);
    color: #fff !important;
}

.avatar-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.sidebar-footer {
    border-top: 1px solid var(--border);
}

/* ===== Track Row Layout (Table List instead of Cards) ===== */
.track-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 8px;
}

.track-row {
    background-color: var(--bg-card);
    border-radius: 12px;
    transition: all 0.2s ease;
}

.track-row:hover {
    background-color: #221840;
    transform: scale(1.005);
}

.track-cell {
    padding: 1.25rem 1rem;
    color: var(--text-main);
    border: none;
    vertical-align: middle;
}

.track-cell:first-child {
    border-top-left-radius: 12px;
    border-bottom-left-radius: 12px;
    padding-left: 1.5rem;
}

.track-cell:last-child {
    border-top-right-radius: 12px;
    border-bottom-right-radius: 12px;
    padding-right: 1.5rem;
}

.track-title {
    font-weight: 700;
    font-size: 1.05rem;
    color: #fff;
}

.track-subtitle {
    color: #a78bfa;
    font-size: 0.85rem;
}

/* ===== Page Hero ===== */
.page-hero {
    background: linear-gradient(135deg, #2a1545, #100620);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2rem;
    color: #fff;
    margin-bottom: 2rem;
}

.page-hero h2 {
    font-weight: 800;
    color: #fff !important;
}

.page-hero p {
    color: #d8b4fe !important;
}

/* ===== Input Fields & Form Controls - High Contrast ===== */
.form-control, .form-select, textarea {
    background-color: #120924 !important;
    border: 2px solid var(--border) !important;
    color: #ffffff !important;
    border-radius: 10px;
    padding: 0.75rem 1rem;
}

.form-control:focus, .form-select:focus, textarea:focus {
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 0.25rem rgba(192, 132, 252, 0.3) !important;
    color: #ffffff !important;
}

.form-control::placeholder {
    color: #6b5c8c !important;
}

label {
    color: #d8b4fe !important;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

/* Ensure no text is black */
p, span, h1, h2, h3, h4, h5, h6, small, select, input, textarea {
    color: var(--text-main);
}

.text-muted {
    color: #a78bfa !important;
}

/* ===== Custom Buttons ===== */
.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-dark), #6d28d9);
    color: #fff !important;
    border: none;
    border-radius: 50px;
    padding: 0.6rem 1.75rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
    transition: all 0.3s ease;
}

.btn-primary-custom:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    box-shadow: 0 6px 18px rgba(139, 92, 246, 0.5);
    transform: translateY(-1px);
}

.btn-outline-custom {
    border: 2px solid var(--primary-dark);
    color: var(--primary) !important;
    border-radius: 50px;
    padding: 0.45rem 1.25rem;
    font-weight: 500;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: var(--primary-dark);
    color: #fff !important;
}

.btn-danger-custom {
    border: 2px solid var(--danger);
    color: var(--danger) !important;
    border-radius: 50px;
    padding: 0.45rem 1.25rem;
    font-weight: 500;
    background: transparent;
    transition: all 0.3s ease;
}

.btn-danger-custom:hover {
    background: var(--danger);
    color: #fff !important;
}

/* ===== Badges ===== */
.badge-kategori {
    background: rgba(192, 132, 252, 0.15);
    color: #e9d5ff !important;
    border: 1px solid rgba(192, 132, 252, 0.3);
    padding: 0.4em 0.8em;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
}

.badge-kategori i {
    color: #c084fc !important;
}

.badge-puan {
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24 !important;
    border: 1px solid rgba(251, 191, 36, 0.3);
    padding: 0.4em 0.8em;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.75rem;
}

/* ===== Search Box ===== */
.search-box {
    position: relative;
}

.search-box .form-control {
    padding-left: 3.2rem;
    border-radius: 50px;
    background-color: #120924 !important;
}

.search-box .search-icon {
    position: absolute;
    left: 1.25rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-light) !important;
}

/* ===== Stats ===== */
.stat-card {
    border-radius: 16px;
    padding: 1.25rem;
    border: 1px solid var(--border);
    background: #150c26;
    text-align: center;
}

.stat-card .stat-number {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary) !important;
}

.stat-card .stat-label {
    font-size: 0.85rem;
    color: #a78bfa !important;
}

/* ===== Form Wrapper ===== */
.form-wrapper {
    background-color: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 2.5rem;
}

/* ===== Empty State ===== */
.empty-state {
    padding: 5rem 2rem;
    text-align: center;
    border: 2px dashed var(--border);
    border-radius: 20px;
    background-color: #120924;
}

/* ===== Mobile Header ===== */
.mobile-header {
    background-color: var(--bg-sidebar);
    border-bottom: 1px solid var(--border);
}

/* ===== Modal ===== */
.modal-content {
    background-color: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
}

.modal-header, .modal-footer {
    border-color: var(--border) !important;
}

.modal-title, .modal-body {
    color: #fff !important;
}

.modal-header .btn-close {
    filter: invert(1);
}

/* ===== Animations ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-in {
    animation: fadeInUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .app-sidebar {
        display: none;
    }
    .main-wrapper {
        min-height: calc(100vh - 70px);
    }
}