html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

html {
  position: relative;
  min-height: 100%;
  overflow-x: hidden;
}

body {
  overflow-x: hidden;
  margin-bottom: 60px;
}

.app-font {
    font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

.app-shell {
    display: flex;
    min-height: 100vh;
    background: #f6f7fb;
}

.app-sidebar {
    width: 260px;
    background: #111827;
    color: #fff;
    position: sticky;
    top: 0;
    height: 100vh;
}

.app-sidebar__brand {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.app-navlink {
    color: rgba(255, 255, 255, 0.85) !important;
}

.app-navlink:hover {
    background: rgba(255, 255, 255, 0.08) !important;
}

.app-navlink.active {
    background: rgba(59, 130, 246, 0.35) !important;
}

.sidebar-action-btn {
    display: block;
    width: 100%;
    text-align: center;
    font-weight: 600;
    border-radius: 8px;
    padding: .4rem .75rem;
    text-decoration: none;
    transition: background .18s ease, color .18s ease, border-color .18s ease;
}

.sidebar-action-btn.btn-blue {
    background: rgba(59,130,246,.25);
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,.4);
}

.sidebar-action-btn.btn-blue:hover {
    background: rgba(59,130,246,.5);
    color: #fff;
    border-color: rgba(59,130,246,.8);
}

/* Acordeón del sidebar */
.app-accordion-btn {
    background: transparent !important;
    color: rgba(255, 255, 255, 0.6) !important;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.4rem 0.5rem;
    box-shadow: none !important;
    border-radius: 0 !important;
}

.app-accordion-btn:not(.collapsed) {
    color: rgba(255, 255, 255, 0.9) !important;
}

.app-accordion-btn::after {
    filter: invert(1) brightness(2);
    width: 0.8rem;
    height: 0.8rem;
    background-size: 0.8rem;
}

.accordion-item.bg-transparent {
    border-top: 1px solid rgba(255, 255, 255, 0.07) !important;
}

.app-main {
    flex: 1;
    min-width: 0;
}

.app-topbar {
    background: #ffffff;
}

.app-content {
    min-height: calc(100vh - 49px);
}

.card {
    border-radius: 14px;
}

.app-table {
    --app-table-hover: #eaf2ff;
}

.app-table > thead > tr > th {
    background: #f8fafc;
    border-bottom: 1px solid #e5e7eb;
    font-weight: 600;
}

.app-table > tbody > tr {
    transition: background-color 120ms ease-in-out;
}

.app-table > tbody > tr:hover {
    background-color: var(--app-table-hover) !important;
}

.app-col-id {
    display: none !important;
}

.app-badge-soft-blue {
    background: #eaf2ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.app-text-soft-blue {
    color: #2563eb !important;
}

.app-socio-thumb {
    width: 68px;
    height: 68px;
    object-fit: cover;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    background: #ffffff;
}

.app-photo-preview {
    position: fixed;
    z-index: 2000;
    width: 320px;
    height: 320px;
    padding: 10px;
    background: rgba(255,255,255,0.98);
    border: 1px solid #e5e7eb;
    border-radius: 14px;
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.22);
    pointer-events: none;
}

.app-photo-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

@media (max-width: 991.98px) {
    .app-socios-name {
        min-width: 240px !important;
    }
}

