/* =====================================================
   THE BLACK TURN - Production Stylesheet
   Mobile-first, fully responsive, modern aesthetic
   ===================================================== */

/* CSS Reset */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

:root {
    --bg-primary: #050505;
    --bg-secondary: #0d0d0d;
    --bg-card: #111111;
    --bg-card-hover: #161616;
    --bg-input: #0f0f0f;
    --bg-sidebar: #080808;
    --border: #1e1e1e;
    --border-light: #2a2a2a;
    --text-primary: #f0f0f0;
    --text-secondary: #999999;
    --text-muted: #555555;
    --accent: #FF4D4D;
    --accent-hover: #FF6B6B;
    --accent-glow: rgba(255, 77, 77, 0.15);
    --success: #22C55E;
    --warning: #F59E0B;
    --danger: #EF4444;
    --info: #3B82F6;
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 18px;
    --radius-xl: 28px;
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow: 0 4px 24px rgba(0,0,0,0.4);
    --shadow-lg: 0 12px 48px rgba(0,0,0,0.6);
    --shadow-glow: 0 8px 32px rgba(255,77,77,0.15);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --font-body: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-heading: 'Space Grotesk', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-display: 'Playfair Display', Georgia, serif;
    --sidebar-width: 260px;
    --header-height: 64px;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--accent-hover); }
h1,h2,h3,h4,h5,h6 { font-family: var(--font-heading); font-weight: 600; line-height: 1.2; }
input, textarea, select, button { font-family: inherit; font-size: inherit; outline: none; }
button { cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--accent); color: #fff; }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg-secondary); }
::-webkit-scrollbar-thumb { background: var(--border-light); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* =====================================================
   LANDING PAGE
   ===================================================== */

.landing-page {
    min-height: 100vh;
    background: var(--bg-primary);
    position: relative;
    overflow: hidden;
}

.landing-page::before {
    content: '';
    position: fixed;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background:
        radial-gradient(circle at 30% 30%, rgba(255,77,77,0.04) 0%, transparent 50%),
        radial-gradient(circle at 70% 70%, rgba(255,77,77,0.02) 0%, transparent 50%);
    animation: bgFloat 30s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes bgFloat {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(-3%, -3%); }
}

.landing-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 16px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    background: rgba(5,5,5,0.75);
    border-bottom: 1px solid rgba(255,255,255,0.04);
}

.landing-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
}

.landing-logo .logo-icon { font-size: 1.5rem; }

.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 16px;
}

.landing-nav-links > a:not(.btn) {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
}

.landing-nav-links > a:not(.btn):hover { color: var(--text-primary); }

.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 120px 20px 60px;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: var(--accent-glow);
    border: 1px solid rgba(255,77,77,0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 500;
    margin-bottom: 24px;
    animation: fadeInUp 0.8s ease;
}

.hero h1 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    max-width: 900px;
    margin-bottom: 20px;
    animation: fadeInUp 0.8s ease 0.1s both;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent), #FF8E53);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: clamp(0.95rem, 2vw, 1.15rem);
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto 40px;
    animation: fadeInUp 0.8s ease 0.2s both;
    padding: 0 16px;
}

.hero-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.3s both;
}

.hero-stats {
    display: flex;
    gap: 40px;
    margin-top: 60px;
    flex-wrap: wrap;
    justify-content: center;
    animation: fadeInUp 0.8s ease 0.4s both;
}

.hero-stat { text-align: center; }
.hero-stat .number {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-primary);
}
.hero-stat .label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.features-section {
    padding: 80px 20px;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 48px;
}

.section-header h2 {
    font-size: clamp(1.6rem, 4vw, 2.5rem);
    margin-bottom: 12px;
}

.section-header p {
    color: var(--text-secondary);
    max-width: 560px;
    margin: 0 auto;
    font-size: 0.95rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
}

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px 24px;
    transition: var(--transition);
}

.feature-card:hover {
    border-color: rgba(255,77,77,0.2);
    transform: translateY(-4px);
    box-shadow: var(--shadow-glow);
}

.feature-icon {
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--accent-glow);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin-bottom: 16px;
    color: var(--accent);
}

.feature-card h3 {
    font-size: 1.1rem;
    margin-bottom: 6px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

.artists-section { padding: 60px 20px; position: relative; z-index: 1; }

.artists-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

.artist-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition);
    text-align: center;
    color: var(--text-primary);
}

.artist-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.artist-card-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-secondary);
}

.artist-card-info { padding: 16px 14px; }

.artist-card-name {
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.artist-card-genre {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.landing-footer {
    border-top: 1px solid var(--border);
    padding: 40px 20px 24px;
    text-align: center;
    position: relative;
    z-index: 1;
}

.landing-footer p { color: var(--text-muted); font-size: 0.85rem; }

/* =====================================================
   BUTTONS
   ===================================================== */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border: none;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    text-decoration: none;
    line-height: 1.2;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255,77,77,0.25);
}
.btn-primary:hover {
    background: var(--accent-hover);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(255,77,77,0.35);
}

.btn-secondary {
    background: var(--bg-card);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-secondary:hover {
    background: var(--bg-card-hover);
    border-color: var(--text-muted);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.btn-ghost {
    background: transparent;
    color: var(--text-secondary);
}
.btn-ghost:hover { color: var(--text-primary); background: rgba(255,255,255,0.04); }

.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #DC2626; color: #fff; }

.btn-success { background: var(--success); color: #fff; }
.btn-success:hover { color: #fff; }

.btn-sm { padding: 7px 14px; font-size: 0.8rem; }
.btn-lg { padding: 14px 32px; font-size: 1rem; }
.btn-icon { padding: 8px; width: 36px; height: 36px; flex-shrink: 0; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.5; pointer-events: none; }

/* =====================================================
   FORM ELEMENTS
   ===================================================== */

.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 6px;
}

.form-label .required { color: var(--accent); }

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-size: 0.92rem;
    transition: var(--transition);
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.form-input::placeholder, .form-textarea::placeholder { color: var(--text-muted); }
.form-textarea { resize: vertical; min-height: 100px; }
.form-select {
    appearance: none;
    cursor: pointer;
    padding-right: 36px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23999' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
}
.form-select option { background: var(--bg-card); color: var(--text-primary); }

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    color: var(--danger);
    font-size: 0.82rem;
    margin-top: 4px;
}

.form-switch {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    user-select: none;
}

.form-switch input { display: none; }

.switch-slider {
    width: 40px; height: 22px;
    background: var(--border-light);
    border-radius: 12px;
    position: relative;
    transition: var(--transition);
    flex-shrink: 0;
}

.switch-slider::before {
    content: '';
    width: 18px; height: 18px;
    border-radius: 50%;
    background: #fff;
    position: absolute;
    top: 2px; left: 2px;
    transition: var(--transition);
}

.form-switch input:checked + .switch-slider { background: var(--accent); }
.form-switch input:checked + .switch-slider::before { transform: translateX(18px); }

/* =====================================================
   SIDEBAR (Dashboard)
   ===================================================== */

.dashboard-body {
    background: var(--bg-primary);
    min-height: 100vh;
}

.sidebar {
    position: fixed;
    top: 0; left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background: var(--bg-sidebar);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    z-index: 1000;
    overflow-y: auto;
    transition: transform 0.3s ease;
}

.sidebar-header {
    padding: 18px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.15rem;
}

.logo-icon { font-size: 1.4rem; }

.sidebar-close {
    display: none;
    color: var(--text-secondary);
    font-size: 1.1rem;
    padding: 6px;
}

.sidebar-profile {
    padding: 16px 18px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid var(--border);
}

.sidebar-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
}

.sidebar-avatar img { width: 100%; height: 100%; object-fit: cover; }

.avatar-placeholder {
    width: 100%; height: 100%;
    background: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
}

.sidebar-profile-info { min-width: 0; flex: 1; }
.sidebar-profile-info strong {
    display: block;
    font-size: 0.85rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-link-small {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 2px;
}

.profile-link-small:hover { color: var(--accent); }

.sidebar-nav {
    padding: 10px 8px;
    flex: 1;
}

.nav-section-label {
    padding: 12px 12px 6px;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: 600;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    font-size: 0.88rem;
    font-weight: 500;
    transition: var(--transition);
    margin-bottom: 2px;
    position: relative;
}

.nav-item:hover {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
}

.nav-item.active {
    background: var(--accent-glow);
    color: var(--accent);
}

.nav-item i { width: 18px; text-align: center; font-size: 0.9rem; }

.nav-item .badge {
    margin-left: auto;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    padding: 2px 7px;
    border-radius: 100px;
    font-weight: 600;
}

.nav-divider {
    height: 1px;
    background: var(--border);
    margin: 12px 14px;
}

.sidebar-footer {
    padding: 10px 8px;
    border-top: 1px solid var(--border);
}

.nav-logout { color: var(--text-muted); }
.nav-logout:hover { color: var(--danger); background: rgba(239,68,68,0.06); }

.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 999;
    backdrop-filter: blur(2px);
}

/* =====================================================
   MAIN CONTENT
   ===================================================== */

.main-content {
    margin-left: var(--sidebar-width);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.top-bar {
    position: sticky;
    top: 0;
    z-index: 50;
    padding: 14px 24px;
    background: rgba(5,5,5,0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    height: var(--header-height);
}

.menu-toggle {
    display: none;
    color: var(--text-primary);
    font-size: 1.2rem;
    padding: 6px;
}

.top-bar-title h1 {
    font-size: 1.1rem;
    font-weight: 600;
}

.top-bar-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-area {
    padding: 24px;
    max-width: 1400px;
    width: 100%;
    flex: 1;
}

/* =====================================================
   CARDS
   ===================================================== */

.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h2 i { color: var(--accent); }

.card-header-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 14px;
    transition: var(--transition);
}

.stat-card:hover {
    border-color: var(--border-light);
    transform: translateY(-2px);
}

.stat-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    flex-shrink: 0;
}

.stat-icon.red { background: rgba(255,77,77,0.1); color: var(--accent); }
.stat-icon.green { background: rgba(34,197,94,0.1); color: var(--success); }
.stat-icon.blue { background: rgba(59,130,246,0.1); color: var(--info); }
.stat-icon.yellow { background: rgba(245,158,11,0.1); color: var(--warning); }
.stat-icon.purple { background: rgba(168,85,247,0.1); color: #A855F7; }

.stat-info { min-width: 0; flex: 1; }

.stat-value {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    line-height: 1;
}

.stat-label {
    color: var(--text-muted);
    font-size: 0.8rem;
    margin-top: 4px;
}

/* Limit progress bar */
.limit-bar {
    margin-top: 8px;
    height: 4px;
    background: var(--border);
    border-radius: 2px;
    overflow: hidden;
}

.limit-bar-fill {
    height: 100%;
    background: var(--accent);
    transition: width 0.3s ease;
}

.limit-bar-fill.warning { background: var(--warning); }
.limit-bar-fill.danger { background: var(--danger); }

.limit-info {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* =====================================================
   ITEM LIST (Songs, Links, etc.)
   ===================================================== */

.item-list { list-style: none; }

.item-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
}

.item-row:hover { background: rgba(255,255,255,0.02); }
.item-row:last-child { border-bottom: none; }

.item-thumb {
    width: 48px; height: 48px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.item-thumb img { width: 100%; height: 100%; object-fit: cover; }

.item-info { flex: 1; min-width: 0; }

.item-title {
    font-weight: 600;
    font-size: 0.92rem;
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.item-subtitle {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.item-meta {
    font-size: 0.72rem;
    color: var(--text-muted);
    flex-shrink: 0;
}

.item-actions {
    display: flex;
    gap: 6px;
    flex-shrink: 0;
}

.action-btn {
    width: 34px; height: 34px;
    font-size: 0.82rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-glow); }
.action-btn.active { color: var(--accent); border-color: var(--accent); }
.action-btn.delete:hover { border-color: var(--danger); color: var(--danger); background: rgba(239,68,68,0.1); }
.action-btn.success:hover { border-color: var(--success); color: var(--success); background: rgba(34,197,94,0.1); }

.featured-badge {
    background: rgba(245,158,11,0.15);
    color: var(--warning);
    padding: 2px 8px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.platform-badge {
    padding: 2px 10px;
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

/* =====================================================
   FLASH MESSAGES
   ===================================================== */

.flash-message {
    padding: 13px 16px;
    border-radius: var(--radius);
    margin-bottom: 18px;
    font-size: 0.88rem;
    font-weight: 500;
    border: 1px solid;
    animation: slideDown 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-message i { font-size: 1rem; flex-shrink: 0; }
.flash-message span { flex: 1; }
.flash-close { color: inherit; opacity: 0.6; font-size: 1.2rem; padding: 0 4px; }
.flash-close:hover { opacity: 1; }

.flash-success { background: rgba(34,197,94,0.08); border-color: rgba(34,197,94,0.2); color: var(--success); }
.flash-error { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.2); color: var(--danger); }
.flash-warning { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.2); color: var(--warning); }
.flash-info { background: rgba(59,130,246,0.08); border-color: rgba(59,130,246,0.2); color: var(--info); }

/* =====================================================
   AUTH PAGES
   ===================================================== */

.auth-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: var(--bg-primary);
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: radial-gradient(circle at 50% 0%, rgba(255,77,77,0.06) 0%, transparent 60%);
    pointer-events: none;
}

.auth-card {
    width: 100%;
    max-width: 460px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 36px 30px;
    position: relative;
}

.auth-logo {
    text-align: center;
    margin-bottom: 28px;
}

.auth-logo a { color: var(--text-primary); }
.auth-logo .logo-icon { font-size: 2.2rem; display: block; margin-bottom: 8px; }
.auth-logo h1 { font-size: 1.4rem; font-family: var(--font-display); }

.auth-footer {
    text-align: center;
    margin-top: 20px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

/* =====================================================
   MODALS
   ===================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-overlay.active,
.modal-overlay.open { display: flex; }

.modal {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.2s ease;
}

.modal-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    background: var(--bg-card);
    z-index: 1;
}

.modal-header h3 { font-size: 1.05rem; }

.modal-close {
    color: var(--text-muted);
    font-size: 1.3rem;
    padding: 4px 8px;
    transition: var(--transition);
}
.modal-close:hover { color: var(--text-primary); }

.modal-body { padding: 22px; }
.modal-footer {
    padding: 16px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* =====================================================
   EMPTY STATE
   ===================================================== */

.empty-state {
    text-align: center;
    padding: 50px 20px;
}

.empty-state .empty-icon {
    font-size: 3rem;
    margin-bottom: 14px;
    opacity: 0.4;
}

.empty-state h3 {
    font-size: 1.05rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.empty-state p {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

/* =====================================================
   TABS
   ===================================================== */

.tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.tab {
    padding: 11px 18px;
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.88rem;
    border-bottom: 2px solid transparent;
    transition: var(--transition);
    white-space: nowrap;
    background: none;
}

.tab:hover { color: var(--text-secondary); }
.tab.active { color: var(--accent); border-bottom-color: var(--accent); }

.tab-content { display: none; }
.tab-content.active { display: block; animation: fadeIn 0.2s ease; }

/* =====================================================
   PROFILE PAGE - PUBLIC
   ===================================================== */

.profile-page { min-height: 100vh; }

.profile-cover {
    height: 240px;
    position: relative;
    overflow: hidden;
}

.profile-cover img { width: 100%; height: 100%; object-fit: cover; }

.profile-cover-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 70%;
    background: linear-gradient(to top, var(--bg-primary), transparent);
}

.profile-header-section {
    max-width: 700px;
    margin: -70px auto 0;
    padding: 0 20px;
    position: relative;
    text-align: center;
}

.profile-avatar {
    width: 130px;
    height: 130px;
    border-radius: 50%;
    border: 4px solid var(--bg-primary);
    overflow: hidden;
    margin: 0 auto 14px;
    background: var(--bg-secondary);
    position: relative;
    z-index: 1;
}

.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-avatar .avatar-placeholder { font-size: 3rem; }

.profile-name {
    font-family: var(--font-display);
    font-size: clamp(1.6rem, 4vw, 2.2rem);
    font-weight: 700;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
}

.profile-verified {
    color: var(--info);
    font-size: 1rem;
    display: inline-flex;
    align-items: center;
}

.profile-genre {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

.profile-location {
    color: var(--text-muted);
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.profile-location i { margin-right: 4px; }

.profile-bio {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.7;
    margin-bottom: 22px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    padding: 0 8px;
}

.profile-socials {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 28px;
}

.social-icon-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    background: rgba(255,255,255,0.06);
    color: var(--text-primary);
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.08);
}

.social-icon-btn:hover {
    transform: scale(1.1);
    color: #fff;
}

.profile-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 20px 60px;
}

.profile-section { margin-bottom: 32px; }

.profile-section-title {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-muted);
    margin-bottom: 14px;
    font-weight: 600;
}

.profile-link-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    margin-bottom: 8px;
    transition: var(--transition);
    color: var(--text-primary);
}

.profile-link-item:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.12);
    transform: translateX(3px);
    color: var(--text-primary);
}

.link-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}

