/* =========================================================
   main.css - Global Styles (Modern Dark Theme)
   ========================================================= */

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

@font-face {
    font-family: 'SF Pro Display';
    src: url('../fonts/SFPRODISPLAYREGULAR.OTF') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'SF Pro Display';
    src: url('../fonts/SFPRODISPLAYBOLD.OTF') format('opentype');
    font-weight: bold;
    font-style: normal;
}

:root {
    /* Color Palette - Dark Mode */
    --bg-base: #0f172a;
    /* Fondo principal (Slate 900) */
    --bg-card: #1e293b;
    /* Fondo tarjetas (Slate 800) */
    --bg-card-hover: #334155;
    /* Hover en tarjetas */
    --bg-input: #0f172a;
    /* Fondo inputs */

    --text-main: #f8fafc;
    /* Blanco principal */
    --text-muted: #94a3b8;
    /* Gris para subtítulos/descripciones */

    --accent-blue: #3b82f6;
    /* Azul para primary/Call to Action */
    --accent-blue-hover: #2563eb;

    --accent-green: #10b981;
    /* Éxito / Recomendaciones */
    --accent-green-bg: rgba(16, 185, 129, 0.1);

    --accent-red: #ef4444;
    /* Errores / Alertas */
    --accent-red-bg: rgba(239, 68, 68, 0.1);

    --border-color: #334155;
    --border-focus: #3b82f6;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.3);

    /* Layout */
    --max-width: 1000px;
    --font-family: 'Outfit',
        sans-serif;
}

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

body {
    font-family: 'SF Pro Display', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
}

