/* ============================================================================
 *  admin-panel.css — Panel Administrativo v3.0
 *  ----------------------------------------------------------------------------
 *  Diseño profesional, corporativo y estructurado:
 *   · Top bar oscura con branding y acciones primarias
 *   · Sidebar claro con navegación por secciones
 *   · Área principal con tarjetas, paneles, tablas y grid de gestión
 *   · Componentes: stat cards, manager grid, modales, badges de estado,
 *     login, paletas de color, uploaders de CV
 *   · Totalmente responsive (desktop / tablet / mobile drawer)
 * ==========================================================================*/

/* ---------- Reset & tokens -------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
:root {
    --gold:       #C9A24B;
    --gold-dk:    #A8852F;
    --navy:       #0F2847;
    --navy-soft:  #1E3A63;
    --ink:        #17212E;
    --ink-soft:   #4A5566;
    --line:       #E3E6EC;
    --bg:         #F4F6FA;
    --card:       #FFFFFF;
    --ok:         #16A34A;
    --warn:       #E0A800;
    --err:        #DC2626;
    --info:       #2563EB;
    --radius:     10px;
    --radius-lg:  14px;
    --shadow-sm:  0 1px 2px rgba(15, 40, 71, 0.06);
    --shadow:     0 4px 14px rgba(15, 40, 71, 0.08);
    --shadow-lg:  0 16px 40px rgba(15, 40, 71, 0.12);
    --font:       'Inter', system-ui, -apple-system, "Segoe UI", sans-serif;
}

html, body { margin: 0; padding: 0; font-family: var(--font); color: var(--ink); background: var(--bg); }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ---------- LOGIN ------------------------------------------------------ */
.login-screen {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 20% 10%,  rgba(201, 162, 75, 0.25), transparent 45%),
        radial-gradient(circle at 85% 85%,  rgba(15, 40, 71, 0.5),   transparent 55%),
        linear-gradient(135deg, #0F2847 0%, #1E3A63 100%);
    padding: 24px;
}
.login-box {
    width: 100%; max-width: 420px;
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 36px 32px 28px;
    box-shadow: var(--shadow-lg);
    text-align: center;
    border-top: 4px solid var(--gold);
}
.login-logo {
    width: 72px; height: 72px;
    border-radius: 16px;
    object-fit: contain;
    margin: 0 auto 14px;
    box-shadow: var(--shadow-sm);
    background: #fff;
    padding: 6px;
}
.login-box h1 { margin: 0 0 4px; font-size: 1.45rem; color: var(--navy); font-weight: 800; letter-spacing: -0.3px; }
.login-subtitle { margin: 0 0 22px; color: var(--ink-soft); font-size: 0.85rem; }
.login-field { text-align: left; margin-bottom: 14px; }
.login-field label { font-size: 0.8rem; font-weight: 600; color: var(--ink-soft); }
.pass-wrap {
    position: relative;
    margin-top: 6px;
}
.pass-wrap input {
    width: 100%;
    padding: 12px 44px 12px 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font-size: 0.95rem;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    background: #fff;
}
.pass-wrap input:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.18); }
.pass-wrap button {
    position: absolute; top: 50%; right: 10px; transform: translateY(-50%);
    background: transparent; border: 0; color: var(--ink-soft); cursor: pointer; font-size: 1rem;
    width: 32px; height: 32px; border-radius: 6px;
}
.pass-wrap button:hover { background: var(--bg); }
.login-error { color: var(--err); font-size: 0.82rem; margin: 4px 0 10px; }
.back-link { display: inline-block; margin-top: 14px; font-size: 0.82rem; color: var(--ink-soft); }
.back-link:hover { color: var(--navy); }