.link-text { flex: 1; min-width: 0; }
.link-title {
    font-weight: 600;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.link-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.link-arrow { color: var(--text-muted); flex-shrink: 0; }

/* Songs */
.song-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
}

.song-card:hover { background: rgba(255,255,255,0.06); }

.song-cover {
    width: 52px; height: 52px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}

.song-cover img { width: 100%; height: 100%; object-fit: cover; }

.song-info { flex: 1; min-width: 0; }
.song-title {
    font-weight: 600;
    font-size: 0.92rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.song-album {
    font-size: 0.78rem;
    color: var(--text-muted);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.song-play-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    transition: var(--transition);
    flex-shrink: 0;
}

.song-play-btn:hover { transform: scale(1.08); box-shadow: 0 4px 12px rgba(255,77,77,0.4); }

.embed-player {
    border-radius: var(--radius);
    overflow: hidden;
    margin-bottom: 10px;
}

.embed-player iframe {
    width: 100%;
    border: none;
    border-radius: var(--radius);
    display: block;
}

/* Events */
.event-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    margin-bottom: 10px;
}

.event-date-box {
    width: 56px;
    text-align: center;
    flex-shrink: 0;
}

.event-date-box .month {
    font-size: 0.68rem;
    text-transform: uppercase;
    color: var(--accent);
    font-weight: 600;
    letter-spacing: 1px;
}

.event-date-box .day {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1;
}

.event-info { flex: 1; min-width: 0; }
.event-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }
.event-venue { font-size: 0.82rem; color: var(--text-secondary); }
.event-location { font-size: 0.78rem; color: var(--text-muted); }

/* Gallery */
.profile-gallery {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
}

.gallery-item {
    aspect-ratio: 1;
    border-radius: var(--radius-sm);
    overflow: hidden;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.gallery-item:hover { transform: scale(1.03); }
.gallery-item img { width: 100%; height: 100%; object-fit: cover; }

/* Merch */
.merch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.merch-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    overflow: hidden;
    transition: var(--transition);
    color: var(--text-primary);
}

.merch-card:hover { transform: translateY(-3px); color: var(--text-primary); }

.merch-img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    background: var(--bg-secondary);
}

.merch-info { padding: 12px; }
.merch-title { font-weight: 600; font-size: 0.85rem; margin-bottom: 4px; }
.merch-price { color: var(--accent); font-weight: 700; font-size: 0.9rem; }

/* Achievements */
.achievement-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: rgba(255,255,255,0.03);
    border-radius: var(--radius-sm);
    margin-bottom: 6px;
}

.achievement-icon { font-size: 1.4rem; }
.achievement-title { font-weight: 600; font-size: 0.88rem; }
.achievement-desc { font-size: 0.78rem; color: var(--text-muted); }

/* Testimonials */
.testimonial-card {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 10px;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 10px;
    font-size: 0.92rem;
    line-height: 1.7;
}

.testimonial-author { font-weight: 600; font-size: 0.88rem; }
.testimonial-role { font-size: 0.78rem; color: var(--text-muted); }
.testimonial-stars { color: var(--warning); margin-bottom: 10px; font-size: 0.85rem; }

/* Newsletter */
.newsletter-box {
    background: linear-gradient(135deg, rgba(255,77,77,0.08), rgba(255,77,77,0.02));
    border: 1px solid rgba(255,77,77,0.15);
    border-radius: var(--radius-lg);
    padding: 28px 22px;
    text-align: center;
}

.newsletter-box h3 { margin-bottom: 6px; font-size: 1.1rem; }
.newsletter-box p { color: var(--text-secondary); font-size: 0.85rem; margin-bottom: 14px; }

.newsletter-form {
    display: flex;
    gap: 8px;
    max-width: 400px;
    margin: 0 auto;
}

.newsletter-form .form-input { flex: 1; }

/* Contact form */
.profile-contact-form {
    background: rgba(255,255,255,0.03);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: var(--radius);
    padding: 22px;
}

/* QR */
.qr-section {
    text-align: center;
    padding: 24px;
}

.qr-code-img {
    width: 160px; height: 160px;
    margin: 0 auto 14px;
    border-radius: var(--radius);
    padding: 10px;
    background: #fff;
}

.share-buttons {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-btn {
    padding: 9px 18px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 7px;
    transition: var(--transition);
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.04);
    color: var(--text-primary);
}

.share-btn:hover { background: rgba(255,255,255,0.08); color: var(--text-primary); }

.profile-footer {
    text-align: center;
    padding: 32px 20px;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: 32px;
}

.profile-footer p { color: var(--text-muted); font-size: 0.78rem; margin-bottom: 4px; }
.profile-footer a { color: var(--accent); }

/* =====================================================
   PROFILE THEMES
   ===================================================== */

