/* ============================================
   PreRegistroProfiler - Tema FUEGO
   Colores calidos: rojos oscuros, naranjas, negros
   ============================================ */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', -apple-system, BlinkMacSystemFont, sans-serif;
    background: #1a0a0a;
    color: #fff;
    min-height: 100vh;
    overflow-x: hidden;
}

.registro-container {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 40px 20px 30px;
    background: linear-gradient(180deg,
        #0d0000 0%,
        #1a0505 20%,
        #2d0a0a 40%,
        #1a0505 70%,
        #0d0000 100%);
}

.bg-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('/images/fondo-fuego.jpg') center top / cover no-repeat;
    opacity: 0.3;
    z-index: 0;
    pointer-events: none;
}

/* Header */
.registro-header {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-bottom: 30px;
}

.header-title-img {
    max-width: 340px;
    width: 100%;
    height: auto;
}

/* Steps */
.step-content {
    display: none;
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 420px;
    animation: fadeIn 0.3s ease;
}

.step-content.active {
    display: block;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Form */
.form-group-custom {
    margin-bottom: 18px;
}

.form-group-custom label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffccaa;
    margin-bottom: 6px;
    letter-spacing: 0.5px;
}

.opcional {
    font-weight: 300;
    color: #aa8866;
    font-size: 12px;
}

.input-custom {
    width: 100%;
    padding: 14px 18px;
    border: none;
    border-radius: 30px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    outline: none;
    transition: box-shadow 0.3s ease;
}

.input-custom:focus {
    box-shadow: 0 0 15px rgba(255, 100, 0, 0.5);
}

.input-custom.input-error {
    box-shadow: 0 0 10px rgba(255, 50, 50, 0.6);
    border: 2px solid #ff4444;
}

.field-error {
    display: none;
    color: #ff6655;
    font-size: 12px;
    margin-top: 5px;
    padding-left: 18px;
}

.privacidad-aviso {
    margin-top: 20px;
    padding: 12px 16px;
    border: 1px solid rgba(255, 100, 0, 0.15);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.03);
}

.privacidad-aviso p {
    font-size: 11px;
    color: #aa8866;
    line-height: 1.5;
    margin: 0;
}

.foto-explicacion {
    text-align: center;
    margin-bottom: 20px;
}

.foto-explicacion p {
    color: #ffccaa;
    font-size: 15px;
    margin-bottom: 5px;
}

.foto-explicacion .foto-sub {
    color: #aa8866;
    font-size: 13px;
}