/* Header */
header {
    background: linear-gradient(135deg, #090e1a 0%, #17223b 100%);
    padding: 30px 40px;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

header h1 {
    font-size: 32px;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: linear-gradient(to right, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 8px;
}

header p {
    font-size: 15px;
    color: var(--text-muted);
}

/* Containers */
.container {
    max-width: var(--max-width);
    margin: 40px auto;
    padding: 0 20px;
}

/* Typography Helpers */
.h2-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 24px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

.h2-title svg {
    color: var(--accent-blue);
    width: 24px;
    height: 24px;
}

/* Cards Global */
.card {
    background-color: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 28px;
    margin-bottom: 28px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-soft);
}

/* Forms & Inputs */
.campo {
    flex: 1;
    min-width: 200px;
    margin-bottom: 16px;
}

.campo label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    color: var(--text-muted);
}

.campo input,
.campo select {
    width: 100%;
    padding: 12px 16px;
    background-color: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    color: var(--text-main);
    font-family: var(--font-family);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.campo input::placeholder {
    color: #475569;
}

.campo input:focus,
.campo select:focus {
    outline: none;
    border-color: var(--border-focus);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Buttons Global */
.btn-primary {
    width: 100%;
    padding: 14px 24px;
    background-color: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 600;
    font-family: var(--font-family);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary:hover {
    background-color: var(--accent-blue-hover);
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background-color: #475569;
    color: #94a3b8;
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 24px;
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    font-size: 15px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s;
}

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

/* Flex rows */
.fila {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

/* SVG Base icons */
.icon-svg {
    width: 1em;
    height: 1em;
    fill: currentColor;
}

/* Tienda espec�ficas */
.entradas-grid {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.entrada-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: var(--radius-md);
    background: var(--bg-card);
    cursor: pointer;
    transition: all 0.2s;
    color: var(--text-muted);
    min-width: 90px;
}

.entrada-btn:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.entrada-btn.seleccionado {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-weight: 600;
}

.entrada-btn .icono svg {
    width: 24px;
    height: 24px;
}

.recomendacion {
    background: var(--accent-green-bg);
    border: 1px solid var(--accent-green);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    display: none;
}

.recomendacion.visible {
    display: block;
    animation: fadeIn 0.4s ease-out;
}

.recomendacion h3 {
    color: var(--accent-green);
    font-size: 16px;
    margin-bottom: 6px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.recomendacion p {
    color: #a7f3d0;
    font-size: 15px;
}

.cargadores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 28px;
}

.cargador-card {
    background: var(--bg-card);
    border: 2px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.cargador-card:hover {
    border-color: #64748b;
    transform: translateY(-4px);
    box-shadow: var(--shadow-soft);
}

.cargador-card.seleccionado {
    border-color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.05);
}

.cargador-card.recomendado-badge {
    border-color: var(--accent-green);
}

.badge-rec {
    position: absolute;
    top: -1px;
    left: -1px;
    background: var(--accent-green);
    color: #022c22;
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: var(--radius-lg) 0px var(--radius-lg) 0px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.badge-stock-bajo {
    position: absolute;
    top: 16px;
    right: 16px;
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border: 1px solid var(--accent-red);
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 20px;
}

.cargador-card h3 {
    font-size: 20px;
    margin: 16px 0 8px;
    color: var(--text-main);
}

.cargador-card .mah {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.cargador-card .desc {
    font-size: 14px;
    color: #cbd5e1;
    margin-bottom: 16px;
    line-height: 1.6;
}

.cargador-card .personas-rec {
    font-size: 13px;
    color: var(--accent-blue);
    font-weight: 600;
    margin-bottom: 16px;
    display: inline-block;
    padding: 4px 10px;
    background: rgba(59, 130, 246, 0.1);
    border-radius: 20px;
}

.entradas-compatibles {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.tag-entrada {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    color: #cbd5e1;
    font-weight: 500;
    border: 1px solid var(--border-color);
}

.tag-entrada.incompatible {
    opacity: 0.3;
    background: transparent;
    border-style: dashed;
}

.precio {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-main);
}

.precio span {
    font-size: 14px;
    color: var(--text-muted);
    font-weight: 400;
}

.form-cliente {
    display: none;
}

.form-cliente.visible {
    display: block;
    animation: slideUp 0.4s ease-out;
}

.resumen-compra {
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    font-size: 15px;
    border: 1px solid rgba(59, 130, 246, 0.2);
}

.resumen-compra strong {
    color: var(--text-main);
    font-size: 18px;
}

.cantidad-selector {
    display: flex;
    align-items: center;
    gap: 16px;
    margin: 16px 0 24px;
}

.btn-cant {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid var(--border-color);
    background: var(--bg-card);
    color: var(--text-main);
    font-size: 24px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.btn-cant:hover {
    border-color: var(--accent-blue);
    color: var(--accent-blue);
    background: rgba(59, 130, 246, 0.1);
}

#cantidadDisplay {
    font-size: 24px;
    font-weight: 700;
    min-width: 40px;
    text-align: center;
}

.total-calculado {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-main);
    background: rgba(59, 130, 246, 0.1);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid var(--accent-blue);
    margin-bottom: 24px;
    text-align: center;
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.1);
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CSS del Mapa sector */
#sectorElegido {
    display: none;
    margin-top: 20px;
    background: var(--accent-green-bg);
    border: 1px solid var(--accent-green);
    border-radius: var(--radius-md);
    padding: 16px;
}

/* Confirmacion Espec�ficas */
.card-exito {
    border-top: 4px solid var(--accent-green);
}

.card-exito h1 {
    color: var(--accent-green);
}

.card-error {
    border-top: 4px solid var(--accent-red);
}

.card-error h1 {
    color: var(--accent-red);
}

.ticket-badge {
    display: inline-block;
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-blue);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 1px;
    padding: 6px 14px;
    border-radius: 20px;
    margin-bottom: 20px;
    border: 1px solid var(--accent-blue);
}

.icono-big {
    margin-bottom: 16px;
    color: var(--accent-green);
}

.subtitulo {
    color: var(--text-muted);
    font-size: 15px;
    margin-bottom: 24px;
}

.detalle {
    background: var(--bg-input);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    text-align: left;
    margin-bottom: 20px;
}

.detalle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    font-size: 14px;
    border-bottom: 1px solid var(--border-color);
}

.detalle-row:last-child {
    border-bottom: none;
}

.detalle-row span:first-child {
    color: var(--text-muted);
}

.detalle-row span:last-child {
    font-weight: 500;
    color: var(--text-main);
}

.total-row span:last-child {
    font-weight: 700;
    font-size: 16px;
    color: var(--accent-green);
}

.pago-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 4px 12px;
    font-size: 13px;
    font-weight: 500;
}

.retiro-box {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: rgba(59, 130, 246, 0.05);
    border: 1px solid var(--accent-blue);
    border-radius: var(--radius-md);
    padding: 16px;
    text-align: left;
    margin-bottom: 24px;
}

.retiro-icon svg {
    width: 24px;
    height: 24px;
    color: var(--accent-blue);
}

.retiro-info p:first-child {
    font-weight: 700;
    font-size: 13px;
    color: var(--accent-blue);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 4px;
}

.retiro-info p:last-child {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-main);
}

/* Admin Espec�ficas */
.metricas {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metrica {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s;
}

.metrica:hover {
    transform: translateY(-3px);
}

.metrica-label {
    font-size: 13px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
    font-weight: 600;
}

.metrica-valor {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent-blue);
}

.seccion {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 30px;
    box-shadow: var(--shadow-soft);
    overflow-x: auto;
}

.seccion-titulo {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 8px;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

thead th {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text-muted);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

tbody td {
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-main);
    vertical-align: middle;
}

tbody tr:last-child td {
    border-bottom: none;
}

tbody tr:hover {
    background: rgba(59, 130, 246, 0.03);
}

.badge-stock {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    background: rgba(16, 185, 129, 0.1);
    color: var(--accent-green);
    border: 1px solid var(--accent-green);
}

.badge-stock.bajo {
    background: rgba(217, 119, 6, 0.1);
    color: #fbbf24;
    border-color: #fbbf24;
}

.badge-stock.agotado {
    background: var(--accent-red-bg);
    color: var(--accent-red);
    border-color: var(--accent-red);
}

.sin-datos {
    text-align: center;
    color: var(--text-muted);
    padding: 40px;
    font-size: 15px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: var(--radius-sm);
    border: 1px dashed var(--border-color);
}

/* =========================================================
   Mapa Vertigo - HTML/CSS Layout
   ========================================================= */
.mapa-vertigo {
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.6)),
        radial-gradient(circle, #1a4a5e, #0a1a1f);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.mapa-titulo {
    letter-spacing: 5px;
    font-size: 1.8em;
    font-weight: 700;
    margin-bottom: 12px;
    text-transform: uppercase;
    color: var(--text-main);
}