.theme-dark-elegant { --bg-primary: #050505; }
.theme-midnight-blue { --bg-primary: #070B14; --accent: #4D9AFF; --accent-glow: rgba(77,154,255,0.12); }
.theme-forest { --bg-primary: #060D06; --accent: #4CAF50; --accent-glow: rgba(76,175,80,0.12); }
.theme-purple-haze { --bg-primary: #0A0510; --accent: #A855F7; --accent-glow: rgba(168,85,247,0.12); }
.theme-sunset { --bg-primary: #0D0805; --accent: #FF8C42; --accent-glow: rgba(255,140,66,0.12); }
.theme-ocean { --bg-primary: #050A0D; --accent: #06B6D4; --accent-glow: rgba(6,182,212,0.12); }
.theme-rose-gold { --bg-primary: #0D0708; --accent: #F472B6; --accent-glow: rgba(244,114,182,0.12); }
.theme-gold { --bg-primary: #0A0900; --accent: #F59E0B; --accent-glow: rgba(245,158,11,0.12); }
.theme-neon { --bg-primary: #000000; --accent: #00FF88; --accent-glow: rgba(0,255,136,0.12); }
.theme-minimal-light {
    --bg-primary: #FAFAFA; --bg-card: #FFFFFF; --bg-secondary: #F0F0F0;
    --border: #E5E5E5; --border-light: #D4D4D4;
    --text-primary: #171717; --text-secondary: #525252; --text-muted: #A3A3A3;
    --accent: #DC2626; --accent-glow: rgba(220,38,38,0.08);
}

/* =====================================================
   EXPLORE PAGE
   ===================================================== */

.explore-header {
    text-align: center;
    padding: 80px 20px 32px;
    position: relative;
    z-index: 1;
}

.search-bar-large {
    max-width: 600px;
    margin: 20px auto 0;
    position: relative;
}

.search-bar-large input {
    width: 100%;
    padding: 14px 20px 14px 48px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 100px;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.search-bar-large input:focus { border-color: var(--accent); }

.search-bar-large .search-icon {
    position: absolute;
    left: 18px; top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.genre-filters {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    justify-content: center;
    padding: 16px 20px;
    max-width: 900px;
    margin: 0 auto;
}

.genre-chip {
    padding: 7px 16px;
    border-radius: 100px;
    border: 1px solid var(--border);
    background: transparent;
    color: var(--text-secondary);
    font-size: 0.82rem;
    transition: var(--transition);
}

.genre-chip:hover, .genre-chip.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

/* =====================================================
   ANIMATIONS
   ===================================================== */

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideDown {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.96); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes spin { to { transform: rotate(360deg); } }

.spinner {
    width: 28px; height: 28px;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* =====================================================
   UTILITY CLASSES
   ===================================================== */

.text-center { text-align: center; }
.text-right { text-align: right; }
.text-muted { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.text-accent { color: var(--accent); }
.text-success { color: var(--success); }
.text-warning { color: var(--warning); }
.text-danger { color: var(--danger); }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }

.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 14px; }
.mt-3 { margin-top: 20px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 14px; }
.mb-3 { margin-bottom: 20px; }

.gap-1 { gap: 8px; }
.gap-2 { gap: 14px; }

.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.flex-wrap { flex-wrap: wrap; }

.w-full { width: 100%; }
.hidden { display: none !important; }
.truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fade-in { animation: fadeInUp 0.4s ease both; }

/* =====================================================
   RESPONSIVE - MOBILE
   ===================================================== */

@media (max-width: 1024px) {
    .content-area { padding: 20px 16px; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar.open ~ .sidebar-overlay,
    .sidebar-overlay.active { display: block; }
    .sidebar-close { display: flex; align-items: center; }
    .menu-toggle { display: flex; align-items: center; }
    
    .main-content { margin-left: 0; }
    .top-bar { padding: 12px 16px; }
    .content-area { padding: 16px 14px; }
    
    .form-row { grid-template-columns: 1fr; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
    .stat-card { padding: 14px; }
    .stat-value { font-size: 1.3rem; }
    .stat-icon { width: 38px; height: 38px; font-size: 0.95rem; }
    
    .card { padding: 18px 16px; border-radius: var(--radius); }
    .card-header { flex-direction: column; align-items: stretch; gap: 10px; }
    
    .item-row { padding: 12px; gap: 10px; flex-wrap: wrap; }
    .item-thumb { width: 42px; height: 42px; }
    .item-meta { display: none; }
    
    .landing-nav { padding: 14px 16px; }
    .landing-nav-links > a:not(.btn) { display: none; }
    
    .hero { padding: 100px 16px 50px; }
    .hero-buttons .btn { font-size: 0.85rem; padding: 10px 18px; }
    
    .features-section, .artists-section { padding: 50px 16px; }
    .features-grid { grid-template-columns: 1fr; }
    .feature-card { padding: 22px 18px; }
    
    .artists-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    
    .auth-card { padding: 28px 22px; border-radius: var(--radius-lg); }
    
    .modal { max-height: 85vh; border-radius: var(--radius); }
    .modal-body { padding: 18px; }
    .modal-header, .modal-footer { padding: 14px 18px; }
    
    .profile-cover { height: 180px; }
    .profile-avatar { width: 100px; height: 100px; }
    .profile-header-section { margin-top: -55px; padding: 0 16px; }
    .profile-content { padding: 0 16px 50px; }
    .profile-gallery { grid-template-columns: repeat(2, 1fr); }
    .merch-grid { grid-template-columns: repeat(2, 1fr); }
    
    .newsletter-form { flex-direction: column; }
    .share-buttons { flex-direction: column; align-items: stretch; }
    .share-btn { justify-content: center; }
    
    .tabs { padding-bottom: 2px; }
    .tab { padding: 10px 14px; font-size: 0.82rem; }
    
    .item-actions { width: 100%; justify-content: flex-end; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .artists-grid { grid-template-columns: repeat(2, 1fr); }
    .hero-stats { gap: 24px; }
    .hero-stats > div { flex: 1 1 30%; }
    .event-card { flex-direction: column; }
    .event-date-box { width: auto; text-align: left; display: flex; gap: 8px; align-items: baseline; }
    .modal-footer { flex-direction: column-reverse; }
    .modal-footer .btn { width: 100%; }
}

/* Touch-friendly */
@media (hover: none) and (pointer: coarse) {
    .btn, .nav-item, .action-btn, .share-btn { min-height: 44px; }
    .form-input, .form-select { padding-top: 13px; padding-bottom: 13px; }
}

/* Print */
@media print {
    .sidebar, .top-bar, .modal-overlay, .btn, .action-btn { display: none !important; }
    .main-content { margin-left: 0 !important; }
    body { background: #fff; color: #000; }
}

/* =====================================================
   V3 ADDITIONS
   ===================================================== */

/* Light theme override */
body.ui-light {
    --bg-primary: #FAFAFA;
    --bg-secondary: #F0F0F0;
    --bg-card: #FFFFFF;
    --bg-card-hover: #F8F8F8;
    --bg-input: #F5F5F5;
    --bg-sidebar: #FFFFFF;
    --border: #E5E5E5;
    --border-light: #D4D4D4;
    --text-primary: #171717;
    --text-secondary: #525252;
    --text-muted: #A3A3A3;
}
body.ui-light .top-bar { background: rgba(255,255,255,0.85); }
body.ui-light .auth-page::before { background: radial-gradient(circle at 50% 0%, rgba(255,77,77,0.04) 0%, transparent 60%); }
body.ui-light .landing-page::before { background: radial-gradient(circle at 30% 30%, rgba(255,77,77,0.03) 0%, transparent 50%); }
body.ui-light .nav-item:hover { background: rgba(0,0,0,0.04); }
body.ui-light ::-webkit-scrollbar-track { background: var(--bg-secondary); }
body.ui-light ::-webkit-scrollbar-thumb { background: #ccc; }

/* Theme toggle button */
.theme-toggle {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-card);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
}
.theme-toggle:hover { color: var(--text-primary); border-color: var(--text-muted); }

/* Password toggle */
.input-with-toggle { position: relative; }
.input-with-toggle .form-input { padding-right: 42px; }
.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    cursor: pointer;
    padding: 6px;
    background: transparent;
}
.toggle-password:hover { color: var(--text-primary); }

/* Username availability indicator */
.username-feedback {
    margin-top: 6px;
    font-size: 0.82rem;
    min-height: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}
.username-feedback.available { color: var(--success); }
.username-feedback.taken { color: var(--danger); }
.username-feedback.checking { color: var(--text-muted); }
.username-feedback.invalid { color: var(--warning); }

.username-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.username-suggestion {
    padding: 6px 14px;
    background: var(--accent-glow);
    color: var(--accent);
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 500;
    border: 1px solid rgba(255,77,77,0.2);
    cursor: pointer;
    transition: var(--transition);
}
.username-suggestion:hover { background: var(--accent); color: #fff; }

/* OTP input */
.otp-input-group {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin: 20px 0;
}
.otp-input {
    width: 48px;
    height: 56px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 600;
    background: var(--bg-input);
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    transition: var(--transition);
}
.otp-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); outline: none; }
@media (max-width: 480px) {
    .otp-input { width: 40px; height: 48px; font-size: 1.1rem; }
    .otp-input-group { gap: 6px; }
}

/* Search Bar */
.search-row {
    display: flex;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.search-row .form-input { flex: 1; min-width: 200px; }

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 24px;
    flex-wrap: wrap;
}
.page-btn {
    min-width: 36px;
    height: 36px;
    padding: 0 12px;
    border: 1px solid var(--border);
    background: var(--bg-card);
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 500;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active { background: var(--accent); color: #fff; border-color: var(--accent); }
.page-ellipsis { color: var(--text-muted); padding: 0 4px; align-self: center; }

/* Broadcast Carousel */
.broadcast-carousel {
    background: linear-gradient(135deg, var(--accent-glow), transparent);
    border: 1px solid rgba(255,77,77,0.2);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 20px;
    position: relative;
    overflow: hidden;
}
.broadcast-slides {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    gap: 14px;
    padding-bottom: 8px;
}
.broadcast-slides::-webkit-scrollbar { height: 4px; }
.broadcast-slide {
    flex: 0 0 100%;
    scroll-snap-align: start;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.broadcast-slide-img {
    width: 80px;
    height: 80px;
    border-radius: var(--radius);
    object-fit: cover;
    flex-shrink: 0;
}
.broadcast-content { flex: 1; min-width: 0; }
.broadcast-title { font-weight: 700; font-size: 1.05rem; margin-bottom: 4px; }
.broadcast-desc { font-size: 0.88rem; color: var(--text-secondary); line-height: 1.5; }
.broadcast-actions {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}
.broadcast-dots {
    display: flex;
    justify-content: center;
    gap: 6px;
    margin-top: 10px;
}
.broadcast-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--border-light);
    cursor: pointer;
    transition: var(--transition);
}
.broadcast-dot.active { background: var(--accent); width: 22px; border-radius: 4px; }
.broadcast-dismiss {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 28px; height: 28px;
    border-radius: 50%;
    background: rgba(0,0,0,0.3);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: none;
    z-index: 2;
}
.broadcast-dismiss:hover { background: rgba(0,0,0,0.5); }

/* Chat */
.chat-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 900px) {
    .chat-container { grid-template-columns: 320px 1fr; height: calc(100vh - 140px); }
}
.chat-thread-list {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.chat-thread-item {
    padding: 14px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    color: inherit;
}
.chat-thread-item:hover { background: var(--bg-card-hover); color: inherit; }
.chat-thread-item.active { background: var(--accent-glow); }
.chat-thread-item.unread { background: rgba(255,77,77,0.04); }
.chat-thread-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
}
.chat-thread-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-thread-info { flex: 1; min-width: 0; }
.chat-thread-name { font-weight: 600; font-size: 0.88rem; display: flex; align-items: center; gap: 4px; }
.chat-thread-preview { font-size: 0.78rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-thread-time { font-size: 0.7rem; color: var(--text-muted); flex-shrink: 0; }
.chat-thread-badge { background: var(--accent); color: #fff; font-size: 0.7rem; padding: 2px 6px; border-radius: 100px; font-weight: 600; }

.chat-window {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    min-height: 400px;
    overflow: hidden;
}
.chat-header {
    padding: 14px 18px;
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: 10px;
}
.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--bg-secondary);
    min-height: 300px;
    max-height: 60vh;
}
.chat-message {
    max-width: 75%;
    padding: 10px 14px;
    border-radius: 12px;
    font-size: 0.92rem;
    line-height: 1.5;
    word-break: break-word;
    animation: fadeInUp 0.2s ease;
}
.chat-message.from-them {
    align-self: flex-start;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}
.chat-message.from-me {
    align-self: flex-end;
    background: var(--accent);
    color: #fff;
    border-bottom-right-radius: 4px;
}
.chat-message-time {
    font-size: 0.68rem;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
}
.chat-input-area {
    padding: 12px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 8px;
    background: var(--bg-card);
}
.chat-input-area textarea {
    flex: 1;
    padding: 10px 14px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 22px;
    color: var(--text-primary);
    resize: none;
    min-height: 40px;
    max-height: 120px;
    font-family: inherit;
    font-size: 0.92rem;
}
.chat-input-area textarea:focus { outline: none; border-color: var(--accent); }
.chat-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    color: var(--text-muted);
    text-align: center;
    padding: 40px 20px;
}
.chat-empty .empty-icon { font-size: 3rem; margin-bottom: 12px; opacity: 0.5; }

/* Broadcast slide builder */
.slide-builder-card {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 12px;
    position: relative;
}
.slide-builder-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    color: var(--danger);
    cursor: pointer;
    padding: 4px 8px;
}
.slide-number {
    display: inline-block;
    background: var(--accent);
    color: #fff;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    text-align: center;
    line-height: 24px;
    font-size: 0.78rem;
    font-weight: 700;
    margin-right: 8px;
}

/* User picker (multi-select for broadcasts) */
.user-picker {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-input);
    padding: 8px;
    max-height: 220px;
    overflow-y: auto;
}
.user-picker-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
    transition: var(--transition);
}
.user-picker-item:hover { background: var(--bg-card-hover); }
.user-picker-item.selected { background: var(--accent-glow); }
.user-picker-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: var(--bg-secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
    font-size: 0.78rem;
    font-weight: 600;
}
.user-picker-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Char counter (visible) */
.char-counter {
    text-align: right;
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.char-counter.warning { color: var(--warning); }
.char-counter.danger { color: var(--danger); }


/* ========================================================================
   V3.1 POLISH LAYER — modern inputs, buttons, cards, animations
   Appended at end so it overrides earlier definitions. Fully theme-aware.
   ======================================================================== */

/* Better form inputs across the app */
.form-input,
.form-textarea,
.form-select {
    background: var(--bg-input) !important;
    border: 1.5px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 12px 14px !important;
    color: var(--text-primary) !important;
    font-size: 0.94rem !important;
    font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, sans-serif !important;
    font-weight: 500 !important;
    transition: border-color 0.2s, background 0.2s, box-shadow 0.2s !important;
    -webkit-appearance: none !important;
    appearance: none !important;
    width: 100%;
    outline: none;
}
.form-input::placeholder,
.form-textarea::placeholder { color: var(--text-muted); font-weight: 400; opacity: 0.7; }
.form-input:hover,
.form-textarea:hover,
.form-select:hover { border-color: var(--text-muted) !important; }
.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: var(--accent) !important;
    box-shadow: 0 0 0 4px rgba(255, 77, 77, 0.15) !important;
    background: var(--bg-card) !important;
}
.form-textarea { min-height: 80px; resize: vertical; line-height: 1.5; }
.form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23999'%3e%3cpath d='M3 6l5 5 5-5'/%3e%3c/svg%3e") !important;
    background-position: right 14px center !important;
    background-repeat: no-repeat !important;
    background-size: 16px !important;
    padding-right: 40px !important;
}
.form-label {
    font-size: 0.84rem;
    font-weight: 600;
    margin-bottom: 7px;
    color: var(--text-primary);
    letter-spacing: 0.01em;
    display: block;
}
.form-label .required { color: var(--accent); margin-left: 2px; }
.form-hint {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
    line-height: 1.4;
}

/* Polished buttons with gradient */
.btn {
    font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, sans-serif !important;
    font-weight: 600 !important;
    letter-spacing: 0.01em !important;
    border-radius: 10px !important;
    padding: 10px 18px !important;
    transition: transform 0.1s, box-shadow 0.2s, background 0.2s !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 7px !important;
    cursor: pointer;
    border: 0;
    line-height: 1.2;
    text-decoration: none !important;
}
.btn-primary {
    background: linear-gradient(135deg, #FF4D4D, #FF8A4D) !important;
    color: #fff !important;
    box-shadow: 0 4px 14px rgba(255, 77, 77, 0.3), 0 1px 0 rgba(255,255,255,0.15) inset !important;
}
.btn-primary:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 20px rgba(255, 77, 77, 0.4), 0 1px 0 rgba(255,255,255,0.15) inset !important;
}
.btn-primary:active { transform: translateY(0); }
.btn-secondary {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    border: 1.5px solid var(--border) !important;
}
.btn-secondary:hover {
    background: var(--bg-card-hover) !important;
    border-color: var(--accent) !important;
    color: var(--accent) !important;
}
.btn-lg { padding: 14px 24px !important; font-size: 1rem !important; }
.btn-sm { padding: 7px 13px !important; font-size: 0.84rem !important; }
.btn-full { width: 100%; }
.btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

/* Polished cards */
.card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 16px !important;
    padding: 22px !important;
    margin-bottom: 16px !important;
    transition: border-color 0.2s !important;
    position: relative;
    overflow: visible;
}
.card:hover { border-color: var(--border-light); }
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 10px;
}
.card-header h2, .card-header h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 9px;
}
.card-header h2 { font-size: 1.25rem; }
.card-header h3 { font-size: 1.05rem; }
.card-header h2 i, .card-header h3 i {
    color: var(--accent);
    font-size: 0.95em;
}

/* Stat cards */
.stat-card {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 14px !important;
    padding: 18px !important;
    transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s !important;
    text-decoration: none !important;
    display: block;
    color: var(--text-primary) !important;
    position: relative;
    overflow: hidden;
}
.stat-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, var(--accent), #FF8A4D);
    opacity: 0;
    transition: opacity 0.2s;
}
.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 8px 24px rgba(255, 77, 77, 0.12);
}
.stat-card:hover::before { opacity: 1; }
.stat-icon {
    width: 40px; height: 40px;
    background: rgba(255, 77, 77, 0.1);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 10px;
}
.stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 4px;
    letter-spacing: -0.02em;
}
.stat-label {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* Item rows polish */
.item-row {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 12px !important;
    padding: 12px !important;
    margin-bottom: 8px !important;
    transition: border-color 0.2s, background 0.2s !important;
    display: flex;
    align-items: center;
    gap: 12px;
}
.item-row:hover {
    border-color: var(--accent);
    background: var(--bg-card-hover) !important;
}
.item-thumb {
    width: 48px; height: 48px;
    border-radius: 10px;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    overflow: hidden;
    font-weight: 700;
    color: var(--accent);
}
.item-thumb img { width: 100%; height: 100%; object-fit: cover; }

/* Action buttons */
.action-btn {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-secondary) !important;
    width: 36px; height: 36px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.15s !important;
    text-decoration: none;
    font-size: 0.88rem;
}
.action-btn:hover {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
    transform: translateY(-1px);
}
.action-btn.delete:hover {
    background: var(--danger, #EF4444) !important;
    border-color: var(--danger, #EF4444) !important;
}
.action-btn.active {
    background: var(--accent) !important;
    color: #fff !important;
    border-color: var(--accent) !important;
}

/* Top bar polish */
.top-bar {
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--border) !important;
}

/* Sidebar polish */
.sidebar {
    backdrop-filter: blur(20px) saturate(140%);
    -webkit-backdrop-filter: blur(20px) saturate(140%);
}
.nav-item {
    border-radius: 10px !important;
    transition: all 0.15s !important;
    font-weight: 500 !important;
    padding: 9px 12px !important;
}
.nav-item.active {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.15), rgba(255, 77, 77, 0.05)) !important;
    color: var(--accent) !important;
    border-left: 3px solid var(--accent) !important;
    padding-left: 9px !important;
}
.nav-item:hover {
    background: var(--bg-card-hover) !important;
    color: var(--accent) !important;
}

/* Modal polish */
.modal {
    background: var(--bg-card) !important;
    border: 1px solid var(--border) !important;
    border-radius: 18px !important;
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
}
.modal-overlay {
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.5);
}
.modal-header {
    border-bottom: 1px solid var(--border);
    padding-bottom: 14px;
    margin-bottom: 16px;
}
.modal-header h3 {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.01em;
}

/* Username feedback (in main app pages too) */
.username-feedback {
    margin-top: 8px;
    padding: 7px 11px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 600;
    display: none;
    align-items: center;
    gap: 6px;
}
.username-feedback.checking,
.username-feedback.invalid,
.username-feedback.available,
.username-feedback.taken { display: inline-flex; }
.username-feedback.checking { background: rgba(245, 158, 11, 0.1); color: #F59E0B; }
.username-feedback.available { background: rgba(34, 197, 94, 0.1); color: #22C55E; }
.username-feedback.taken,
.username-feedback.invalid { background: rgba(239, 68, 68, 0.1); color: #EF4444; }

.username-suggestions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}
.username-suggestion {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-block;
}
.username-suggestion:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    transform: translateY(-1px);
}

/* Genre chips polish */
.genre-chip {
    background: var(--bg-input) !important;
    border: 1px solid var(--border) !important;
    color: var(--text-primary) !important;
    padding: 7px 14px !important;
    border-radius: 999px !important;
    font-size: 0.83rem !important;
    font-weight: 500 !important;
    text-decoration: none !important;
    transition: all 0.15s !important;
    display: inline-flex !important;
    align-items: center;
    gap: 6px;
}
.genre-chip:hover { border-color: var(--accent) !important; color: var(--accent) !important; }
.genre-chip.active {
    background: linear-gradient(135deg, var(--accent), #FF8A4D) !important;
    color: #fff !important;
    border-color: transparent !important;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.3);
}

/* Pagination */
.pagination {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 18px 0 8px;
    flex-wrap: wrap;
}
.page-btn {
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 7px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.15s;
    min-width: 36px;
    text-align: center;
}
.page-btn:hover { border-color: var(--accent); color: var(--accent); }
.page-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}
.page-btn.disabled { opacity: 0.4; pointer-events: none; }

/* Search row */
.search-row {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: nowrap;
}
.search-row .form-input { flex: 1; }
@media (max-width: 480px) {
    .search-row { flex-wrap: wrap; }
    .search-row .form-input { flex: 1 1 100%; }
}

/* Welcome card pop */
.welcome-card {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.08), rgba(255, 138, 77, 0.04)) !important;
    border: 1px solid rgba(255, 77, 77, 0.2) !important;
    border-radius: 16px !important;
    padding: 20px !important;
    margin-bottom: 16px !important;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

/* Flash messages polish */
.flash-message {
    border-radius: 12px !important;
    padding: 12px 16px !important;
    border: 1px solid !important;
    margin-bottom: 14px !important;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    animation: flash-in 0.3s ease;
}
@keyframes flash-in {
    from { opacity: 0; transform: translateY(-8px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Better typography */
body, .dashboard-body {
    font-family: 'Plus Jakarta Sans', 'Outfit', system-ui, sans-serif !important;
    -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, h5, h6 {
    font-family: 'Outfit', sans-serif !important;
    letter-spacing: -0.015em;
}

/* Switch toggle polish */
.form-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    cursor: pointer;
    user-select: none;
}
.form-switch input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 40px; height: 22px;
    background: var(--bg-input);
    border: 1.5px solid var(--border);
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s, border-color 0.2s;
    margin: 0;
    flex-shrink: 0;
}
.form-switch input[type="checkbox"]::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 14px;
    height: 14px;
    background: var(--text-muted);
    border-radius: 50%;
    transition: transform 0.2s, background 0.2s;
}
.form-switch input[type="checkbox"]:checked {
    background: var(--accent);
    border-color: var(--accent);
}
.form-switch input[type="checkbox"]:checked::before {
    transform: translateX(18px);
    background: #fff;
}
.form-switch .switch-slider { display: none; } /* hidden, replaced by ::before */

/* Scrollbar polish */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--bg-secondary, transparent); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 6px; }
::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Auth pages override - new design takes over completely */
body.auth-page { font-family: 'Plus Jakarta Sans', sans-serif !important; }

/* ========================================================================
   END V3.1 POLISH LAYER
   ======================================================================== */

/* ========================================================================
   V3.3 MOBILE RESPONSIVE POLISH
   ======================================================================== */
