@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

/* ==========================================
   1. VARIABLES NEOMÓRFICAS (SOFT UI)
   ========================================== */
:root { 
    /* Colores base exactos (El secreto del Neomorfismo) */
    --neo-bg: #E0E5EC; 
    --neo-surface: #E0E5EC;
    
    /* Acentos */
    --primary-color: #0A84FF; 
    --success-color: #10B981; 
    --danger-color: #EF4444; 
    --warning-color: #F59E0B;
    --info-color: #0EA5E9;
    
    /* Textos - mejoramos contraste con tonos más profundos */
    --text-main: #1A202C;       /* más oscuro que #2D3748 */
    --text-muted: #4A5568;      /* más oscuro que #718096 */
    
    /* Radios */
    --radius-lg: 20px;
    --radius-md: 12px;
    --radius-sm: 8px;
    
    /* SOMBRAS NEOMÓRFICAS (EXTRUIDO) */
    --neo-shadow: 9px 9px 16px rgba(163, 177, 198, 0.6), 
                 -9px -9px 16px rgba(255, 255, 255, 0.8);
    
    --neo-shadow-sm: 5px 5px 10px rgba(163, 177, 198, 0.5), 
                    -5px -5px 10px rgba(255, 255, 255, 0.8);

    --neo-shadow-hover: 12px 12px 20px rgba(163, 177, 198, 0.7), 
                       -12px -12px 20px rgba(255, 255, 255, 0.9);

    /* SOMBRAS NEOMÓRFICAS (HUNDIDO/PRESIONADO) */
    --neo-inset: inset 6px 6px 10px 0 rgba(163, 177, 198, 0.6), 
                 inset -6px -6px 10px 0 rgba(255, 255, 255, 0.8);
                 
    --neo-inset-sm: inset 3px 3px 6px 0 rgba(163, 177, 198, 0.6), 
                    inset -3px -3px 6px 0 rgba(255, 255, 255, 0.8);
}

/* ==========================================
   2. RESET Y BASE SOFT (con mejor contraste)
   ========================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--neo-bg);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    font-weight: 500;
}

h1, h2, h3, h4 {
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

/* ==========================================
   3. HEADER TIPO "ESTANTE" NEOMÓRFICO
   ========================================== */
header {
    background: var(--neo-bg);
    box-shadow: var(--neo-shadow);
    padding: 1.2rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 1rem;
    border-radius: 0 0 20px 20px;
    margin-bottom: 1rem;
}

header h1 {
    font-size: 1.8rem;
    color: var(--text-main);
}

/* ==========================================
   4. BOTONES (EMPUJADOS HACIA AFUERA) con mejor feedback visual
   ========================================== */
.btn {
    padding: 0.7rem 1.5rem;
    background: var(--neo-surface);
    border: none;
    border-radius: 40px;
    font-weight: 700;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    box-shadow: var(--neo-shadow-sm);
    color: var(--text-main);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn:hover {
    box-shadow: var(--neo-shadow);
    transform: translateY(-2px);
}

.btn:active {
    box-shadow: var(--neo-inset-sm);
    transform: translateY(0);
}

/* Variantes de color: en Soft UI coloreamos el texto, pero añadimos un pequeño realce */
.btn-primary { color: var(--primary-color); font-weight: 800; }
.btn-secondary { color: var(--text-muted); }
.btn-success { color: var(--success-color); }
.btn-danger { color: var(--danger-color); }
.btn-info { color: var(--info-color); }
.btn-warning { color: var(--warning-color); }

.btn-sm {
    padding: 0.4rem 1rem;
    font-size: 0.8rem;
}

/* ==========================================
   5. TARJETAS (ESTRUCTURAS SÓLIDAS EXTRUIDAS) con padding mejorado en desktop
   ========================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 2.5rem;
    padding: 1.5rem 0;
}

.card {
    background: var(--neo-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--neo-shadow);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: all 0.3s ease;
    border: none;
    min-height: 300px; /* un poco más alto */
    overflow: hidden;
}

.card:hover {
    box-shadow: var(--neo-shadow-hover);
    transform: translateY(-5px);
}

.card-bg-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.6;
    transition: opacity 0.4s ease, transform 0.4s ease;
    mix-blend-mode: multiply;
}

.card:hover .card-bg-preview {
    opacity: 0.9;
    transform: scale(1.03);
}

.card-content {
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(224, 229, 236, 0.7) 0%, rgba(224, 229, 236, 0.95) 100%);
}

