/* =====================================================
   YAYKUNA - Estilos principales
   Colores: Morado #7b2be0 | Amarillo #FFCC00
   ===================================================== */

/* ===== RESET Y BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', sans-serif;
    background: #f5f5f5;
    color: #222;
}

/* ===== VARIABLES YAYKUNA ===== */
:root {
    --morado: #7b2be0;
    --morado-claro: #8f3df0;
    --amarillo: #FFCC00;
    --blanco: #ffffff;
    --gris: #f5f5f5;
    --gris-borde: #d9d9e3;
    --texto: #222;
    --texto-suave: #666;
    --verde-bg: #eaf7ee;
    --verde-texto: #1f7a38;
    --rojo-bg: #fdecea;
    --rojo-texto: #d32f2f;
}

/* =====================================================
   LOGO
   ===================================================== */
.logo { font-size: 24px; font-weight: 900; }
.logo-yay { color: var(--morado); }
.logo-kuna { color: var(--amarillo); }
.sidebar .logo-yay { color: white; }
.sidebar .logo-kuna { color: var(--amarillo); }

/* Imagen logo YAYKUNA — header móvil legacy (sidebar: admin-enterprise.css) */
.admin-header-movil .admin-header-logo img,
.admin-header-movil .ae-admin-logo-img {
    max-height: 40px;
    width: auto;
}

/* =====================================================
   ALERTAS
   ===================================================== */
