/* 
 * Servillantas El Puente - Dashboard CSS Aislado PREMIUM
 * Diseño estilo Stripe / Vercel / Linear con Live Preview Integrado
 */

@import url('https://fonts.googleapis.com/css2?family=Bebas+Neue&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700&display=swap');

:root {
    --bg-dark: #07070a;
    --panel-dark: rgba(13, 13, 18, 0.94);
    --border-glass: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(229, 9, 20, 0.2);
    
    --primary-red: #e50914;
    --primary-yellow: #ffb703;
    --text-white: #ffffff;
    --text-gray: #a0a0b0;
    --text-dim: #5c5c6d;
    
    --radius-lg: 16px;
    --radius-md: 10px;
    --radius-sm: 6px;
    
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
    --shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-gray);
    min-height: 100vh;
    overflow: hidden;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Outfit', sans-serif;
    color: var(--text-white);
    font-weight: 600;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
::-webkit-scrollbar-track {
    background: #09090c;
    border-left: 1px solid rgba(255, 255, 255, 0.03);
}
::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.12);
    border-radius: 4px;
    border: 2px solid #09090c;
    transition: all 0.3s ease;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--primary-red);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.5);
}

/* LOGIN VIEW */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100vw;
    height: 100vh;
    padding: 20px;
    background: linear-gradient(rgba(0, 0, 0, 0.25), rgba(0, 0, 0, 0.40)), url('../../img/section-1-servillantas.jpg') center/cover no-repeat;
}

.login-container {
    max-width: 420px;
    width: 100%;
    margin: auto;
    padding: 45px 35px;
    background: rgba(0, 0, 0, 0.05); /* Ultra transparent glass */
    border: 1px solid rgba(255, 255, 255, 0.20);
    border-radius: var(--radius-lg);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), inset 0 1px 1px rgba(255, 255, 255, 0.20);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-align: center;
    position: relative;
    z-index: 10;
}

.login-container::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    z-index: -1;
    background: linear-gradient(135deg, rgba(229, 9, 20, 0.3), rgba(229, 9, 20, 0) 60%);
    border-radius: calc(var(--radius-lg) + 1px);
    opacity: 0.2; /* Subtler red tint */
    pointer-events: none;
}

.login-logo {
    width: 170px;
    margin-bottom: 25px;
}

.login-title {
    font-size: 24px;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.login-container .login-subtitle {
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    margin-bottom: 30px;
}

.login-container .form-label {
    color: #ffffff;
    opacity: 1;
}

.login-container .form-control {
    color: #ffffff;
    background: rgba(0, 0, 0, 0.4);
    border-color: rgba(255, 255, 255, 0.2);
}

.login-container .form-control::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.login-container #toggle-password {
    color: rgba(255, 255, 255, 0.7) !important;
}

/* FORM ELEMENTS */
.form-group {
    margin-bottom: 22px;
    text-align: left;
}

.form-label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    color: var(--text-white);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.85;
}

.form-control {
    width: 100%;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    color: var(--text-white);
    padding: 12px 14px;
    font-size: 14px;
    font-family: inherit;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-red);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.12);
    background: rgba(255, 255, 255, 0.06);
}

textarea.form-control {
    min-height: 90px;
    resize: vertical;
}

select.form-control option {
    background-color: #0d0d12;
    color: var(--text-white);
}

/* BUTTONS */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    border-radius: var(--radius-sm);
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-red);
    color: var(--text-white);
}

.btn-primary:hover {
    background: #ff1c27;
    transform: translateY(-1.5px);
    box-shadow: 0 5px 15px rgba(229, 9, 20, 0.25);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-white);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    color: var(--text-white);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
    border-radius: var(--radius-sm);
}

.btn-block {
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 22px;
    font-size: 13px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 10px;
}

.alert-danger {
    background: rgba(229, 9, 20, 0.08);
    border: 1px solid rgba(229, 9, 20, 0.15);
    color: #ff4d5a;
}

.alert-success {
    background: rgba(46, 204, 113, 0.08);
    border: 1px solid rgba(46, 204, 113, 0.15);
    color: #2ecc71;
}

/* DASHBOARD LAYOUT */
.dashboard-wrapper {
    display: flex;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* 1. SIDEBAR */
.sidebar {
    width: 250px;
    background: #09090c;
    border-right: 1px solid var(--border-glass);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100%;
}

.sidebar-brand {
    padding: 24px;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    justify-content: flex-start;
    align-items: center;
    background: rgba(229, 9, 20, 0.015);
}

.brand-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: left;
    gap: 1px;
}