.card-header {
    padding: 1.5rem 2rem;  /* más padding */
    font-weight: 800;
    font-size: 1.4rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.card-body {
    padding: 1.5rem 2rem;
    flex-grow: 1;
    font-weight: 600;
    font-size: 1rem;
}

.card-footer {
    padding: 1.2rem 2rem;
    display: flex;
    gap: 0.8rem;
}

.btn-edit-name {
    border: none;
    background: var(--neo-surface);
    box-shadow: var(--neo-shadow-sm);
    color: var(--text-muted);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    cursor: pointer;
}

.btn-edit-name:hover {
    color: var(--primary-color);
    box-shadow: var(--neo-shadow);
}
.btn-edit-name:active {
    box-shadow: var(--neo-inset-sm);
}

/* ==========================================
   6. ACORDEONES Y GRUPOS con más contraste
   ========================================== */
.grupo-section {
    margin-bottom: 2rem;
}

.grupo-header {
    background: var(--neo-surface);
    box-shadow: var(--neo-shadow);
    color: var(--text-main);
    padding: 1.2rem 2rem;
    cursor: pointer;
    border-radius: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 800;
    transition: all 0.2s;
}

.grupo-header:active {
    box-shadow: var(--neo-inset-sm);
}

.grupo-content {
    display: none;
    padding: 2rem 1rem 1rem 2rem;
}

.grupo-content.active {
    display: block;
    animation: fadeIn 0.4s ease;
}

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

/* ==========================================
   7. MODALES NEOMÓRFICOS con padding mejorado
   ========================================== */
.modal {
    display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%;
    background: rgba(224, 229, 236, 0.8); backdrop-filter: blur(5px);
    align-items: center; justify-content: center;
}

.modal.is-visible { display: flex; }

.modal-content {
    background: var(--neo-surface);
    border-radius: var(--radius-lg);
    width: 90%; max-width: 650px; max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--neo-shadow-hover);
    border: none;
    animation: modalPop 0.3s ease;
}

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

.modal-header {
    padding: 2rem 2.5rem;  /* más aire */
    display: flex; justify-content: space-between; align-items: center;
}

.close-btn {
    background: var(--neo-surface);
    box-shadow: var(--neo-shadow-sm);
    border: none; width: 44px; height: 44px; border-radius: 50%;
    font-size: 1.4rem; display: flex; align-items: center; justify-content: center;
    cursor: pointer; transition: all 0.2s; color: var(--text-muted);
}

.close-btn:hover { color: var(--danger-color); box-shadow: var(--neo-shadow); }
.close-btn:active { box-shadow: var(--neo-inset-sm); }

.modal-body { padding: 0 2.5rem 2.5rem 2.5rem; }
.modal-footer { padding: 1.5rem 2.5rem; display: flex; justify-content: flex-end; gap: 15px; }

/* ==========================================
   8. INPUTS Y FORMULARIOS (TALLADOS HACIA ADENTRO)
   ========================================== */
.form-group { margin-bottom: 2rem; }

.form-group label {
    display: block; margin-bottom: 0.8rem; font-weight: 700;
    color: var(--text-main); font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px;
}

.form-control,
.form-group input:not([type="checkbox"]):not([type="color"]),
.form-group select,
.form-group textarea {
    width: 100%; padding: 1.2rem 1.5rem;
    border: none; border-radius: 16px;
    background: var(--neo-surface);
    box-shadow: var(--neo-inset);
    font-size: 1rem; color: var(--text-main);
    transition: all 0.2s;
}

.form-control:focus,
.form-group input:focus,
.form-group select:focus {
    outline: none;
    box-shadow: var(--neo-inset), 0 0 0 3px rgba(10, 132, 255, 0.3);
}

/* ==========================================
   9. LISTAS, ALERTAS Y PREVIEWS con mejor contraste
   ========================================== */
.product-list-item {
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.2rem 2rem;
    background: var(--neo-surface);
    box-shadow: var(--neo-shadow-sm);
    border-radius: 18px;
    margin-bottom: 1rem;
    transition: 0.2s;
}

.product-list-item:hover {
    transform: scale(1.01);
    box-shadow: var(--neo-shadow);
}

.product-name { font-weight: 700; color: var(--text-main); }
.product-price { color: var(--primary-color); font-weight: 800; }

.modal-alert { text-align: center; padding: 2.5rem; }
.modal-alert .alert-icon { font-size: 5rem; margin-bottom: 1.5rem; }
.modal-alert .alert-icon .bi-check-circle-fill { color: var(--success-color); }
.modal-alert .alert-icon .bi-x-circle-fill { color: var(--danger-color); }

