/* =====================================================
   PlaylistHub Admin Panel — Modern Edition
   (Cue1860 color palette)
===================================================== */

@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;1,9..40,300&family=Space+Mono:wght@400;700&display=swap');

:root {
    /* Core Palette */
    --bg:            #0A0E1A;
    --bg2:           #0C1120;
    --surface:       #121623;
    --surface2:      #1A2031;
    --border:        rgba(255,255,255,0.08);
    --border-hover:  rgba(139,92,246,0.35);

    /* Brand */
    --primary:       #8B5CF6;
    --primary-dim:   rgba(139,92,246,0.15);
    --primary-glow:  rgba(139,92,246,0.08);
    --accent:        #EC4899;
    --accent-dim:    rgba(236,72,153,0.12);

    /* Status */
    --success:       #34d399;
    --warning:       #f59e0b;
    --danger:        #f43f5e;
    --info:          #38bdf8;

    /* Text */
    --text:          #E5E7EB;
    --text-2:        #9CA3AF;
    --text-3:        #5B6478;

    /* Layout */
    --sidebar-width: 264px;
    --topbar-height: 64px;
    --radius-sm:     8px;
    --radius-md:     12px;
    --radius-lg:     16px;
    --radius-xl:     22px;

    /* Typography */
    --font-ui:       'DM Sans', system-ui, sans-serif;
    --font-mono:     'Space Mono', monospace;

    /* Transitions */
    --ease:          cubic-bezier(0.4, 0, 0.2, 1);
    --fast:          0.15s;
    --mid:           0.25s;
}

/* =====================================================
   RESET + BASE
===================================================== */

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html { scroll-behavior: smooth; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-ui);
    font-size: 15px;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Subtle grid texture */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(139,92,246,0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139,92,246,0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
    z-index: 0;
}

/* =====================================================
   LAYOUT
===================================================== */

.container {
    display: flex;
    min-height: 100vh;
    position: relative;
    z-index: 1;
}

/* ============================================================
   STICKY "ADD TRACKS" PANEL  —  desktop only
   - Sirf jab dono panels visible hain (i.e. user can edit) — readonly view me skip
   - Topbar (64px) se 20px ka gap rakhta hai
   - Agar panel content viewport se bada ho jaye to internally scroll
   - 1100px ke neeche layout already stack ho jaata hai, to sticky auto-off
   ============================================================ */
@media (min-width: 1101px) {
    .tm-wrap:not(.tm-readonly) > .tm-panel:first-child {
        position: sticky;
        top: 84px;
        max-height: calc(100vh - 104px);
        overflow-y: auto;
        align-self: start;
    }

    /* Inside sticky panel, let .tm-results flow naturally — taaki nested
       double-scrollbar na ban jaye on smaller laptop screens. */
    .tm-wrap:not(.tm-readonly) > .tm-panel:first-child .tm-results {
        max-height: none;
    }
}

/* =====================================================
   SIDEBAR
===================================================== */

.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg2);
    border-right: 1px solid var(--border);
    padding: 28px 16px;
    display: flex;
    flex-direction: column;
    z-index: 100;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Thin accent line on sidebar right edge */
.sidebar::after {
    content: '';
    position: absolute;
    top: 20%;
    right: -1px;
    width: 1px;
    height: 60%;
    background: linear-gradient(
        180deg,
        transparent,
        var(--primary) 50%,
        transparent
    );
    opacity: 0.4;
}

.sidebar-header {
    margin-bottom: 36px;
    padding: 0 8px;
}

.sidebar-logo {
    display: flex !important;
    align-items: center;
    gap: 10px;
    font-size: 20px !important;
    font-weight: 600 !important;
    color: var(--text) !important;
    letter-spacing: -0.5px;
    text-decoration: none !important;
    line-height: 1.2;
}

.sidebar-logo:hover {
    color: var(--text) !important;
    text-decoration: none !important;
}

/* No pseudo-element — SVG icon now lives in markup */
.sidebar-logo::before { content: none !important; }

.sidebar-subtitle {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 6px;
    padding-left: 30px;
}