.brand-dashboard {
    font-family: 'Inter', sans-serif;
    font-size: 9px;
    font-weight: 500;
    color: var(--primary-red);
    letter-spacing: 3px;
    text-transform: uppercase;
    line-height: 1.2;
}

.brand-subtitle {
    font-family: 'Bebas Neue', sans-serif;
    font-size: 21px;
    font-weight: 400;
    color: var(--text-white);
    letter-spacing: 1.5px;
    line-height: 1;
    text-transform: uppercase;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    white-space: nowrap;
}

.brand-highlight {
    color: var(--primary-red);
    text-shadow: 0 0 10px rgba(229, 9, 20, 0.25);
}

.sidebar-menu {
    list-style: none;
    padding: 16px 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    overflow-y: auto;
}

.menu-item button, .menu-item a {
    width: 100%;
    background: transparent;
    border: none;
    color: var(--text-gray);
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    text-align: left;
    font-family: 'Outfit', sans-serif;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: var(--transition);
    text-decoration: none;
}

.menu-item button i {
    width: 18px;
    text-align: center;
    font-size: 15px;
    opacity: 0.7;
}

.menu-item.active button, .menu-item button:hover, .menu-item a:hover {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-white);
}

.menu-item.active button {
    border-left: 2px solid var(--primary-red);
    background: rgba(229, 9, 20, 0.04);
}

.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-glass);
}

/* 2. FORM EDITING COLUMN */
.main-content {
    width: 580px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--bg-dark);
    border-right: 1px solid var(--border-glass);
    height: 100%;
    overflow: hidden;
}

.top-bar {
    height: 70px;
    background: #09090c;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.page-title {
    font-size: 17px;
    font-weight: 600;
}

.page-title i {
    color: var(--primary-red);
    margin-right: 8px;
}

.user-profile {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: var(--text-dim);
}

.content-body {
    padding: 24px;
    flex: 1;
    overflow-y: auto;
}

/* CARDS & PANELS */
.dashboard-card {
    background: var(--panel-dark);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.card-title {
    font-size: 15px;
    margin-bottom: 18px;
    border-bottom: 1px solid var(--border-glass);
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-title i {
    color: var(--primary-red);
    font-size: 14px;
}

.tab-pane {
    display: none;
}

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

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

.dynamic-item-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin-bottom: 14px;
}

.dynamic-item-header {
    font-size: 12px;
    font-weight: 700;
    color: var(--primary-yellow);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 3. LIVE PREVIEW PANE (STICKY RIGHT) */
.preview-pane {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: #060608;
    height: 100%;
    overflow: hidden;
}

.preview-topbar {
    height: 70px;
    background: #09090c;
    border-bottom: 1px solid var(--border-glass);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    flex-shrink: 0;
}

.device-selectors {
    display: flex;
    gap: 6px;
}

.device-btn {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    color: var(--text-gray);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: 'Outfit', sans-serif;
    font-size: 12px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: var(--transition);
}

.device-btn:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-white);
}

.device-btn.active {
    background: rgba(229, 9, 20, 0.08);
    color: var(--text-white);
    border-color: var(--primary-red);
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.12);
}

.preview-indicator {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pulse-dot {
    width: 6px;
    height: 6px;
    background: #2ecc71;
    border-radius: 50%;
    box-shadow: 0 0 6px #2ecc71;
    animation: pulse 2.2s infinite;
}

@keyframes pulse {
    0% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0.6); }
    70% { transform: scale(1); box-shadow: 0 0 0 5px rgba(46, 204, 113, 0); }
    100% { transform: scale(0.9); box-shadow: 0 0 0 0 rgba(46, 204, 113, 0); }
}

.viewport-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden;
    scrollbar-gutter: stable;
    background: radial-gradient(circle at center, #111116 0%, #060608 100%);
}

.device-chassis {
    transition: all 0.45s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 8px solid transparent;
    margin: 0 auto;
}

.device-chassis.device-desktop {
    width: 1280px;
    height: 720px;
    flex-shrink: 0;
    border: 8px solid #14141a;
    border-radius: 16px;
    background: #000;
    box-shadow: none;
}

.device-chassis.device-tablet {
    width: 768px;
    height: 95%;
    flex-shrink: 0;
    border: 8px solid #14141a;
    border-radius: 16px;
    background: #000;
    box-shadow: none !important;
}

.device-chassis.device-mobile {
    width: 375px;
    height: 85%;
    flex-shrink: 0;
    border: 8px solid #14141a;
    border-radius: 16px;
    background: #000;
    box-shadow: none !important;
}

