/* ======= BASE Y VARIABLES ======= */
:root {
    --bg-color: #2F3640;
    --card-bg: #22252A;
    --primary-yellow: #FFC107;
    --primary-hover: #ffcf33;
    --header-text: #FFFFFF;
    --text-secondary: #aaaaaa;
}

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

body {
    font-family: 'Inter', sans-serif;
    /* Usando la imagen subida por el usuario ubicándola en img/ */
    background: url('../img/pantalla_principal.png') center center;
    background-size: cover;
    background-attachment: fixed;
    color: var(--header-text);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
    position: relative;
}

/* Efecto de oscurecimiento sobre el fondo original para que los elementos destaquen */
body::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.4);
    z-index: -1;
    pointer-events: none;
}

/* ======= ANIMACIONES ======= */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(40px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(255, 193, 7, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 193, 7, 0); }
}

@keyframes floatAnim {
    0% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
    100% { transform: translateY(0); }
}

@keyframes spinLoader {
    100% { transform: rotate(360deg); }
}

/* ======= NAVEGACIÓN ======= */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 5%;
    background: rgba(30, 32, 36, 0.85);
    backdrop-filter: blur(8px);
    border-bottom: 2px solid var(--primary-yellow);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0,0,0,0.6);
    animation: slideDown 0.6s ease-out;
}

/* Nav superior con 3 elementos: logo / catalogos / descargar */
.nav-top {
    justify-content: space-between !important;
    display: flex !important;
    align-items: center !important;
    border-bottom: none !important;
    background: transparent !important;
    padding: 10px 3% !important;
    box-shadow: none !important;
    position: absolute !important;
    width: 100% !important;
    z-index: 100;
    gap: clamp(4px, 1.5vw, 12px);
}

.nav-top .nav-logo {
    height: clamp(26px, 5.5vw, 40px);
    opacity: 0.95;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.8));
    cursor: pointer;
    flex-shrink: 0;
}

/* Boton central: Ver Catalogos */
.nav-catalogo-btn {
    display: inline-flex;
    align-items: center;
    gap: clamp(3px, 1vw, 6px);
    padding: clamp(5px, 1.5vw, 9px) clamp(8px, 2.5vw, 18px);
    background: rgba(21, 101, 192, 0.92);
    color: #fff;
    border: 2px solid #FFC107;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 700;
    font-size: clamp(0.65rem, 2vw, 0.9rem);
    box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,193,7,0.3);
    transition: all 0.3s ease;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
    animation: pulseCatalogo 2.5s ease-in-out infinite;
}

.nav-catalogo-btn:hover {
    transform: translateY(-2px) scale(1.03);
    background: rgba(13, 71, 161, 1);
    box-shadow: 0 6px 18px rgba(255,193,7,0.4);
}

.nav-catalogo-btn svg {
    width: clamp(13px, 3.5vw, 18px);
    height: clamp(13px, 3.5vw, 18px);
    color: #FFC107;
}

/* Texto abreviado en moviles muy chicos */
@media (max-width: 380px) {
    .nav-catalogo-texto::after {
        content: 'Catálogos';
    }
    .nav-catalogo-texto {
        font-size: 0 !important;
    }
    .nav-catalogo-texto::after {
        font-size: 0.7rem;
        font-weight: 700;
    }
}

@keyframes pulseCatalogo {
    0%, 100% { box-shadow: 0 4px 12px rgba(0,0,0,0.5), 0 0 0 1px rgba(255,193,7,0.3); }
    50% { box-shadow: 0 4px 20px rgba(255,193,7,0.55), 0 0 0 2px rgba(255,193,7,0.6); }
}

/* Boton Descargar en el nav: compacto */
.nav-top .nav-descargar {
    font-size: clamp(0.65rem, 2vw, 0.85rem) !important;
    padding: clamp(5px, 1.5vw, 9px) clamp(8px, 2.5vw, 18px) !important;
    flex-shrink: 0;
    white-space: nowrap;
}

