/* ============================================
   MVINGO ADMIN PANEL — STYLESHEET
   ============================================ */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@400;600;700;800;900&family=Inter:wght@400;500;600&display=swap');

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

:root {
    --red:        #e8001e;
    --red-glow:   rgba(232, 0, 30, 0.3);
    --bg:         #050000;
    --bg2:        #0d0002;
    --bg3:        #160004;
    --border:     #2a0008;
    --text:       #f0f0f0;
    --muted:      #888;
    --success:    #00c853;
    --radius:     4px;
    --font-head:  'Outfit', sans-serif;
    --font-body:  'Inter', sans-serif;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

html, body { height: 100%; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

/* ── LOGIN ──────────────────────────────── */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at 50% 0%, rgba(232,0,30,0.15) 0%, var(--bg) 70%);
}

.login-box {
    width: 100%;
    max-width: 380px;
    padding: 3.5rem 3rem;
    background: var(--bg2);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    text-align: center;
}

.login-logo {
    font-family: var(--font-head);
    font-size: 2rem;
    font-weight: 900;
    letter-spacing: 4px;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.login-title {
    font-family: var(--font-head);
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.4rem;
}

.login-subtitle {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 2.5rem;
}

.input-group input {
    width: 100%;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 1rem 1.2rem;
    font-size: 1rem;
    font-family: var(--font-body);
    outline: none;
    text-align: center;
    letter-spacing: 4px;
    transition: var(--transition);
    margin-bottom: 0.8rem;
}

.input-group input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}

.login-error {
    color: var(--red);
    font-size: 0.8rem;
    display: none;
    margin-bottom: 0.8rem;
}

.login-error.show { display: block; }

.btn-login {
    width: 100%;
    padding: 1rem;
    background: var(--red);
    color: white;
    border: none;
    cursor: pointer;
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-login:hover {
    background: white;
    color: var(--red);
}

/* ── LAYOUT ─────────────────────────────── */
.admin-app {
    display: grid;
    grid-template-columns: 240px 1fr;
    min-height: 100vh;
}

.hidden { display: none !important; }

/* ── SIDEBAR ────────────────────────────── */
.sidebar {
    background: var(--bg2);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    padding: 2rem 0;
    position: sticky;
    top: 0;
    height: 100vh;
}

.sidebar-logo {
    font-family: var(--font-head);
    font-size: 1.2rem;
    font-weight: 900;
    letter-spacing: 3px;
    color: var(--text);
    padding: 0 1.8rem 2rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 1.5rem;
}

.sidebar-logo span {
    display: block;
    font-size: 0.6rem;
    letter-spacing: 5px;
    color: var(--red);
    margin-top: 0.2rem;
}

.sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    padding: 0 1rem;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem 1rem;
    color: var(--muted);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    border-radius: var(--radius);
    transition: var(--transition);
    border: 1px solid transparent;
}

.nav-item svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.nav-item:hover {
    color: var(--text);
    background: rgba(255,255,255,0.05);
}

.nav-item.active {
    color: var(--red);
    background: rgba(232, 0, 30, 0.1);
    border-color: rgba(232, 0, 30, 0.3);
}

.btn-logout {
    margin: 1rem;
    padding: 0.7rem;
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    border-radius: var(--radius);
}

.btn-logout:hover {
    border-color: var(--red);
    color: var(--red);
}

/* ── MAIN CONTENT ───────────────────────── */
.admin-main {
    padding: 2.5rem 3rem;
    overflow-y: auto;
    max-height: 100vh;
}

.section { display: none; }
.section.active { display: block; }

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
    gap: 1rem;
}

.section-header h1 {
    font-family: var(--font-head);
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.section-header p {
    font-size: 0.85rem;
    color: var(--muted);
    margin-top: 0.3rem;
}

.badge-live {
    background: rgba(0, 200, 83, 0.1);
    border: 1px solid rgba(0, 200, 83, 0.3);
    color: var(--success);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 2px;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
}

/* ── STATS ──────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 3rem;
}

.stat-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
}

.stat-card.accent {
    border-color: rgba(232, 0, 30, 0.3);
    background: rgba(232, 0, 30, 0.05);
}

.stat-value {
    font-family: var(--font-head);
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--red);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
}

/* ── QUICK ACTIONS ──────────────────────── */
.quick-actions h3 {
    font-family: var(--font-head);
    font-size: 0.75rem;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 1rem;
}

.action-row {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

/* ── FORMS ──────────────────────────────── */
.card-form {
    background: var(--bg2);
    border: 1px solid var(--border);
    padding: 2.5rem;
    max-width: 1000px;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem;
    margin-bottom: 2rem;
}

.form-col { display: flex; flex-direction: column; gap: 1.2rem; }

.field-group { display: flex; flex-direction: column; gap: 0.4rem; }

.field-group label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--muted);
}

.field-group input,
.field-group textarea,
.select-input {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.75rem 1rem;
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
    width: 100%;
    border-radius: 2px;
}