/* Simulated screen overlays */
.device-chassis.device-mobile::before {
    content: '';
    position: absolute;
    top: 4px;
    width: 100px;
    height: 16px;
    background: #1a1a24;
    border-bottom-left-radius: 10px;
    border-bottom-right-radius: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}

.device-chassis.device-mobile::after {
    content: '';
    position: absolute;
    bottom: 4px;
    width: 110px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    pointer-events: none;
}

.preview-iframe {
    width: 100%;
    height: 100%;
    border: none;
    background: #000;
    display: block;
    flex: 1 1 100%;
    align-self: stretch;
}

.device-chassis.device-desktop .preview-iframe {
    border-radius: 8px;
}

.device-chassis.device-tablet .preview-iframe {
    border-radius: 8px;
}

.device-chassis.device-mobile .preview-iframe {
    border-radius: 8px;
}

/* MEDIA LIBRARY styles */
.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.media-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-sm);
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
}

.media-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-1.5px);
}

.media-preview-container {
    height: 100px;
    background: rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.media-preview-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.media-info {
    padding: 8px;
    font-size: 10px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
}

.media-name {
    color: var(--text-white);
    font-weight: 600;
    word-break: break-all;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.media-size {
    color: var(--text-dim);
}

.media-actions {
    display: flex;
    gap: 4px;
    margin-top: auto;
}

.btn-icon {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-white);
    border: 1px solid var(--border-glass);
    border-radius: 4px;
    padding: 5px;
    font-size: 11px;
    cursor: pointer;
    text-align: center;
    transition: var(--transition);
}

.btn-icon:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
}

.upload-zone {
    border: 2px dashed var(--border-glass);
    border-radius: var(--radius-md);
    padding: 30px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: rgba(255, 255, 255, 0.005);
}

.upload-zone:hover {
    border-color: var(--primary-red);
    background: rgba(229, 9, 20, 0.015);
}

.upload-icon {
    font-size: 32px;
    color: var(--text-dim);
    margin-bottom: 12px;
}

/* RESPONSIVE BREAKPOINTS (SAFETY & PARITY) */
@media (max-width: 1200px) {
    .preview-pane {
        display: none;
    }
    
    .main-content {
        width: 100%;
        max-width: 100%;
        flex-shrink: 1;
        border-right: none;
    }
}

@media (max-width: 768px) {
    .dashboard-wrapper {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-glass);
    }
    
    .sidebar-menu {
        flex-direction: row;
        overflow-x: auto;
        padding: 8px;
    }
    
    .menu-item button {
        white-space: nowrap;
        padding: 8px 12px;
    }
    
    .main-content {
        width: 100%;
        max-width: 100%;
        flex: 1;
        min-height: 0;
        height: auto;
    }
    
    .top-bar {
        padding: 0 16px;
    }
    
    .content-body {
        padding: 16px;
    }
}

/* Botones de guardado persistentes (Sticky) en Móviles y Tablets */
@media (max-width: 1024px) {
    .tab-pane form {
        display: flex;
        flex-direction: column;
        padding-bottom: 60px; /* Espacio de seguridad al final para que el scroll supere el botón */
    }

    .tab-pane form button[name="save_content"] {
        position: sticky;
        bottom: 0px;
        z-index: 999;
        margin: 20px 0 10px 0 !important;
        width: 100%;
        padding: 14px 20px;
        border-radius: var(--radius-md);
        background: var(--primary-red);
        color: var(--text-white);
        border: 1px solid rgba(255, 255, 255, 0.1);
        font-weight: 600;
        letter-spacing: 0.5px;
        /* Sombra premium que funciona como degradado para ocultar el texto que pasa por debajo */
        box-shadow: 0 -15px 25px 8px var(--bg-dark), 
                    0 4px 15px rgba(229, 9, 20, 0.4);
        transition: var(--transition);
    }

    .tab-pane form button[name="save_content"]:hover {
        background: #ff1c27;
        box-shadow: 0 -15px 25px 8px var(--bg-dark), 
                    0 6px 20px rgba(229, 9, 20, 0.6);
        transform: translateY(-1px);
    }
    
    .tab-pane form button[name="save_content"]:active {
        transform: translateY(1px);
    }
}


/* Premium Visual Media Picker */
.media-picker-field {
    display: flex;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--border-glass);
    border-radius: 12px;
    padding: 10px;
    margin-top: 5px;
    transition: all 0.3s ease;
    width: 100%;
}

.media-picker-field:hover {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
}

.media-picker-preview {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    background: #09090c;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: pointer;
    flex-shrink: 0;
}