.logo-container {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logo-container img {
    height: 55px; /* Estable */
    background: transparent;
    padding: 0;
    border: none;
    border-radius: 50%;
}

.btn {
    background: var(--primary-yellow);
    color: #111;
    border: none;
    padding: 12px 24px;
    font-weight: 800;
    font-size: 1rem;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 4px 10px rgba(255, 193, 7, 0.3);
    text-transform: uppercase;
    position: relative;
    overflow: hidden;
}

.btn::after {
    content: "";
    position: absolute;
    top: -50%; left: -50%;
    width: 200%; height: 200%;
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(45deg) translateY(-100%);
    transition: transform 0.6s ease;
}

.btn:hover::after {
    transform: rotate(45deg) translateY(100%);
}

.btn:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.5);
    background: var(--primary-hover);
}

/* Pulsing effect for main CTA */
.btn.btn-pulse {
    animation: pulseGold 2s infinite;
}

/* ======= CONTENEDOR PRINCIPAL ======= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* ======= BANNER SUPERIOR (compacto horizontal en todos los tamanos) ======= */
.hero-banner {
    background: linear-gradient(135deg, var(--primary-yellow) 0%, #ff9800 100%);
    border-radius: 16px;
    color: #111;
    margin-bottom: 25px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.5);
    position: relative;
    overflow: hidden;
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
    animation-delay: 0.2s;

    /* Layout siempre horizontal, escala con el ancho de pantalla */
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: clamp(6px, 2vw, 18px);
    padding: clamp(8px, 2.5vw, 22px) clamp(10px, 3vw, 28px);
    flex-wrap: nowrap;
}

.hero-banner::after {
    content: '';
    position: absolute;
    top: -50%; left: -50%; width: 200%; height: 200%;
    background: repeating-linear-gradient(45deg, transparent, transparent 10px, rgba(0,0,0,0.05) 10px, rgba(0,0,0,0.05) 20px);
    z-index: 1;
    pointer-events: none;
}

.hero-banner > * { position: relative; z-index: 2; }