@media (max-width: 768px) {
    /* Sidebar handling on mobile */
    .sidebar { transform: translateX(-100%); transition: transform 0.3s; }
    .sidebar.open { transform: translateX(0); }
    
    /* Top bar more compact */
    .top-bar { padding: 12px 14px !important; }
    .top-bar h1, .top-bar h2 { font-size: 1.05rem !important; }
    
    /* Cards tighter */
    .card { padding: 16px !important; border-radius: 12px !important; }
    .card-header { flex-wrap: wrap; gap: 8px; }
    .card-header h2, .card-header h3 { font-size: 1.05rem !important; }
    
    /* Form rows stack */
    .form-row { display: block !important; }
    .form-row .form-group { margin-bottom: 14px; }
    
    /* Buttons full width on action rows */
    .modal-footer { flex-direction: column-reverse !important; gap: 8px; padding: 14px !important; }
    .modal-footer .btn { width: 100%; }
    
    /* Item rows compact */
    .item-row { flex-wrap: wrap; gap: 10px !important; padding: 10px !important; }
    .item-thumb { width: 44px !important; height: 44px !important; }
    .item-info { flex: 1 1 calc(100% - 60px); min-width: 0; }
    .item-info .item-title { font-size: 0.95rem; }
    .item-info .item-subtitle { font-size: 0.78rem; }
    .item-actions { flex: 1 1 100%; display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; padding-top: 6px; border-top: 1px dashed var(--border); margin-top: 6px; }
    .action-btn { width: 32px !important; height: 32px !important; font-size: 0.78rem; }
    
    /* Search row tweaks */
    .search-row { flex-wrap: wrap; }
    .search-row .form-input { flex: 1 1 100%; min-width: 0; }
    
    /* Stats grids */
    [style*="grid-template-columns:repeat(auto-fit,minmax(200px"] { grid-template-columns: 1fr 1fr !important; gap: 10px !important; }
    [style*="grid-template-columns:repeat(auto-fit,minmax(280px"] { grid-template-columns: 1fr !important; }
    .stat-card { padding: 14px !important; }
    .stat-value { font-size: 1.4rem !important; }
    
    /* Modal full width on mobile */
    .modal { max-width: 100% !important; max-height: 92vh !important; border-radius: 14px !important; margin: 0 !important; }
    .modal-overlay { padding: 8px !important; }
    .modal-body { padding: 16px !important; }
    .modal-header { padding: 14px 16px !important; }
    
    /* Pagination wraps */
    .pagination { gap: 4px !important; }
    .page-btn { padding: 6px 9px !important; font-size: 0.78rem !important; min-width: 32px !important; }
    
    /* Tabs scroll horizontally */
    .tabs, [data-tab-group] > .tabs { overflow-x: auto; flex-wrap: nowrap !important; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
    .tab { white-space: nowrap; flex-shrink: 0; }
    
    /* Welcome card vertical */
    .welcome-card { flex-direction: column; align-items: stretch; text-align: center; }
    
    /* Profile public page - song cards comfortable */
    .pp-song-row { gap: 10px !important; }
    .pp-song-thumb { width: 56px !important; height: 56px !important; }
    .pp-song-title { font-size: 0.98rem; }
    .pp-section-title { font-size: 1rem !important; }
}

@media (max-width: 480px) {
    .stat-value { font-size: 1.25rem !important; }
    [style*="grid-template-columns:repeat(auto-fit,minmax(200px"] { grid-template-columns: 1fr 1fr !important; }
    .card { padding: 14px !important; }
    .top-bar { padding: 10px 12px !important; }
    .btn-lg { padding: 12px 18px !important; font-size: 0.92rem !important; }
    .form-input, .form-textarea, .form-select { font-size: 16px !important; /* prevent iOS zoom on focus */ }
}

/* Touch targets minimum */
@media (hover: none) and (pointer: coarse) {
    .action-btn { min-width: 36px; min-height: 36px; }
    .btn { min-height: 42px; }
    .nav-item { padding: 12px !important; }
}

/* ========================================================================
   V3.4 — PAGE INTRO + DASHBOARD STYLES
   Reusable .page-intro card for new-artist guidance (works on any page).
   Dashboard-specific layout below.
   ======================================================================== */

/* === Page intro card (reusable on all pages) === */
.page-intro {
    background: linear-gradient(135deg, rgba(255,77,77,0.06) 0%, rgba(255,138,77,0.03) 100%);
    border: 1px solid rgba(255, 77, 77, 0.18);
    border-radius: 14px;
    padding: 14px 18px;
    margin-bottom: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}
.page-intro-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: rgba(255, 77, 77, 0.15);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.page-intro-body { flex: 1; min-width: 0; }
.page-intro-title {
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 4px;
    line-height: 1.2;
}
.page-intro-desc {
    color: var(--text-secondary);
    font-size: 0.86rem;
    margin: 0;
    line-height: 1.5;
}
.page-intro-desc strong { color: var(--text-primary); }

@media (max-width: 480px) {
    .page-intro { padding: 12px 14px; gap: 10px; }
    .page-intro-icon { width: 36px; height: 36px; font-size: 0.95rem; }
}

/* === Dashboard hero === */
.dash-hero {
    background: linear-gradient(135deg, rgba(255,77,77,0.08) 0%, rgba(255,138,77,0.04) 100%);
    border: 1px solid rgba(255, 77, 77, 0.18);
    border-radius: 18px;
    padding: 22px;
    margin-bottom: 16px;
    display: flex;
    gap: 16px;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.dash-hero::before {
    content: '';
    position: absolute;
    top: -40%;
    right: -10%;
    width: 250px; height: 250px;
    background: radial-gradient(circle, rgba(255,77,77,0.18), transparent 70%);
    pointer-events: none;
}
.dash-hero-photo {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #FF4D4D, #FF8A4D);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-family: 'Outfit', sans-serif;
    font-size: 2rem; font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(255, 77, 77, 0.3);
    position: relative; z-index: 1;
}
.dash-hero-photo img { width: 100%; height: 100%; object-fit: cover; }
.dash-hero-info { flex: 1; min-width: 0; position: relative; z-index: 1; }
.dash-greeting {
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 2px;
}
.dash-name {
    font-family: 'Outfit', sans-serif;
    font-size: clamp(1.3rem, 4vw, 1.7rem);
    font-weight: 700;
    line-height: 1.1;
    margin: 0 0 6px;
    letter-spacing: -0.01em;
}
.dash-url-row { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 0.82rem; }
.dash-url-row a { color: var(--accent); text-decoration: none; font-weight: 600; word-break: break-all; }
.dash-url-row .copy-btn {
    background: var(--bg-input); border: 1px solid var(--border);
    color: var(--text-secondary); padding: 4px 9px; border-radius: 6px;
    cursor: pointer; font-size: 0.74rem; font-weight: 600;
    display: inline-flex; align-items: center; gap: 4px;
    transition: all 0.15s; font-family: inherit;
}
.dash-url-row .copy-btn:hover { color: var(--accent); border-color: var(--accent); }

/* === Dashboard stats grid === */
.dash-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.dash-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 14px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
    position: relative;
    overflow: hidden;
}
.dash-stat:hover {
    transform: translateY(-2px);
    border-color: var(--accent);
    box-shadow: 0 6px 18px rgba(255, 77, 77, 0.1);
}
.dash-stat-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.dash-stat-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255, 77, 77, 0.1);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
}
.dash-stat-icon.green { background: rgba(34, 197, 94, 0.1); color: #22C55E; }
.dash-stat-icon.blue { background: rgba(59, 130, 246, 0.1); color: #3B82F6; }
.dash-stat-icon.purple { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; }
.dash-stat-icon.orange { background: rgba(251, 146, 60, 0.1); color: #FB923C; }
.dash-stat-icon.pink { background: rgba(236, 72, 153, 0.1); color: #EC4899; }
.dash-stat-icon.cyan { background: rgba(6, 182, 212, 0.1); color: #06B6D4; }
.dash-stat-icon.yellow { background: rgba(250, 204, 21, 0.1); color: #FACC15; }
.dash-stat-badge {
    background: var(--accent); color: #fff;
    padding: 2px 7px; border-radius: 999px;
    font-size: 0.66rem; font-weight: 700; line-height: 1.4;
}
.dash-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.6rem; font-weight: 700;
    line-height: 1; margin-bottom: 3px;
    letter-spacing: -0.02em;
}
.dash-stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 500; }

/* === Dashboard 2-column grid === */
.dash-grid {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
@media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }

.dash-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 14px;
}
.dash-card-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}
.dash-card-head h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem; font-weight: 700;
    display: flex; align-items: center; gap: 8px;
}
.dash-card-head h3 i { color: var(--accent); }
.dash-card-head .link-more { color: var(--accent); font-size: 0.82rem; font-weight: 600; text-decoration: none; }
.dash-card-head .link-more:hover { text-decoration: underline; }

/* === Bar chart === */
.chart-wrap { display: flex; align-items: flex-end; gap: 6px; height: 140px; padding-top: 8px; }
.chart-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--accent) 0%, rgba(255, 138, 77, 0.6) 100%);
    border-radius: 6px 6px 0 0;
    min-height: 4px;
    position: relative;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
}
.chart-bar:hover { opacity: 0.85; transform: scaleY(1.04); transform-origin: bottom; }
.chart-bar.empty { background: var(--bg-input); }
.chart-bar-tip {
    position: absolute;
    top: -28px;
    left: 50%; transform: translateX(-50%);
    background: var(--text-primary); color: var(--bg-primary);
    padding: 3px 8px; border-radius: 6px;
    font-size: 0.72rem; font-weight: 600;
    white-space: nowrap;
    opacity: 0; transition: opacity 0.15s;
    pointer-events: none;
}
.chart-bar:hover .chart-bar-tip { opacity: 1; }
.chart-labels { display: flex; gap: 6px; margin-top: 6px; }
.chart-labels > span { flex: 1; text-align: center; font-size: 0.7rem; color: var(--text-muted); font-weight: 500; }

