/* Reset y base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root{
  --primary: #1e66ff;          /* azul primary */
  --primary-hover: #1553cc;    /* hover más oscuro */
}

/* Botones grandes del héroe y variantes */
.btn-extra-large,
.btn-primary,
.btn-action,
.btn-small,
.btn-large {
  background: var(--primary) !important;
  color: #fff !important;
  border: none !important;
  box-shadow: none !important;
  transition: background .15s ease, transform .15s ease;
}

/* Hover/focus: sin sombras ni degradés */
.btn-extra-large:hover,
.btn-primary:hover,
.btn-action:hover,
.btn-small:hover,
.btn-large:hover,
.btn-extra-large:focus,
.btn-primary:focus,
.btn-action:focus,
.btn-small:focus,
.btn-large:focus {
  background: var(--primary-hover) !important;
  transform: translateY(0) !important; /* sin “flotar” si no querés */
  box-shadow: none !important;
  outline: none;
}

/* Si querés que el secundario NO sea azul, lo dejamos neutro */
.btn-secondary {
  background: #f8f9fa !important;
  color: #333 !important;
  border: 2px solid #dee2e6 !important;
}
.btn-secondary:hover,
.btn-secondary:focus {
  background: #e9ecef !important;
  transform: none !important;
  box-shadow: none !important;
}

/* Ajustes visuales asociados al primary */
.form-control:focus {
  border-color: var(--primary) !important;
  box-shadow: 0 0 0 5px rgba(30,102,255,0.12) !important;
}
.loading-spinner {
  border-top-color: var(--primary) !important;
}

/* (Opcional) si tenés “action-card” tipo botón y querés que sean azules también: */
.action-card.button-like,
button.action-card.button-like {
  background: var(--primary) !important;
  color: #fff !important;
  border-color: transparent !important;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #333;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

/* Layout principal del tótem - 1080×1920 vertical */
.totem-container {
    width: 1080px;
    height: 1920px;
    position: relative;
    background: #ffffff;
    margin: 0 auto;
    overflow: hidden;
    box-shadow: 0 0 50px rgba(0,0,0,0.3);
}

/* Sistema de vistas */
.view {
    display: none;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    padding: 60px;
    overflow-y: auto;
}

/* Vista activa por defecto centrada (para todas las vistas) */
.view.active {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

/* ====== AJUSTE ESPECÍFICO DEL IDLE: LOGO ARRIBA + HERO CENTRADO ====== */
#idleView { position: relative; }

/* Logo pegado arriba y centrado horizontalmente */
#idleView .logo-container{
  position: absolute;
  top: 36px;
  left: 50%;
  transform: translateX(-50%);
  display: grid;
  justify-items: center;
  gap: 18px;
  margin: 0;                 /* sin empujarlo hacia abajo */
  text-align: center;
}

/* El hero queda centrado verticalmente. Le damos padding-top para que no tape al logo */
#idleView .hero-section{
  min-height: 100%;
  width: 100%;
  max-width: 900px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;    /* centrado vertical */
  text-align: center;
  padding-top: 180px;         /* espacio reservado para el logo */
}

/* ================================================================ */

/* Vista Idle - Pantalla de atracción */
.hero-section {
    text-align: center;
    width: 100%;
    max-width: 900px;
}

.logo-link{ display: inline-block; }

.logo-image{
  width: min(720px, 80vw);  /* tamaño grande en el tótem */
  max-width: 100%;
  height: auto;
  image-rendering: auto;
}

/* Si tu pantalla del tótem es muy alta (1080x1920), podés subir un poco más */
@media (min-height: 1700px){
  .logo-image{ width: min(780px, 82vw); }
}

/* En pantallas más chicas (modo responsive fuera del tótem) */
@media (max-width: 1080px){
  .logo-image{ width: min(560px, 72vw); }
}

.hero-section h1 {
    font-size: 72px;
    color: #333;
    margin-bottom: 40px;
    font-weight: 700;
}

.welcome-message h2 {
    font-size: 48px;
    color: #555;
    margin-bottom: 20px;
    font-weight: 400;
}

.welcome-message p {
    font-size: 32px;
    color: #777;
    margin-bottom: 60px;
}

/* Botones principales para personas mayores */
.main-buttons-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    width: 100%;
    max-width: 800px;
    margin-bottom: 60px;
}

.btn-extra-large {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 50px 60px;
    min-height: 200px;
    font-size: 42px;
    border-radius: 30px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.3);
}

.btn-extra-large:hover {
    transform: translateY(-5px);
    box-shadow: 0 20px 50px rgba(102, 126, 234, 0.4);
}

.btn-extra-large .btn-icon {
    font-size: 80px;
    margin-right: 40px;
    min-width: 100px;
}

.btn-extra-large .btn-text {
  flex: initial;                /* no ocupar todo el ancho */
  text-align: center;           /* centrar líneas */
  margin: 0;                    /* sin márgenes laterales */
}

.btn-extra-large .btn-title {
    font-size: 48px;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.2;
}

.btn-extra-large .btn-subtitle {
    font-size: 28px;
    font-weight: 400;
    opacity: 0.9;
    line-height: 1.2;
}

