/* ============================================
   ESTILOS PREMIUM DEL PANEL ADMIN BRECCIA
   ============================================ */

:root {
    --primary-color: #6b2c3e;
    --primary-dark: #4a1d2a;
    --primary-light: #8b3a4f;
    --accent-color: #c5a059;
    --accent-hover: #b38e46;
    --bg-dark: #0f172a;
    --bg-card: #ffffff;
    --bg-body: #f8fafc;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --border-color: #e2e8f0;
    --border-input: #cbd5e1;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 12px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 30px -5px rgba(107, 44, 62, 0.12);
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
}

body.admin-body {
    background-color: var(--bg-body);
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    color: var(--text-main);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    opacity: 1;
}

/* Helper para Iconos SVG Vectoriales */
.svg-icon, .btn-icon {
    display: inline-block;
    vertical-align: middle;
    flex-shrink: 0;
}

/* ============================================
   PANTALLA DE LOGIN / OVERLAY
   ============================================ */
.login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, #3b1622 0%, #0f172a 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    padding: 1.5rem;
}

.login-card {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    width: 100%;
    max-width: 420px;
    border-radius: var(--radius-lg);
    padding: 2.75rem 2.5rem;
    box-shadow: 0 25px 50px -12px rgba(0,0,0,0.35);
    text-align: center;
    border: 1px solid rgba(255,255,255,0.4);
    animation: fadeIn 0.4s ease-out;
}

.login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 1.5rem;
}

.login-logo-main {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary-color);
    letter-spacing: 2px;
}

.login-logo-sub {
    font-size: 0.85rem;
    color: var(--accent-color);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.login-title {
    font-size: 1.3rem;
    color: var(--text-main);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.login-subtitle {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-bottom: 1.75rem;
}

.form-group-login {
    margin-bottom: 1.25rem;
    text-align: left;
}

.form-group-login label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-main);
}

.form-group-login input {
    width: 100%;
    padding: 0.9rem 1.1rem;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    font-size: 1rem;
    transition: all 0.2s;
    box-sizing: border-box;
    background: #ffffff;
}

.form-group-login input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(107, 44, 62, 0.12);
}

.btn-login {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.95rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    box-shadow: 0 4px 14px rgba(107, 44, 62, 0.3);
}

.btn-login:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 44, 62, 0.4);
}

.login-error {
    color: #c7163b;
    background: linear-gradient(135deg, #ffe4e6, #fff1f2);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    margin-bottom: 1rem;
    display: none;
    border: 1px solid #fecdd3;
    font-weight: 500;
}

/* Aviso de intentos restantes */
.login-attempts {
    background: linear-gradient(135deg, #fff7ed, #ffedd5);
    border: 1px solid #fed7aa;
    color: #c2410c;
    padding: 0.65rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 1rem;
    display: none;
}

/* Badge del segundo paso de seguridad */
.login-step2-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, rgba(107, 44, 62, 0.08), rgba(139, 58, 79, 0.06));
    border: 1px solid rgba(107, 44, 62, 0.18);
    color: #6b2c3e;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin-bottom: 1.5rem;
}

/* Botón "Volver" en login paso 2 */
.btn-back-login {
    width: 100%;
    margin-top: 0.75rem;
    background: transparent;
    border: 1px solid rgba(107, 44, 62, 0.25);
    color: #6b2c3e;
    padding: 0.7rem;
    border-radius: var(--radius-md);
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.22s ease;
}

.btn-back-login:hover {
    background: rgba(107, 44, 62, 0.06);
    border-color: rgba(107, 44, 62, 0.4);
}

/* ============================================
   ESTRUCTURA PRINCIPAL DEL PANEL
   ============================================ */
.admin-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary-color) 100%);
    color: white;
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
    position: sticky;
    top: 0;
    z-index: 100;
}

.admin-header-brand {
    display: flex;
    align-items: center;
    gap: 1.25rem;
}

.admin-badge {
    background: var(--accent-color);
    color: white;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 1.2px;
}