.chart-summary { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 8px; }
.chart-summary-num { font-family: 'Outfit', sans-serif; font-size: 1.6rem; font-weight: 700; line-height: 1; }
.chart-trend { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; }
.chart-trend.up { background: rgba(34, 197, 94, 0.15); color: #22C55E; }
.chart-trend.down { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.chart-trend.flat { background: var(--bg-input); color: var(--text-muted); }

/* === Profile completion === */
.complete-bar { height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.complete-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #FF8A4D);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.complete-list { display: flex; flex-direction: column; gap: 6px; }
.complete-item {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 10px;
    border-radius: 9px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
    font-size: 0.88rem;
}
.complete-item:hover { background: var(--bg-input); }
.complete-item .check {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.72rem;
    flex-shrink: 0;
}
.complete-item.done .check { background: rgba(34, 197, 94, 0.2); color: #22C55E; }
.complete-item:not(.done) .check { background: var(--bg-input); border: 1.5px dashed var(--border); color: var(--text-muted); }
.complete-item.done .label { color: var(--text-muted); text-decoration: line-through; }
.complete-item .arrow { margin-left: auto; color: var(--text-muted); font-size: 0.78rem; }
.complete-item:not(.done):hover .arrow { color: var(--accent); transform: translateX(2px); transition: transform 0.15s; }

/* === Top song highlight card === */
.top-song-card {
    background: linear-gradient(135deg, rgba(255,77,77,0.08), rgba(255,138,77,0.03));
    border: 1px solid rgba(255, 77, 77, 0.2);
    border-radius: 14px;
    padding: 14px;
    display: flex; gap: 12px; align-items: center;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.2s;
}
.top-song-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.top-song-cover {
    width: 56px; height: 56px;
    border-radius: 10px;
    background: var(--bg-input);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
}
.top-song-cover img { width: 100%; height: 100%; object-fit: cover; }
.top-song-info { flex: 1; min-width: 0; }
.top-song-title { font-weight: 700; font-size: 0.95rem; margin-bottom: 3px; }
.top-song-stats { font-size: 0.78rem; color: var(--text-muted); }
.top-song-stats span { display: inline-flex; align-items: center; gap: 4px; margin-right: 10px; }

/* === Top stores breakdown === */
.store-row {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 9px;
}
.store-icon-d {
    width: 30px; height: 30px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff; font-size: 0.85rem;
    flex-shrink: 0;
}
.store-name-d { font-size: 0.85rem; font-weight: 600; flex: 0 0 100px; }
.store-bar-wrap { flex: 1; height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.store-bar-fill { height: 100%; border-radius: 3px; transition: width 0.5s; }
.store-count { font-size: 0.78rem; font-weight: 600; color: var(--text-muted); flex-shrink: 0; min-width: 36px; text-align: right; }

/* === Recent message item === */
.msg-item {
    display: flex; gap: 10px; align-items: flex-start;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
    margin-bottom: 4px;
}
.msg-item:hover { background: var(--bg-input); }
.msg-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--bg-input);
    display: flex; align-items: center; justify-content: center;
    overflow: hidden; flex-shrink: 0;
    font-weight: 700; color: var(--accent);
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.msg-body { flex: 1; min-width: 0; }
.msg-name { font-weight: 600; font-size: 0.86rem; margin-bottom: 2px; display: flex; justify-content: space-between; gap: 8px; }
.msg-name .time { font-size: 0.7rem; color: var(--text-muted); font-weight: 500; flex-shrink: 0; }
.msg-preview { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.msg-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-left: 6px; flex-shrink: 0; align-self: center; }

/* === Event item === */
.event-item {
    display: flex; gap: 10px; align-items: center;
    padding: 10px;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: background 0.15s;
    margin-bottom: 4px;
    border: 1px solid var(--border);
}
.event-item:hover { background: var(--bg-input); border-color: var(--accent); }
.event-date {
    width: 50px; flex-shrink: 0;
    text-align: center;
    background: rgba(255, 77, 77, 0.1);
    border-radius: 8px;
    padding: 6px;
    line-height: 1;
}
.event-date .day { font-family: 'Outfit', sans-serif; font-size: 1.2rem; font-weight: 700; color: var(--accent); display: block; }
.event-date .month { font-size: 0.66rem; font-weight: 700; color: var(--accent); text-transform: uppercase; letter-spacing: 0.5px; }
.event-info { flex: 1; min-width: 0; }
.event-title-d { font-weight: 600; font-size: 0.88rem; margin-bottom: 2px; }
.event-loc { font-size: 0.74rem; color: var(--text-muted); }

/* === QR share card === */
.qr-share-card { text-align: center; }
.qr-share-card img {
    width: 140px; height: 140px;
    background: #fff; padding: 6px;
    border-radius: 12px;
    margin: 0 auto 10px;
    display: block;
}
.qr-share-buttons { display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.qr-share-buttons .btn { flex: 1; min-width: 90px; }

/* === Quick actions list === */
.quick-actions { display: grid; gap: 6px; }
.quick-action {
    display: flex; align-items: center; gap: 10px;
    padding: 11px 12px;
    background: var(--bg-input);
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-primary);
    transition: all 0.15s;
    font-size: 0.88rem;
    font-weight: 500;
}
.quick-action:hover {
    background: var(--bg-card-hover);
    border-color: var(--accent);
    color: var(--accent);
    transform: translateX(3px);
}
.quick-action i:first-child { color: var(--accent); width: 20px; text-align: center; }
.quick-action .arrow { margin-left: auto; opacity: 0; transition: opacity 0.15s; }
.quick-action:hover .arrow { opacity: 1; }

/* === Mobile dashboard tweaks === */
@media (max-width: 600px) {
    .dash-hero { flex-direction: column; align-items: flex-start; padding: 18px; }
    .dash-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .dash-stat { padding: 12px; }
    .dash-stat-value { font-size: 1.35rem; }
    .chart-wrap { height: 110px; }
    .qr-share-card img { width: 120px; height: 120px; }
    .store-name-d { flex: 0 0 80px; font-size: 0.8rem; }
}

/* ========================================================================
   END V3.4 PAGE INTRO + DASHBOARD
   ======================================================================== */


/* ========================================================================
   V3.5 — PROFILE EDIT PAGE (bulletproof, mobile-first)
   ======================================================================== */

/* === Tooltip / help icon === */
.field-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px; height: 18px;
    border-radius: 50%;
    background: transparent;
    border: 0;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    margin-left: 4px;
    padding: 0;
    vertical-align: middle;
    transition: color 0.15s, transform 0.15s;
    font-family: inherit;
}
.field-help:hover { color: var(--accent); transform: scale(1.15); }
.field-help.active { color: var(--accent); }
.field-help i { pointer-events: none; }

/* CRITICAL: hidden by default. Inline style="display:none" added in PHP for cache safety. */
.field-tip {
    display: none;
    background: rgba(255, 77, 77, 0.05);
    border-left: 3px solid var(--accent);
    border-radius: 0 8px 8px 0;
    padding: 8px 12px;
    margin-top: 6px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    line-height: 1.5;
}
.field-tip.show { display: block !important; animation: fieldTipDown 0.18s ease; }
.field-tip strong { color: var(--text-primary); font-weight: 600; }
.field-tip code { background: var(--bg-input); padding: 1px 6px; border-radius: 4px; font-size: 0.78rem; }
@keyframes fieldTipDown {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* === Two-column top grid === */
.pe-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 14px;
    margin-bottom: 16px;
}
@media (max-width: 900px) { .pe-grid { grid-template-columns: 1fr; } }

/* === Card title with help === */
.pe-card-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 10px;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
}
.pe-card-title i { color: var(--accent); }

/* === Photos blocks === */
.pe-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
@media (max-width: 600px) { .pe-photos { grid-template-columns: 1fr; } }

.pe-photo-block {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
}
.pe-photo-block-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
    gap: 6px;
}
.pe-photo-label {
    font-size: 0.86rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 6px;
}
.pe-photo-label i { color: var(--accent); font-size: 0.85rem; }
.pe-photo-meta {
    font-size: 0.7rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

/* These have inline style fallback — CSS here is just for theme-safe colors */
.pe-photo-circle img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pe-photo-cover img { width: 100%; height: 100%; max-height: 110px; object-fit: cover; display: block; }

.pe-photo-actions {
    display: flex;
    gap: 6px;
}
.pe-photo-actions form { flex: 1; margin: 0; }

/* === Profile completion sidebar === */
.pe-completion-card {
    background: linear-gradient(135deg, rgba(255,77,77,0.05), rgba(255,138,77,0.02));
    border: 1px solid rgba(255, 77, 77, 0.15);
    border-radius: 14px;
    padding: 16px;
    position: sticky;
    top: 80px;
}
@media (max-width: 900px) { .pe-completion-card { position: static; } }

.pe-completion-head {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 12px;
}
.pe-completion-head h3 {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    display: flex;
    align-items: center;
    gap: 7px;
}
.pe-completion-head h3 i { color: var(--accent); }
.pe-completion-pct {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem; font-weight: 700;
    color: var(--accent);
}
.pe-completion-bar { height: 8px; background: var(--bg-input); border-radius: 4px; overflow: hidden; margin-bottom: 14px; }
.pe-completion-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #FF8A4D);
    border-radius: 4px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.pe-completion-list { display: flex; flex-direction: column; gap: 4px; }
.pe-completion-item {
    display: flex; align-items: center; gap: 9px;
    padding: 6px 4px;
    font-size: 0.84rem;
}
.pe-completion-item.done { color: var(--text-muted); }
.pe-completion-item.done .pe-check-mini { background: rgba(34,197,94,0.2); color: #22C55E; }
.pe-completion-item:not(.done) .pe-check-mini {
    background: var(--bg-input);
    border: 1.5px dashed var(--border);
    color: var(--text-muted);
}
.pe-check-mini {
    width: 18px; height: 18px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.6rem;
    flex-shrink: 0;
}

/* === Tabs === */
.pe-tabs-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 6px;
    margin-bottom: 14px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.pe-tabs-wrap::-webkit-scrollbar { display: none; }
.pe-tabs {
    display: flex;
    gap: 4px;
    min-width: max-content;
}
.pe-tab {
    background: transparent;
    border: 0;
    color: var(--text-secondary);
    padding: 9px 14px;
    border-radius: 9px;
    font-family: inherit;
    font-size: 0.86rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: all 0.15s;
    white-space: nowrap;
}
.pe-tab:hover:not(.active) { background: var(--bg-input); color: var(--text-primary); }
.pe-tab.active {
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.3);
}
.pe-tab .pe-tab-dot {
    width: 7px; height: 7px;
    border-radius: 50%;
    background: var(--text-muted);
    flex-shrink: 0;
}
.pe-tab.has-content .pe-tab-dot { background: #22C55E; }
.pe-tab.active .pe-tab-dot { background: #fff; }

/* === Section subhead === */
.pe-sub {
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    margin: 18px 0 10px;
    display: flex;
    align-items: center;
    gap: 7px;
    color: var(--text-primary);
}
.pe-sub i { color: var(--accent); }
.pe-sub:first-child { margin-top: 0; }

/* === Theme swatch grid === */
.pe-theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
}
.pe-theme-swatch {
    cursor: pointer;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px;
    text-align: center;
    transition: all 0.2s;
    background: var(--bg-card);
    position: relative;
    margin: 0;
}
.pe-theme-swatch:hover { transform: translateY(-2px); border-color: var(--text-muted); }
.pe-theme-swatch.selected {
    border-color: var(--accent);
    box-shadow: 0 4px 14px rgba(255, 77, 77, 0.2);
}
.pe-theme-swatch.selected::after {
    content: '✓';
    position: absolute;
    top: 6px; right: 6px;
    width: 22px; height: 22px;
    border-radius: 50%;
    background: var(--accent);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    display: flex; align-items: center; justify-content: center;
}
.pe-theme-preview {
    height: 50px;
    border-radius: 8px;
    margin-bottom: 8px;
    border: 1px solid var(--border);
}
.pe-theme-name { font-size: 0.78rem; font-weight: 600; color: var(--text-primary); }

/* === Accent color === */
.pe-accent-row {
    display: flex; gap: 10px; align-items: center;
    flex-wrap: wrap; margin-bottom: 12px;
}
.pe-accent-input-color {
    height: 44px; width: 64px;
    cursor: pointer;
    padding: 4px;
    flex-shrink: 0;
    border: 1.5px solid var(--border);
    border-radius: 10px;
    background: var(--bg-input);
}
.pe-accent-input-hex {
    flex: 1; min-width: 110px;
    font-family: 'Outfit', monospace;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.pe-accent-presets { display: flex; gap: 8px; flex-wrap: wrap; }
.pe-accent-preset {
    width: 32px; height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    padding: 0;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}
.pe-accent-preset:hover { transform: scale(1.12); }
.pe-accent-preset.selected {
    border-color: #fff;
    transform: scale(1.1);
    box-shadow: 0 0 0 2px var(--accent), 0 4px 12px rgba(0,0,0,0.25);
}

.pe-live-preview {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px dashed var(--border);
    background: var(--bg-input);
}
.pe-live-preview-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}
.pe-live-preview-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.pe-live-btn {
    background: var(--pe-accent-live, var(--accent));
    color: #fff;
    border: 0;
    padding: 8px 14px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.82rem;
    font-family: inherit;
    pointer-events: none;
}
.pe-live-link {
    color: var(--pe-accent-live, var(--accent));
    font-weight: 600;
    font-size: 0.86rem;
}

/* === Sticky save bar === */
.pe-save-bar {
    position: sticky;
    bottom: 8px;
    margin: 14px 0;
    padding: 12px 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 8px;
    z-index: 50;
    flex-wrap: wrap;
}
.pe-save-bar .pe-save-msg {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-right: auto;
    display: flex;
    align-items: center;
    gap: 6px;
}
@media (max-width: 600px) {
    .pe-save-bar { padding: 10px 12px; gap: 6px; }
    .pe-save-bar .pe-save-msg { display: none; }
    .pe-save-bar .btn { flex: 1; padding: 11px 14px; font-size: 0.85rem; }
}

/* === Tab content panels — ensure hidden by default === */
.tab-content { display: none; }
.tab-content.active { display: block; }

/* ========================================================================
   END V3.5 PROFILE EDIT
   ======================================================================== */

/* ========================================================================
   V3.6 — SONGS PAGE (modern, drag-reorder, mobile-first)
   ======================================================================== */

/* === Mini stat strip at top === */
.songs-stats-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
}
.songs-stat-mini {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}
.songs-stat-mini-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.songs-stat-mini-icon.red    { background: rgba(255, 77, 77, 0.12);  color: var(--accent); }
.songs-stat-mini-icon.green  { background: rgba(34, 197, 94, 0.12);  color: #22C55E; }
.songs-stat-mini-icon.blue   { background: rgba(59, 130, 246, 0.12); color: #3B82F6; }
.songs-stat-mini-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8B5CF6; }
.songs-stat-mini-body { line-height: 1.1; min-width: 0; }
.songs-stat-mini-value {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1.1rem;
}
.songs-stat-mini-label {
    color: var(--text-muted);
    font-size: 0.75rem;
    margin-top: 2px;
}

/* === Smart link feature callout (collapsible) === */
.smart-feature-card {
    background: linear-gradient(135deg, rgba(255,77,77,0.06), rgba(255,138,77,0.03));
    border: 1px solid rgba(255, 77, 77, 0.2);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.smart-feature-card .smart-feature-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(255, 77, 77, 0.15);
    color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}
.smart-feature-card .smart-feature-body {
    flex: 1; min-width: 200px; line-height: 1.35;
}
.smart-feature-card strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 2px;
}
.smart-feature-card .text-muted { font-size: 0.82rem; }

/* === Song row redesign === */
.song-list { list-style: none; padding: 0; margin: 0; }
.song-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.18s;
    position: relative;
}
.song-row:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.song-row.dragging { opacity: 0.5; }
.song-row.drag-over { border-color: var(--accent); border-style: dashed; transform: scale(1.01); }

/* Drag handle */
.song-drag {
    cursor: grab;
    color: var(--text-muted);
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    user-select: none;
    font-size: 0.95rem;
    transition: color 0.15s;
}
.song-drag:hover { color: var(--accent); }
.song-drag:active { cursor: grabbing; }

.song-thumb {
    width: 56px; height: 56px;
    border-radius: 10px;
    overflow: hidden;
    background: var(--bg-input);
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
}
.song-thumb img { width: 100%; height: 100%; object-fit: cover; }
.song-thumb i { color: var(--text-muted); font-size: 1.4rem; }

.song-body { flex: 1; min-width: 0; }
.song-row-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    margin-bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    word-break: break-word;
}
.song-row-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.song-row-meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Pills */
.pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border);
}
.pill.platform { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; border-color: rgba(139, 92, 246, 0.2); }
.pill.featured { background: linear-gradient(135deg, #FFD700, #FFA500); color: #fff; border: 0; }
.pill.smart {
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    transition: transform 0.15s, box-shadow 0.15s;
}
.pill.smart:hover { transform: scale(1.05); box-shadow: 0 3px 10px rgba(255, 77, 77, 0.3); }

/* Action buttons row */
.song-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.song-actions .action-btn {
    width: 34px; height: 34px;
}
.song-actions form { margin: 0; display: inline; }

/* Mobile: stack actions below */
@media (max-width: 700px) {
    .song-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .song-body { flex: 1 1 calc(100% - 90px); }
    .song-drag { order: -1; }
    .song-actions {
        flex: 1 1 100%;
        order: 10;
        justify-content: flex-start;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px dashed var(--border);
        gap: 6px;
    }
    .song-thumb { width: 50px; height: 50px; }
}

/* === Store row in modal (drag-reorder) === */
.store-row-built {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px;
    margin-bottom: 10px;
    display: flex;
    gap: 10px;
    align-items: flex-start;
    flex-wrap: wrap;
    transition: all 0.18s;
    position: relative;
}
.store-row-built.dragging { opacity: 0.4; }
.store-row-built.drag-over { border-color: var(--accent); border-style: dashed; transform: scale(1.01); }

.store-drag {
    cursor: grab;
    color: var(--text-muted);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
    user-select: none;
    font-size: 1rem;
    align-self: center;
    padding: 4px 0;
}
.store-drag:hover { color: var(--accent); }
.store-drag:active { cursor: grabbing; }

.store-row-icon {
    width: 42px; height: 42px;
    border-radius: 10px;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1.2rem;
}

.store-row-fields {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.store-row-fields .row-1 {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}
.store-row-fields .row-1 select { flex: 0 0 160px; min-width: 120px; }
.store-row-fields .row-1 input[type="text"] { flex: 1; min-width: 140px; }

@media (max-width: 500px) {
    .store-row-fields .row-1 select { flex: 1 1 100%; }
    .store-row-fields .row-1 input[type="text"] { flex: 1 1 100%; }
}

/* === Limit bar === */
.limit-bar-wrap {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
}
.limit-bar-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.82rem;
    margin-bottom: 8px;
}
.limit-bar-info strong { color: var(--text-primary); font-weight: 700; }
.limit-bar-track { height: 6px; background: var(--bg-input); border-radius: 3px; overflow: hidden; }
.limit-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #FF8A4D);
    border-radius: 3px;
    transition: width 0.5s;
}
.limit-bar-fill.warning { background: linear-gradient(90deg, #FB923C, #FACC15); }
.limit-bar-fill.danger { background: linear-gradient(90deg, #EF4444, #DC2626); }

/* === Card title row === */
.songs-page-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}
.songs-page-head h2 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1.15rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.songs-page-head h2 i { color: var(--accent); }
.songs-page-head h2 .count-pill {
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.74rem;
    padding: 2px 8px;
    border-radius: 999px;
    font-weight: 600;
}

/* ========================================================================
   END V3.6 SONGS PAGE
   ======================================================================== */

/* ========================================================================
   V3.7 — ACHIEVEMENTS PAGE
   ======================================================================== */

/* === Achievement card === */
.ach-list { list-style: none; padding: 0; margin: 0; }
.ach-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: all 0.18s;
    position: relative;
}
.ach-row:hover {
    border-color: var(--accent);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(0,0,0,0.08);
}
.ach-row.dragging { opacity: 0.5; }
.ach-row.drag-over { border-color: var(--accent); border-style: dashed; transform: scale(1.01); }

.ach-drag {
    cursor: grab;
    color: var(--text-muted);
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    user-select: none;
    font-size: 0.95rem;
    transition: color 0.15s;
}
.ach-drag:hover { color: var(--accent); }
.ach-drag:active { cursor: grabbing; }

.ach-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    flex-shrink: 0;
    background: linear-gradient(135deg, rgba(255,77,77,0.12), rgba(255,138,77,0.06));
    border: 1px solid rgba(255, 77, 77, 0.18);
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.ach-body { flex: 1; min-width: 0; }
.ach-title {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    margin-bottom: 4px;
    word-break: break-word;
}
.ach-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 4px;
}
.ach-date-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.74rem;
    font-weight: 600;
    padding: 3px 9px;
    border-radius: 999px;
    background: rgba(255, 77, 77, 0.1);
    color: var(--accent);
    border: 1px solid rgba(255, 77, 77, 0.2);
}
.ach-desc {
    font-size: 0.84rem;
    color: var(--text-muted);
    line-height: 1.4;
    word-break: break-word;
}

.ach-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.ach-actions .action-btn { width: 34px; height: 34px; }
.ach-actions form { margin: 0; display: inline; }

@media (max-width: 600px) {
    .ach-row { gap: 10px; padding: 12px; flex-wrap: wrap; }
    .ach-icon { width: 48px; height: 48px; font-size: 1.5rem; border-radius: 12px; }
    .ach-body { flex: 1 1 calc(100% - 80px); }
    .ach-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px dashed var(--border);
    }
}

/* === Emoji quick picker (modal) === */
.emoji-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
    padding: 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.emoji-pick-btn {
    background: var(--bg-card);
    border: 2px solid var(--border);
    border-radius: 10px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.15s;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}