.help-text {
    margin-top: 40px;
}

.help-text p {
    font-size: 24px;
    color: #666;
    font-style: italic;
}

/* Botones regulares */
.btn-primary, .btn-secondary, .btn-action, .btn-small {
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 32px;
    font-weight: 600;
    padding: 30px 60px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-height: 64px;
    line-height: 1.2;
}

.btn-large {
    font-size: 36px;
    padding: 40px 70px;
    min-height: 100px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #f8f9fa;
    color: #333;
    border: 3px solid #dee2e6;
}

.btn-secondary:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-action {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    margin: 10px;
}

.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(40, 167, 69, 0.4);
}

.btn-small {
    font-size: 24px;
    padding: 15px 30px;
    min-height: 50px;
    margin: 5px;
}

/* Formularios */
.form-container, .confirm-container, .menu-container, .qr-container {
    width: 100%;
    max-width: 800px;
    background: white;
    border-radius: 30px;
    padding: 60px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.1);
}

.totem-form h2, .confirm-container h2, .menu-container h2, .qr-container h2 {
    font-size: 48px;
    margin-bottom: 30px;
    text-align: center;
    color: #333;
}

.form-description {
    font-size: 28px;
    color: #666;
    text-align: center;
    margin-bottom: 40px;
    line-height: 1.4;
}

.form-group {
    margin-bottom: 40px;
}

.form-group label {
    display: block;
    font-size: 32px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.form-control {
    width: 100%;
    padding: 25px 30px;
    font-size: 36px;
    border: 3px solid #dee2e6;
    border-radius: 15px;
    background: #fff;
    transition: border-color 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 5px rgba(102, 126, 234, 0.1);
}

.form-help {
    font-size: 20px;
    color: #666;
    margin-top: 8px;
    display: block;
    font-style: italic;
}

.form-separator {
    text-align: center;
    margin: 30px 0;
    position: relative;
}

.form-separator::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background: #dee2e6;
}

.form-separator span {
    background: white;
    padding: 0 20px;
    font-size: 24px;
    color: #666;
    font-weight: 600;
}

.form-actions {
    display: flex;
    gap: 30px;
    justify-content: center;
    margin-top: 50px;
}

/* Vista de confirmación */
.client-data {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
}

.data-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    border-bottom: 2px solid #dee2e6;
    font-size: 32px;
}

.data-row:last-child {
    border-bottom: none;
}

.data-row .label {
    font-weight: 600;
    color: #555;
}

.data-row .value {
    font-weight: 400;
    color: #333;
}

/* Vista de menú principal */
.welcome-name {
    font-size: 36px;
    color: #667eea;
    font-weight: 600;
    text-align: center;
    margin-bottom: 40px;
}

.menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin: 50px 0;
}

.menu-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 25px;
    padding: 60px 40px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 3px solid transparent;
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    border-color: #667eea;
}

.menu-icon {
    font-size: 120px;
    margin-bottom: 30px;
}

.menu-card h3 {
    font-size: 36px;
    margin-bottom: 20px;
    color: #333;
}

.menu-card p {
    font-size: 24px;
    color: #666;
    line-height: 1.4;
}

/* Vista QR */
.qr-display {
    text-align: center;
    background: #f8f9fa;
    border-radius: 20px;
    padding: 40px;
    margin: 40px 0;
}

.qr-image {
    max-width: 400px;
    width: 100%;
    height: auto;
    border: 5px solid #dee2e6;
    border-radius: 15px;
    margin-bottom: 30px;
}

.qr-code-text {
    font-size: 28px;
    color: #333;
    font-family: 'Courier New', monospace;
}

.qr-instructions {
    text-align: center;
    font-size: 28px;
    color: #666;
    margin: 30px 0;
    line-height: 1.4;
}

.qr-actions {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin: 40px 0;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: none;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 80px;
    height: 80px;
    border: 8px solid #f3f3f3;
    border-top: 8px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 30px;
}