/* Logo izquierda: escala con el ancho */
.hero-banner .hero-logo {
    flex-shrink: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-banner .hero-logo-img {
    width: clamp(34px, 11vw, 72px);
    height: clamp(34px, 11vw, 72px);
    background: white;
    border-radius: 50%;
    padding: 3px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
    object-fit: contain;
    display: block;
}

/* Texto centro: crece pero nunca desborda */
.hero-banner .hero-text {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
    padding: 0 clamp(4px, 1vw, 10px);
}

.hero-banner h1 {
    font-size: clamp(0.95rem, 4.2vw, 2.8rem);
    font-weight: 800;
    margin: 0 0 clamp(1px, 0.5vw, 6px) 0;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(255,255,255,0.25);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-banner p {
    font-size: clamp(0.62rem, 2.3vw, 1.05rem);
    font-weight: 600;
    margin: 0;
    line-height: 1.2;
    max-width: 100%;
    overflow: hidden;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

/* Boton ayuda derecha: circulo que escala */
.hero-banner .hero-help-wrap {
    flex-shrink: 0;
}

.hero-banner .hero-help-btn {
    width: clamp(30px, 9vw, 60px);
    height: clamp(30px, 9vw, 60px);
    border-radius: 50%;
    font-size: clamp(1rem, 4vw, 2rem);
    font-weight: 900;
    padding: 0;
    background: transparent;
    border: clamp(2px, 0.4vw, 3px) solid #111;
    color: #111;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 10px rgba(0,0,0,0.5);
    text-transform: none;
}

.hero-banner .hero-help-btn:hover {
    background: #111;
    color: var(--primary-yellow);
}

/* ======= GRID DE TARJETAS (APPS) ======= */
.grid-container {
    display: grid;
    /* EL USUARIO SOLICITÓ ESTRUCTURA 3x3 ESTRICTA EN TODAS LAS PANTALLAS */
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.app-card {
    background-color: var(--card-bg);
    border-radius: 24px;
    padding: 25px 15px; /* Ligeramente más angosto para entrar en 3x3 */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0,0,0,0.7);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.03);
    height: 100%;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.app-card.animate {
    opacity: 1;
    transform: translateY(0);
}

.app-card::before {
    content: '';
    position: absolute;
    top: 0; left: -100%; width: 50%; height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    transition: 0.5s;
}

.app-card:hover::before { left: 150%; }

.app-card:hover {
    transform: translateY(-8px) scale(1.03);
    border-color: rgba(255, 193, 7, 0.5);
    box-shadow: 0 15px 40px rgba(0,0,0,0.8), 0 0 20px rgba(255, 193, 7, 0.1);
    background-color: #272A30;
}

.icon-box {
    background-color: var(--primary-yellow);
    width: 70px;
    height: 70px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
    color: #111;
    box-shadow: 0 6px 15px rgba(255, 193, 7, 0.2);
    transition: transform 0.4s;
}

.app-card:hover .icon-box {
    transform: rotate(5deg) scale(1.1);
}

.icon-box svg {
    width: 35px;
    height: 35px;
    stroke-width: 2.2;
}

.app-card span {
    color: #ffffff;
    font-weight: 700;
    font-size: 1.1rem;
    line-height: 1.25;
    word-break: break-word;
}

/* Responsividad estricta para garantizar que el 3x3 se vea perfecto en celular pequeño */
@media (max-width: 768px) {
    .grid-container { gap: 10px; }
    .app-card { padding: 15px 5px; border-radius: 16px; min-height: 120px; justify-content: flex-start;}
    .icon-box { width: 45px; height: 45px; margin-bottom: 8px; border-radius: 12px; }
    .icon-box svg { width: 22px; height: 22px; }
    .app-card span { font-size: 0.7rem; }
}

@media (max-width: 400px) {
    .grid-container { gap: 8px; }
    .app-card { padding: 12px 2px; }
    .icon-box { width: 40px; height: 40px; margin-bottom: 6px; }
    .icon-box svg { width: 20px; height: 20px; }
    .app-card span { font-size: 0.65rem; }
}

/* ======= BOTONES FLOTANTES INFERIORES ======= */
.floating-actions {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 15px;
    z-index: 1000;
}

/* ======= ANIMACIONES EXTRA ======= */
@keyframes blinker {
    0% { opacity: 1; text-shadow: 0 0 10px #4CAF50; }
    50% { opacity: 0; text-shadow: none; }
    100% { opacity: 1; text-shadow: 0 0 10px #4CAF50; }
}

.text-pulse-green {
    display: block !important;
    width: 100% !important;
    color: #55ff55 !important; /* Verde mucho más brillante */
    text-align: center !important;
    font-weight: 900 !important;
    font-size: 1.1rem;
    margin: 0 auto 25px auto !important;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: blinker 1.2s linear infinite !important;
}

@media (max-width: 600px) {
    .text-pulse-green { 
        font-size: 0.8rem !important; 
        margin-bottom: 20px !important; 
        padding: 0 10px;
    }
}

.bottom-actions {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 30px;
    flex-wrap: wrap;
    opacity: 0;
    animation: fadeInUp 1s ease-out forwards;
    animation-delay: 1.5s;
}

.action-circle {
    background-color: var(--card-bg);
    width: 85px;
    height: 85px;
    border-radius: 50%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 2px solid transparent;
    box-shadow: 0 8px 25px rgba(0,0,0,0.6);
    text-decoration: none;
    color: #fff;
    animation: floatAnim 4s ease-in-out infinite;
}

.action-circle:nth-child(2) { animation-delay: 1s; }
.action-circle:nth-child(3) { animation-delay: 2s; }

.action-circle svg { width: 30px; height: 30px; margin-bottom: 5px; transition: transform 0.3s; }
.action-circle span { font-size: 0.75rem; font-weight: 700; }

.action-circle.chispazo svg { color: var(--primary-yellow); }
.action-circle.feedback svg { color: #25D366; } 
.action-circle.descanso svg { color: var(--primary-yellow); }

.action-circle:hover {
    transform: scale(1.12);
    border-color: rgba(255,255,255,0.2);
    background-color: #2a2e35;
    animation-play-state: paused;
}
.action-circle:hover svg { transform: scale(1.2); }

/* ======= MODALES ======= */
.modal-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    z-index: 1000;
    display: flex;
    align-items: flex-start; /* Arranca arriba en lugar de centrado */
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s;
    perspective: 1000px;
    overflow-y: auto; /* permitir scroll cuando el contenido es muy alto */
    padding: clamp(8px, 3vw, 30px);
}

.modal-overlay.active { opacity: 1; visibility: visible; }

.modal-content {
    background: #1e2025;
    border: 2px solid rgba(255,193,7, 0.3);
    border-radius: clamp(12px, 3vw, 24px);
    width: 100%;
    max-width: 500px;
    padding: clamp(14px, 4vw, 35px) clamp(12px, 4vw, 30px);
    position: relative;
    transform: translateY(50px) rotateX(10deg);
    transition: all 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 60px rgba(0,0,0,0.9), inset 0 0 20px rgba(255,255,255,0.02);
    margin: auto 0;
}

.modal-overlay.active .modal-content {
    transform: translateY(0) rotateX(0);
    border-color: var(--primary-yellow);
}

.close-btn {
    position: absolute;
    top: 15px; right: 20px;
    background: none; border: none;
    color: var(--text-secondary);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.2s, transform 0.2s;
}

.close-btn:hover { color: #fff; transform: scale(1.2) rotate(90deg); }

.modal-content h2 {
    font-size: clamp(1.1rem, 4.5vw, 1.8rem);
    color: var(--primary-yellow);
    margin-bottom: 5px;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.modal-content > p {
    font-size: clamp(0.75rem, 2.8vw, 1rem);
    line-height: 1.35;
}

.form-group {
    margin-bottom: clamp(10px, 3vw, 20px);
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: clamp(3px, 1vw, 8px);
    font-size: clamp(0.78rem, 2.8vw, 0.95rem);
    color: #eee;
    font-weight: 600;
}

.form-control {
    width: 100%;
    padding: clamp(8px, 2.8vw, 14px) clamp(10px, 3vw, 18px);
    background: #141518;
    border: 2px solid #333;
    border-radius: clamp(8px, 2vw, 12px);
    color: #fff;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.85rem, 3vw, 1.05rem);
    transition: all 0.3s;
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.5);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-yellow);
    background: #1a1c20;
    box-shadow: 0 0 10px rgba(255, 193, 7, 0.2), inset 0 2px 5px rgba(0,0,0,0.5);
}

textarea.form-control {
    resize: vertical;
    min-height: clamp(60px, 15vw, 100px);
}

.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: clamp(6px, 2vw, 12px);
    margin-bottom: clamp(12px, 3vw, 25px);
}

.checkbox-group input {
    margin-top: 3px;
    width: clamp(16px, 4vw, 18px);
    height: clamp(16px, 4vw, 18px);
    accent-color: var(--primary-yellow);
    cursor: pointer;
    flex-shrink: 0;
}
.checkbox-group label {
    font-size: clamp(0.7rem, 2.6vw, 0.9rem);
    color: #aaa;
    cursor: pointer;
    line-height: 1.3;
}

.submit-btn {
    width: 100%;
    font-size: clamp(0.9rem, 3.2vw, 1.15rem);
    padding: clamp(10px, 3vw, 16px);
    border-radius: clamp(10px, 2.5vw, 14px);
}

/* Boton cerrar modal mas compacto en movil */
.close-btn {
    font-size: clamp(1.4rem, 5vw, 2rem) !important;
    top: clamp(8px, 2vw, 15px) !important;
    right: clamp(10px, 2.5vw, 20px) !important;
}

/* Ajustes extra para celulares muy pequeños (menos de 360px) */
@media (max-width: 360px) {
    .modal-content { border-radius: 10px; border-width: 1px; }
    .form-group { margin-bottom: 8px; }
    textarea.form-control { min-height: 55px; }
    .modal-content h2 { font-size: 1rem; }
}

.loader {
    display: none;
    width: 22px; height: 22px;
    border: 3px solid rgba(0,0,0,0.3);
    border-top-color: #000;
    border-radius: 50%;
    animation: spinLoader 1s infinite linear;
    margin: 0 auto;
}

/* ======= PANEL ADMINISTRATIVO ======= */
#admin-modal .modal-content {
    max-width: 95vw;
    max-height: 90vh;
    display: flex; flex-direction: column;
}

/* Estadisticas rapidas */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}
.admin-stat-box {
    background: #141518;
    border: 1px solid rgba(255,193,7,0.2);
    border-radius: 10px;
    padding: 10px 6px;
    text-align: center;
}
.admin-stat-num {
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--primary-yellow);
    line-height: 1;
}
.admin-stat-label {
    font-size: 0.75rem;
    color: #aaa;
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Bandejas (tabs) */
.admin-tabs {
    display: flex;
    gap: 5px;
    margin-bottom: 10px;
    border-bottom: 2px solid rgba(255,255,255,0.08);
}
.admin-tab {
    background: transparent;
    border: none;
    color: #aaa;
    padding: 10px 16px;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
    margin-bottom: -2px;
}
.admin-tab:hover { color: #fff; }
.admin-tab.activa {
    color: var(--primary-yellow);
    border-bottom-color: var(--primary-yellow);
}
.admin-bandeja { flex: 1; overflow: hidden; display: flex; flex-direction: column; }

@media (max-width: 500px) {
    .admin-stat-num { font-size: 1.2rem; }
    .admin-stat-label { font-size: 0.65rem; }
    .admin-tab { padding: 8px 10px; font-size: 0.8rem; }
}

.table-wrap {
    overflow-x: auto; overflow-y: auto;
    max-height: 55vh;
    margin-top: 20px;
    border: 1px solid #444;
    border-radius: 12px;
    background: #141518;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.5);
}

table {
    width: 100%; border-collapse: collapse; text-align: left;
}

th, td {
    padding: 15px 20px;
    border-bottom: 1px solid #2a2e35;
    font-size: 0.95rem;
}

th {
    background: #1E2025;
    color: var(--primary-yellow);
    position: sticky; top: 0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

td { color: #eee; }
tr:hover td { background: rgba(255, 193, 7, 0.05); }

/* ══════════════════════════════════════════════════════════════════════ */
/* ══════ PANEL ADMIN: PESTAÑAS DE PRECIOS ═════════════════════════════ */
/* ══════════════════════════════════════════════════════════════════════ */

/* --- INICIO: Cabecera de cada bandeja de precios --- */
.precios-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    flex-wrap: wrap;
}
.precios-version {
    background: rgba(255,193,7,0.15);
    color: var(--primary-yellow);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
}
/* --- FIN: Cabecera --- */

/* --- INICIO: Fila de margen/mano de obra --- */
.precios-margen-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
    background: rgba(255,255,255,0.04);
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(255,193,7,0.15);
}
.precios-margen-row label {
    color: #ccc;
    font-size: 0.85rem;
    font-weight: 600;
}
.precios-input-grupo {
    display: flex;
    align-items: center;
    gap: 6px;
}
.precios-unidad {
    color: #888;
    font-size: 0.8rem;
}
/* --- FIN: Fila de margen --- */

/* --- INICIO: Inputs editables de precios --- */
.precios-input {
    background: #141518;
    border: 2px solid #333;
    border-radius: 8px;
    color: #fff;
    font-family: 'Inter', monospace;
    font-size: 0.95rem;
    font-weight: 600;
    padding: 8px 12px;
    text-align: right;
    transition: border-color 0.3s, box-shadow 0.3s;
    width: 130px;
}
.precios-input:focus {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 8px rgba(255,193,7,0.2);
}
.precios-input-small {
    width: 90px;
}
/* --- FIN: Inputs --- */

/* --- INICIO: Nombre del grupo en la tabla --- */
.precios-grupo-nombre {
    color: var(--primary-yellow);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
}
.precios-depto-nombre {
    color: #eee;
    font-weight: 600;
    font-size: 0.9rem;
}
/* --- FIN: Nombres --- */

/* --- INICIO: Botón guardar precios --- */
.precios-btn-guardar {
    width: 100%;
    margin-top: 14px;
    background: #4CAF50 !important;
    color: #fff !important;
    font-size: 1rem;
    padding: 12px;
    border-radius: 10px;
    transition: background 0.3s, transform 0.2s;
}
.precios-btn-guardar:hover {
    background: #388E3C !important;
    transform: translateY(-2px);
}
/* --- FIN: Botón guardar --- */

/* --- INICIO: Mensaje de estado (éxito/error) --- */
.precios-status {
    text-align: center;
    margin-top: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    min-height: 20px;
    padding: 4px;
    border-radius: 6px;
    transition: all 0.3s;
}
.precios-status.ok {
    color: #4CAF50;
    background: rgba(76,175,80,0.1);
}
.precios-status.error {
    color: #f44336;
    background: rgba(244,67,54,0.1);
}
/* --- FIN: Estado --- */

/* --- INICIO: Sub-pestañas de categorías (presupuestos) --- */
.precios-sub-tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 12px;
    overflow-x: auto;
    padding-bottom: 4px;
    flex-wrap: wrap;
}
.precios-sub-tab {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #aaa;
    padding: 6px 14px;
    font-size: 0.78rem;
    font-weight: 700;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.2s;
    white-space: nowrap;
}
.precios-sub-tab:hover { color: #fff; border-color: rgba(255,193,7,0.3); }
.precios-sub-tab.activa {
    color: #111;
    background: var(--primary-yellow);
    border-color: var(--primary-yellow);
}
/* --- FIN: Sub-pestañas --- */

/* --- INICIO: Tabla de tiers (economico/estandar/premium) --- */
.precios-tier-tabla {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 12px;
}
.precios-tier-tabla th {
    background: #1E2025;
    color: var(--primary-yellow);
    font-size: 0.8rem;
    padding: 8px 10px;
    text-align: center;
    text-transform: uppercase;
}
.precios-tier-tabla td {
    padding: 8px 10px;
    border-bottom: 1px solid #2a2e35;
    text-align: center;
}
.precios-tier-tabla td:first-child {
    text-align: left;
    color: #eee;
    font-weight: 600;
}
/* --- FIN: Tabla de tiers --- */

/* --- INICIO: Tabla de ajustes por departamento (presupuestos) --- */
.precios-ajuste-input {
    width: 80px;
    text-align: center;
}
/* --- FIN: Ajustes --- */

/* --- INICIO: Responsive para pestañas de precios en móvil --- */
@media (max-width: 500px) {
    .precios-input { width: 100px; font-size: 0.85rem; padding: 6px 8px; }
    .precios-input-small { width: 75px; }
    .precios-margen-row { padding: 8px 10px; }
    .precios-margen-row label { font-size: 0.78rem; }
    .precios-sub-tab { padding: 5px 10px; font-size: 0.7rem; }
    .admin-tabs { flex-wrap: wrap; }
    .admin-tab { font-size: 0.72rem; padding: 6px 8px; }
}
/* --- FIN: Responsive --- */

/* ======= FOOTER ======= */
footer {
    text-align: center;
    padding: 30px;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-top: 1px solid rgba(255,255,255,0.05);
    margin-top: 50px;
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
}