/* Nav section label */
.nav-section-label {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1.8px;
    padding: 0 12px;
    margin: 20px 0 8px;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    color: var(--text-2);
    text-decoration: none;
    font-size: 14px;
    font-weight: 450;
    letter-spacing: 0.1px;
    transition: background var(--fast) var(--ease),
                color var(--fast) var(--ease),
                border-color var(--fast) var(--ease);
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
}

.nav-item:hover {
    background: rgba(255,255,255,0.04);
    color: var(--text);
    border-color: var(--border);
}

.nav-item.active {
    background: var(--primary-dim);
    border-color: rgba(139,92,246,0.25);
    color: #fff;
    font-weight: 500;
}

/* Active left accent */
.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 20%;
    height: 60%;
    width: 3px;
    background: var(--primary);
    border-radius: 0 3px 3px 0;
}

.nav-item .nav-icon {
    width: 18px;
    height: 18px;
    opacity: 0.7;
    flex-shrink: 0;
}

.nav-item.active .nav-icon {
    opacity: 1;
}

/* Sidebar divider */
.sidebar-divider {
    height: 1px;
    background: var(--border);
    margin: 14px 8px;
}

.sidebar-footer {
    margin-top: auto;
    padding-top: 16px;
    border-top: 1px solid var(--border);
}

/* User card in footer */
.sidebar-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 10px;
}

.sidebar-avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--primary-dim);
    border: 1px solid rgba(139,92,246,0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: var(--primary);
    flex-shrink: 0;
}

.sidebar-user-info {
    overflow: hidden;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--text-3);
}

.btn-logout {
    width: 100%;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    padding: 10px 14px;
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: var(--font-ui);
    font-size: 13px;
    font-weight: 500;
    transition: background var(--fast) var(--ease),
                color var(--fast) var(--ease),
                border-color var(--fast) var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-logout:hover {
    background: rgba(244,63,94,0.1);
    border-color: rgba(244,63,94,0.35);
    color: var(--danger);
}

/* =====================================================
   MAIN
===================================================== */

.main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* =====================================================
   TOPBAR
===================================================== */

.topbar {
    position: sticky;
    top: 0;
    height: var(--topbar-height);
    background: rgba(10,14,26,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: 0 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 50;
}

.topbar-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--text);
    flex: 1;
}

.topbar-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Hamburger — hidden on desktop */
.topbar-hamburger {
    display: none;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-2);
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background var(--fast), color var(--fast);
    margin-right: 12px;
}

.topbar-hamburger:hover {
    background: rgba(255,255,255,0.06);
    color: var(--text);
}

/* Sidebar overlay (mobile) */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 99;
    opacity: 0;
    transition: opacity var(--mid) var(--ease);
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

/* =====================================================
   CONTENT
===================================================== */

.content {
    padding: 36px;
    flex: 1;
}

/* =====================================================
   PAGE HEADER
===================================================== */

.page-header {
    margin-bottom: 32px;
}

.page-header-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.6px;
    color: var(--text);
    line-height: 1.2;
}

.page-subtitle {
    font-size: 14px;
    color: var(--text-2);
    margin-top: 5px;
    font-weight: 400;
}

/* Breadcrumb */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-3);
    margin-bottom: 10px;
}

.breadcrumb a {
    color: var(--text-3);
    text-decoration: none;
    transition: color var(--fast);
}

.breadcrumb a:hover { color: var(--text-2); }

.breadcrumb-sep { opacity: 0.4; }