.media-picker-preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.media-picker-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.media-picker-preview:hover .media-picker-overlay {
    opacity: 1;
}

.media-picker-preview:hover img {
    transform: scale(1.1);
    filter: blur(1px);
}

.media-picker-meta {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.media-picker-filename {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 180px;
    font-family: monospace;
}

/* Modal Dialog */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: #0c0c10;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 30px 70px rgba(0, 0, 0, 0.8);
    animation: modalSlide 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
}

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

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #09090c;
}

.modal-header h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-close {
    font-size: 24px;
    color: var(--text-dim);
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #fff;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex: 1;
    background: #0c0c10;
}

.upload-zone-compact {
    border: 2px dashed rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.01);
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-zone-compact:hover {
    border-color: var(--primary-red);
    background: rgba(229, 9, 20, 0.02);
}

.media-grid-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.media-picker-card {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.3s ease;
}

.media-picker-card:hover {
    border-color: var(--primary-red);
    transform: translateY(-2px);
    background: rgba(255, 255, 255, 0.03);
}

.media-info-compact {
    padding: 8px;
    text-align: center;
    background: rgba(0, 0, 0, 0.3);
}

.media-info-compact .media-name {
    font-size: 11px;
    font-weight: 500;
    color: var(--text-dim);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: block;
}

.media-picker-card:hover .media-name {
    color: #fff;
}

/* Sleek sorting buttons & cards controls */
.dynamic-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-bottom: 10px;
    margin-bottom: 15px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-light);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.dynamic-item-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-sort {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-dim);
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.btn-sort:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-delete-card {
    background: rgba(229, 9, 20, 0.05);
    border: 1px solid rgba(229, 9, 20, 0.15);
    color: #ff4d5a;
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 11px;
    transition: all 0.2s ease;
}

.btn-delete-card:hover {
    background: var(--primary-red);
    border-color: var(--primary-red);
    color: #fff;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
}

/* ==========================================================================
   PERSONALIZACIÓN VISUAL (THEME EDITOR) STYLES
   ========================================================================== */

.customizer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.02) 0%, rgba(255, 255, 255, 0) 100%);
    border: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 16px;
    margin-bottom: 25px;
    gap: 20px;
}

@media (max-width: 768px) {
    .customizer-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .btn-reset-theme {
        width: 100%;
    }
}

.preset-pill-group {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}

.preset-pill {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-light);
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.preset-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    transform: translateY(-1px);
}

.preset-color-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 6px rgba(0, 0, 0, 0.5);
}

.unit-btn.active {
    background: #E50914 !important;
    color: #fff !important;
    box-shadow: 0 0 10px rgba(229, 9, 20, 0.4);
}

.unit-btn:hover:not(.active) {
    background: rgba(255, 255, 255, 0.08) !important;
}

.color-picker-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

@media (max-width: 576px) {
    .color-picker-grid {
        grid-template-columns: 1fr;
    }
    .color-picker-grid > div {
        grid-column: span 1 !important;
    }
}

.color-picker-wrapper {
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 5px;
    gap: 8px;
    position: relative;
    transition: all 0.3s ease;
}

.color-picker-wrapper:focus-within {
    border-color: rgba(255, 255, 255, 0.25);
    background: rgba(255, 255, 255, 0.04);
}

.color-preview-badge {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid rgba(255, 255, 255, 0.15);
    position: relative;
    overflow: hidden;
    box-shadow: inset 0 0 4px rgba(0,0,0,0.5);
    flex-shrink: 0;
}

.color-input-native {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.color-text-field {
    border: none !important;
    background: transparent !important;
    color: #fff !important;
    font-family: monospace;
    font-size: 14px;
    height: 36px !important;
    padding: 0 10px !important;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    flex-grow: 1;
}

.color-text-field:focus {
    box-shadow: none !important;
    outline: none !important;
}

.typography-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

@media (max-width: 768px) {
    .typography-grid {
        grid-template-columns: 1fr;
    }
}

.typo-block {
    background: rgba(255, 255, 255, 0.01);
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 12px;
    padding: 20px;
}

.typo-block-header {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #fff;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    padding-bottom: 10px;
}

.form-select-custom {
    background: rgba(255, 255, 255, 0.02) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-radius: 10px !important;
    height: 44px !important;
    padding: 0 15px !important;
    cursor: pointer;
    width: 100%;
}

.form-select-custom option {
    background-color: #0c0d12 !important;
    color: #fff !important;
}

.form-select-custom:focus {
    border-color: rgba(255, 255, 255, 0.2) !important;
    background: rgba(255, 255, 255, 0.04) !important;
    outline: none !important;
}