/* ---------- BUTTONS ---------------------------------------------------- */
.btn-primary, .btn-secondary, .btn-db, .btn-save-all, .btn-logout {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--font);
    font-weight: 600; font-size: 0.88rem;
    padding: 10px 16px;
    border-radius: var(--radius);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.12s ease, box-shadow 0.2s, background 0.2s, color 0.2s;
    line-height: 1;
}
.btn-primary {
    background: linear-gradient(180deg, var(--gold), var(--gold-dk));
    color: #fff;
    box-shadow: var(--shadow-sm);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn-secondary {
    background: #fff;
    border-color: var(--line);
    color: var(--navy);
}
.btn-secondary:hover { background: var(--bg); border-color: var(--gold); }
.btn-logout {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.25);
    color: #fff;
}
.btn-logout:hover { background: rgba(255, 255, 255, 0.12); }

/* ---------- ADMIN APP LAYOUT ------------------------------------------ */
.admin-app { min-height: 100vh; display: flex; flex-direction: column; }

.admin-topbar {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; gap: 16px;
    padding: 0 18px;
    height: 60px;
    background: linear-gradient(180deg, #0F2847 0%, #1E3A63 100%);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.admin-toggle {
    display: none;
    background: transparent; border: 0; color: #fff;
    font-size: 1.2rem; cursor: pointer;
    width: 40px; height: 40px; border-radius: 8px;
}
.admin-toggle:hover { background: rgba(255,255,255,0.1); }

.topbar-brand { display: flex; align-items: center; gap: 10px; font-size: 1rem; font-weight: 700; }
.topbar-brand img { width: 34px; height: 34px; border-radius: 8px; background: #fff; padding: 4px; }
.topbar-brand strong { letter-spacing: 0.3px; }

.topbar-actions {
    margin-left: auto;
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}

.db-status {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 0.78rem; font-weight: 600;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    color: #ECEFF4;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.db-status i { font-size: 0.55rem; color: var(--warn); }
.db-status.ok i { color: var(--ok); }
.db-status.err i { color: var(--err); }

.btn-db {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #fff;
}
.btn-db:hover { background: rgba(255, 255, 255, 0.15); }

.btn-save-all {
    background: linear-gradient(180deg, var(--gold), var(--gold-dk));
    color: #fff;
    box-shadow: 0 6px 18px rgba(201, 162, 75, 0.35);
}
.btn-save-all:hover { transform: translateY(-1px); }

/* ---------- Body grid (sidebar + main) -------------------------------- */
.admin-body {
    flex: 1;
    display: grid;
    grid-template-columns: 250px 1fr;
    min-height: calc(100vh - 60px);
}

.admin-sidebar {
    background: var(--card);
    border-right: 1px solid var(--line);
    padding: 20px 12px;
    overflow-y: auto;
    position: sticky; top: 60px;
    height: calc(100vh - 60px);
}
.admin-sidebar nav { display: flex; flex-direction: column; gap: 4px; }
.side-link {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px;
    font-size: 0.9rem; font-weight: 500;
    color: var(--ink-soft);
    border-radius: 8px;
    transition: background 0.15s, color 0.15s;
    position: relative;
}
.side-link i { width: 18px; text-align: center; color: var(--ink-soft); transition: color 0.15s; }
.side-link:hover { background: var(--bg); color: var(--navy); }
.side-link:hover i { color: var(--gold); }
.side-link.active {
    background: linear-gradient(90deg, rgba(201, 162, 75, 0.12), rgba(201, 162, 75, 0));
    color: var(--navy);
    font-weight: 700;
}
.side-link.active i { color: var(--gold); }
.side-link.active::before {
    content: '';
    position: absolute; left: 0; top: 8px; bottom: 8px;
    width: 3px; background: var(--gold); border-radius: 2px;
}

.admin-main {
    padding: 24px 28px 60px;
    overflow-x: auto;
    min-width: 0;
}

/* ---------- Panel sections -------------------------------------------- */
.panel-section { display: none; animation: secIn 0.25s ease; }
.panel-section.active { display: block; }
@keyframes secIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.panel-section h2 {
    margin: 0 0 6px;
    font-size: 1.55rem; font-weight: 800; color: var(--navy);
    letter-spacing: -0.3px;
}
.section-sub {
    margin: 4px 0 20px;
    color: var(--ink-soft); font-size: 0.9rem;
}

/* ---------- Dashboard stats ------------------------------------------- */
.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 14px;
    margin: 18px 0 24px;
}
.stat-card {
    background: var(--card);
    border-radius: var(--radius-lg);
    padding: 18px 18px 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--line);
    position: relative;
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.stat-card::after {
    content: '';
    position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: linear-gradient(90deg, var(--gold), var(--gold-dk));
    opacity: 0.8;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: rgba(201, 162, 75, 0.4); }
.stat-card i { font-size: 1.4rem; color: var(--gold); margin-bottom: 6px; display: block; }
.stat-card strong { display: block; font-size: 1.8rem; font-weight: 800; color: var(--navy); line-height: 1; margin: 4px 0 4px; }
.stat-card span { font-size: 0.8rem; color: var(--ink-soft); font-weight: 500; }

.info-box {
    margin-top: 24px;
    padding: 16px 18px;
    background: #FFF9EB;
    border: 1px solid #F6E2A3;
    border-left: 4px solid var(--gold);
    border-radius: var(--radius);
    color: var(--ink);
}
.info-box h3 { margin: 0 0 4px; font-size: 0.95rem; color: var(--navy); }
.info-box p  { margin: 0; font-size: 0.88rem; color: var(--ink-soft); }

/* ---------- Forms ----------------------------------------------------- */
.form-group { margin-bottom: 18px; }
.form-group label,
.form-group > label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--ink-soft); margin-bottom: 6px; }
.form-row {
    display: grid; grid-template-columns: 1fr 1fr; gap: 14px;
}
@media (max-width: 640px) { .form-row { grid-template-columns: 1fr; } }