.mapa-badge {
    border: 2px solid rgba(255, 255, 255, 0.5);
    display: inline-block;
    padding: 4px 18px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 3px;
    color: var(--text-main);
}

.mapa-wrapper {
    position: relative;
    height: 360px;
    margin-top: 10px;
}

.mapa-area {
    position: absolute;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    cursor: pointer;
    border-radius: 6px;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

.mapa-area:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    z-index: 10;
}

.mapa-area.zona-activa {
    border: 3px solid #fff !important;
    box-shadow: 0 0 18px rgba(255, 255, 255, 0.3), 0 8px 24px rgba(0, 0, 0, 0.4);
    transform: scale(1.08);
    z-index: 10;
}

/* Posiciones individuales del mapa */
.mapa-barra2 {
    top: 6%;
    left: 5%;
    width: 26%;
    height: 50px;
    background: #c5a021;
}

.mapa-banos {
    top: 6%;
    left: 33%;
    width: 34%;
    height: 55px;
    background: #0088cc;
    border-radius: 6px 6px 0 0;
    cursor: default;
    font-size: 11px;
}

.mapa-banos:hover {
    transform: none;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.mapa-barra1 {
    top: 6%;
    right: 3%;
    width: 22%;
    height: 50px;
    background: #c5a021;
}

.mapa-mesas {
    top: 28%;
    left: 10%;
    width: 42%;
    height: 80px;
    background: #b0b0b0;
    color: #1a1a1a;
    text-shadow: none;
    font-size: 13px;
}

.mapa-camarotes {
    top: 52%;
    left: 3%;
    width: 16%;
    height: 120px;
    background: #8b4513;
    flex-direction: column;
}

.mapa-cabina {
    bottom: 22%;
    left: 32%;
    width: 20%;
    height: 50px;
    background: #a0522d;
}

.mapa-box {
    top: 35%;
    right: 3%;
    width: 36%;
    height: 60px;
    background: #555;
    font-size: 13px;
}

.mapa-backizq {
    bottom: 4%;
    left: 22%;
    width: 22%;
    height: 38px;
    background: #475569;
    font-size: 11px;
}

.mapa-backder {
    bottom: 4%;
    right: 18%;
    width: 22%;
    height: 38px;
    background: #475569;
    font-size: 11px;
}

.mapa-entrada {
    position: absolute;
    top: 55%;
    right: 3%;
    transform: rotate(-90deg);
    color: var(--text-main);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 2px;
    pointer-events: none;
}

.mapa-footer {
    margin-top: 16px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Header Logo y Titulo grande */
header h1 {
    font-size: 3rem !important;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    color: #fff !important;
    -webkit-text-fill-color: #fff !important;
    background: none !important;
}

.header-logo {
    height: 3rem;
    width: auto;
    object-fit: contain;
    border-radius: 8px;
    vertical-align: middle;
}

.titulo-vertigo {
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}