.loading-overlay p {
    color: white;
    font-size: 32px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mensajes de error */
.error-message {
    margin-top: 30px;
    padding: 20px;
    background: #f8d7da;
    color: #721c24;
    border: 2px solid #f5c6cb;
    border-radius: 15px;
    font-size: 24px;
    text-align: center;
}

/* Estilos para user_view.php */
.user-profile-container {
    padding: 40px;
    max-width: 1000px;
    margin: 0 auto;
}

.user-profile-container h1 {
    font-size: 56px;
    text-align: center;
    margin-bottom: 50px;
    color: #333;
}

.client-info-card, .adjudicaciones-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.client-info-card h2, .adjudicaciones-card h2 {
    font-size: 36px;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 3px solid #667eea;
    padding-bottom: 15px;
}

.update-form {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #dee2e6;
}

.update-form h3 {
    font-size: 28px;
    margin-bottom: 20px;
    color: #555;
}

.adjudicaciones-list {
    max-height: 800px;
    overflow-y: auto;
}

.adjudicacion-item {
    background: #f8f9fa;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
}

.adj-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.lote-number {
    font-size: 32px;
    font-weight: 700;
    color: #333;
}

.status {
    padding: 10px 20px;
    border-radius: 20px;
    font-size: 20px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-asignado {
    background: #d4edda;
    color: #155724;
}

.status-pagado {
    background: #cce5ff;
    color: #004085;
}

.status-cancelado {
    background: #f8d7da;
    color: #721c24;
}

.adj-details {
    margin-bottom: 20px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    font-size: 24px;
}

.adj-actions {
    display: flex;
    gap: 15px;
}

.main-actions {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 40px;
}

.no-data {
    text-align: center;
    font-size: 28px;
    color: #666;
    padding: 60px;
    font-style: italic;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.8);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    border-radius: 20px;
    padding: 40px;
    max-width: 600px;
    width: 90%;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    border-bottom: 2px solid #dee2e6;
    padding-bottom: 20px;
}

.modal-header h3 {
    font-size: 32px;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 40px;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-actions {
    display: flex;
    justify-content: center;
    margin-top: 30px;
}

/* Estilos para qrscan.php */
.scan-container {
    padding: 40px;
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

.scan-header {
    text-align: center;
    margin-bottom: 50px;
}

.scan-header h1 {
    font-size: 48px;
    color: #333;
    margin-bottom: 20px;
}

.scan-header p {
    font-size: 24px;
    color: #666;
}

.scan-form-container {
    background: #f8f9fa;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
}

.scan-form .form-group {
    margin-bottom: 30px;
}

.scan-form label {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 10px;
    display: block;
    color: #333;
}

.scan-form .form-control {
    font-size: 20px;
    padding: 15px 20px;
}

.result-container {
    margin-top: 30px;
    padding: 20px;
    border-radius: 10px;
    font-size: 18px;
}

.result-container.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.result-container.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.recent-assignments {
    background: white;
    border-radius: 20px;
    padding: 40px;
    margin-bottom: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.recent-assignments h2 {
    font-size: 32px;
    margin-bottom: 30px;
    color: #333;
    border-bottom: 2px solid #667eea;
    padding-bottom: 15px;
}

.recent-list {
    max-height: 400px;
    overflow-y: auto;
}

.recent-item {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.recent-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.recent-lote {
    font-size: 20px;
    font-weight: 700;
    color: #333;
}

.recent-time {
    font-size: 14px;
    color: #666;
}

.recent-details {
    font-size: 16px;
    color: #555;
}

.navigation {
    text-align: center;
    margin-top: 40px;
}

/* Mensajes de éxito/error */
.message .success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 18px;
}

.message .error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 15px 20px;
    border-radius: 10px;
    margin-top: 15px;
    font-size: 18px;
}

/* Responsive adjustments para pantallas más pequeñas */
@media (max-width: 1080px) {
    .totem-container {
        width: 100vw;
        height: 100vh;
    }
    
    .view {
        padding: 30px;
    }
    
    .hero-section h1 {
        font-size: 48px;
    }
    
    .welcome-message h2 {
        font-size: 32px;
    }
    
    .btn-primary, .btn-secondary {
        font-size: 24px;
        padding: 20px 40px;
    }
    .keyboard-container{
    position: fixed; left:0; right:0; bottom:0; z-index:9999;
    background:#111; box-shadow:0 -8px 24px rgba(0,0,0,.35);
    transform: translateY(100%); transition: transform .25s ease;
    }
    .keyboard-container.active{ transform: translateY(0); }

    /* tamaño general */
    .keyboard-container .simple-keyboard{
    max-width: 100%;
    padding: 18px 22px;
    }

    /* filas separadas */
    .keyboard-container .hg-theme-default .hg-row{
    margin-bottom: 14px;
    }

    /* botones grandes por defecto */
    .keyboard-container .hg-theme-default .hg-button{
    height: 110px;                 /* ⬅️ alto de tecla */
    border-radius: 16px;
    font-size: 42px;               /* ⬅️ tamaño de letra */
    line-height: 1;
    padding: 0 18px;
    }

    /* teclas especiales (bksp/space/enter) aún más visibles */
    .keyboard-container .hg-theme-default .hg-button.hg-functionBtn{
    font-weight: 600;
    }

    /* layout numérico: aún más grande */
    .keyboard-container.numeric .hg-theme-default .hg-button{
    height: 140px;                 /* ⬅️ alto de tecla numérica */
    font-size: 48px;
    }

    /* evita que el contenido quede oculto detrás del teclado */
    body.keyboard-open{
    /* este padding ahora lo ajustamos por JS según el alto real del teclado */
    padding-bottom: 0 !important;
    }
    
    .btn-extra-large {
    display: flex;
    align-items: center;
    justify-content: center;      /* <-- centrado horizontal */
    text-align: center;           /* <-- por si hay inline text */
    padding: 50px 30px;
    }
    
    .btn-extra-large .btn-icon {
    display: none;
    }
    
    .btn-extra-large .btn-title {
        font-size: 36px;
    }
    
    .btn-extra-large .btn-subtitle {
        font-size: 22px;
    }
    
    .menu-grid {
        grid-template-columns: 1fr;
    }
}