.login-page {
    min-height: 100vh;
    width: 100%;
    overflow-x: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(ellipse at top left, #eef2ff 0%, transparent 55%),
        radial-gradient(ellipse at bottom right, #dbeafe 0%, transparent 55%),
        #0b1220;
    padding: 16px;
    box-sizing: border-box;
}

.login-card {
    width: 100%;
    max-width: 420px;
    border-radius: 16px;
}

@media (max-width: 480px) {
    .login-card {
        border-radius: 12px;
    }
    .login-card .card-body {
        padding: 1.25rem !important;
    }
}

@media (max-width: 767.98px) {
    .app-sidebar {
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-100%);
        transition: transform 160ms ease-in-out;
        z-index: 1030;
    }

    .app-sidebar.is-open {
        transform: translateX(0);
    }
}

/* ============================================================
   KIOSK — PantallaIngresoSocio
   ============================================================ */
.kiosk-body {
    background: #000;
    min-height: 100vh;
    overflow-x: hidden;
}

.kiosk-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 16px 32px;
    background: linear-gradient(135deg, #000 0%, #0b1a35 50%, #000 100%);
    gap: 24px;
}

.kiosk-header {
    width: 100%;
    display: flex;
    justify-content: center;
}

.kiosk-logo {
    max-height: 80px;
    max-width: 240px;
    object-fit: contain;
}

/* Input de búsqueda */
.kiosk-input-panel {
    width: 100%;
    max-width: 520px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.kiosk-input-wrap {
    display: flex;
    gap: 8px;
}

.kiosk-input {
    flex: 1;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(100,180,255,.35);
    border-radius: 10px;
    color: #e0efff;
    font-size: 1.3rem;
    padding: .55rem 1rem;
    outline: none;
    transition: border-color .2s, background .2s;
}
.kiosk-input::placeholder { color: rgba(255,255,255,.35); }
.kiosk-input:focus {
    background: rgba(255,255,255,.12);
    border-color: rgba(100,180,255,.7);
}

.kiosk-btn {
    background: rgba(59,130,246,.35);
    color: #93c5fd;
    border: 1px solid rgba(59,130,246,.5);
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    padding: .55rem 1.4rem;
    cursor: pointer;
    transition: background .18s, color .18s;
    white-space: nowrap;
}
.kiosk-btn:hover { background: rgba(59,130,246,.6); color: #fff; }
.kiosk-btn:disabled { opacity: .5; cursor: not-allowed; }

.kiosk-error {
    color: #f87171;
    font-size: .9rem;
    text-align: center;
}

/* Fila de resultado */
.kiosk-result-row {
    width: 100%;
    max-width: 860px;
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    justify-content: center;
}

/* Panel base */
.kiosk-panel {
    background: rgba(30,50,80,.55);
    border: 1px solid rgba(100,180,255,.2);
    border-radius: 16px;
    padding: 24px 20px;
    backdrop-filter: blur(8px);
    flex: 1 1 260px;
    min-width: 240px;
    max-width: 380px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    transition: border-color .3s, background .3s;
}

.kiosk-panel-success { background: rgba(22,101,52,.45); border-color: rgba(74,222,128,.35); }
.kiosk-panel-danger  { background: rgba(127,29,29,.45); border-color: rgba(248,113,113,.5); }
.kiosk-panel-warning { background: rgba(120,90,0,.45);  border-color: rgba(250,204,21,.4); }

/* Foto */
.kiosk-avatar-wrap {
    width: 110px;
    height: 110px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(100,180,255,.4);
}
.kiosk-avatar {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.kiosk-nombre {
    color: #e0efff;
    font-size: 1.2rem;
    font-weight: 700;
    text-align: center;
}
.kiosk-socio-num {
    color: rgba(147,197,253,.85);
    font-size: .95rem;
}
.kiosk-actividad {
    color: rgba(255,255,255,.6);
    font-size: .85rem;
    text-align: center;
}

/* Panel estado */
.kiosk-bienvenida {
    color: #fff;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
}
.kiosk-info-row { width: 100%; }
.kiosk-info-label { color: rgba(255,255,255,.5); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; }
.kiosk-info-valor { color: #e0efff; font-size: 1rem; font-weight: 600; }

/* Alerta de producto */
.kiosk-alerta {
    width: 100%;
    max-width: 520px;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 12px;
    padding: 16px 20px;
}
.kiosk-alerta-success { background: rgba(22,101,52,.5); color: #86efac; border: 1px solid rgba(74,222,128,.4); }
.kiosk-alerta-danger  { background: rgba(127,29,29,.5); color: #fca5a5; border: 1px solid rgba(248,113,113,.4); }

@media (max-width: 576px) {
    .kiosk-page { padding: 16px 10px 24px; gap: 16px; }
    .kiosk-logo { max-height: 56px; }
    .kiosk-input { font-size: 1.1rem; }
    .kiosk-bienvenida { font-size: 1.3rem; }
    .kiosk-panel { padding: 16px 14px; }
}

/* ── KIOSK — Reconocimiento facial ─────────────────────────────────────── */
.kiosk-cam-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    margin-top: 8px;
}

.kiosk-cam-wrap {
    position: relative;
    width: 280px;
    height: 210px;
    border-radius: 12px;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.15);
    background: #111;
}

.kiosk-cam-wrap video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1); /* espejo */
}

.kiosk-cam-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,.55);
    color: rgba(255,255,255,.7);
    font-size: .85rem;
    text-align: center;
    padding: 8px;
    border-radius: 12px;
    transition: opacity .3s;
}

.kiosk-cam-overlay.d-none { display: none !important; }

.kiosk-cam-btn {
    padding: 7px 22px;
    border-radius: 8px;
    border: 1px solid rgba(99,179,237,.5);
    background: rgba(49,130,206,.25);
    color: #90cdf4;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.kiosk-cam-btn:hover { background: rgba(49,130,206,.5); color: #fff; }
.kiosk-cam-btn:disabled { opacity: .4; cursor: not-allowed; }

/* Barra de progreso para precarga de descriptores */
.kiosk-load-bar-wrap {
    width: 280px;
    background: rgba(255,255,255,.1);
    border-radius: 6px;
    overflow: hidden;
    height: 6px;
}

.kiosk-load-bar {
    height: 6px;
    background: linear-gradient(90deg, #3b82f6, #60a5fa);
    width: 0%;
    transition: width .3s;
    border-radius: 6px;
}

.kiosk-load-status {
    font-size: .78rem;
    color: rgba(255,255,255,.5);
    text-align: center;
}

/* indicador de escaneo activo */
.kiosk-scan-ring {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 120px; height: 120px;
    border: 3px solid rgba(74,222,128,.6);
    border-radius: 50%;
    animation: scanPulse 1.4s ease-in-out infinite;
    pointer-events: none;
    display: none;
}
.kiosk-scanning .kiosk-scan-ring { display: block; }

@keyframes scanPulse {
    0%, 100% { opacity: .6; transform: translate(-50%,-50%) scale(1); }
    50%       { opacity: 1;  transform: translate(-50%,-50%) scale(1.12); }
}