.emoji-pick-btn:hover { border-color: var(--accent); transform: scale(1.1); }
.emoji-pick-btn.selected {
    border-color: var(--accent);
    background: rgba(255, 77, 77, 0.1);
    transform: scale(1.05);
}

/* === Stat mini (reusable from songs page) === */
/* .songs-stat-mini already defined in V3.6 — reuse */

/* ========================================================================
   END V3.7 ACHIEVEMENTS
   ======================================================================== */

/* ========================================================================
   V3.8 — EVENTS PAGE
   ======================================================================== */

/* === Tab pills (upcoming/past) === */
.event-tabs {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 14px;
}
.event-tab {
    padding: 7px 14px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.event-tab:hover:not(.active) { color: var(--text-primary); background: var(--bg-input); }
.event-tab.active {
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.25);
}
.event-tab .tab-count {
    background: rgba(255, 255, 255, 0.22);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.5;
}
.event-tab:not(.active) .tab-count { background: var(--bg-input); color: var(--text-muted); }

/* === Event card === */
.event-list { list-style: none; padding: 0; margin: 0; }
.event-card {
    display: flex;
    gap: 14px;
    padding: 14px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    margin-bottom: 10px;
    transition: all 0.18s;
    position: relative;
    overflow: hidden;
}
.event-card:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }

/* Big date block (calendar style) */
.event-date-block {
    width: 70px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    border-radius: 12px;
    padding: 8px 4px;
    text-align: center;
    line-height: 1.1;
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.25);
    overflow: hidden;
    position: relative;
    align-self: flex-start;
}
.event-date-block.past {
    opacity: 0.7;
    background: linear-gradient(135deg, #6b7280, #4b5563);
    box-shadow: none;
}
.event-date-block .e-month {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.92;
    position: relative;
    z-index: 1;
}
.event-date-block .e-day {
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    margin: 2px 0;
    position: relative;
    z-index: 1;
}
.event-date-block .e-time {
    font-size: 0.66rem;
    font-weight: 600;
    opacity: 0.88;
    margin-top: 3px;
    position: relative;
    z-index: 1;
}
.event-date-block .e-poster-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0.18;
    pointer-events: none;
}

.event-body { flex: 1; min-width: 0; }
.event-title-row {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    margin-bottom: 6px;
}
.event-title-text {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.25;
    word-break: break-word;
}
.event-meta-line {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin-bottom: 3px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.event-meta-line i {
    color: var(--accent);
    width: 12px;
    text-align: center;
    flex-shrink: 0;
    font-size: 0.78rem;
}
.event-desc {
    font-size: 0.82rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 6px;
    word-break: break-word;
}

.event-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    flex-shrink: 0;
    flex-wrap: wrap;
    align-self: flex-start;
}
.event-actions .action-btn { width: 34px; height: 34px; }
.event-actions form { margin: 0; display: inline; }

.pill.free {
    background: linear-gradient(135deg, #22C55E, #16A34A);
    color: #fff;
    border: 0;
}
.pill.event-type {
    background: rgba(139, 92, 246, 0.1);
    color: #8B5CF6;
    border-color: rgba(139, 92, 246, 0.22);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.pill.price {
    background: rgba(34, 197, 94, 0.08);
    color: #16A34A;
    border-color: rgba(34, 197, 94, 0.22);
}

.tickets-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    border: 0;
    padding: 7px 13px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 600;
    transition: transform 0.15s, box-shadow 0.15s;
}
.tickets-btn:hover { transform: translateY(-1px); box-shadow: 0 4px 12px rgba(255, 77, 77, 0.3); color: #fff; }

@media (max-width: 600px) {
    .event-card { gap: 10px; padding: 12px; flex-wrap: wrap; }
    .event-date-block { width: 56px; padding: 7px 3px; }
    .event-date-block .e-day { font-size: 1.4rem; }
    .event-body { flex: 1 1 calc(100% - 70px); min-width: 0; }
    .event-actions {
        flex: 1 1 100%;
        justify-content: flex-end;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px dashed var(--border);
    }
}

/* ========================================================================
   END V3.8 EVENTS
   ======================================================================== */

/* ========================================================================
   V3.9 — ANALYTICS PAGE
   ======================================================================== */

/* === Time range pills === */
.an-range {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 16px;
}
.an-range a {
    padding: 7px 14px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.85rem;
    transition: all 0.15s;
}
.an-range a:hover:not(.active) { color: var(--text-primary); background: var(--bg-input); }
.an-range a.active {
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.25);
}

/* === Big stat cards with trend === */
.an-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.an-stat {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 16px;
    transition: all 0.18s;
}
.an-stat:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: 0 6px 18px rgba(255, 77, 77, 0.08); }
.an-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}
.an-stat-icon {
    width: 40px; height: 40px;
    border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.05rem;
    flex-shrink: 0;
}
.an-stat-icon.red    { background: rgba(255, 77, 77, 0.12);  color: var(--accent); }
.an-stat-icon.green  { background: rgba(34, 197, 94, 0.12);  color: #22C55E; }
.an-stat-icon.blue   { background: rgba(59, 130, 246, 0.12); color: #3B82F6; }
.an-stat-icon.yellow { background: rgba(250, 204, 21, 0.12); color: #FACC15; }
.an-stat-icon.purple { background: rgba(139, 92, 246, 0.12); color: #8B5CF6; }
.an-stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 3px 8px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 700;
}
.an-stat-trend.up   { background: rgba(34, 197, 94, 0.15); color: #22C55E; }
.an-stat-trend.down { background: rgba(239, 68, 68, 0.15); color: #EF4444; }
.an-stat-trend.flat { background: var(--bg-input);         color: var(--text-muted); }
.an-stat-value {
    font-family: 'Outfit', sans-serif;
    font-size: 1.7rem;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
    margin-bottom: 4px;
}
.an-stat-label {
    font-size: 0.84rem;
    color: var(--text-muted);
    font-weight: 500;
}

/* === Daily views chart === */
.an-chart-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px;
    margin-bottom: 14px;
}
.an-chart-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
    flex-wrap: wrap;
    gap: 10px;
}
.an-chart-head h3 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 8px;
}
.an-chart-head h3 i { color: var(--accent); }

.an-chart-wrap {
    display: flex;
    align-items: flex-end;
    gap: 3px;
    height: 180px;
    padding-top: 8px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.an-chart-wrap::-webkit-scrollbar { height: 4px; }
.an-bar {
    flex: 1;
    min-width: 6px;
    background: linear-gradient(180deg, var(--accent) 0%, rgba(255, 138, 77, 0.5) 100%);
    border-radius: 4px 4px 0 0;
    min-height: 3px;
    position: relative;
    transition: opacity 0.2s, transform 0.2s;
    cursor: pointer;
}
.an-bar:hover { opacity: 0.85; transform: scaleY(1.04); transform-origin: bottom; }
.an-bar.empty { background: var(--bg-input); }
.an-bar-tip {
    position: absolute;
    top: -32px;
    left: 50%; transform: translateX(-50%);
    background: var(--text-primary); color: var(--bg-primary);
    padding: 4px 9px; border-radius: 6px;
    font-size: 0.72rem; font-weight: 600;
    white-space: nowrap;
    opacity: 0; transition: opacity 0.15s;
    pointer-events: none;
    z-index: 10;
}
.an-bar:hover .an-bar-tip { opacity: 1; }
.an-chart-axis {
    display: flex;
    gap: 3px;
    margin-top: 8px;
    color: var(--text-muted);
    font-size: 0.7rem;
    font-weight: 500;
}
.an-chart-axis > span {
    flex: 1;
    text-align: center;
    min-width: 6px;
}

/* === 2-column lower grid === */
.an-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 14px;
    margin-bottom: 14px;
}

/* === Generic ranked list (countries, songs, links, referrers) === */
.an-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.an-list-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}
.an-list-item:last-child { border-bottom: 0; }
.an-list-rank {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--bg-input);
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.an-list-item:nth-child(1) .an-list-rank { background: linear-gradient(135deg, #FFD700, #FFA500); color: #fff; }
.an-list-item:nth-child(2) .an-list-rank { background: linear-gradient(135deg, #C0C0C0, #A0A0A0); color: #fff; }
.an-list-item:nth-child(3) .an-list-rank { background: linear-gradient(135deg, #CD7F32, #B5651D); color: #fff; }

.an-list-icon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(255, 77, 77, 0.1);
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 1rem;
}
.an-list-icon img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.an-list-body { flex: 1; min-width: 0; }
.an-list-title {
    font-weight: 600;
    font-size: 0.88rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.an-list-bar {
    margin-top: 4px;
    height: 5px;
    background: var(--bg-input);
    border-radius: 3px;
    overflow: hidden;
}
.an-list-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--accent), #FF8A4D);
    border-radius: 3px;
    transition: width 0.5s;
}
.an-list-count {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 0.92rem;
    color: var(--text-primary);
    flex-shrink: 0;
    text-align: right;
    min-width: 50px;
}
.an-list-pct {
    font-size: 0.7rem;
    color: var(--text-muted);
    font-weight: 600;
}

/* === Devices grid === */
.an-devices {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}
.an-device {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px;
    text-align: center;
}
.an-device-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
}
.an-device-name {
    font-weight: 700;
    text-transform: capitalize;
    font-size: 0.88rem;
    margin-bottom: 4px;
}
.an-device-pct {
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    color: var(--accent);
    font-size: 1rem;
}
.an-device-count {
    font-size: 0.74rem;
    color: var(--text-muted);
}

/* === Hourly chart (24 small bars) === */
.an-hourly {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 80px;
    padding-top: 4px;
}
.an-hour-bar {
    flex: 1;
    background: linear-gradient(180deg, var(--accent), rgba(255, 138, 77, 0.5));
    border-radius: 3px 3px 0 0;
    min-height: 2px;
    position: relative;
    transition: opacity 0.15s;
    cursor: pointer;
}
.an-hour-bar.empty { background: var(--bg-input); }
.an-hour-bar:hover { opacity: 0.85; }
.an-hour-bar-tip {
    position: absolute;
    top: -28px;
    left: 50%; transform: translateX(-50%);
    background: var(--text-primary);
    color: var(--bg-primary);
    padding: 3px 7px;
    border-radius: 5px;
    font-size: 0.68rem;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    z-index: 10;
}
.an-hour-bar:hover .an-hour-bar-tip { opacity: 1; }
.an-hourly-axis {
    display: flex;
    margin-top: 6px;
    color: var(--text-muted);
    font-size: 0.66rem;
}
.an-hourly-axis > span { flex: 1; text-align: center; }
.an-peak-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: rgba(255, 77, 77, 0.1);
    color: var(--accent);
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 700;
}

/* === Empty state === */
.an-empty {
    text-align: center;
    padding: 30px 14px;
    color: var(--text-muted);
    font-size: 0.86rem;
}
.an-empty .icon {
    font-size: 2rem;
    margin-bottom: 6px;
    opacity: 0.5;
}

@media (max-width: 600px) {
    .an-stats { grid-template-columns: repeat(2, 1fr); gap: 8px; }
    .an-stat { padding: 13px; }
    .an-stat-value { font-size: 1.4rem; }
    .an-chart-wrap { height: 140px; }
}

/* ========================================================================
   END V3.9 ANALYTICS
   ======================================================================== */

/* ========================================================================
   V3.10 — VIDEOS PAGE
   ======================================================================== */

.video-list { list-style: none; padding: 0; margin: 0; }
.video-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.18s;
    position: relative;
}
.video-row:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.video-row.dragging { opacity: 0.5; }
.video-row.drag-over { border-color: var(--accent); border-style: dashed; transform: scale(1.01); }

.video-drag {
    cursor: grab;
    color: var(--text-muted);
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    user-select: none;
    font-size: 0.95rem;
    transition: color 0.15s;
}
.video-drag:hover { color: var(--accent); }
.video-drag:active { cursor: grabbing; }

.video-thumb {
    width: 110px;
    height: 64px;
    border-radius: 8px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a22, #2a2a32);
    flex-shrink: 0;
    position: relative;
    border: 1px solid var(--border);
}
.video-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.video-thumb-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.6);
    font-size: 1.6rem;
}
.video-thumb-play {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.4);
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.video-row:hover .video-thumb-play { opacity: 1; }
.video-thumb-play-icon {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: rgba(255, 77, 77, 0.95);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.4);
    padding-left: 2px;
}

.video-body { flex: 1; min-width: 0; }
.video-row-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    margin-bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    word-break: break-word;
}
.video-row-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}
.video-row-meta span { display: inline-flex; align-items: center; gap: 4px; }
.video-row-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 4px;
    word-break: break-word;
}

/* Platform-branded pills */
.pill.v-youtube   { background: rgba(255, 0, 0, 0.1);    color: #FF0000; border-color: rgba(255, 0, 0, 0.22); }
.pill.v-vimeo     { background: rgba(26, 183, 234, 0.1); color: #1AB7EA; border-color: rgba(26, 183, 234, 0.22); }
.pill.v-instagram { background: rgba(228, 64, 95, 0.1);  color: #E4405F; border-color: rgba(228, 64, 95, 0.22); }
.pill.v-tiktok    { background: rgba(0, 0, 0, 0.06);     color: var(--text-primary); border-color: var(--border); }
.pill.v-other     { background: rgba(139, 92, 246, 0.1); color: #8B5CF6; border-color: rgba(139, 92, 246, 0.22); }

.video-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.video-actions .action-btn { width: 34px; height: 34px; }
.video-actions form { margin: 0; display: inline; }

/* YouTube preview thumbnail in modal */
.yt-preview {
    margin-top: 10px;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    aspect-ratio: 16 / 9;
    max-width: 280px;
    background: var(--bg-input);
}
.yt-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.yt-preview-label {
    position: absolute;
    top: 6px;
    left: 6px;
    background: rgba(0,0,0,0.7);
    color: #fff;
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
}

@media (max-width: 700px) {
    .video-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .video-thumb { width: 90px; height: 54px; }
    .video-body { flex: 1 1 calc(100% - 130px); }
    .video-drag { order: -1; }
    .video-actions {
        flex: 1 1 100%;
        order: 10;
        justify-content: flex-start;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px dashed var(--border);
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .video-thumb { width: 80px; height: 48px; }
    .video-body { flex: 1 1 calc(100% - 115px); }
}

/* ========================================================================
   END V3.10 VIDEOS
   ======================================================================== */

/* ========================================================================
   V3.11 — LINKS PAGE
   ======================================================================== */

.link-list { list-style: none; padding: 0; margin: 0; }
.link-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 8px;
    transition: all 0.18s;
    position: relative;
}
.link-row:hover { border-color: var(--accent); transform: translateY(-1px); box-shadow: 0 4px 14px rgba(0,0,0,0.08); }
.link-row.dragging { opacity: 0.5; }
.link-row.drag-over { border-color: var(--accent); border-style: dashed; transform: scale(1.01); }

.link-drag {
    cursor: grab;
    color: var(--text-muted);
    width: 22px;
    text-align: center;
    flex-shrink: 0;
    user-select: none;
    font-size: 0.95rem;
    transition: color 0.15s;
}
.link-drag:hover { color: var(--accent); }
.link-drag:active { cursor: grabbing; }

/* Social: round colored icon. Custom: 56x56 thumb (image or icon). */
.link-thumb {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    overflow: hidden;
    background: var(--bg-input);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid var(--border);
    color: #fff;
    font-size: 1.2rem;
}
.link-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.link-thumb.social { border: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.12); }

.link-body { flex: 1; min-width: 0; }
.link-row-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.25;
    margin-bottom: 4px;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    word-break: break-word;
}
.link-row-url {
    font-size: 0.78rem;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
    max-width: 100%;
}
.link-row-meta {
    font-size: 0.78rem;
    color: var(--text-muted);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-top: 3px;
}
.link-row-meta span { display: inline-flex; align-items: center; gap: 4px; }
.link-row-desc {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
    margin-top: 4px;
    word-break: break-word;
}

/* Click count pill */
.click-pill {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(34, 197, 94, 0.1);
    color: #22C55E;
    border: 1px solid rgba(34, 197, 94, 0.22);
    font-size: 0.7rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
}

.link-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
}
.link-actions .action-btn { width: 34px; height: 34px; }
.link-actions form { margin: 0; display: inline; }

/* Mini info card under tabs */
.link-info-card {
    background: linear-gradient(135deg, rgba(59,130,246,0.06), rgba(59,130,246,0.02));
    border: 1px solid rgba(59, 130, 246, 0.18);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 14px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.link-info-card-icon {
    width: 36px; height: 36px;
    border-radius: 10px;
    background: rgba(59, 130, 246, 0.15);
    color: #3B82F6;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.link-info-card-body {
    flex: 1; min-width: 200px;
    line-height: 1.4;
    font-size: 0.84rem;
}
.link-info-card-body strong {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
    margin-bottom: 2px;
    color: var(--text-primary);
}

@media (max-width: 700px) {
    .link-row {
        flex-wrap: wrap;
        gap: 10px;
    }
    .link-body { flex: 1 1 calc(100% - 90px); min-width: 0; }
    .link-drag { order: -1; }
    .link-actions {
        flex: 1 1 100%;
        order: 10;
        justify-content: flex-start;
        padding-top: 8px;
        margin-top: 4px;
        border-top: 1px dashed var(--border);
        gap: 6px;
    }
    .link-thumb { width: 44px; height: 44px; font-size: 1.1rem; }
}

/* ========================================================================
   END V3.11 LINKS
   ======================================================================== */

/* ========================================================================
   V3.12 — MERCH PAGE
   ======================================================================== */

/* === Product card grid === */
.merch-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 14px;
}

.merch-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    overflow: hidden;
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    position: relative;
}
.merch-card:hover {
    border-color: var(--accent);
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}
.merch-card.dragging { opacity: 0.5; }
.merch-card.drag-over { border-color: var(--accent); border-style: dashed; transform: scale(1.02); }
.merch-card.sold-out { opacity: 0.85; }