.txt, textarea.txt, select.txt {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    font: inherit; font-size: 0.9rem;
    background: #fff;
    color: var(--ink);
    transition: border 0.15s, box-shadow 0.15s;
    outline: none;
}
.txt:focus, textarea.txt:focus, select.txt:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.15);
}
textarea.txt { resize: vertical; font-family: inherit; }

/* ---------- Image-edit row (content editor) --------------------------- */
.img-edit-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 14px;
    align-items: center;
    padding: 12px;
    border: 1px dashed var(--line);
    border-radius: var(--radius);
    background: #FAFBFD;
}
.img-edit-row > div { display: flex; flex-direction: column; gap: 8px; }
.img-preview {
    width: 110px; height: 110px;
    border-radius: 8px;
    object-fit: cover;
    background: #fff;
    border: 1px solid var(--line);
}
.img-preview.img-wide { width: 100%; height: 120px; max-width: 220px; object-fit: cover; }

/* ---------- Manager grid (CRUD cards) --------------------------------- */
.manager-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 14px;
    margin-top: 16px;
}
.manager-item {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
    display: flex; flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: transform 0.18s, box-shadow 0.18s;
}
.manager-item:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.manager-item .thumb {
    aspect-ratio: 16/10;
    background: #0F2847;
    overflow: hidden;
}
.manager-item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.manager-item .body {
    padding: 12px 14px;
    display: flex; flex-direction: column; gap: 4px;
    flex: 1;
}
.manager-item .body strong { font-size: 0.95rem; color: var(--navy); }
.manager-item .body small { font-size: 0.78rem; color: var(--ink-soft); }
.manager-item .actions {
    display: flex; gap: 4px; margin-top: 10px; flex-wrap: wrap;
}
.manager-item .actions button {
    flex: 1 1 auto;
    font-size: 0.78rem;
    padding: 6px 10px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 6px;
    cursor: pointer;
    display: inline-flex; align-items: center; gap: 4px; justify-content: center;
    color: var(--ink);
    transition: background 0.12s, color 0.12s;
}
.manager-item .actions button:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.manager-item .actions button.danger:hover { background: var(--err); border-color: var(--err); }