.image-preview-container {
    border-radius: var(--radius-md);
    background: var(--neo-surface);
    box-shadow: var(--neo-inset);
    padding: 2rem;
    margin-bottom: 2rem;
}

.image-preview-container img {
    border-radius: 12px;
    box-shadow: var(--neo-shadow-sm);
    max-width: 100%;
}

/* ==========================================
   10. MEJORAS ESPECÍFICAS PARA DESKTOP (pantallas grandes)
   ========================================== */
@media (min-width: 1200px) {
    .container, 
    .main-content {
        padding: 2rem 4rem;
    }
    
    .grid {
        gap: 3rem;
    }
    
    .card-header {
        padding: 2rem 2.5rem;
        font-size: 1.6rem;
    }
    
    .card-body {
        padding: 2rem 2.5rem;
    }
    
    .card-footer {
        padding: 1.5rem 2.5rem;
    }
    
    .modal-content {
        max-width: 750px;
    }
    
    .btn {
        padding: 0.9rem 2rem;
        font-size: 1rem;
    }
    
    .btn-sm {
        padding: 0.5rem 1.2rem;
        font-size: 0.9rem;
    }
}

/* ==========================================
   11. RESPONSIVE (mantenemos el original)
   ========================================== */
@media (max-width: 768px) {
    .grid { grid-template-columns: 1fr; gap: 1.5rem; }
    header { border-radius: 0; }
    .btn { border-radius: 30px; }
}

/* ==========================================
   11. FUENTES LOCALES Y PREVISUALIZADOR
   ========================================== */
/* Cargamos todas tus fuentes locales en el panel maestro */
@font-face { font-family: 'BerlinSans-Bold'; src: url('fonts/BerlinSans-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'BerlinSans'; src: url('fonts/BerlinSans.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Oswald-SemiBold'; src: url('fonts/Oswald-SemiBold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Nunito-BoldItalic'; src: url('fonts/Nunito-BoldItalic.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Nunito-Bold'; src: url('fonts/Nunito-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Montserrat-BoldItalic'; src: url('fonts/Montserrat-BoldItalic.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Montserrat-Bold'; src: url('fonts/Montserrat-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Impact'; src: url('fonts/impact.ttf') format('truetype'); font-display: swap; }
/* NUEVAS FUENTES MODERNAS Y ELEGANTES */
@font-face { font-family: 'BebasNeue'; src: url('fonts/BebasNeue.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Anton'; src: url('fonts/Anton.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'RobotoCondensed-Bold'; src: url('fonts/RobotoCondensed-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Poppins-Bold'; src: url('fonts/Poppins-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Inter-Bold'; src: url('fonts/Inter-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'PlayfairDisplay-Bold'; src: url('fonts/PlayfairDisplay-Bold.ttf') format('truetype'); font-display: swap; }
@font-face { font-family: 'Lora-Bold'; src: url('fonts/Lora-Bold.ttf') format('truetype'); font-display: swap; }
/* Contenedor oscuro (Simulador de TV) para la previsualización */
#style-preview-container {
    background-color: #0f172a; /* Fondo oscuro tipo pantalla apagada */
    background-image: radial-gradient(circle at center, #1e293b 0%, #020617 100%);
    padding: 30px 20px;
    border-radius: 16px;
    text-align: center;
    margin-top: 20px;
    box-shadow: inset 0 10px 30px rgba(0,0,0,0.8), 0 5px 15px rgba(0,0,0,0.1);
    border: 4px solid #334155; /* Borde como el marco de un TV */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 120px;
}

#style-preview {
    transition: all 0.2s ease;
    white-space: nowrap;
    line-height: 1; /* Evita que se corte por arriba o abajo */
}

/* ==========================================
   12. ADMIN DASHBOARD CARDS Y GRUPOS
   ========================================== */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
    padding: 20px;
}

.card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background-color: #333;
    min-height: 250px;
    display: flex;
    flex-direction: column;
    border: 1px solid #ddd;
}

.card-bg-preview {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    opacity: 0.8;
}

.card-content {
    position: relative;
    z-index: 2;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    background: linear-gradient(180deg, rgba(255,255,255,0.4) 0%, rgba(255,255,255,0.7) 100%);
}

.card-body {
    padding: 20px;
    flex-grow: 1;
    text-shadow: 1px 1px 2px rgba(255,255,255,0.8);
    font-weight: 500;
}

.card-header {
    padding: 15px 20px;
    font-weight: 700;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(0,0,0,0.05);
}

.btn-edit-name {
    border: none;
    background: rgba(0,0,0,0.05);
    color: #666;
    border-radius: 6px;
    padding: 4px 8px;
    transition: 0.2s;
    cursor: pointer;
}

.btn-edit-name:hover {
    background: #ffc107;
    color: #000;
}

.card-footer {
    padding: 15px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    background: rgba(255,255,255,0.9);
}

.card-footer .btn {
    padding: 12px 5px;
    font-size: 0.95rem;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
}

.card-footer .btn-danger {
    grid-column: span 1;
}

@keyframes pulse-dot {
    0% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7); }
    70% { transform: scale(1); box-shadow: 0 0 0 6px rgba(16, 185, 129, 0); }
    100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