/* Drag handle floats on card top-left */
.merch-drag {
    position: absolute;
    top: 8px; left: 8px;
    width: 30px; height: 30px;
    background: rgba(0,0,0,0.55);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 3;
    font-size: 0.85rem;
    opacity: 0;
    transition: opacity 0.18s;
    backdrop-filter: blur(4px);
}
.merch-card:hover .merch-drag { opacity: 1; }
.merch-drag:active { cursor: grabbing; }

/* Image area (square, 1:1) */
.merch-img-wrap {
    aspect-ratio: 1 / 1;
    background: linear-gradient(135deg, #1a1a22, #2a2a32);
    position: relative;
    overflow: hidden;
}
.merch-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.merch-card:hover .merch-img-wrap img { transform: scale(1.05); }
.merch-img-fallback {
    width: 100%; height: 100%;
    display: flex; align-items: center; justify-content: center;
    color: rgba(255,255,255,0.4);
    font-size: 3rem;
}

/* Sold out overlay */
.merch-soldout-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.merch-soldout-badge {
    background: #EF4444;
    color: #fff;
    padding: 7px 18px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    transform: rotate(-6deg);
    box-shadow: 0 4px 14px rgba(0,0,0,0.4);
    border: 2px solid rgba(255,255,255,0.3);
}

/* Price tag (top-right corner of image) */
.merch-price-tag {
    position: absolute;
    top: 10px; right: 10px;
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    padding: 6px 12px;
    border-radius: 999px;
    font-weight: 800;
    font-size: 0.82rem;
    box-shadow: 0 4px 12px rgba(255, 77, 77, 0.4);
    z-index: 1;
    font-family: 'Outfit', sans-serif;
    letter-spacing: -0.01em;
}
.merch-price-tag.muted {
    background: rgba(0,0,0,0.55);
    backdrop-filter: blur(4px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

/* Body */
.merch-body {
    padding: 12px 14px 14px;
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.merch-title {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.3;
    word-break: break-word;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.merch-desc {
    font-size: 0.78rem;
    color: var(--text-muted);
    line-height: 1.4;
    flex: 1;
    /* Clamp to 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Action row */
.merch-actions {
    display: flex;
    gap: 6px;
    margin-top: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.merch-actions .merch-buy {
    flex: 1;
    background: var(--text-primary);
    color: var(--bg-primary);
    border: 0;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 0.82rem;
    font-weight: 700;
    text-align: center;
    transition: transform 0.15s, box-shadow 0.15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-width: 0;
}
.merch-actions .merch-buy:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    color: var(--bg-primary);
}
.merch-actions .merch-buy.disabled {
    background: var(--bg-input);
    color: var(--text-muted);
    cursor: not-allowed;
    pointer-events: none;
}
.merch-actions .action-btn {
    width: 32px; height: 32px;
    flex-shrink: 0;
}
.merch-actions form { margin: 0; display: inline-flex; }

@media (max-width: 600px) {
    .merch-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .merch-body { padding: 10px 12px 12px; }
    .merch-title { font-size: 0.88rem; }
    .merch-desc { font-size: 0.74rem; }
    .merch-price-tag { font-size: 0.76rem; padding: 5px 10px; top: 8px; right: 8px; }
    .merch-drag { opacity: 1; }  /* always visible on mobile */
}

@media (max-width: 380px) {
    .merch-grid { grid-template-columns: 1fr; }
}

/* ========================================================================
   END V3.12 MERCH
   ======================================================================== */

/* ========================================================================
   V3.13 — GALLERY PAGE
   ======================================================================== */

/* === Category filter pills === */
.gal-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 14px;
}
.gal-filter a {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 6px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 999px;
    text-decoration: none;
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    transition: all 0.15s;
    white-space: nowrap;
}
.gal-filter a:hover:not(.active) { color: var(--text-primary); border-color: var(--accent); }
.gal-filter a.active {
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.25);
}
.gal-filter a .gal-cnt {
    background: rgba(255,255,255,0.2);
    padding: 1px 6px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
}
.gal-filter a:not(.active) .gal-cnt { background: var(--bg-input); color: var(--text-muted); }

/* === Photo grid === */
.gal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 8px;
}
.gal-item {
    position: relative;
    aspect-ratio: 1;
    border-radius: 12px;
    overflow: hidden;
    background: linear-gradient(135deg, #1a1a22, #2a2a32);
    cursor: pointer;
    transition: all 0.18s;
    border: 1px solid var(--border);
}
.gal-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.18);
    border-color: var(--accent);
}
.gal-item.dragging { opacity: 0.5; }
.gal-item.drag-over { border-color: var(--accent); border-style: dashed; transform: scale(1.02); }

.gal-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s;
}
.gal-item:hover img { transform: scale(1.06); }

/* Drag handle (top-left) */
.gal-drag {
    position: absolute;
    top: 8px; left: 8px;
    width: 28px; height: 28px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 3;
    font-size: 0.78rem;
    opacity: 0;
    transition: opacity 0.18s;
}
.gal-item:hover .gal-drag { opacity: 1; }
.gal-drag:active { cursor: grabbing; }

/* Category tag (top-right) */
.gal-cat-tag {
    position: absolute;
    top: 8px; right: 8px;
    background: rgba(0,0,0,0.6);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    padding: 3px 9px;
    border-radius: 999px;
    font-size: 0.66rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    z-index: 2;
    pointer-events: none;
}

/* Caption + actions overlay (bottom) */
.gal-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 30px 10px 10px;
    background: linear-gradient(to top, rgba(0,0,0,0.92) 0%, rgba(0,0,0,0.5) 60%, transparent 100%);
    color: #fff;
    opacity: 0;
    transition: opacity 0.2s;
    pointer-events: none;
}
.gal-item:hover .gal-overlay { opacity: 1; pointer-events: auto; }

.gal-caption {
    font-size: 0.78rem;
    font-weight: 500;
    margin-bottom: 6px;
    line-height: 1.3;
    /* Clamp 2 lines */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.gal-actions {
    display: flex;
    gap: 4px;
    justify-content: flex-end;
}
.gal-actions .action-btn {
    width: 32px; height: 32px;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    border-color: rgba(255,255,255,0.2);
    color: #fff;
}
.gal-actions .action-btn:hover {
    background: var(--accent);
    border-color: var(--accent);
}
.gal-actions form { margin: 0; display: inline; }

/* Mobile: always-visible overlay */
@media (max-width: 700px) {
    .gal-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 6px; }
    .gal-overlay { opacity: 1; pointer-events: auto; }
    .gal-drag { opacity: 1; width: 26px; height: 26px; font-size: 0.74rem; }
    .gal-actions .action-btn { width: 28px; height: 28px; font-size: 0.72rem; }
    .gal-cat-tag { font-size: 0.62rem; padding: 2px 7px; top: 6px; right: 6px; }
}

@media (max-width: 480px) {
    .gal-grid { grid-template-columns: repeat(2, 1fr); }
}

/* === Multi-upload drop zone === */
.gal-dropzone {
    border: 2px dashed var(--border);
    border-radius: 14px;
    padding: 30px 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.18s;
    background: var(--bg-input);
}
.gal-dropzone:hover, .gal-dropzone.dz-active {
    border-color: var(--accent);
    background: rgba(255, 77, 77, 0.04);
}
.gal-dropzone-icon {
    width: 56px; height: 56px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(255,77,77,0.12), rgba(255,138,77,0.06));
    color: var(--accent);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    margin: 0 auto 10px;
}
.gal-dropzone-title {
    font-weight: 700;
    margin-bottom: 4px;
    font-family: 'Outfit', sans-serif;
}
.gal-dropzone-sub {
    color: var(--text-muted);
    font-size: 0.82rem;
}
.gal-dropzone input[type="file"] { display: none; }

.gal-file-list {
    margin-top: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.gal-file-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 0.82rem;
}
.gal-file-item .name {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.gal-file-item .size { color: var(--text-muted); font-size: 0.74rem; }
.gal-file-item .status {
    width: 22px; height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    flex-shrink: 0;
}
.gal-file-item .status.pending { background: var(--bg-input); color: var(--text-muted); }
.gal-file-item .status.uploading { background: rgba(59, 130, 246, 0.15); color: #3B82F6; }
.gal-file-item .status.done { background: rgba(34, 197, 94, 0.15); color: #22C55E; }
.gal-file-item .status.error { background: rgba(239, 68, 68, 0.15); color: #EF4444; }

/* === Lightbox === */
.gal-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.92);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    cursor: zoom-out;
}
.gal-lightbox.open { display: flex; }
.gal-lightbox img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: 8px;
    cursor: default;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.gal-lightbox-close {
    position: absolute;
    top: 16px; right: 16px;
    width: 44px; height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    font-size: 1.3rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}
.gal-lightbox-close:hover { background: rgba(255,255,255,0.2); }
.gal-lightbox-caption {
    position: absolute;
    bottom: 20px; left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(10px);
    color: #fff;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.86rem;
    max-width: 80%;
    text-align: center;
}

/* ========================================================================
   END V3.13 GALLERY
   ======================================================================== */

/* ========================================================================
   V3.14 — TESTIMONIALS PAGE
   ======================================================================== */

/* === Testimonial card grid === */
.tst-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.tst-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 18px 14px;
    transition: all 0.2s;
    overflow: hidden;
}
.tst-card:hover {
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.08);
}
.tst-card.dragging { opacity: 0.5; }
.tst-card.drag-over { border-color: var(--accent); border-style: dashed; transform: scale(1.01); }

/* Big quote mark in background */
.tst-quote-mark {
    position: absolute;
    top: -10px;
    right: 12px;
    font-family: 'Outfit', serif;
    font-size: 6rem;
    font-weight: 900;
    color: var(--accent);
    opacity: 0.08;
    line-height: 1;
    pointer-events: none;
    user-select: none;
    z-index: 0;
}