/* =====================================================
   USER INFO (legacy compat)
===================================================== */

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.user-role {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    background: var(--primary-dim);
    border: 1px solid rgba(139,92,246,0.3);
    color: #c4b5fd;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

/* =====================================================
   BADGE / STATUS CHIPS
===================================================== */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.badge-draft    { background: rgba(148,163,184,0.12); color: #94a3b8; border: 1px solid rgba(148,163,184,0.2); }
.badge-pending  { background: rgba(245,158,11,0.12);  color: #fbbf24; border: 1px solid rgba(245,158,11,0.25); }
.badge-approved { background: rgba(52,211,153,0.12);  color: #34d399; border: 1px solid rgba(52,211,153,0.25); }
.badge-published{ background: rgba(139,92,246,0.15);  color: #a78bfa; border: 1px solid rgba(139,92,246,0.3); }
.badge-rejected { background: rgba(244,63,94,0.12);   color: #fb7185; border: 1px solid rgba(244,63,94,0.25); }

/* Dot indicator */
.badge::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: currentColor;
    flex-shrink: 0;
}

/* =====================================================
   STAT CARDS / DASHBOARD GRID
===================================================== */

.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 600px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    position: relative;
    overflow: hidden;
    transition: border-color var(--mid) var(--ease),
                transform var(--mid) var(--ease);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary-glow);
    transform: translate(25%, -25%);
    pointer-events: none;
}

.stat-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-2px);
}

.stat-icon {
    width: 38px;
    height: 38px;
    min-width: 38px;
    min-height: 38px;
    flex-shrink: 0;
    align-self: flex-start;
    border-radius: var(--radius-sm);
    background: var(--primary-dim);
    border: 1px solid rgba(139,92,246,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    font-size: 18px;
    color: var(--primary);
}

.stat-label {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1.5px;
    color: var(--text);
    font-variant-numeric: tabular-nums;
    line-height: 1;
}

.stat-delta {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 8px;
}

.stat-delta.up   { color: var(--success); }
.stat-delta.down { color: var(--danger); }

/* =====================================================
   CARD
===================================================== */

.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    transition: border-color var(--mid) var(--ease),
                transform var(--mid) var(--ease);
}

.card:hover {
    border-color: rgba(255,255,255,0.12);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 12px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    letter-spacing: -0.2px;
}

.card-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.3px;
    margin-bottom: 16px;
    color: var(--text);
}

/* =====================================================
   PLAYLIST CARDS (grid)
===================================================== */

.playlist-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 16px;
}

.playlist-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: border-color var(--mid) var(--ease),
                transform var(--mid) var(--ease);
    cursor: pointer;
    text-decoration: none;
    color: inherit;
    display: flex;
    flex-direction: column;
}

.playlist-card:hover {
    border-color: var(--border-hover);
    transform: translateY(-3px);
}

.playlist-card-cover {
    height: 140px;
    background: linear-gradient(135deg, var(--surface2), var(--bg));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 42px;
    position: relative;
    overflow: hidden;
}

.playlist-card-cover::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        transparent 50%,
        rgba(10,14,26,0.6)
    );
}

.playlist-card-body {
    padding: 16px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.playlist-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.playlist-card-meta {
    font-size: 12px;
    color: var(--text-3);
    display: flex;
    align-items: center;
    gap: 10px;
}

.playlist-card-footer {
    padding: 12px 16px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* =====================================================
   TRACK LIST
===================================================== */

.track-list {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.track-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: background var(--fast) var(--ease),
                border-color var(--fast) var(--ease);
    cursor: grab;
}

.track-item:active { cursor: grabbing; }

.track-item:hover {
    background: rgba(255,255,255,0.03);
    border-color: var(--border);
}

.track-item.dragging {
    background: var(--primary-dim);
    border-color: rgba(139,92,246,0.3);
    opacity: 0.85;
}

.track-drag-handle {
    color: var(--text-3);
    font-size: 14px;
    cursor: grab;
    flex-shrink: 0;
    width: 20px;
    text-align: center;
    transition: color var(--fast);
}

.track-item:hover .track-drag-handle { color: var(--text-2); }

.track-num {
    font-size: 12px;
    color: var(--text-3);
    font-variant-numeric: tabular-nums;
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    font-family: var(--font-mono);
}

.track-cover {
    width: 42px;
    height: 42px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--surface2);
    flex-shrink: 0;
    border: 1px solid var(--border);
}

.track-info {
    flex: 1;
    min-width: 0;
}

.track-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-artist {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.track-duration {
    font-size: 12px;
    color: var(--text-3);
    font-family: var(--font-mono);
    flex-shrink: 0;
}

.track-actions {
    display: flex;
    align-items: center;
    gap: 6px;
    opacity: 0;
    transition: opacity var(--fast);
}

.track-item:hover .track-actions { opacity: 1; }

/* =====================================================
   SEARCH RESULTS
===================================================== */

.search-result-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    border-radius: var(--radius-md);
    border: 1px solid transparent;
    transition: background var(--fast), border-color var(--fast);
}

.search-result-item:hover {
    background: rgba(255,255,255,0.03);
    border-color: var(--border);
}

/* =====================================================
   EMPTY STATE
===================================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 56px 24px;
    color: var(--text-3);
    text-align: center;
}

.empty-state-icon {
    font-size: 40px;
    opacity: 0.35;
    margin-bottom: 6px;
}

.empty-state-title {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-2);
}

.empty-state-desc {
    font-size: 13px;
    max-width: 320px;
}

/* =====================================================
   TABLE
===================================================== */

.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.table thead { background: var(--surface2); }

.table th {
    text-align: left;
    padding: 13px 18px;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-3);
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
    border-bottom: 1px solid var(--border);
}