.grid.sortable-grid {
    gap: 28px;
}

.grid.sortable-grid .card {
    border-radius: 22px;
    min-height: 320px;
    border: none;
    background: var(--neo-surface);
    box-shadow: var(--neo-shadow);
    transition: transform 0.24s ease, box-shadow 0.24s ease;
}

.grid.sortable-grid .card:hover {
    transform: translateY(-6px);
    box-shadow: var(--neo-shadow-hover);
}

.grid.sortable-grid .card-bg-preview {
    inset: 0;
    opacity: 0.52;
    transform: scale(1.01);
    filter: saturate(1.02) contrast(1.03);
}

.grid.sortable-grid .card::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(180deg, rgba(224,229,236,0.12) 0%, rgba(224,229,236,0.36) 30%, rgba(224,229,236,0.7) 62%, rgba(224,229,236,0.9) 100%);
}

.grid.sortable-grid .card-content {
    min-height: 100%;
    background: transparent;
}

.grid.sortable-grid .card-header {
    padding: 18px 20px 12px;
    align-items: flex-start;
    gap: 12px;
    border-bottom: none;
}

.grid.sortable-grid .card-header > span:first-child {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 0;
    font-size: 1.08rem;
    font-weight: 800;
    line-height: 1.15;
    color: #172033;
    letter-spacing: -0.02em;
}

.grid.sortable-grid .card-header > span:first-child::after {
    content: "Menu listo para pantalla";
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--neo-surface);
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0;
    box-shadow: var(--neo-inset-sm);
}

.grid.sortable-grid .card-body {
    padding: 0 20px 18px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    gap: 14px;
    text-shadow: none;
}

.grid.sortable-grid .card-body > p {
    color: #334155;
    font-size: 0.95rem;
    line-height: 1.5;
    font-weight: 600;
    max-width: 30ch;
}

.grid.sortable-grid .card-body::after {
    content: "Orientacion configurada  •  Fondo listo para preview";
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 11px;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 800;
    color: #1f2a44;
    background: var(--neo-surface);
    box-shadow: var(--neo-inset-sm);
}

.grid.sortable-grid .btn-edit-name {
    background: var(--neo-surface);
    color: var(--text-muted);
    border-radius: 12px;
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--neo-shadow-sm);
}

.grid.sortable-grid .btn-edit-name:hover {
    color: var(--primary-color);
    box-shadow: var(--neo-shadow);
}

.grid.sortable-grid .card-footer {
    display: grid !important;
    padding: 18px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.35);
    background: rgba(224,229,236,0.9);
}

.grid.sortable-grid .card-footer .btn,
.grid.sortable-grid .card-footer a.btn {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    font-size: 0.88rem;
    font-weight: 800;
    border-radius: 14px;
    gap: 7px;
}

.grid.sortable-grid .card-footer .compact-action {
    min-height: 44px;
    padding: 10px 10px;
}

.grid.sortable-grid .card-footer .compact-action span {
    display: inline-block;
}

.grid.sortable-grid .card-footer .btn-primary,
.grid.sortable-grid .card-footer .btn-info,
.grid.sortable-grid .card-footer .btn-secondary,
.grid.sortable-grid .card-footer .btn-warning,
.grid.sortable-grid .card-footer .btn-danger {
    background: var(--neo-surface);
}

.grid.sortable-grid .card-footer .wide-action,
.grid.sortable-grid .card-footer .btn-primary {
    grid-column: span 2;
}