.field-group input:focus,
.field-group textarea:focus,
.select-input:focus {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--red-glow);
}

.select-input { cursor: pointer; appearance: auto; }

.field-group textarea { resize: vertical; }

.platforms-label {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--red);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    margin-bottom: 0.5rem;
}

/* ── IMAGE PICKER ───────────────────────── */
.image-picker {
    background: var(--bg);
    border: 1px dashed var(--border);
    min-height: 180px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-bottom: 0.8rem;
    border-radius: 2px;
}

.image-picker.small { min-height: 100px; }

.image-picker img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.8rem;
    color: #444;
    text-align: center;
    padding: 2rem;
}

.image-placeholder svg {
    width: 40px;
    height: 40px;
    color: #333;
}

.image-placeholder span {
    font-size: 0.8rem;
}

/* ── BUTTONS ────────────────────────────── */
.btn-save {
    padding: 0.9rem 2.5rem;
    background: var(--red);
    color: white;
    border: none;
    cursor: pointer;
    font-family: var(--font-head);
    font-weight: 800;
    font-size: 0.85rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: var(--transition);
    box-shadow: 0 0 20px var(--red-glow);
    border-radius: 2px;
}

.btn-save:hover { background: white; color: var(--red); }

.btn-save.btn-sm { padding: 0.6rem 1.5rem; font-size: 0.75rem; }

.btn-outline {
    padding: 0.9rem 2rem;
    background: none;
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.85rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    border-radius: 2px;
}

.btn-outline:hover { border-color: var(--text); }

.btn-action {
    padding: 0.85rem 1.8rem;
    background: var(--bg3);
    color: var(--text);
    border: 1px solid var(--border);
    cursor: pointer;
    font-family: var(--font-head);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
    text-decoration: none;
    display: inline-block;
    border-radius: 2px;
}

.btn-action:hover {
    border-color: var(--red);
    color: var(--red);
}

.btn-danger {
    background: none;
    border: none;
    color: #555;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 700;
    transition: var(--transition);
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
}

.btn-danger:hover { color: var(--red); background: rgba(232,0,30,0.1); }

.btn-edit {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
}

.btn-edit:hover { border-color: var(--text); color: var(--text); }

/* ── ALBUMS ADMIN GRID ──────────────────── */
.albums-admin-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1.5rem;
}

.admin-album-card {
    background: var(--bg2);
    border: 1px solid var(--border);
    overflow: hidden;
    transition: var(--transition);
    border-radius: 2px;
}

.admin-album-card:hover { border-color: #444; }

.admin-album-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
    filter: grayscale(20%);
}

.admin-album-card .card-info {
    padding: 1rem;
}

.admin-album-card .card-title {
    font-family: var(--font-head);
    font-size: 0.9rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.2rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.admin-album-card .card-type {
    font-size: 0.7rem;
    font-weight: 600;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: var(--red);
    margin-bottom: 0.8rem;
}

.admin-album-card .card-btns {
    display: flex;
    gap: 0.5rem;
}

/* ── MODAL ──────────────────────────────── */
.modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(8px);
    padding: 1rem;
}

.modal-box {
    background: var(--bg2);
    border: 1px solid var(--border);
    border-top: 3px solid var(--red);
    width: 100%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2.5rem;
    border-radius: 2px;
}

.modal-hdr {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.modal-hdr h2 {
    font-family: var(--font-head);
    font-size: 1.3rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.modal-close-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    width: 36px;
    height: 36px;
    cursor: pointer;
    font-size: 1rem;
    transition: var(--transition);
    border-radius: 2px;
}

.modal-close-btn:hover { border-color: var(--red); color: var(--red); }

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    margin-top: 1rem;
}

/* ── TOAST ──────────────────────────────── */
.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--bg2);
    border: 1px solid var(--red);
    border-left: 4px solid var(--red);
    color: var(--text);
    padding: 1rem 1.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
    z-index: 99999;
    max-width: 320px;
    border-radius: 2px;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast.success { border-color: var(--success); }

/* ── RESPONSIVE ─────────────────────────── */
@media (max-width: 900px) {
    .admin-app { grid-template-columns: 1fr; }
    .sidebar { display: none; }
    .admin-main { padding: 1.5rem; }
    .form-grid { grid-template-columns: 1fr; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
}

.file-input {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: var(--bg-hover);
    border: 1px dashed var(--border);
    border-radius: 2px;
    color: var(--muted);
    font-size: 0.8rem;
    cursor: pointer;
    font-family: var(--font-body);
}

.file-input::-webkit-file-upload-button {
    background: var(--bg3);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 0.4rem 0.8rem;
    border-radius: 2px;
    cursor: pointer;
    margin-right: 15px;
    font-family: var(--font-head);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
}

.file-input::-webkit-file-upload-button:hover {
    border-color: var(--red);
    color: var(--red);
}