/* ---------- Tables ---------------------------------------------------- */
.table-wrap {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow-x: auto;
    background: var(--card);
    box-shadow: var(--shadow-sm);
}
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}
.admin-table th, .admin-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--line);
}
.admin-table th {
    background: #F8FAFD;
    color: var(--ink-soft);
    font-weight: 600;
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.admin-table tr:hover td { background: #FAFBFD; }
.badge-status {
    display: inline-block; padding: 3px 10px;
    font-size: 0.72rem; font-weight: 600;
    background: rgba(201, 162, 75, 0.15);
    color: var(--gold-dk);
    border-radius: 999px;
    text-transform: uppercase; letter-spacing: 0.3px;
}
.admin-table button {
    background: var(--bg); border: 1px solid var(--line);
    padding: 5px 9px; border-radius: 6px; font-size: 0.8rem;
    cursor: pointer; color: var(--ink);
    margin-right: 4px;
}
.admin-table button:hover { background: var(--gold); color: #fff; border-color: var(--gold); }

/* ---------- Card block (content editor) ------------------------------- */
.card-block {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    padding: 22px 24px 20px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.card-title {
    margin: 0 0 16px;
    font-size: 1rem;
    color: var(--navy);
    font-weight: 700;
    display: flex; align-items: center; gap: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}
.card-title i { color: var(--gold); }

/* ---------- Sidebar section titles ------------------------------------ */
.side-section-title {
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #94a3b8;
    font-weight: 700;
    padding: 14px 18px 6px;
}
.admin-sidebar > nav + .side-section-title { border-top: 1px solid var(--line); margin-top: 6px; }

/* ---------- Preview button in topbar ---------------------------------- */
.btn-preview {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 16px;
    background: transparent;
    border: 1px solid rgba(255,255,255,0.25);
    color: #fff;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 0.88rem;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-preview:hover { background: rgba(255,255,255,0.12); }

/* ---------- Theme Grid ------------------------------------------------- */
.theme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 16px;
    margin: 14px 0 22px;
}
.theme-card {
    position: relative;
    display: flex; flex-direction: column; gap: 10px;
    padding: 18px 18px 20px;
    background: var(--card);
    border: 2px solid var(--line);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
    overflow: hidden;
}
.theme-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.theme-card.selected {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(201, 162, 75, 0.2);
}
.theme-card.selected .theme-check { opacity: 1; }
.theme-badge {
    position: absolute;
    top: 10px; right: 10px;
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dk));
    color: #fff;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 999px;
}
.theme-swatches {
    display: flex;
    height: 42px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--line);
}
.theme-swatches span { flex: 1; }
.theme-card h4 { margin: 4px 0 0; font-size: 1rem; color: var(--navy); font-weight: 700; }
.theme-card p  { margin: 0; font-size: 0.8rem; color: var(--ink-soft); line-height: 1.4; }
.theme-check {
    position: absolute; bottom: 14px; right: 14px;
    color: var(--gold);
    font-size: 1.2rem;
    opacity: 0;
    transition: opacity 0.2s;
}

/* ---------- Typography Preview ---------------------------------------- */
.typo-preview {
    margin: 16px 0 20px;
    padding: 22px 24px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}
.typo-preview h3 { margin: 0 0 8px; font-size: 1.6rem; color: var(--navy); }
.typo-preview p  { margin: 0; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.5; }

/* ---------- Palettes -------------------------------------------------- */
.palette-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 14px;
    margin: 10px 0 20px;
}
.palette-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 14px 16px;
    box-shadow: var(--shadow-sm);
}
.palette-card h4 {
    margin: 0 0 10px;
    font-size: 0.92rem; color: var(--navy);
    display: flex; align-items: center; gap: 8px;
}
.palette-card h4 i { color: var(--gold); }
.palette-row {
    display: grid;
    grid-template-columns: 1fr 42px 120px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.palette-row label { font-size: 0.78rem; color: var(--ink-soft); font-family: 'JetBrains Mono', monospace; }
.palette-row input[type="color"] {
    width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 6px;
    padding: 0; background: transparent; cursor: pointer;
}
.palette-row input[type="text"] {
    width: 100%; padding: 6px 8px; font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem; border: 1px solid var(--line); border-radius: 6px;
    background: #fff; color: var(--ink);
}

/* ---------- CV Upload grid ------------------------------------------- */
.cv-upload-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
    margin: 16px 0 20px;
}
.cv-card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px 18px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s, border-color 0.2s;
}
.cv-card:hover { transform: translateY(-2px); border-color: var(--gold); }
.cv-card i { font-size: 2rem; color: var(--gold); }
.cv-card h3 { margin: 2px 0 0; font-size: 1rem; color: var(--navy); }
.cv-card p  { margin: 0 0 8px; font-size: 0.8rem; color: var(--ink-soft); }
.cv-link { font-size: 0.78rem; color: var(--info); text-decoration: underline; }