.grupo-header {
    background: #333;
    color: #fff;
    padding: 15px 20px;
    cursor: pointer;
    border-radius: 8px;
    margin-top: 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    transition: background 0.3s;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.grupo-header:hover { background: #444; }
.grupo-content { display: none; padding-top: 15px; }
.grupo-content.active { display: block; animation: fadeIn 0.3s; }
.header-buttons { display: flex; gap: 10px; flex-wrap: wrap; }

.grupo-locked .card-footer {
    opacity: 0.4 !important;
    pointer-events: none !important;
    filter: grayscale(100%) !important;
    display: grid !important;
}

.grupo-locked .btn-edit-name {
    display: none !important;
}

.lock-btn-ui {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,0.14);
    border: none;
    color: white;
    padding: 6px 12px;
    border-radius: 999px;
    cursor: pointer;
    transition: 0.3s;
    font-size: 0.88rem;
    font-weight: 800;
}

.lock-btn-ui:hover {
    background: rgba(0,0,0,0.4);
}

.lock-btn-ui .lock-switch {
    position: relative;
    width: 38px;
    height: 22px;
    border-radius: 999px;
    background: rgba(255,255,255,0.28);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.18);
}

.lock-btn-ui .lock-switch::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #fff;
    transition: transform 0.25s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.lock-btn-ui .lock-label {
    min-width: 88px;
    text-align: left;
}

.lock-btn-ui.locked {
    color: #ffd6d6;
}

.lock-btn-ui.locked .lock-switch {
    background: rgba(255, 77, 77, 0.45);
}

.lock-btn-ui.locked .lock-switch::after {
    transform: translateX(16px);
}

.edit-lock-btn {
    background: rgba(0,0,0,0.2);
    border-radius: 10px;
    padding: 6px 10px;
}

.edit-lock-btn i {
    font-size: 1rem;
}

.edit-lock-btn.locked {
    color: #ffb3b3;
    background: rgba(255, 77, 77, 0.18);
}

.sort-lock-btn {
    background: rgba(255,255,255,0.14);
}

.header-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}

.tasa-status-bar {
    background: #f8f9fa;
    padding: 12px 20px;
    border-bottom: 2px solid #e0e0e0;
    display: flex;
    justify-content: flex-start;
    align-items: center;
    font-family: sans-serif;
}

.tasa-status-chip {
    background: var(--neo-surface, #e0e5ec);
    padding: 8px 18px;
    border-radius: 30px;
    box-shadow: 4px 4px 10px rgba(0,0,0,0.1), -4px -4px 10px rgba(255,255,255,0.8);
    display: flex;
    align-items: center;
    gap: 15px;
    border: 1px solid rgba(255,255,255,0.4);
    max-width: 100%;
}

.tasa-status-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    flex-shrink: 0;
}

.tasa-mode-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(0,0,0,0.03);
    padding: 5px 12px;
    border-radius: 20px;
    border: 1px solid rgba(0,0,0,0.05);
}