.table td {
    padding: 14px 18px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    color: var(--text-2);
    vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }

.table tbody tr {
    transition: background var(--fast) var(--ease);
}

.table tbody tr:hover {
    background: rgba(255,255,255,0.025);
}

/* =====================================================
   FORM
===================================================== */

.form-group {
    margin-bottom: 22px;
}

.form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-2);
    margin-bottom: 8px;
    letter-spacing: 0.2px;
}

.form-label span {
    color: var(--danger);
    margin-left: 3px;
}

.form-control {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 14px;
    transition: border-color var(--fast) var(--ease),
                box-shadow var(--fast) var(--ease);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.form-control::placeholder { color: var(--text-3); }

.form-control:hover {
    border-color: rgba(255,255,255,0.15);
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(139,92,246,0.15);
}

.form-control.error {
    border-color: var(--danger);
    box-shadow: 0 0 0 3px rgba(244,63,94,0.1);
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%235B6478' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

.form-hint {
    font-size: 12px;
    color: var(--text-3);
    margin-top: 6px;
}

.form-error {
    font-size: 12px;
    color: var(--danger);
    margin-top: 6px;
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Inline form row */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

/* =====================================================
   SEARCH BAR
===================================================== */

.search-bar {
    position: relative;
}

.search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-3);
    pointer-events: none;
    font-size: 16px;
}

.search-bar .form-control {
    padding-left: 44px;
}

/* =====================================================
   BUTTONS
===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: none;
    cursor: pointer;
    padding: 10px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-ui);
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0.1px;
    text-decoration: none !important;
    transition: all var(--fast) var(--ease);
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    outline: none;
}

a.btn, a.btn:hover, a.btn:visited, a.btn:focus, a.btn:active {
    text-decoration: none !important;
}

a.nav-item, a.nav-item:hover, a.sidebar-logo, a.sidebar-logo:hover, a.page-link {
    text-decoration: none !important;
}

.breadcrumb a, .breadcrumb a:hover, .breadcrumb a:visited {
    text-decoration: none !important;
}

.btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(139,92,246,0.4);
}

.btn:active {
    transform: scale(0.98);
}

.btn-icon-only {
    padding: 9px;
    width: 38px;
    height: 38px;
    border-radius: var(--radius-sm);
}

/* Primary */
.btn-primary {
    background: var(--primary);
    color: #fff;
    border: 1px solid transparent;
}

.btn-primary:hover {
    background: #9d75ff;
    box-shadow: 0 4px 16px rgba(139,92,246,0.35);
}

/* Secondary */
.btn-secondary {
    background: rgba(255,255,255,0.06);
    color: var(--text);
    border: 1px solid var(--border);
}

.btn-secondary:hover {
    background: rgba(255,255,255,0.1);
    border-color: rgba(255,255,255,0.15);
}

/* Ghost */
.btn-ghost {
    background: transparent;
    color: var(--text-2);
    border: 1px solid transparent;
}

.btn-ghost:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
}