.admin-header-actions {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.btn-header-link {
    color: white;
    text-decoration: none;
    background: rgba(255,255,255,0.12);
    padding: 0.6rem 1.2rem;
    border-radius: 25px;
    font-size: 0.88rem;
    font-weight: 600;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-header-link:hover {
    background: rgba(255,255,255,0.25);
    color: white;
    transform: translateY(-1px);
}

.btn-logout {
    background: rgba(239, 68, 68, 0.18);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
    padding: 0.6rem 1.1rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-logout:hover {
    background: #ef4444;
    color: white;
}

.admin-container {
    max-width: 1320px;
    margin: 2.25rem auto;
    padding: 0 1.5rem;
}

/* ============================================
   ESTADÍSTICAS / METRICS DASHBOARD
   ============================================ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    gap: 1.25rem;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: rgba(197, 160, 89, 0.5);
}

.stat-icon {
    width: 54px;
    height: 54px;
    border-radius: 14px;
    background: rgba(107, 44, 62, 0.06);
    color: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(107, 44, 62, 0.1);
}

.stat-info h4 {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-info .stat-value {
    font-size: 1.85rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 0.1rem;
}

/* ============================================
   PESTAÑAS / TABS
   ============================================ */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 1.75rem;
    border: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 0.9rem 1.25rem;
    border: none;
    background: transparent;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
}

.tab-btn:hover {
    color: var(--primary-color);
    background: rgba(107, 44, 62, 0.04);
}

.tab-btn.active {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 12px rgba(107, 44, 62, 0.25);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* ============================================
   PANEL CARD (TARJETA CONTENEDORA)
   ============================================ */
.panel-card {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.04), 0 1px 3px rgba(0, 0, 0, 0.05);
    border: 1px solid var(--border-color);
    padding: 2.25rem 2.5rem;
    margin-bottom: 2rem;
}

.panel-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

.panel-card-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--primary-color);
    margin: 0 0 0.25rem 0;
    letter-spacing: -0.3px;
}

.panel-card-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0;
}

/* ============================================
   TABLA DE PROPIEDADES
   ============================================ */
.table-responsive {
    overflow-x: auto;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-color);
}

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

.admin-table th {
    background: #f8fafc;
    padding: 1rem 1.2rem;
    font-weight: 700;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
}

.admin-table td {
    padding: 1.1rem 1.2rem;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}

.admin-table tr:hover {
    background-color: #f8fafc;
}

.prop-thumb {
    width: 64px;
    height: 48px;
    border-radius: var(--radius-sm);
    object-fit: cover;
    background: #e2e8f0;
    box-shadow: 0 2px 4px rgba(0,0,0,0.08);
}

.badge-tipo {
    display: inline-block;
    padding: 0.25rem 0.7rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-venta {
    background: #dcfce7;
    color: #15803d;
}

.badge-alquiler {
    background: #dbeafe;
    color: #1d4ed8;
}

.badge-estatico {
    background: #f1f5f9;
    color: #64748b;
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-weight: 600;
}

.badge-dinamico {
    background: #fef3c7;
    color: #b45309;
    font-size: 0.72rem;
    padding: 0.2rem 0.55rem;
    border-radius: 6px;
    font-weight: 700;
}

.action-btns {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.btn-action {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.btn-action.edit {
    background: #eff6ff;
    color: #2563eb;
    border-color: #bfdbfe;
}

.btn-action.edit:hover {
    background: #2563eb;
    color: white;
}

.btn-action.delete {
    background: #fff1f2;
    color: #e11d48;
    border-color: #fecdd3;
}

.btn-action.delete:hover {
    background: #e11d48;
    color: white;
}

.btn-action.view {
    background: #f0fdf4;
    color: #16a34a;
    border-color: #bbf7d0;
}

.btn-action.view:hover {
    background: #16a34a;
    color: white;
}

/* Controls / Search Bar */
.filter-bar {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.search-box-wrapper {
    position: relative;
    flex: 1;
    min-width: 260px;
}

.search-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.75rem;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    box-sizing: border-box;
    transition: all 0.2s;
}

.search-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(107, 44, 62, 0.12);
}

.select-filter {
    padding: 0.8rem 1.25rem;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    font-size: 0.92rem;
    background: white;
    color: var(--text-main);
    cursor: pointer;
    transition: all 0.2s;
}

.select-filter:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* ============================================
   FORMULARIO CREAR / EDITAR (CON ESTILOS PREMIUM)
   ============================================ */
.form-section-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--primary-color);
    background: linear-gradient(135deg, rgba(107, 44, 62, 0.04) 0%, rgba(197, 160, 89, 0.06) 100%);
    border-left: 4px solid var(--primary-color);
    padding: 0.85rem 1.25rem;
    border-radius: var(--radius-sm);
    margin: 2.25rem 0 1.25rem 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.form-section-title svg {
    color: var(--primary-color);
}

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

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.form-group.span-2 {
    grid-column: span 2;
}

.form-group label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #334155;
}