.alerta-error {
    background: var(--rojo-bg);
    color: var(--rojo-texto);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.alerta-exito {
    background: var(--verde-bg);
    color: var(--verde-texto);
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 14px;
}

.sin-resultados {
    padding: 16px;
    text-align: center;
    color: var(--rojo-texto);
    font-size: 15px;
    font-weight: 600;
    background: var(--rojo-bg);
    border: 1px dashed #d7d7df;
    border-radius: 8px;
}

/* =====================================================
   BOTONES
   ===================================================== */
.btn-aprobar {
    background: var(--verde-bg);
    color: var(--verde-texto);
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-right: 6px;
}

.btn-rechazar {
    background: var(--rojo-bg);
    color: var(--rojo-texto);
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
}

.btn-ver {
    background: #e8eaff;
    color: #3730a3;
    padding: 6px 12px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    margin-right: 6px;
}

.btn-guardar {
    background: linear-gradient(180deg, var(--morado-claro) 0%, var(--morado) 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
}

.btn-guardar:hover { filter: brightness(1.05); }

.btn-ver-evento {
    display: block;
    background: linear-gradient(180deg, var(--morado-claro) 0%, var(--morado) 100%);
    color: white;
    text-align: center;
    padding: 12px;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 700;
    margin-top: 16px;
}

.btn-ver-evento:hover { filter: brightness(1.05); }

.btn-login {
    background: var(--morado);
    color: white !important;
    padding: 8px 20px;
    border-radius: 8px;
    text-decoration: none;
}

/* =====================================================
   BADGES DE ESTADO
   ===================================================== */
.badge-estado {
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.badge-estado.pendiente  { background: #fff3cd; color: #856404; }
.badge-estado.aprobado   { background: var(--verde-bg); color: var(--verde-texto); }
.badge-estado.rechazado  { background: var(--rojo-bg); color: var(--rojo-texto); }
.badge-estado.pagado     { background: var(--verde-bg); color: var(--verde-texto); }
.badge-estado.gratis     { background: #f0f9ff; color: #0369a1; }

/* =====================================================
   FORMULARIOS
   ===================================================== */
.form-card {
    background: white;
    padding: 32px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    max-width: 860px;
    width: 100%;
    margin: 0 auto;
    box-sizing: border-box;
}

.form-grupo { margin-bottom: 20px; }

.form-grupo label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #444;
    margin-bottom: 8px;
}

.form-grupo input,
.form-grupo textarea,
.form-grupo select {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    font-size: 16px;
    outline: none;
    box-sizing: border-box;
    background: white;
}

.form-grupo select { height: 48px; }

.form-grupo input:focus,
.form-grupo textarea:focus,
.form-grupo select:focus { border-color: var(--morado); }

.form-fila {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ===== OJITO CONTRASEÑA ===== */
.input-password {
    position: relative;
    margin-bottom: 12px;
}

.input-password input {
    width: 100%;
    height: 48px;
    padding: 0 48px 0 16px;
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 0;
    outline: none;
    box-sizing: border-box;
}

.input-password .ojito {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    font-size: 18px;
}

/* =====================================================
   LOGIN Y REGISTRO
   ===================================================== */
.login-contenedor {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gris);
}

.login-box {
    background: var(--blanco);
    padding: 40px;
    border-radius: 16px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    text-align: center;
}

.login-box h2 { margin: 16px 0 24px; color: var(--texto); }

.login-box input {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border: 1px solid var(--gris-borde);
    border-radius: 10px;
    font-size: 16px;
    margin-bottom: 12px;
    outline: none;
    box-sizing: border-box;
}

.login-box input:focus { border-color: var(--morado); }

.login-box button {
    width: 100%;
    height: 48px;
    background: linear-gradient(180deg, var(--morado-claro) 0%, var(--morado) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    margin-top: 8px;
}

.login-box button:hover { filter: brightness(1.05); }
.login-box p { margin-top: 16px; color: var(--texto-suave); }
.login-box a { color: var(--morado); font-weight: 600; }

/* =====================================================
   HEADER PÚBLICO
   ===================================================== */
.header-publico {
    background: white;
    border-bottom: 1px solid #eee;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-contenido {
    max-width: 1200px;
    margin: 0 auto;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 24px;
}

.header-nav a {
    text-decoration: none;
    color: #444;
    font-size: 15px;
    font-weight: 500;
}

.header-nav a.activo { color: var(--morado); font-weight: 700; }

/* =====================================================
   MAIN PÚBLICO
   ===================================================== */
.main-publico {
    background: var(--gris);
    min-height: calc(100vh - 64px);
    padding: 32px 24px;
}

.contenedor-publico {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 16px;
}

.titulo-seccion {
    font-size: 24px;
    font-weight: 800;
    margin-bottom: 24px;
    color: var(--texto);
}

/* =====================================================
   PANEL ADMIN / ORGANIZADOR
   ===================================================== */
.admin-contenedor {
    display: flex;
    width: 100%;
    min-height: 100vh;
    background: #f5f5f5;
    overflow-x: visible;
    min-width: 0;
}

.sidebar {
    flex: 0 0 240px;
    width: 240px;
    min-width: 240px;
    max-width: 240px;
    flex-shrink: 0;
    background: #1a1a2e;
    padding: 24px 16px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    overflow: hidden;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sidebar-nav a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 500;
}

.sidebar-nav a:hover,
.sidebar-nav a.activo {
    background: rgba(255,255,255,0.15);
    color: white;
}

.admin-contenido {
    flex: 1;
    min-width: 0;
    padding: 32px;
}

.tabla-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.admin-contenido h1 { font-size: 24px; margin-bottom: 24px; }

/* =====================================================
   STATS DASHBOARD
   ===================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.stat-card {
    background: white;
    padding: 24px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.stat-icono { font-size: 24px; margin-bottom: 8px; }
.stat-card h3 { font-size: 14px; color: var(--texto-suave); margin-bottom: 8px; }
.stat-numero { font-size: 32px; font-weight: 800; color: var(--morado); }

/* =====================================================
   TABLA ADMIN
   ===================================================== */
.tabla-admin {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.tabla-admin th {
    background: #f5f5f5;
    padding: 14px 16px;
    text-align: left;
    font-size: 14px;
    color: var(--texto-suave);
}

.tabla-admin td {
    padding: 14px 16px;
    border-bottom: 1px solid #eee;
    font-size: 15px;
}

/* ===== COMISIÓN INLINE ===== */
.form-comision { margin: 0; }

.comision-grupo {
    display: flex;
    align-items: center;
    gap: 4px;
}

.input-comision {
    width: 70px;
    padding: 6px 8px;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    font-size: 14px;
    text-align: right;
    outline: none;
}

.input-comision:focus { border-color: var(--morado); }

.comision-pct {
    font-size: 14px;
    color: var(--texto-suave);
    font-weight: 600;
}

.btn-comision {
    background: none;
    border: 1px solid var(--gris-borde);
    border-radius: 8px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    transition: background 0.15s;
}

.btn-comision:hover { background: #f0e6ff; border-color: var(--morado); }

/* =====================================================
   PÁGINA PÚBLICA - EVENTOS
   ===================================================== */
.grid-eventos {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.card-evento {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    transition: transform 0.2s;
}

.card-evento:hover { transform: translateY(-4px); }

.card-imagen {
    height: 180px;
    background: #f0e6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card-imagen img { width: 100%; height: 100%; object-fit: cover; }
.card-imagen-placeholder { font-size: 60px; }
.card-info { padding: 20px; }
.card-titulo { font-size: 17px; font-weight: 700; color: var(--texto); margin-bottom: 10px; }
.card-fecha, .card-lugar, .card-organizador { font-size: 14px; color: var(--texto-suave); margin-bottom: 6px; }

/* =====================================================
   DETALLE EVENTO
   ===================================================== */
.evento-detalle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    margin-bottom: 32px;
}

.evento-imagen {
    height: 300px;
    background: #f0e6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.evento-imagen img { width: 100%; height: 100%; object-fit: cover; }
.evento-info { padding: 32px; }
.evento-info h1 { font-size: 24px; font-weight: 800; margin-bottom: 16px; color: var(--texto); }
.evento-descripcion { margin-top: 16px; color: #555; line-height: 1.6; font-size: 15px; }

/* =====================================================
   ENTRADAS
   ===================================================== */
.grid-entradas {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
}

.card-entrada {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
}

.entrada-tipo { font-size: 18px; font-weight: 700; color: var(--texto); margin-bottom: 12px; }
.entrada-precio { font-size: 32px; font-weight: 800; color: var(--morado); margin-bottom: 8px; }
.entrada-disponibles { font-size: 14px; color: #888; margin-bottom: 16px; }

/* =====================================================
   COMPRA
   ===================================================== */
.compra-contenedor {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 24px;
    max-width: 900px;
    margin: 0 auto;
}

.compra-resumen,
.compra-form {
    background: white;
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    height: fit-content;
}

.compra-resumen h2,
.compra-form h2 { font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--texto); }

.resumen-titulo { font-size: 16px; font-weight: 700; color: var(--texto); margin-bottom: 8px; }
.resumen-tipo, .resumen-fecha, .resumen-lugar { font-size: 14px; color: var(--texto-suave); margin-bottom: 6px; }

.resumen-precio {
    display: flex;
    justify-content: space-between;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #eee;
    font-weight: 600;
}

.total-compra {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f0e6ff;
    border-radius: 10px;
    margin-bottom: 16px;
    font-weight: 600;
}

.total-precio { font-size: 22px; font-weight: 800; color: var(--morado); }

/* ===== MENU HAMBURGUESA ===== */
.menu-hamburguesa {
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    display: none;
}

.menu-hamburguesa span {
    display: block;
    width: 25px;
    height: 3px;
    background: #7b2be0;
    border-radius: 3px;
}

.btn-publicar {
    background: var(--amarillo);
    color: #222 !important;
    padding: 8px 20px;
    border-radius: 8px;
    font-weight: 700;
}

@media (max-width: 767px) {
    .menu-hamburguesa {
        display: flex;
    }

    .header-nav {
        display: none;
        position: absolute;
        top: 80px;
        left: 0;
        width: 100%;
        background: white;
        flex-direction: column;
        padding: 16px 24px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        z-index: 100;
        gap: 12px;
    }

    .header-nav.activo {
        display: flex;
    }
}

@media (min-width: 768px) {
    .btn-hero-publicar {
        display: none !important;
    }
}

.dt-local-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    overflow: hidden;
}

input[type="date"],
input[type="datetime-local"] {
    width: 100% !important;
    max-width: 100% !important;
    min-width: 0 !important;
    box-sizing: border-box !important;
    height: auto !important;
    min-height: 0 !important;
    padding: 12px 16px !important;
    font-family: inherit !important;
    font-size: 16px !important;
    color: inherit !important;
}

input[type="date"]::-webkit-datetime-edit,
input[type="datetime-local"]::-webkit-datetime-edit {
    padding: 0;
    display: inline-flex;
    align-items: center;
}

input[type="date"]::-webkit-datetime-edit-fields-wrapper,
input[type="datetime-local"]::-webkit-datetime-edit-fields-wrapper {
    padding: 0;
}

input[type="date"]::-webkit-calendar-picker-indicator,
input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    margin: 0;
    padding: 0;
    cursor: pointer;
}