/* Danger */
.btn-danger {
    background: rgba(244,63,94,0.12);
    color: var(--danger);
    border: 1px solid rgba(244,63,94,0.25);
}

.btn-danger:hover {
    background: rgba(244,63,94,0.22);
    border-color: rgba(244,63,94,0.45);
}

/* Success */
.btn-success {
    background: rgba(52,211,153,0.12);
    color: var(--success);
    border: 1px solid rgba(52,211,153,0.25);
}

.btn-success:hover {
    background: rgba(52,211,153,0.2);
}

/* Accent (Spotify-ish) */
.btn-accent {
    background: var(--accent);
    color: #2a0f1e;
    font-weight: 600;
}

.btn-accent:hover {
    background: #f25aad;
    box-shadow: 0 4px 16px rgba(236,72,153,0.3);
}

/* Sizes */
.btn-sm { padding: 7px 14px; font-size: 12px; border-radius: var(--radius-sm); }
.btn-lg { padding: 13px 28px; font-size: 15px; border-radius: var(--radius-lg); }

/* Loading state */
.btn.loading {
    pointer-events: none;
    opacity: 0.7;
}

.btn.loading::after {
    content: '';
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* =====================================================
   ALERT / FLASH MESSAGES
===================================================== */

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 18px;
    border-radius: var(--radius-md);
    font-size: 14px;
    margin-bottom: 20px;
    border: 1px solid;
}

.alert-success {
    background: rgba(52,211,153,0.08);
    border-color: rgba(52,211,153,0.2);
    color: #6ee7b7;
}

.alert-error {
    background: rgba(244,63,94,0.08);
    border-color: rgba(244,63,94,0.2);
    color: #fda4af;
}

.alert-warning {
    background: rgba(245,158,11,0.08);
    border-color: rgba(245,158,11,0.2);
    color: #fcd34d;
}

.alert-info {
    background: rgba(56,189,248,0.08);
    border-color: rgba(56,189,248,0.2);
    color: #7dd3fc;
}

/* =====================================================
   PAGINATION
===================================================== */

.pagination {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 24px;
}

.page-link {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    color: var(--text-2);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all var(--fast);
}

.page-link:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
    border-color: rgba(255,255,255,0.15);
}

.page-link.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.page-link.disabled {
    opacity: 0.35;
    pointer-events: none;
}

/* =====================================================
   MODAL
===================================================== */

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.65);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 200;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn var(--fast) var(--ease);
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 520px;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp var(--mid) var(--ease);
    box-shadow: 0 24px 80px rgba(0,0,0,0.5);
}

.modal-header {
    padding: 22px 24px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-title {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
}

.modal-close {
    width: 30px;
    height: 30px;
    border-radius: var(--radius-sm);
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-3);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--fast);
    font-size: 18px;
    line-height: 1;
}

.modal-close:hover {
    background: rgba(255,255,255,0.05);
    color: var(--text);
}

.modal-body { padding: 20px 24px; }

.modal-footer {
    padding: 0 24px 22px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
}

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes slideUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* =====================================================
   ACTIVITY LOG
===================================================== */

.activity-feed {
    display: flex;
    flex-direction: column;
}

.activity-item {
    display: flex;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.activity-item:last-child { border-bottom: none; }

.activity-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--primary);
    flex-shrink: 0;
    margin-top: 6px;
    box-shadow: 0 0 8px rgba(139,92,246,0.5);
}

.activity-dot.success { background: var(--success); box-shadow: 0 0 8px rgba(52,211,153,0.4); }
.activity-dot.warning { background: var(--warning); box-shadow: 0 0 8px rgba(245,158,11,0.4); }
.activity-dot.danger  { background: var(--danger);  box-shadow: 0 0 8px rgba(244,63,94,0.4); }

.activity-content { flex: 1; }

.activity-text {
    font-size: 14px;
    color: var(--text-2);
    line-height: 1.5;
}