/* Boton principal */
.btn-fuego {
    display: block;
    width: 100%;
    padding: 16px 30px;
    margin-top: 25px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 2px;
    color: #fff;
    background: linear-gradient(135deg, #cc4400, #ff6600, #ee5500);
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.btn-fuego:hover:not(:disabled) {
    background: linear-gradient(135deg, #ee5500, #ff8833, #ff6600);
    box-shadow: 0 5px 25px rgba(255, 100, 0, 0.5);
    transform: translateY(-1px);
}

.btn-fuego:disabled {
    background: linear-gradient(135deg, #553322, #664433, #553322);
    color: #997766;
    cursor: not-allowed;
}

.btn-fuego.btn-sm {
    padding: 10px 20px;
    font-size: 13px;
    width: auto;
    display: inline-block;
    margin-top: 10px;
}

.btn-secondary-fuego {
    display: inline-block;
    padding: 14px 25px;
    margin-top: 15px;
    margin-right: 10px;
    border: 2px solid #cc4400;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 1px;
    color: #ffaa66;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-secondary-fuego:hover {
    background: rgba(204, 68, 0, 0.2);
}

.btn-link-custom {
    display: block;
    margin-top: 20px;
    background: none;
    border: none;
    color: #ff9966;
    font-size: 14px;
    cursor: pointer;
    text-align: center;
    width: 100%;
    padding: 8px;
}

.btn-link-custom:hover {
    color: #ffbb88;
    text-decoration: underline;
}

.btn-upload-label {
    display: block;
    text-align: center;
    cursor: pointer;
}

/* Camara */
.instruccion-foto {
    text-align: center;
    color: #ffccaa;
    font-size: 15px;
    margin-bottom: 20px;
}

.camera-container {
    width: 100%;
    max-width: 350px;
    margin: 0 auto 20px;
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    aspect-ratio: 4/3;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid rgba(255, 100, 0, 0.3);
}

#video-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.foto-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

#foto-controls {
    text-align: center;
}

/* Confirmacion */
.confirm-foto-container {
    text-align: center;
    margin-bottom: 20px;
}

.confirm-foto {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid #ff6600;
    box-shadow: 0 0 20px rgba(255, 100, 0, 0.3);
}

.confirm-datos {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 100, 0, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 10px;
}

.confirm-datos p {
    margin-bottom: 8px;
    font-size: 14px;
    color: #eee;
}

.confirm-datos strong {
    color: #ffaa66;
}

/* Registro Resumen */
.registro-resumen {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 100, 0, 0.25);
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.registro-resumen p {
    margin-bottom: 6px;
    font-size: 14px;
    color: #eee;
}

.registro-resumen strong {
    color: #ffaa66;
}

/* QR Section */
.qr-container {
    text-align: center;
    margin: 20px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 16px;
}

.qr-image {
    width: 220px;
    height: 220px;
    margin: 0 auto 10px;
    display: block;
}

.qr-nombre {
    color: #333;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.qr-empresa {
    color: #666;
    font-size: 14px;
}

.qr-actions {
    margin: 20px 0;
}

.btn-secondary-fuego.btn-full {
    display: block;
    width: 100%;
    text-align: center;
    margin-right: 0;
}

.btn-wallet {
    display: block;
    width: 100%;
    padding: 14px 30px;
    margin-top: 12px;
    border: none;
    border-radius: 30px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: #000;
    cursor: pointer;
    letter-spacing: 1px;
}

.btn-wallet:hover {
    background: #222;
}

.wallet-icon {
    font-size: 18px;
}

.email-status {
    text-align: center;
    font-size: 13px;
    margin-top: 10px;
    padding: 8px;
    border-radius: 8px;
}

.email-status.sending { color: #ffaa66; }
.email-status.success { color: #66cc66; }
.email-status.error { color: #ff6655; }

.evento-fecha {
    margin-top: 10px;
    font-size: 14px;
}

.evento-lugar {
    font-size: 13px;
}

/* Exito */
.exito-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #cc4400, #ff6600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 40px;
    margin: 0 auto 20px;
    box-shadow: 0 0 30px rgba(255, 100, 0, 0.4);
}

.exito-titulo {
    text-align: center;
    font-size: 24px;
    color: #fff;
    margin-bottom: 15px;
}

.exito-mensaje {
    text-align: center;
    color: #ccaa99;
    font-size: 15px;
    margin-bottom: 25px;
    line-height: 1.5;
}

.evento-info {
    text-align: center;
    padding: 20px;
    border: 1px solid rgba(255, 100, 0, 0.3);
    border-radius: 12px;
    background: rgba(255, 50, 0, 0.05);
}

.evento-info p {
    margin-bottom: 5px;
    color: #ffccaa;
}

/* Footer */
.evento-footer {
    position: relative;
    z-index: 1;
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 100, 0, 0.15);
}

.evento-footer p {
    color: #cc9977;
    font-size: 14px;
    margin-bottom: 4px;
    font-weight: 500;
}

/* Spinner */
.spinner-fire {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 100, 0, 0.2);
    border-top-color: #ff6600;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 15px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Error modal */
.error-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.error-content {
    background: #2a1010;
    border: 1px solid #cc4400;
    border-radius: 12px;
    padding: 30px;
    max-width: 350px;
    text-align: center;
}

.error-content p {
    color: #ffccaa;
    margin-bottom: 15px;
    font-size: 15px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (min-width: 768px) {
    .registro-container {
        padding: 60px 40px 40px;
    }

    .header-title-img {
        max-width: 420px;
    }

    .step-content {
        max-width: 480px;
    }

    .camera-container {
        max-width: 400px;
    }
}

@media (max-width: 375px) {
    .header-title-img {
        max-width: 260px;
    }

    .input-custom {
        padding: 12px 16px;
        font-size: 15px;
    }

    .btn-fuego {
        padding: 14px 20px;
        font-size: 13px;
    }
}

/* ============================================
   ADMIN PAGE
   ============================================ */

.admin-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
}

.admin-header {
    text-align: center;
    margin-bottom: 30px;
}

.admin-header h1 {
    color: #ff6600;
    font-size: 24px;
    margin-bottom: 10px;
}

.admin-stats {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.stat-card {
    background: rgba(255, 100, 0, 0.1);
    border: 1px solid rgba(255, 100, 0, 0.3);
    border-radius: 12px;
    padding: 15px 25px;
    text-align: center;
    min-width: 120px;
}

.stat-card .stat-number {
    font-size: 28px;
    font-weight: 700;
    color: #ff6600;
}

.stat-card .stat-label {
    font-size: 12px;
    color: #aa8866;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-bar {
    max-width: 500px;
    margin: 0 auto 30px;
}

.search-input {
    width: 100%;
    padding: 14px 20px;
    border-radius: 30px;
    border: 1px solid rgba(255, 100, 0, 0.3);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    font-size: 16px;
    outline: none;
}

.search-input:focus {
    border-color: #ff6600;
    box-shadow: 0 0 10px rgba(255, 100, 0, 0.2);
}

.search-input::placeholder {
    color: #886644;
}

.registros-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.registro-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 100, 0, 0.15);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: all 0.3s ease;
}

.registro-card:hover {
    border-color: rgba(255, 100, 0, 0.4);
    background: rgba(255, 100, 0, 0.05);
}

.registro-card.checked-in {
    border-color: rgba(0, 200, 100, 0.4);
    background: rgba(0, 200, 100, 0.05);
}

.card-foto {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff6600;
    flex-shrink: 0;
}

.registro-card.checked-in .card-foto {
    border-color: #00cc66;
}

.card-info {
    flex: 1;
    min-width: 0;
}

.card-info h3 {
    font-size: 16px;
    color: #fff;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-info .card-empresa {
    font-size: 13px;
    color: #aa8866;
    margin-bottom: 8px;
}

.btn-checkin {
    padding: 6px 14px;
    border-radius: 20px;
    border: 1px solid #ff6600;
    background: transparent;
    color: #ff6600;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.btn-checkin:hover {
    background: rgba(255, 100, 0, 0.2);
}

.btn-checkin.checked {
    background: #00cc66;
    border-color: #00cc66;
    color: #fff;
}

.no-results {
    text-align: center;
    color: #886644;
    padding: 40px;
    font-size: 16px;
}

/* Radio buttons - Asistencia */
.asistencia-group {
    margin-top: 10px;
}

.radio-group {
    display: flex;
    gap: 20px;
    margin-top: 8px;
}

.radio-option {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    color: #ffccaa;
    font-size: 15px;
}

.radio-option input[type="radio"] {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #ff6600;
    border-radius: 50%;
    background: transparent;
    cursor: pointer;
    position: relative;
}

.radio-option input[type="radio"]:checked {
    background: #ff6600;
    box-shadow: inset 0 0 0 4px #1a0505;
}

.radio-label {
    font-weight: 500;
}
