/* admin-cms.css */
:root {
    --primary: #37667b;
    --primary-hover: #2a4e5e;
    --bg-color: #f4f7f6;
    --surface: #ffffff;
    --text-main: #333333;
    --text-muted: #777777;
    --border: #e0e0e0;
    --danger: #d32f2f;
    --success: #2e7d32;
}

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

/* ====== ESTILOS ESPECÍFICOS DE PÁGINA ====== */
.dashboard-body {
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.login-body {
    background: linear-gradient(135deg, var(--primary) 0%, #1a3644 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
}

/* ====== COMPONENTES ====== */
.btn {
    padding: 10px 20px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.3s;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    font-size: 0.95rem;
}

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

.btn:disabled {
    background: #a0b4bc;
    cursor: not-allowed;
}

.btn-success {
    background: var(--success);
}

.btn-danger {
    background: var(--danger);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-main);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    outline: none;
    transition: border 0.3s;
    font-family: 'Poppins', sans-serif;
    font-size: 0.95rem;
}

.form-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(55, 102, 123, 0.1);
}

/* ====== LOGIN CARD PRO ====== */
.login-card {
    background: var(--surface);
    padding: 50px 40px;
    border-radius: 16px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 420px;
}

.login-card h2 {
    text-align: center;
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 5px;
}

.login-card p {
    text-align: center;
    color: var(--text-muted);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* ====== DASHBOARD ====== */
#dashboard-view {
    padding: 40px 30px;
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
}

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

.tabs-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    border-bottom: 2px solid var(--border);
}

.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: 0.3s;
}

.tab-btn.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.tab-content {
    display: none;
    background: var(--surface);
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

.tab-content.active {
    display: block;
}

/* ====== EDITOR & IMAGE PREVIEW ====== */
.editor-layout {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
}

@media (max-width: 1100px) {
    .editor-layout {
        grid-template-columns: 1fr;
    }
}

.image-preview-container {
    width: 100%;
    height: 180px;
    background: #f8f9fa;
    border: 2px dashed var(--border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 10px;
}

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

.ql-container.ql-snow {
    height: 600px;
    font-size: 1.05rem;
}

/* ====== TABLA GESTOR ====== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

th {
    background: #f8f9fa;
    color: var(--primary);
}

.badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge.published {
    background: #e8f5e9;
    color: var(--success);
}

.badge.draft {
    background: #fff3e0;
    color: #e65100;
}

.back-to-site {
    position: absolute;
    top: 20px;
    left: 20px;
    color: white;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 15px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(5px);
    transition: 0.3s;
    z-index: 1000;
}

.back-to-site:hover {
    background: rgba(255, 255, 255, 0.2);
}