.countdown-timer-pill {
    font-size: 0.65rem;
    font-weight: 800;
    color: #0A84FF;
    font-family: monospace;
    background: rgba(10, 132, 255, 0.1);
    padding: 2px 8px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.tasa-status-values {
    display: flex;
    flex-direction: column;
    line-height: 1.3;
    min-width: 0;
}

.tasa-rate-line {
    color: #333;
    font-size: 0.95rem;
    font-weight: 600;
}

.tasa-rate-value {
    color: #0A84FF;
    font-size: 1.1rem;
    font-weight: 800;
}

.tasa-rate-name {
    color: #666;
    font-size: 0.8rem;
    font-weight: 700;
}

.tasa-updated-at {
    color: #666;
    font-size: 0.75rem;
    font-weight: 600;
}

.main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.main-header h2 {
    margin: 0;
}

.grupo-header-actions {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.grupo-sort-locked .sortable-grid {
    outline: 2px dashed rgba(239, 68, 68, 0.35);
    outline-offset: 10px;
    border-radius: 18px;
}

.grupo-sort-locked .card {
    box-shadow: var(--neo-shadow), inset 0 0 0 1px rgba(239, 68, 68, 0.12);
}

@media (max-width: 768px) {
    .grid.sortable-grid .card {
        min-height: 300px;
    }

    .grid.sortable-grid .card-header,
    .grid.sortable-grid .card-body {
        padding-left: 16px;
        padding-right: 16px;
    }

    .grid.sortable-grid .card-footer {
        grid-template-columns: 1fr;
        padding: 16px;
    }

    .grid.sortable-grid .card-footer .wide-action,
    .grid.sortable-grid .card-footer .btn-primary {
        grid-column: span 1;
    }

    .grid.sortable-grid .card-footer {
        gap: 12px;
    }

    .grid.sortable-grid .card-footer .wide-action {
        min-height: 48px;
        justify-content: flex-start;
        padding-left: 14px;
        padding-right: 14px;
    }

    .grid.sortable-grid .card-footer .compact-action {
        display: grid;
        grid-template-columns: 18px 1fr;
        align-items: center;
        justify-content: flex-start;
        text-align: left;
        gap: 10px;
        padding-left: 14px;
        padding-right: 14px;
    }

    .grid.sortable-grid .card-footer .compact-action i {
        margin: 0;
    }

    body {
        font-size: 15px;
    }

    header {
        padding: 14px 14px 16px;
        align-items: stretch;
    }

    header h1 {
        width: 100%;
        font-size: 1.25rem;
        line-height: 1.25;
    }

    .header-actions,
    .header-buttons {
        width: 100%;
    }

    .header-actions .btn,
    .header-buttons .btn {
        flex: 1 1 calc(50% - 10px);
        min-height: 46px;
    }

    .tasa-status-bar {
        padding: 10px 12px;
    }

    .tasa-status-chip {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
        gap: 10px;
        border-radius: 22px;
        padding: 12px 14px;
    }

    .tasa-status-meta {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        flex-wrap: wrap;
    }

    .tasa-status-values {
        width: 100%;
    }

    .tasa-rate-line,
    .tasa-updated-at {
        display: block;
    }

    .main-header {
        margin-bottom: 4px;
    }

    .grupo-header {
        padding: 14px;
        border-radius: 18px;
        font-size: 1rem;
        align-items: flex-start;
        gap: 12px;
    }

    .grupo-header > span:first-child {
        min-width: 0;
        flex: 1 1 auto;
    }

    .grupo-header-actions {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .lock-btn-ui {
        flex: 1 1 calc(50% - 10px);
        justify-content: center;
        min-height: 42px;
    }

    .lock-btn-ui .lock-label {
        min-width: 0;
    }

    .grid,
    .grid.sortable-grid {
        padding: 14px 0;
        gap: 18px;
    }

    .grid.sortable-grid .card {
        min-height: 0;
    }

    .grid.sortable-grid .card-header > span:first-child::after,
    .grid.sortable-grid .card-body::after {
        white-space: normal;
        max-width: 100%;
    }

    .grid.sortable-grid .card-body > p {
        max-width: none;
    }

    .modal {
        align-items: flex-end;
    }

    .modal-content {
        width: 100%;
        max-width: none;
        max-height: min(88vh, 100%);
        border-radius: 20px 20px 0 0;
    }

    .modal-header {
        padding: 18px 16px 14px;
        gap: 12px;
    }

    .modal-header h2 {
        font-size: 1.1rem;
        line-height: 1.25;
    }

    .modal-body {
        padding: 0 16px 18px;
    }

    .modal-footer {
        padding: 12px 16px 18px;
        flex-wrap: wrap;
    }

    .modal-footer .btn {
        flex: 1 1 100%;
    }

    .product-list-item {
        padding: 14px;
        gap: 10px;
        align-items: flex-start;
        flex-direction: column;
    }

    .product-list-item .product-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .product-list-item .product-actions .btn {
        flex: 1 1 calc(33.333% - 8px);
    }
}

@media (max-width: 560px) {
    .container,
    main.container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .header-actions .btn,
    .header-buttons .btn,
    .lock-btn-ui,
    .product-list-item .product-actions .btn {
        flex-basis: 100%;
    }

    .grid.sortable-grid .card-header,
    .grid.sortable-grid .card-body,
    .grid.sortable-grid .card-footer {
        padding-left: 14px;
        padding-right: 14px;
    }

    .grid.sortable-grid .card-footer {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
    }

    .grid.sortable-grid .card-footer .wide-action,
    .grid.sortable-grid .card-footer .btn-primary {
        grid-column: span 2;
    }

    .grid.sortable-grid .card-footer .compact-action {
        min-height: 42px;
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
        gap: 6px;
        padding: 10px 8px;
    }

    .grid.sortable-grid .card-footer .compact-action span {
        font-size: 0.74rem;
        line-height: 1.1;
    }

    .card-header {
        gap: 8px;
    }

    .btn,
    .btn-sm {
        font-size: 0.86rem;
    }

    .tasa-rate-line {
        font-size: 0.88rem;
    }

    .tasa-rate-value {
        font-size: 1rem;
    }
}