/* ---------- Code block ------------------------------------------------ */
.code-block {
    margin-top: 14px;
    padding: 14px;
    background: #0F2847;
    color: #C9A24B;
    border-radius: var(--radius);
    font-family: 'JetBrains Mono', ui-monospace, monospace;
    font-size: 0.82rem;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-all;
    max-height: 260px;
}

/* ---------- Modal ----------------------------------------------------- */
.modal {
    position: fixed; inset: 0;
    background: rgba(15, 40, 71, 0.55);
    backdrop-filter: blur(3px);
    display: flex; align-items: center; justify-content: center;
    z-index: 200;
    padding: 20px;
    animation: modalIn 0.2s ease;
}
@keyframes modalIn { from { opacity: 0; } to { opacity: 1; } }
.modal[hidden] { display: none; }

.modal-box {
    width: 100%; max-width: 620px;
    background: var(--card);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    max-height: 90vh;
    display: flex; flex-direction: column;
    overflow: hidden;
}
.modal-box header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 20px;
    border-bottom: 1px solid var(--line);
    background: #F8FAFD;
}
.modal-box header h3 { margin: 0; font-size: 1.05rem; color: var(--navy); }
.modal-box header button {
    background: transparent; border: 0; font-size: 1.4rem;
    color: var(--ink-soft); cursor: pointer;
    width: 32px; height: 32px; border-radius: 6px;
}
.modal-box header button:hover { background: var(--line); color: var(--err); }
.modal-box form {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}
.modal-box form .actions {
    display: flex; gap: 10px; justify-content: flex-end;
    margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line);
}

/* ---------- Toast ---------------------------------------------------- */
.admin-toast {
    position: fixed;
    bottom: 28px; left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: var(--navy);
    color: #fff;
    padding: 12px 20px;
    border-radius: 999px;
    font-size: 0.88rem; font-weight: 500;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s, transform 0.25s;
    z-index: 300;
    border-left: 4px solid var(--gold);
}
.admin-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.admin-toast.success { border-left-color: var(--ok); }
.admin-toast.error   { border-left-color: var(--err); }

/* ---------- Responsive ------------------------------------------------ */
@media (max-width: 900px) {
    .admin-body { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: fixed; top: 60px; left: 0; bottom: 0;
        width: 270px; z-index: 40;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        box-shadow: var(--shadow-lg);
    }
    .admin-sidebar.open { transform: translateX(0); }
    .admin-toggle { display: inline-flex; align-items: center; justify-content: center; }
    .admin-main   { padding: 18px; }
    .topbar-actions .btn-db span, .topbar-actions .btn-save-all span,
    .topbar-actions .btn-logout span { display: inline; }
}
@media (max-width: 620px) {
    .admin-topbar { gap: 8px; padding: 0 10px; }
    .topbar-brand strong { display: none; }
    .db-status span:last-child { display: none; }
    .btn-db, .btn-save-all, .btn-logout { padding: 8px 12px; font-size: 0.78rem; }
    .panel-section h2 { font-size: 1.2rem; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .stat-card strong { font-size: 1.4rem; }
    .img-edit-row { grid-template-columns: 90px 1fr; }
    .img-preview  { width: 84px; height: 84px; }
}
