/* ══════════════════════════════════════════════════════
   Suggestify — Admin Dashboard Styles
   ══════════════════════════════════════════════════════ */

:root {
    --bg: #000000;
    --bg-elevated: #1c1c1e;
    --bg-secondary: #2c2c2e;
    --bg-tertiary: #3a3a3c;
    --fill-search: rgba(118, 118, 128, 0.24);
    --fill-hover: rgba(255, 255, 255, 0.06);
    --fill-active: rgba(255, 255, 255, 0.10);
    --text-primary: #ffffff;
    --text-secondary: rgba(235, 235, 245, 0.6);
    --text-tertiary: rgba(235, 235, 245, 0.3);
    --accent: #FA2D48;
    --accent-soft: rgba(250, 45, 72, 0.15);
    --accent-glow: rgba(250, 45, 72, 0.35);
    --success: #30D158;
    --success-soft: rgba(48, 209, 88, 0.15);
    --danger: #FF453A;
    --danger-soft: rgba(255, 69, 58, 0.12);
    --warning: #FF9F0A;
    --warning-soft: rgba(255, 159, 10, 0.12);
    --info: #0A84FF;
    --info-soft: rgba(10, 132, 255, 0.12);
    --separator: rgba(84, 84, 88, 0.65);
    --card-radius: 14px;
    --radius-full: 980px;
    --font-display: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { -webkit-font-smoothing: antialiased; scroll-behavior: smooth; }
body {
    font-family: var(--font-display);
    background: var(--bg);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

/* ── Ambient BG ──────────────────────────────────── */
.ambient-bg { position: fixed; inset: 0; z-index: 0; overflow: hidden; pointer-events: none; }
.ambient-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.25; animation: drift 25s ease-in-out infinite alternate; }
.orb-1 { width: 500px; height: 500px; background: var(--accent); top: -15%; right: -10%; }
.orb-2 { width: 400px; height: 400px; background: #AF52DE; bottom: -10%; left: -10%; animation-delay: -8s; }
@keyframes drift {
    0% { transform: translate(0,0) scale(1); }
    50% { transform: translate(-40px,30px) scale(1.12); }
    100% { transform: translate(20px,-20px) scale(0.95); }
}

/* ── LOGIN ───────────────────────────────────────── */
.login-screen {
    position: fixed; inset: 0; z-index: 50;
    display: flex; align-items: center; justify-content: center;
    background: var(--bg);
    transition: opacity 0.5s, transform 0.5s;
}
.login-screen.hidden { opacity: 0; pointer-events: none; transform: scale(1.05); }
.login-card {
    background: var(--bg-elevated);
    border: 1px solid var(--separator);
    border-radius: 20px;
    padding: 48px 40px;
    width: 380px; max-width: 90vw;
    text-align: center;
    animation: fadeUp 0.6s cubic-bezier(0.22,1,0.36,1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.login-icon {
    width: 72px; height: 72px; border-radius: 18px;
    background: var(--accent-soft); display: grid; place-items: center;
    font-size: 30px; color: var(--accent); margin: 0 auto 20px;
    box-shadow: 0 6px 28px var(--accent-glow);
}
.login-card h1 { font-size: 1.6rem; font-weight: 700; margin-bottom: 6px; }
.login-card p { color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 24px; }
.login-field {
    display: flex; align-items: center; gap: 10px;
    background: var(--fill-search); border-radius: 12px;
    padding: 0 14px; height: 48px; margin-bottom: 16px;
    transition: box-shadow 0.3s;
}
.login-field:focus-within { box-shadow: 0 0 0 1px rgba(250,45,72,0.3); }
.login-field i { color: var(--text-tertiary); font-size: 14px; }
.login-field input {
    flex: 1; background: transparent; border: none; outline: none;
    color: var(--text-primary); font-size: 16px; font-family: inherit;
}
.login-field input::placeholder { color: var(--text-tertiary); }
.login-btn {
    width: 100%; height: 48px; border-radius: 12px; border: none;
    background: var(--accent); color: white; font-family: inherit;
    font-size: 16px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; display: flex; align-items: center; justify-content: center; gap: 8px;
}
.login-btn:hover { box-shadow: 0 4px 20px var(--accent-glow); transform: translateY(-1px); }
.login-btn:active { transform: scale(0.97); }
.login-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }
.login-error {
    color: var(--danger); font-size: 13px; margin-top: 12px;
    opacity: 0; transition: opacity 0.3s;
}
.login-error.visible { opacity: 1; }

/* ── DASHBOARD ───────────────────────────────────── */
.dashboard { position: relative; z-index: 1; max-width: 900px; width: 100%; margin: 0 auto; padding: 20px; }
.dash-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 20px 0 28px; border-bottom: 0.5px solid var(--separator); margin-bottom: 24px;
}
.dash-brand { display: flex; align-items: center; gap: 14px; }
.dash-brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 4px 16px var(--accent-glow); }
.dash-brand h1 { font-size: 1.5rem; font-weight: 700; }
.dash-brand span { color: var(--text-secondary); font-size: 0.85rem; font-weight: 500; margin-left: 8px; }
.logout-btn {
    background: var(--fill-search); border: none; border-radius: var(--radius-full);
    padding: 8px 16px; color: var(--text-secondary); font-family: inherit;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; gap: 6px;
}
.logout-btn:hover { background: var(--danger-soft); color: var(--danger); }

/* ── TABS ────────────────────────────────────────── */
.tab-bar {
    display: flex; gap: 4px; background: var(--fill-search);
    border-radius: 10px; padding: 3px; margin-bottom: 24px;
}
.tab-btn {
    flex: 1; padding: 10px 16px; border: none; border-radius: 8px;
    background: transparent; color: var(--text-secondary); font-family: inherit;
    font-size: 14px; font-weight: 600; cursor: pointer; transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 6px;
}
.tab-btn.active { background: var(--bg-secondary); color: var(--text-primary); box-shadow: 0 2px 8px rgba(0,0,0,0.3); }
.tab-btn i { font-size: 13px; }
.tab-content { display: none; animation: fadeUp 0.4s cubic-bezier(0.22,1,0.36,1); }
.tab-content.active { display: block; }

/* ── SECTION HEADERS ─────────────────────────────── */
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.section-header h2 { font-size: 1.2rem; font-weight: 700; }
.btn-primary {
    display: flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: var(--radius-full); border: none;
    background: var(--accent-soft); color: var(--accent); font-family: inherit;
    font-size: 13px; font-weight: 600; cursor: pointer; transition: all 0.2s;
}
.btn-primary:hover { background: var(--accent); color: white; box-shadow: 0 4px 16px var(--accent-glow); }

/* ── SESSION CARDS ───────────────────────────────── */
.sessions-grid { display: flex; flex-direction: column; gap: 10px; }
.session-card {
    display: flex; align-items: center; gap: 16px;
    background: var(--bg-elevated); border: 1px solid var(--separator);
    border-radius: var(--card-radius); padding: 16px 18px;
    transition: all 0.2s; cursor: default;
}
.session-card:hover { border-color: rgba(250,45,72,0.3); }
.session-status-dot {
    width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.session-status-dot.active { background: var(--success); box-shadow: 0 0 8px rgba(48,209,88,0.5); }
.session-status-dot.upcoming { background: var(--info); box-shadow: 0 0 8px rgba(10,132,255,0.5); }
.session-status-dot.ended { background: var(--text-tertiary); }
.session-info { flex: 1; min-width: 0; }
.session-title { font-size: 15px; font-weight: 600; margin-bottom: 2px; }
.session-dates { font-size: 13px; color: var(--text-secondary); }
.session-badge {
    padding: 4px 10px; border-radius: var(--radius-full);
    font-size: 11px; font-weight: 600; flex-shrink: 0;
}
.session-badge.active { background: var(--success-soft); color: var(--success); }
.session-badge.upcoming { background: var(--info-soft); color: var(--info); }
.session-badge.ended { background: var(--fill-search); color: var(--text-tertiary); }
.session-count {
    font-size: 12px; color: var(--text-tertiary); flex-shrink: 0;
    display: flex; align-items: center; gap: 4px;
}
.session-actions { display: flex; gap: 6px; flex-shrink: 0; }
.action-btn {
    width: 32px; height: 32px; border-radius: 8px; border: none;
    background: var(--fill-search); color: var(--text-secondary);
    cursor: pointer; transition: all 0.2s; display: grid; place-items: center;
    font-size: 13px;
}
.action-btn:hover { background: var(--fill-active); color: var(--text-primary); }
.action-btn.danger:hover { background: var(--danger-soft); color: var(--danger); }
.session-link-btn {
    width: 32px; height: 32px; border-radius: 8px; border: none;
    background: var(--accent-soft); color: var(--accent);
    cursor: pointer; transition: all 0.2s; display: grid; place-items: center; font-size: 13px;
}
.session-link-btn:hover { background: var(--accent); color: white; }

/* ── SUGGESTIONS TAB ─────────────────────────────── */
.session-selector {
    display: flex; align-items: center; gap: 10px; margin-bottom: 20px;
}
.session-selector label { font-size: 14px; font-weight: 600; color: var(--text-secondary); white-space: nowrap; }
.session-selector select {
    flex: 1; background: var(--fill-search); border: 1px solid var(--separator);
    border-radius: 10px; padding: 10px 14px; color: var(--text-primary);
    font-family: inherit; font-size: 14px; outline: none; cursor: pointer;
    appearance: none; -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='rgba(235,235,245,0.6)' viewBox='0 0 16 16'%3E%3Cpath d='M8 11L3 6h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center;
}
.session-selector select:focus { border-color: rgba(250,45,72,0.4); }

/* Suggestion groups */
.suggestion-group { margin-bottom: 28px; }
.suggestion-group-title {
    font-size: 13px; font-weight: 600; color: var(--text-tertiary);
    text-transform: uppercase; letter-spacing: 1px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 8px;
}
.suggestion-group-title .count {
    background: var(--fill-search); border-radius: var(--radius-full);
    padding: 2px 8px; font-size: 11px;
}

/* Suggestion row */
.suggestion-row {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 12px; border-radius: 10px; transition: all 0.3s;
    position: relative;
}
.suggestion-row:not(:last-child)::after {
    content: ''; position: absolute; bottom: 0; left: 68px; right: 0;
    height: 0.5px; background: var(--separator);
}
.suggestion-row:hover { background: var(--fill-hover); }
.suggestion-row.removing {
    opacity: 0; transform: translateX(40px); max-height: 0; padding: 0;
    margin: 0; overflow: hidden;
    transition: all 0.4s cubic-bezier(0.22,1,0.36,1);
}
.suggestion-artwork {
    width: 48px; height: 48px; border-radius: 8px; object-fit: cover;
    flex-shrink: 0; background: var(--bg-secondary); box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.suggestion-meta { flex: 1; min-width: 0; }
.suggestion-name {
    font-size: 15px; font-weight: 500; white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.suggestion-artist {
    font-size: 13px; color: var(--text-secondary); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
}
.suggestion-time { font-size: 11px; color: var(--text-tertiary); margin-top: 2px; }
.suggestion-actions { display: flex; gap: 6px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.sug-btn {
    height: 30px; padding: 0 12px; border-radius: var(--radius-full); border: none;
    font-family: inherit; font-size: 12px; font-weight: 600; cursor: pointer;
    transition: all 0.2s; display: flex; align-items: center; gap: 5px; white-space: nowrap;
}
.sug-btn i { font-size: 11px; }
.sug-btn.accept { background: var(--success-soft); color: var(--success); }
.sug-btn.accept:hover { background: var(--success); color: white; }
.sug-btn.reject { background: var(--danger-soft); color: var(--danger); }
.sug-btn.reject:hover { background: var(--danger); color: white; }
.sug-btn.copy { background: var(--fill-search); color: var(--text-secondary); }
.sug-btn.copy:hover { background: var(--fill-active); color: var(--text-primary); }
.sug-btn.done { background: var(--accent-soft); color: var(--accent); }
.sug-btn.done:hover { background: var(--accent); color: white; }
.sug-btn.copied { background: var(--success-soft); color: var(--success); pointer-events: none; }

/* Done row styling */
.suggestion-row.is-done { opacity: 0.5; }
.suggestion-row.is-done .suggestion-name { text-decoration: line-through; }

/* ── MODAL ───────────────────────────────────────── */
.modal-overlay {
    position: fixed; inset: 0; z-index: 100;
    background: rgba(0,0,0,0.6); backdrop-filter: blur(8px);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; pointer-events: none; transition: opacity 0.3s;
}
.modal-overlay.active { opacity: 1; pointer-events: auto; }
.modal {
    background: var(--bg-elevated); border: 1px solid var(--separator);
    border-radius: 16px; padding: 32px; width: 420px; max-width: 90vw;
    transform: translateY(20px); transition: transform 0.3s cubic-bezier(0.22,1,0.36,1);
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}
.modal-overlay.active .modal { transform: translateY(0); }
.modal h2 { font-size: 1.2rem; font-weight: 700; margin-bottom: 20px; }
.modal-field { margin-bottom: 16px; }
.modal-field label { display: block; font-size: 13px; font-weight: 600; color: var(--text-secondary); margin-bottom: 6px; }
.modal-field input {
    width: 100%; background: var(--fill-search); border: 1px solid var(--separator);
    border-radius: 10px; padding: 10px 14px; color: var(--text-primary);
    font-family: inherit; font-size: 15px; outline: none; transition: border-color 0.2s;
}
.modal-field input:focus { border-color: rgba(250,45,72,0.4); }
.modal-actions { display: flex; gap: 10px; margin-top: 24px; }
.modal-actions button { flex: 1; height: 44px; border-radius: 10px; border: none; font-family: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: all 0.2s; }
.modal-cancel { background: var(--fill-search); color: var(--text-secondary); }
.modal-cancel:hover { background: var(--fill-active); }
.modal-confirm { background: var(--accent); color: white; }
.modal-confirm:hover { box-shadow: 0 4px 16px var(--accent-glow); }

/* ── EMPTY STATE ─────────────────────────────────── */
.admin-empty {
    text-align: center; padding: 60px 20px; color: var(--text-tertiary);
}
.admin-empty i { font-size: 36px; margin-bottom: 12px; display: block; }
.admin-empty p { font-size: 14px; }

/* ── TOAST ───────────────────────────────────────── */
.admin-toast {
    position: fixed; bottom: -80px; left: 50%; transform: translateX(-50%);
    display: flex; align-items: center; gap: 10px;
    background: var(--bg-elevated); border: 1px solid var(--separator);
    border-radius: var(--radius-full); padding: 10px 20px 10px 12px;
    box-shadow: 0 8px 40px rgba(0,0,0,0.5); z-index: 200;
    transition: bottom 0.45s cubic-bezier(0.34,1.56,0.64,1);
    backdrop-filter: blur(20px);
}
.admin-toast.show { bottom: 36px; }
.admin-toast-icon {
    width: 26px; height: 26px; border-radius: 50%;
    background: var(--success); display: grid; place-items: center;
    color: white; font-size: 12px; flex-shrink: 0;
}
.admin-toast span { font-size: 14px; font-weight: 600; white-space: nowrap; }

/* ── ANIMATIONS ──────────────────────────────────── */
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── RESPONSIVE ──────────────────────────────────── */
@media (max-width: 600px) {
    .dashboard { padding: 12px; }
    .dash-header { flex-direction: column; gap: 12px; align-items: flex-start; }
    .session-card { flex-wrap: wrap; gap: 10px; padding: 14px; }
    .session-actions { width: 100%; justify-content: flex-end; }
    .suggestion-row { flex-wrap: wrap; gap: 8px; }
    .suggestion-actions { width: 100%; justify-content: flex-start; margin-top: 4px; }
    .modal { padding: 24px; }
    .login-card { padding: 32px 24px; }
}
