:root {
    --bg-dark: #0F0F0F;
    --bg-sidebar: #141416;
    --bg-page: #F4F5F7;
    --white: #FFFFFF;
    --gold: #F5B800;
    --gold-hover: #D9A300;
    --gold-soft: #FFF8E1;
    --text-dark: #18181B;
    --text-gray: #52525B;
    --text-muted: #A1A1AA;
    --border-light: #E4E4E7;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Plus Jakarta Sans', sans-serif;
}

/* =========================================
   LOGIN ADMIN
   ========================================= */
.login-body {
    background-color: var(--bg-dark);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.login-card {
    background: var(--white);
    width: 100%;
    max-width: 410px;
    border-radius: 18px;
    padding: 2.25rem;
    text-align: center;
    box-shadow: 0 20px 45px rgba(0, 0, 0, 0.45);
}

.login-logo {
    height: 48px;
    background: var(--bg-dark);
    padding: 6px 14px;
    border-radius: 10px;
    margin-bottom: 1.25rem;
}

.login-card h1 {
    font-size: 1.45rem;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 0.4rem;
}

.login-card p {
    font-size: 0.86rem;
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.login-form {
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.back-site-link {
    display: inline-block;
    margin-top: 1.25rem;
    font-size: 0.84rem;
    color: var(--text-gray);
    text-decoration: none;
    font-weight: 600;
}

.back-site-link:hover {
    color: var(--gold-hover);
}

/* =========================================
   LAYOUT PRINCIPAL ADMIN
   ========================================= */
.admin-body {
    background-color: var(--bg-page);
    color: var(--text-dark);
}

.admin-layout {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background-color: var(--bg-sidebar);
    color: var(--white);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-top {
    padding: 1.5rem 1.25rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-brand img {
    height: 38px;
    width: auto;
    display: block;
}

.admin-nav {
    padding: 1.25rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1;
}

.admin-nav-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 14px;
    border-radius: 10px;
    color: #D4D4D8;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    transition: 0.2s;
}

.admin-nav-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
}

.admin-nav-item.active {
    background: var(--gold);
    color: var(--bg-dark);
    font-weight: 700;
}

.sidebar-bottom {
    padding: 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.logout-btn {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logout-btn:hover {
    color: #EF4444;
}

/* ÁREA PRINCIPAL */
.admin-main {
    flex: 1;
    padding: 1.75rem 2.25rem;
    overflow-x: hidden;
}

.admin-topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.75rem;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-admin-btn {
    display: none;
    background: var(--bg-dark);
    color: var(--white);
    border: none;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
}

.admin-topbar h1 {
    font-size: 1.55rem;
    font-weight: 800;
}

.admin-topbar p {
    font-size: 0.86rem;
    color: var(--text-gray);
}

.admin-user-pill {
    background: var(--white);
    border: 1px solid var(--border-light);
    padding: 7px 14px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 700;
}

/* TARJETAS KPI */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
    margin-bottom: 1.75rem;
}

.kpi-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
}

.kpi-icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: var(--gold-soft);
    color: var(--gold-hover);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 800;
}

.kpi-info span {
    display: block;
    font-size: 0.82rem;
    color: var(--text-gray);
    font-weight: 600;
}

.kpi-info strong {
    font-size: 1.65rem;
    font-weight: 800;
    color: var(--text-dark);
}

/* PANEL Y TABLA */
.admin-panel-card {
    background: var(--white);
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.panel-card-header h2 {
    font-size: 1.2rem;
    font-weight: 800;
}

.btn-admin-gold {
    background: var(--gold);
    color: var(--bg-dark);
    border: none;
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}

.btn-admin-gold:hover {
    background: var(--gold-hover);
}

.btn-admin-outline {
    background: var(--white);
    color: var(--text-dark);
    border: 1px solid var(--border-light);
    padding: 10px 18px;
    border-radius: 8px;
    font-size: 0.86rem;
    font-weight: 700;
    cursor: pointer;
}

.full-width {
    width: 100%;
    padding: 12px;
}

.table-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 1.25rem;
}

.table-search {
    flex: 2;
    min-width: 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 8px 12px;
}

.table-search input {
    width: 100%;
    border: none;
    background: transparent;
    outline: none;
    font-size: 0.88rem;
}

.admin-select {
    flex: 1;
    min-width: 150px;
    background: var(--bg-page);
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.86rem;
    outline: none;
}

.table-responsive {
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 0.88rem;
}

.admin-table th {
    padding: 12px 14px;
    background: var(--bg-page);
    color: var(--text-gray);
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 1px solid var(--border-light);
}

.admin-table td {
    padding: 14px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table-rest-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.table-rest-cell img {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    object-fit: cover;
    background: #E4E4E7;
}

.table-rest-cell strong {
    display: block;
    font-weight: 700;
    color: var(--text-dark);
}

.table-rest-cell span {
    font-size: 0.78rem;
    color: var(--text-gray);
}

.star-active {
    color: var(--gold-hover);
    font-weight: 700;
    font-size: 0.82rem;
}

.star-muted {
    color: var(--text-muted);
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 50px;
    font-size: 0.76rem;
    font-weight: 700;
}

.status-badge.published {
    background: #DCFCE7;
    color: #166534;
}

.status-badge.draft {
    background: #FEF3C7;
    color: #92400E;
}

.action-btns {
    display: flex;
    gap: 6px;
}

.act-btn {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    border: 1px solid var(--border-light);
    background: var(--white);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    text-decoration: none;
    font-size: 0.9rem;
    transition: 0.2s;
}

.act-btn:hover {
    border-color: var(--gold);
    background: var(--gold-soft);
}

.act-btn.delete:hover {
    border-color: #EF4444;
    background: #FEF2F2;
}

/* =========================================
   MODAL FORMULARIO
   ========================================= */
.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 15, 15, 0.7);
    backdrop-filter: blur(3px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    z-index: 200;
}

.modal-backdrop.open {
    display: flex;
}

.modal-box {
    background: var(--white);
    width: 100%;
    max-width: 660px;
    max-height: 92vh;
    overflow-y: auto;
    border-radius: 16px;
    padding: 1.75rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.35);
}

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

.close-modal {
    background: transparent;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--text-gray);
}

.modal-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.form-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.form-group label {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-dark);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="tel"],
.form-group select,
.form-group textarea {
    border: 1px solid var(--border-light);
    border-radius: 8px;
    padding: 9px 12px;
    font-size: 0.88rem;
    outline: none;
    background: var(--bg-page);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--gold);
    background: var(--white);
}

.checkbox-wrap {
    justify-content: center;
    gap: 8px;
}

.checkbox-wrap label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    cursor: pointer;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding-top: 1rem;
    border-top: 1px solid var(--border-light);
}

/* RESPONSIVO ADMIN */
@media (max-width: 992px) {
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .admin-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: -260px;
        z-index: 150;
        transition: left 0.25s ease;
    }

    .admin-sidebar.open {
        left: 0;
    }

    .mobile-admin-btn {
        display: inline-block;
    }

    .admin-main {
        padding: 1.25rem;
    }

    .form-grid-2,
    .form-grid-3 {
        grid-template-columns: 1fr;
    }
}