.form-group label .req {
    color: #e11d48;
    font-weight: 800;
    margin-left: 2px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.85rem 1.1rem;
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-family: inherit;
    color: var(--text-main);
    background-color: #ffffff;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(107, 44, 62, 0.12);
}

.form-group textarea {
    resize: vertical;
    line-height: 1.6;
}

/* Tag manager para características */
.add-tag-box {
    display: flex;
    gap: 0.75rem;
}

.add-tag-box input {
    flex: 1;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-top: 0.85rem;
}

.tag-item {
    background: #f1f5f9;
    color: var(--text-main);
    padding: 0.45rem 0.95rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    border: 1px solid var(--border-color);
}

.tag-remove {
    cursor: pointer;
    color: #ef4444;
    font-weight: bold;
    font-size: 1.1rem;
    line-height: 1;
    transition: color 0.2s;
}

.tag-remove:hover {
    color: #dc2626;
}

/* ============================================
   SECCIÓN DE CARGA DE IMÁGENES / DROPZONE
   ============================================ */
.dropzone-wrapper {
    margin-bottom: 1.5rem;
}

.dropzone {
    border: 2px dashed #c5a059;
    background: linear-gradient(135deg, rgba(107, 44, 62, 0.03) 0%, rgba(197, 160, 89, 0.08) 100%);
    border-radius: var(--radius-lg);
    padding: 2.75rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.dropzone:hover {
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(107, 44, 62, 0.1);
}

.dropzone.dragover {
    border-color: var(--primary-color);
    background: rgba(107, 44, 62, 0.1);
    transform: scale(1.01);
    box-shadow: 0 0 25px rgba(107, 44, 62, 0.25);
}

.dropzone-icon-container {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: linear-gradient(135deg, #ffffff 0%, #fcf8f2 100%);
    color: var(--primary-color);
    box-shadow: 0 6px 16px rgba(107, 44, 62, 0.15), 0 0 0 1px rgba(197, 160, 89, 0.3);
    margin-bottom: 1.2rem;
    transition: transform 0.3s ease;
}

.dropzone:hover .dropzone-icon-container {
    transform: scale(1.1) rotate(-3deg);
}

.dropzone-plus-badge {
    position: absolute;
    bottom: -2px;
    right: -2px;
    background: var(--accent-color);
    color: white;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 1rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid white;
}

.dropzone-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--primary-color);
    margin: 0 0 0.4rem 0;
}

.dropzone-subtitle {
    font-size: 0.88rem;
    color: var(--text-muted);
    margin: 0 0 1.25rem 0;
}

.dropzone-btn-select {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(107, 44, 62, 0.25);
    transition: all 0.2s ease;
}

.dropzone-chips {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.chip-item {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    border: 1px solid rgba(197, 160, 89, 0.35);
}

/* Header & Barra de Acciones de Galería */
.gallery-count-badge {
    background: rgba(107, 44, 62, 0.08);
    color: var(--primary-color);
    font-size: 0.82rem;
    font-weight: 700;
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    border: 1px solid rgba(107, 44, 62, 0.15);
}

.gallery-actions-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8fafc;
    padding: 0.75rem 1.1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.gallery-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
}