.tst-drag {
    position: absolute;
    top: 12px; left: 12px;
    width: 28px; height: 28px;
    background: var(--bg-input);
    color: var(--text-muted);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    z-index: 3;
    font-size: 0.78rem;
    opacity: 0;
    transition: opacity 0.18s, background 0.15s, color 0.15s;
}
.tst-card:hover .tst-drag { opacity: 1; }
.tst-drag:hover { background: var(--accent); color: #fff; }
.tst-drag:active { cursor: grabbing; }

/* Stars row */
.tst-stars {
    display: flex;
    gap: 2px;
    margin-bottom: 10px;
    color: #FACC15;
    font-size: 0.95rem;
    position: relative;
    z-index: 1;
    margin-left: 38px;
}
.tst-stars .empty { color: var(--border); }

/* Quote text */
.tst-content {
    font-size: 0.92rem;
    line-height: 1.55;
    color: var(--text-primary);
    margin-bottom: 14px;
    font-style: italic;
    position: relative;
    z-index: 1;
    /* clamp 5 lines */
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Author footer */
.tst-author {
    display: flex;
    align-items: center;
    gap: 10px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
    position: relative;
    z-index: 1;
}
.tst-avatar {
    width: 40px; height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    font-family: 'Outfit', sans-serif;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.25);
}
.tst-author-info {
    flex: 1;
    min-width: 0;
}
.tst-author-name {
    font-weight: 700;
    font-size: 0.9rem;
    line-height: 1.2;
    margin-bottom: 2px;
    word-break: break-word;
}
.tst-author-role {
    font-size: 0.76rem;
    color: var(--text-muted);
    word-break: break-word;
    /* clamp 1 line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tst-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.tst-actions .action-btn { width: 32px; height: 32px; }
.tst-actions form { margin: 0; display: inline; }

/* Avatar color variants — alternate per index for visual variety */
.tst-card:nth-child(4n+1) .tst-avatar { background: linear-gradient(135deg, var(--accent), #FF8A4D); }
.tst-card:nth-child(4n+2) .tst-avatar { background: linear-gradient(135deg, #3B82F6, #60A5FA); }
.tst-card:nth-child(4n+3) .tst-avatar { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.tst-card:nth-child(4n+4) .tst-avatar { background: linear-gradient(135deg, #22C55E, #4ADE80); }

/* Mobile */
@media (max-width: 600px) {
    .tst-grid { grid-template-columns: 1fr; gap: 10px; }
    .tst-card { padding: 14px 14px 12px; }
    .tst-quote-mark { font-size: 4.5rem; right: 8px; }
    .tst-drag { opacity: 1; width: 26px; height: 26px; }
    .tst-stars { margin-left: 36px; font-size: 0.86rem; }
    .tst-content { font-size: 0.86rem; -webkit-line-clamp: 4; }
}

/* === Star rating picker (in modal) === */
.star-picker {
    display: flex;
    gap: 4px;
    align-items: center;
    margin-top: 4px;
}
.star-picker .star-btn {
    background: transparent;
    border: 0;
    cursor: pointer;
    padding: 6px;
    font-size: 1.5rem;
    color: var(--border);
    transition: transform 0.12s, color 0.12s;
    line-height: 1;
}
.star-picker .star-btn:hover { transform: scale(1.18); }
.star-picker .star-btn.active,
.star-picker .star-btn.hover-active { color: #FACC15; }
.star-picker-label {
    margin-left: 8px;
    font-weight: 700;
    color: #FACC15;
    font-family: 'Outfit', sans-serif;
    font-size: 0.95rem;
}

/* ========================================================================
   END V3.14 TESTIMONIALS
   ======================================================================== */

/* ========================================================================
   V3.15 — MESSAGES PAGE
   ======================================================================== */

/* === Filter pills (reuses .event-tabs + adds variant) === */
.msg-filters {
    display: inline-flex;
    gap: 4px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    margin-bottom: 14px;
    flex-wrap: wrap;
    max-width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.msg-filters::-webkit-scrollbar { display: none; }
.msg-filter {
    padding: 7px 12px;
    border-radius: 7px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.84rem;
    transition: all 0.15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
}
.msg-filter:hover:not(.active) { color: var(--text-primary); background: var(--bg-input); }
.msg-filter.active {
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.25);
}
.msg-filter .filter-count {
    background: rgba(255, 255, 255, 0.22);
    padding: 1px 7px;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    min-width: 18px;
    text-align: center;
}
.msg-filter:not(.active) .filter-count { background: var(--bg-input); color: var(--text-muted); }
.msg-filter .filter-count.urgent { background: var(--accent); color: #fff; }
.msg-filter.active .filter-count.urgent { background: rgba(255,255,255,0.35); }

/* === Message threads list === */
.msg-list {
    list-style: none;
    padding: 0;
    margin: 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border);
}
.msg-thread {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    transition: all 0.15s;
    position: relative;
    cursor: pointer;
}
.msg-thread:last-child { border-bottom: 0; }
.msg-thread:hover { background: var(--bg-input); }
.msg-thread.unread { background: rgba(255, 77, 77, 0.045); }
.msg-thread.unread:hover { background: rgba(255, 77, 77, 0.08); }

/* Unread accent bar (left) */
.msg-thread.unread::before {
    content: '';
    position: absolute;
    left: 0; top: 12px; bottom: 12px;
    width: 3px;
    background: linear-gradient(180deg, var(--accent), #FF8A4D);
    border-radius: 0 3px 3px 0;
}

/* Avatar */
.msg-avatar {
    width: 48px; height: 48px;
    border-radius: 50%;
    overflow: hidden;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #fff;
    font-size: 1.1rem;
    font-family: 'Outfit', sans-serif;
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    position: relative;
    border: 2px solid var(--bg-card);
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.msg-avatar img { width: 100%; height: 100%; object-fit: cover; }

/* Avatar variety */
.msg-thread:nth-child(5n+1) .msg-avatar:not(.has-img) { background: linear-gradient(135deg, var(--accent), #FF8A4D); }
.msg-thread:nth-child(5n+2) .msg-avatar:not(.has-img) { background: linear-gradient(135deg, #3B82F6, #60A5FA); }
.msg-thread:nth-child(5n+3) .msg-avatar:not(.has-img) { background: linear-gradient(135deg, #8B5CF6, #A78BFA); }
.msg-thread:nth-child(5n+4) .msg-avatar:not(.has-img) { background: linear-gradient(135deg, #22C55E, #4ADE80); }
.msg-thread:nth-child(5n+5) .msg-avatar:not(.has-img) { background: linear-gradient(135deg, #EAB308, #FCD34D); }

.msg-avatar-online {
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 12px; height: 12px;
    background: #22C55E;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

/* Body */
.msg-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}
.msg-row-1 {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.msg-name {
    font-weight: 700;
    font-size: 0.95rem;
    line-height: 1.2;
    word-break: break-word;
}
.msg-thread.unread .msg-name { color: var(--text-primary); }

/* Pills */
.msg-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    font-size: 0.66rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    line-height: 1.4;
}
.msg-pill.artist {
    background: linear-gradient(135deg, #1DB954, #1ED760);
    color: #fff;
}
.msg-pill.sent {
    background: var(--bg-input);
    color: var(--text-muted);
    border: 1px solid var(--border);
}

.msg-time {
    font-size: 0.74rem;
    color: var(--text-muted);
    margin-left: auto;
    flex-shrink: 0;
    white-space: nowrap;
}
.msg-thread.unread .msg-time { color: var(--accent); font-weight: 700; }

.msg-row-2 {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
}
.msg-snippet {
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.35;
    flex: 1;
    min-width: 0;
    /* clamp 1 line */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.msg-thread.unread .msg-snippet { color: var(--text-primary); font-weight: 500; }
.msg-snippet strong { color: var(--text-primary); font-weight: 700; }

.msg-row-3 {
    font-size: 0.72rem;
    color: var(--text-faint);
    margin-top: 2px;
}

/* Star + unread indicator wrapper */
.msg-indicators {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
}
.msg-star-on { color: #FACC15; font-size: 0.95rem; }
.msg-unread-dot {
    width: 10px; height: 10px;
    background: var(--accent);
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 77, 77, 0.18);
}

/* Actions (visible on hover, always visible on mobile) */
.msg-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.15s;
}
.msg-thread:hover .msg-actions { opacity: 1; }
.msg-actions .action-btn { width: 32px; height: 32px; }
.msg-actions form { margin: 0; display: inline; }

@media (max-width: 700px) {
    .msg-thread { gap: 10px; padding: 12px; flex-wrap: wrap; }
    .msg-actions { opacity: 1; flex: 1 1 100%; justify-content: flex-end; padding-top: 8px; margin-top: 4px; border-top: 1px dashed var(--border); }
    .msg-avatar { width: 42px; height: 42px; font-size: 1rem; }
    .msg-body { flex: 1 1 calc(100% - 100px); }
    .msg-time { font-size: 0.7rem; }
}

/* === Stats strip variant for messages === */
.msg-stat-mini-icon.indigo { background: rgba(99, 102, 241, 0.12); color: #6366F1; }

/* ========================================================================
   END V3.15 MESSAGES
   ======================================================================== */

/* ========================================================================
   V3.16 — CHAT PAGE (WhatsApp-style bubbles)
   ======================================================================== */

/* === Chat container === */
.chat-wrap {
    display: flex;
    flex-direction: column;
    height: calc(100vh - 130px);
    min-height: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
}

/* Background pattern (subtle dot grid) */
.chat-bg-pattern {
    position: absolute;
    inset: 0;
    background-image: radial-gradient(circle, var(--border) 1px, transparent 1px);
    background-size: 20px 20px;
    opacity: 0.4;
    pointer-events: none;
    z-index: 0;
}

/* === Chat header (sticky top) === */
.chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}
.chat-back-btn {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: var(--bg-input);
    border: 1px solid var(--border);
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.15s;
    flex-shrink: 0;
}
.chat-back-btn:hover { background: var(--accent); color: #fff; border-color: transparent; }

.chat-head-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    overflow: hidden;
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    flex-shrink: 0;
    position: relative;
    border: 2px solid var(--bg-card);
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}
.chat-head-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-head-avatar .chat-online-dot {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 11px; height: 11px;
    background: #22C55E;
    border-radius: 50%;
    border: 2px solid var(--bg-card);
}

.chat-head-info { flex: 1; min-width: 0; }
.chat-head-name {
    font-weight: 700;
    font-size: 1rem;
    line-height: 1.2;
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}
.chat-head-meta {
    font-size: 0.74rem;
    color: var(--text-muted);
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.chat-head-meta a { color: var(--accent); text-decoration: none; font-weight: 600; }
.chat-head-meta a:hover { text-decoration: underline; }

.chat-head-actions {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}
.chat-head-actions .action-btn {
    width: 36px; height: 36px;
    background: transparent;
    border: 0;
}
.chat-head-actions .action-btn:hover { background: var(--bg-input); }

/* === Subject banner === */
.chat-subject-banner {
    background: linear-gradient(135deg, rgba(255, 77, 77, 0.06), transparent);
    border-bottom: 1px solid var(--border);
    padding: 8px 16px;
    font-size: 0.82rem;
    color: var(--text-secondary);
    text-align: center;
    position: relative;
    z-index: 1;
    flex-shrink: 0;
}
.chat-subject-banner strong { color: var(--text-primary); font-weight: 700; }

/* === Messages area === */
.chat-msgs {
    flex: 1;
    overflow-y: auto;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    z-index: 1;
    -webkit-overflow-scrolling: touch;
}
.chat-msgs::-webkit-scrollbar { width: 6px; }
.chat-msgs::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
.chat-msgs::-webkit-scrollbar-thumb:hover { background: var(--text-muted); }

/* Day separator */
.chat-day {
    text-align: center;
    margin: 14px 0 8px;
    position: relative;
}
.chat-day::before, .chat-day::after {
    content: '';
    position: absolute;
    top: 50%;
    width: 25%;
    height: 1px;
    background: var(--border);
}
.chat-day::before { left: 0; }
.chat-day::after { right: 0; }
.chat-day span {
    background: var(--bg-card);
    color: var(--text-muted);
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border: 1px solid var(--border);
    display: inline-block;
}

/* === Bubbles === */
.chat-bubble-row {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    margin-bottom: 2px;
}
.chat-bubble-row.from-me { justify-content: flex-end; }
.chat-bubble-row.from-them { justify-content: flex-start; }

/* Avatar (only on first message of a group from them) */
.chat-msg-avatar {
    width: 28px; height: 28px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.72rem;
    flex-shrink: 0;
    overflow: hidden;
    align-self: flex-end;
    margin-bottom: 2px;
}
.chat-msg-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-msg-avatar.spacer { background: transparent; visibility: hidden; }

.chat-bubble {
    max-width: 75%;
    padding: 9px 14px 7px;
    border-radius: 18px;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    line-height: 1.45;
    font-size: 0.92rem;
    position: relative;
    animation: bubbleIn 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes bubbleIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Their bubble (left, gray) */
.from-them .chat-bubble {
    background: var(--bg-input);
    color: var(--text-primary);
    border: 1px solid var(--border);
    border-bottom-left-radius: 4px;
}

/* My bubble (right, accent) */
.from-me .chat-bubble {
    background: linear-gradient(135deg, var(--accent), #FF6B6B);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.18);
}

/* Subsequent messages in same group: tighter corners */
.chat-bubble-row.grouped.from-them .chat-bubble { border-top-left-radius: 8px; border-bottom-left-radius: 8px; }
.chat-bubble-row.grouped.from-me .chat-bubble { border-top-right-radius: 8px; border-bottom-right-radius: 8px; }

/* Sender name (above first bubble of a group from them) */
.chat-bubble-name {
    font-size: 0.7rem;
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 4px;
    padding-left: 2px;
}

.chat-bubble-text { white-space: pre-wrap; }
.chat-bubble-time {
    font-size: 0.66rem;
    opacity: 0.7;
    margin-top: 4px;
    display: block;
    text-align: right;
    user-select: none;
}
.from-them .chat-bubble-time { color: var(--text-muted); opacity: 1; }

/* Empty state */
.chat-empty {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}
.chat-empty .icon { font-size: 3rem; margin-bottom: 10px; opacity: 0.5; }

/* === Input area === */
.chat-input-row {
    display: flex;
    gap: 8px;
    padding: 12px 16px;
    background: var(--bg-card);
    border-top: 1px solid var(--border);
    align-items: flex-end;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}
.chat-input-row textarea {
    flex: 1;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 10px 16px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.92rem;
    resize: none;
    outline: none;
    line-height: 1.4;
    max-height: 120px;
    transition: border-color 0.15s;
}
.chat-input-row textarea:focus {
    border-color: var(--accent);
    background: var(--bg-card);
}
.chat-input-row textarea::placeholder { color: var(--text-muted); }

.chat-send-btn {
    width: 42px; height: 42px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.95rem;
    transition: transform 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 8px rgba(255, 77, 77, 0.3);
}
.chat-send-btn:hover:not(:disabled) {
    transform: scale(1.06);
    box-shadow: 0 4px 14px rgba(255, 77, 77, 0.4);
}
.chat-send-btn:active { transform: scale(0.95); }
.chat-send-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}
.chat-send-btn.sending i { animation: spin 0.6s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.chat-char-count {
    position: absolute;
    bottom: -16px;
    right: 60px;
    font-size: 0.66rem;
    color: var(--text-muted);
    pointer-events: none;
    transition: color 0.15s;
}
.chat-char-count.near-limit { color: #F59E0B; }
.chat-char-count.over { color: #EF4444; font-weight: 700; }

/* Mobile */
@media (max-width: 700px) {
    .chat-wrap { height: calc(100vh - 100px); border-radius: 0; border-left: 0; border-right: 0; margin: -16px -16px 0; }
    .chat-head { padding: 10px 12px; gap: 8px; }
    .chat-head-avatar { width: 38px; height: 38px; font-size: 0.95rem; }
    .chat-head-name { font-size: 0.92rem; }
    .chat-msgs { padding: 12px; }
    .chat-bubble { max-width: 85%; font-size: 0.88rem; }
    .chat-input-row { padding: 10px 12px; }
    .chat-input-row textarea { font-size: 0.88rem; padding: 8px 14px; }
    .chat-send-btn { width: 38px; height: 38px; font-size: 0.85rem; }
}

/* ========================================================================
   END V3.16 CHAT
   ======================================================================== */

/* ========================================================================
   V3.9.1 — ANALYTICS: Custom Date Range
   ======================================================================== */
.an-range-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    margin-bottom: 16px;
    padding: 10px 12px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
}
.an-range-pills {
    display: inline-flex;
    gap: 4px;
    padding: 3px;
    background: var(--bg-input);
    border-radius: 8px;
    flex-wrap: wrap;
}
.an-range-pills a {
    padding: 7px 14px;
    border-radius: 6px;
    text-decoration: none;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.84rem;
    transition: all 0.15s;
    white-space: nowrap;
}
.an-range-pills a:hover:not(.active) { color: var(--text-primary); background: var(--bg-card); }
.an-range-pills a.active {
    background: linear-gradient(135deg, var(--accent), #FF8A4D);
    color: #fff;
    box-shadow: 0 2px 6px rgba(255,77,77,0.25);
}

.an-range-divider {
    width: 1px;
    height: 26px;
    background: var(--border);
    margin: 0 4px;
}
@media (max-width: 700px) { .an-range-divider { display: none; } }

.an-range-custom {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    flex: 1;
    min-width: 280px;
}
.an-range-custom label {
    font-size: 0.78rem;
    color: var(--text-muted);
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
}
.an-range-custom label i { color: var(--accent); }
.an-range-custom input[type="date"] {
    padding: 7px 10px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 7px;
    color: var(--text-primary);
    font-size: 0.84rem;
    font-family: inherit;
    color-scheme: dark;
    transition: border-color 0.15s;
    min-width: 0;
    flex: 1 1 130px;
}
body.ui-light .an-range-custom input[type="date"] { color-scheme: light; }
.an-range-custom input[type="date"]:focus {
    outline: none;
    border-color: var(--accent);
}
.an-range-custom input[type="date"].active {
    border-color: var(--accent);
    background: rgba(255,77,77,0.05);
}
.an-range-custom .dash { color: var(--text-muted); font-size: 0.86rem; padding: 0 2px; }
.an-range-custom button {
    padding: 7px 14px;
    background: var(--accent);
    color: #fff;
    border: 0;
    border-radius: 7px;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    font-family: inherit;
    transition: opacity 0.15s;
    white-space: nowrap;
}
.an-range-custom button:hover { opacity: 0.9; }
.an-range-custom button:disabled { opacity: 0.5; cursor: not-allowed; }

.an-range-label {
    font-size: 0.84rem;
    color: var(--text-muted);
    margin-left: auto;
    padding: 6px 12px;
    background: var(--bg-input);
    border-radius: 999px;
    font-weight: 600;
    white-space: nowrap;
}
.an-range-label strong { color: var(--text-primary); font-weight: 700; }

@media (max-width: 700px) {
    .an-range-row { padding: 10px; }
    .an-range-pills a { padding: 6px 10px; font-size: 0.78rem; }
    .an-range-custom { flex: 1 1 100%; min-width: 0; }
    .an-range-label { margin: 0; flex: 1 1 100%; text-align: center; }
}

/* ========================================================================
   END V3.9.1
   ======================================================================== */