/* ========================================
   VILA VALQUEIRE RJ - Admin CSS
   ======================================== */
:root {
    --bg: #0d0b1a;
    --bg-2: #14102c;
    --card: rgba(255, 255, 255, 0.04);
    --border: rgba(255, 255, 255, 0.1);
    --text: #f4f1ff;
    --muted: #b9b2d6;
    --pink: #e1306c;
    --gradient: linear-gradient(90deg, #fcaf45, #f77737, #e1306c, #bc1888);
    --font-title: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}
input, button { font-family: inherit; }

/* ---------- LOGIN ---------- */
.login-body {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background:
        radial-gradient(600px 400px at 15% 10%, rgba(131, 58, 180, 0.25), transparent 60%),
        radial-gradient(600px 400px at 85% 85%, rgba(225, 48, 108, 0.22), transparent 60%),
        var(--bg);
}
.login-bg { position: fixed; inset: 0; z-index: 0; }
.login-card {
    position: relative;
    z-index: 1;
    width: min(420px, 100%);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 40px 34px;
    backdrop-filter: blur(12px);
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.5);
}
.login-logo { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.login-badge {
    width: 44px; height: 44px;
    display: grid; place-items: center;
    background: transparent;
    border-radius: 13px;
}
.login-badge img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.login-brand {
    font-family: var(--font-title);
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: 0.3px;
}
.login-brand strong { color: var(--pink); }
.login-title { font-family: var(--font-title); font-size: 1.5rem; font-weight: 800; margin-bottom: 6px; }
.login-desc { color: var(--muted); font-size: 0.92rem; margin-bottom: 28px; }

.field { margin-bottom: 18px; }
.field label {
    display: flex; align-items: center; gap: 8px;
    font-size: 0.82rem; font-weight: 600;
    color: var(--muted);
    margin-bottom: 8px;
    letter-spacing: 0.4px;
}
.field label i { color: var(--pink); }
.field input {
    width: 100%;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--text);
    font-size: 0.95rem;
    outline: none;
    transition: border-color 0.25s ease;
}
.field input:focus { border-color: var(--pink); }

.login-error { color: #ff6b6b; font-size: 0.85rem; min-height: 20px; margin-bottom: 8px; }
.back-link {
    display: inline-block;
    margin-top: 22px;
    color: var(--muted);
    font-size: 0.88rem;
    text-decoration: none;
    transition: color 0.25s ease;
    display: flex; align-items: center; gap: 8px; justify-content: center;
}
.back-link:hover { color: #ff8fb8; }

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 13px 22px;
    border-radius: 999px;
    font-family: var(--font-title);
    font-weight: 700;
    font-size: 0.92rem;
    color: #fff;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn-gradient {
    background: var(--gradient);
    box-shadow: 0 10px 26px rgba(225, 48, 108, 0.4);
    background-size: 200% 200%;
}
.btn-gradient:hover { transform: translateY(-2px); background-position: 100% 50%; }
.btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    color: var(--text);
}
.btn-ghost:hover { background: rgba(255, 255, 255, 0.12); }
.btn-block { width: 100%; }
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }

/* ---------- TOPBAR ---------- */
.admin-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 4%;
    background: rgba(10, 8, 20, 0.92);
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 50;
}
.admin-brand { display: flex; align-items: center; gap: 10px; }
.admin-actions { display: flex; gap: 10px; align-items: center; }
.link-btn {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted);
    padding: 8px 14px;
    border-radius: 10px;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex; align-items: center; gap: 7px;
    transition: all 0.25s ease;
}
.link-btn:hover { color: var(--text); border-color: var(--pink); }
.link-btn.danger:hover { color: #ff6b6b; border-color: #ff6b6b; }

/* ---------- LAYOUT ---------- */
.admin-layout {
    display: flex;
    width: min(1180px, 94%);
    margin: 28px auto;
    gap: 26px;
    align-items: flex-start;
}
.admin-sidebar {
    width: 240px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: sticky;
    top: 84px;
}
.tab-btn {
    text-align: left;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 13px 16px;
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
    display: flex; align-items: center; gap: 10px;
    transition: all 0.25s ease;
}
.tab-btn i { width: 20px; text-align: center; }
.tab-btn:hover { background: rgba(255, 255, 255, 0.08); color: var(--text); }
.tab-btn.active {
    background: var(--gradient);
    color: #fff;
    box-shadow: 0 8px 22px rgba(225, 48, 108, 0.35);
}

.admin-content {
    flex: 1;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    position: relative;
    min-height: 60vh;
}
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.tab-panel h2 {
    font-family: var(--font-title);
    font-size: 1.25rem;
    margin-bottom: 6px;
    display: flex; align-items: center; gap: 10px;
}
.tab-panel h2 i { color: var(--pink); }
.tab-panel > p { color: var(--muted); font-size: 0.92rem; margin-bottom: 26px; }

/* ---------- CORES ---------- */
.color-grid { display: grid; gap: 16px; margin-bottom: 28px; }
.color-item {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 12px 16px;
}
.color-item input[type="color"] {
    width: 52px;
    height: 40px;
    border: none;
    border-radius: 10px;
    background: none;
    cursor: pointer;
    padding: 0;
}
.color-item input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.color-item input[type="color"]::-webkit-color-swatch { border-radius: 8px; border: 1px solid rgba(255,255,255,0.2); }
.color-info { flex: 1; display: flex; flex-direction: column; }
.color-name { font-weight: 700; font-size: 0.92rem; }
.color-hex { color: var(--muted); font-size: 0.8rem; letter-spacing: 0.5px; }

.preview-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px dashed var(--border);
    border-radius: 14px;
    padding: 18px;
}
.preview-title { font-size: 0.8rem; font-weight: 700; letter-spacing: 1px; color: var(--muted); margin-bottom: 12px; }
.preview-bar {
    height: 70px;
    border-radius: 12px;
    background: var(--gradient);
    margin-bottom: 16px;
    border: 1px solid rgba(255, 255, 255, 0.15);
}
.preview-buttons { display: flex; gap: 10px; }
.preview-btn {
    padding: 10px 18px;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 700;
}
.preview-btn.solid { background: var(--gradient); color: #fff; }
.preview-btn.soft { border: 1px solid var(--pink); color: var(--text); }

/* ---------- SLIDER ---------- */
.slide-row {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 18px;
    margin-bottom: 14px;
    position: relative;
}
.slide-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.slide-row-header strong { font-size: 0.9rem; color: #ff8fb8; }
.slide-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.slide-grid .field { margin-bottom: 0; }
.slide-grid .field-full { grid-column: 1 / -1; }
.remove-slide {
    background: none;
    border: none;
    color: #ff6b6b;
    cursor: pointer;
    font-size: 1rem;
    padding: 6px;
    transition: transform 0.2s ease;
}
.remove-slide:hover { transform: scale(1.15); }
#sliderRows { margin-bottom: 18px; }
.slide-upload-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.slide-upload-status {
    font-size: 0.8rem;
    color: var(--success, #4caf7d);
}

/* ---------- HELP BOXES ---------- */
.help-box {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 16px;
}
.help-box h3 { font-size: 0.98rem; margin-bottom: 10px; display: flex; gap: 10px; align-items: center; }
.help-box h3 i { color: var(--pink); }
.help-box p { color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.help-box ol { margin-left: 20px; color: var(--muted); font-size: 0.9rem; margin-bottom: 10px; }
.help-box code {
    background: rgba(225, 48, 108, 0.15);
    color: #ff8fb8;
    padding: 2px 7px;
    border-radius: 6px;
    font-size: 0.82rem;
}

/* ---------- SAVE BAR ---------- */
.save-bar {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    position: sticky;
    bottom: 16px;
    margin-top: 30px;
    padding: 14px;
    background: rgba(20, 16, 44, 0.9);
    border: 1px solid var(--border);
    border-radius: 16px;
    backdrop-filter: blur(10px);
}

/* ---------- TOAST ---------- */
.toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: var(--gradient);
    color: #fff;
    padding: 13px 24px;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 16px 40px rgba(225, 48, 108, 0.45);
    z-index: 200;
    opacity: 0;
    transition: all 0.35s ease;
    pointer-events: none;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.error { background: #ff5252; box-shadow: 0 16px 40px rgba(255, 82, 82, 0.4); }

/* ---------- RESPONSIVO ---------- */
@media (max-width: 860px) {
    .admin-layout { flex-direction: column; }
    .admin-sidebar {
        width: 100%;
        position: static;
        flex-direction: row;
        flex-wrap: wrap;
    }
    .slide-grid { grid-template-columns: 1fr; }
    .admin-topbar { align-items: flex-start; }
}