.btn-clear-all {
    background: #ffe4e6;
    color: #e11d48;
    border: 1px solid #fecdd3;
    padding: 0.45rem 0.9rem;
    border-radius: 8px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.btn-clear-all:hover {
    background: #e11d48;
    color: white;
}

/* GRID DE PREVIEW DE FOTOS */
.image-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1.25rem;
    margin-top: 1rem;
}

.preview-item {
    position: relative;
    aspect-ratio: 4/3;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    border: 2px solid white;
    background: #1e293b;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.preview-item:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 0 12px 24px rgba(0,0,0,0.18);
    z-index: 10;
}

.preview-item.es-portada {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(197, 160, 89, 0.4), 0 8px 20px rgba(0,0,0,0.15);
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.preview-item:hover img {
    transform: scale(1.08);
}

/* Badge PORTADA */
.badge-portada {
    position: absolute;
    top: 6px;
    left: 6px;
    background: linear-gradient(135deg, #c5a059 0%, #b38e46 100%);
    color: white;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 3px 8px;
    border-radius: 10px;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    z-index: 3;
    text-transform: uppercase;
    display: flex;
    align-items: center;
    gap: 4px;
}

.preview-index-tag {
    position: absolute;
    bottom: 6px;
    left: 6px;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px);
    color: white;
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 8px;
    z-index: 3;
}

/* OVERLAY DE ACCIONES AL HOVER */
.preview-actions-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.68);
    backdrop-filter: blur(3px);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    opacity: 0;
    transition: opacity 0.25s ease;
    z-index: 4;
}

.preview-item:hover .preview-actions-overlay {
    opacity: 1;
}

.preview-top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn-make-cover {
    background: var(--accent-color);
    color: white;
    border: none;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 4px 8px;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: background 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.btn-make-cover:hover {
    background: #b38e46;
}

.btn-remove-photo {
    background: rgba(225, 29, 72, 0.9);
    color: white;
    border: none;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: bold;
    transition: transform 0.2s, background 0.2s;
}

.btn-remove-photo:hover {
    background: #dc2626;
    transform: scale(1.15);
}

.preview-reorder-controls {
    display: flex;
    justify-content: center;
    gap: 6px;
}

.btn-reorder {
    background: rgba(255, 255, 255, 0.25);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.4);
    width: 28px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.75rem;
    transition: background 0.2s;
}

.btn-reorder:hover {
    background: rgba(255, 255, 255, 0.5);
}

/* Botones Principales del Formulario */
.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-light) 100%);
    color: white;
    padding: 0.85rem 2.2rem;
    border: none;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 14px rgba(107, 44, 62, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(107, 44, 62, 0.4);
}

.btn-secondary {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid var(--border-input);
    padding: 0.85rem 1.8rem;
    border-radius: var(--radius-md);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-secondary:hover {
    background: #e2e8f0;
    color: var(--text-main);
}

/* ============================================
   TOAST NOTIFICATIONS
   ============================================ */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    background: white;
    padding: 1rem 1.35rem;
    border-radius: var(--radius-md);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 0.85rem;
    min-width: 290px;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--primary-color);
    font-size: 0.92rem;
    font-weight: 600;
}

.toast.success { border-left-color: #16a34a; }
.toast.error { border-left-color: #dc2626; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideInRight {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Responsive */
@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-group.span-2 {
        grid-column: span 1;
    }
}

@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
        padding: 1rem;
    }
    .admin-tabs {
        flex-direction: column;
    }
    .panel-card {
        padding: 1.5rem;
    }
    .panel-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Modal de Confirmación de Eliminación */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.65);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.modal-card {
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    width: 100%;
    max-width: 480px;
    padding: 2rem;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
    animation: modalPop 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes modalPop {
    from { transform: scale(0.92); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.modal-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
}

.modal-close {
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: #64748b;
    cursor: pointer;
    line-height: 1;
    padding: 0.25rem 0.5rem;
    border-radius: 8px;
    transition: background 0.2s;
}

.modal-close:hover {
    background: #f1f5f9;
    color: #0f172a;
}