.activity-text strong { color: var(--text); font-weight: 500; }

.activity-time {
    font-size: 11px;
    color: var(--text-3);
    margin-top: 4px;
    font-family: var(--font-mono);
}

/* =====================================================
   SPOTIFY CONNECT BANNER
===================================================== */

.spotify-banner {
    background: linear-gradient(
        135deg,
        rgba(236,72,153,0.08),
        rgba(236,72,153,0.03)
    );
    border: 1px solid rgba(236,72,153,0.2);
    border-radius: var(--radius-lg);
    padding: 20px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
}

.spotify-banner-info {
    display: flex;
    align-items: center;
    gap: 14px;
}

.spotify-logo {
    width: 42px;
    height: 42px;
    min-width: 42px;
    min-height: 42px;
    border-radius: 50%;
    background: #1db954;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    box-shadow: 0 0 16px rgba(29,185,84,0.35);
}

.spotify-banner-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
}

.spotify-banner-desc {
    font-size: 13px;
    color: var(--text-3);
    margin-top: 2px;
}

/* =====================================================
   TOOLTIP
===================================================== */

[data-tooltip] {
    position: relative;
}

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface2);
    color: var(--text);
    font-size: 12px;
    font-weight: 400;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    white-space: nowrap;
    border: 1px solid var(--border);
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--fast), transform var(--fast);
    transform: translateX(-50%) translateY(4px);
    z-index: 999;
}

[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* =====================================================
   UTILITY
===================================================== */

.flex          { display: flex; }
.flex-col      { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.items-start   { align-items: flex-start; }
.justify-between { justify-content: space-between; }
.justify-end   { justify-content: flex-end; }
.gap-8         { gap: 8px; }
.gap-12        { gap: 12px; }
.gap-16        { gap: 16px; }
.gap-20        { gap: 20px; }
.flex-1        { flex: 1; }
.min-w-0       { min-width: 0; }
.w-full        { width: 100%; }
.mt-8          { margin-top: 8px; }
.mt-16         { margin-top: 16px; }
.mt-24         { margin-top: 24px; }
.mb-8          { margin-bottom: 8px; }
.mb-16         { margin-bottom: 16px; }
.mb-24         { margin-bottom: 24px; }
.text-muted    { color: var(--text-3); }
.text-sm       { font-size: 13px; }
.text-xs       { font-size: 11px; }
.font-mono     { font-family: var(--font-mono); }
.truncate      { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sr-only       { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Dividers */
hr, .divider {
    border: none;
    border-top: 1px solid var(--border);
    margin: 20px 0;
}

/* Scrollbar */
::-webkit-scrollbar              { width: 6px; height: 6px; }
::-webkit-scrollbar-track        { background: transparent; }
::-webkit-scrollbar-thumb        { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover  { background: rgba(255,255,255,0.18); }

/* =====================================================
   RESPONSIVE
===================================================== */

@media (max-width: 1024px) {
    .form-row { grid-template-columns: 1fr; }
    .content  { padding: 24px; }
}

@media (max-width: 900px) {
    :root { --sidebar-width: 220px; }
}

@media (max-width: 768px) {
    :root { --sidebar-width: 0px; }

    .topbar-hamburger {
        display: flex;
    }

    .sidebar {
        position: fixed;
        top: 0;
        left: -264px;
        width: 264px;
        height: 100vh;
        z-index: 200;
        transition: left var(--mid) var(--ease);
        box-shadow: none;
    }

    .sidebar.open {
        left: 0;
        box-shadow: 8px 0 32px rgba(0,0,0,0.5);
    }

    .sidebar::after { display: none; }

    .main {
        margin-left: 0;
        width: 100%;
    }

    .content { padding: 20px; }

    .dashboard-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .playlist-grid {
        grid-template-columns: 1fr;
    }

    .page-header-row {
        flex-direction: column;
        align-items: flex-start;
    }

    .page-title { font-size: 22px; }
}

@media (max-width: 480px) {
    .dashboard-grid { grid-template-columns: 1fr; }
    .topbar { padding: 0 16px; }
}