@font-face {
    font-family: 'Freight';
    src: url('https://azulik.com/wp-content/uploads/2025/10/Freight-Disp-Book.ttf') format('truetype');
}

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

html, body {
    width: 100%;
    height: 100%;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f3f3f3;
    color: #333333;
    line-height: 1.5;
}

.container {
    max-width: 500px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ===== FORMULARIO PÚBLICO ===== */

.form-wrapper {
    width: 100%;
    text-align: center;
}

.logo {
    max-width: 120px;
    height: auto;
    margin: 0 auto 20px;
}

.title {
    font-family: 'Freight', serif;
    font-size: 48px;
    font-weight: 400;
    color: #333333;
    margin-bottom: 20px;
    letter-spacing: 3px;
}

.event-info {
    font-size: 16px;
    color: #666666;
    margin-bottom: 15px;
}

.event-info .time {
    font-size: 14px;
    color: #999999;
    opacity: 1;
}

/* Form */
.form {
    margin-top: 30px;
                padding:50px;

}

.form-group {
    margin-bottom: 15px;

}

.form-group input {
    width: 100%;
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid #C59C2C;
    color: #333333;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.form-group input::placeholder {
    color: #999999;
}

.form-group input:focus {
    outline: none;
    border-color: #C59C2C;
    box-shadow: 0 0 0 3px rgba(12, 113, 195, 0.1);
}

.instagram-input {
    position: relative;
    display: flex;
    align-items: center;
}

.at {
    position: absolute;
    left: 12px;
    color: #C59C2C;
    font-weight: 600;
    pointer-events: none;
}

.instagram-input input {
    padding-left: 32px !important;
}

/* Botones */
.btn {
    width: 100%;
    padding: 12px;
    background-color: #C59C2C;
    border: none;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    margin-top: 10px;
}

.btn:hover {
    opacity: 0.9;
}

.btn:active {
    opacity: 1;
}

.btn-print {
    padding: 10px 20px;
    background-color: #C59C2C;
    border: none;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    text-transform: uppercase;
    margin-top: 15px;
    transition: all 0.3s;
}

.btn-print:hover {
    background-color: #9B7626;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(12, 113, 195, 0.2);
}

/* Mensajes */
.message {
    padding: 12px;
    margin: 15px 0;
    border-left: 3px solid;
    font-size: 13px;
    border-radius: 6px;
    animation: slideDown 0.3s ease-out;
    display: none;
}

.message.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.message-error {
    border-left-color: #ff6b6b;
    background: #ffe8e8;
    color: #cc0000;
}

.message-success {
    border-left-color: #C59C2C;
    background: #f5f5f5;
    color: #C59C2C;
}

.message-closed {
    border-left-color: #C59C2C;
    background: #e8f0ff;
    color: #C59C2C;
}

.message-info {
    border-left-color: #C59C2C;
    background: #e8f0ff;
    color: #C59C2C;
}

/* ===== BOLETO CON QR ===== */

.ticket-wrapper {
    margin-top: 30px;
    text-align: center;
}

.ticket {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid #ffffff;
    border-radius: 8px;
    padding: 30px 20px;
    margin-bottom: 20px;
}

.ticket-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    padding-bottom: 20px;
    margin-bottom: 20px;
}

.ticket-header h2 {
    font-family: 'Freight', sans-serif;
    font-size: 32px;
    margin-bottom: 5px;
    letter-spacing: 2px;
}

.ticket-date {
    font-size: 14px;
    opacity: 0.8;
}

.ticket-content {
    padding: 20px 0;
}

.ticket-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    opacity: 0.8;
    margin-bottom: 5px;
}

.ticket-name {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
}

.ticket-qr {
    margin: 20px 0;
}

.ticket-qr img {
    width: 180px;
    height: 180px;
    border: 2px solid #ffffff;
    padding: 10px;
    background: #ffffff;
}

.ticket-code {
    font-size: 12px;
    font-family: 'Courier New', monospace;
    letter-spacing: 1px;
    word-break: break-all;
    margin: 15px 0 20px 0;
}

.ticket-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
    font-size: 12px;
}

/* Cámara QR */
#videoContainer {
    background: rgba(0, 0, 0, 0.5);
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
}

#video {
    width: 100%;
    max-width: 500px !important;
    border-radius: 8px;
    background: #000;
    border: 2px solid #b9d9c3;
}

#resultadoQR {
    animation: slideDown 0.3s ease-out;
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }
    
    .form-wrapper > p:first-of-type,
    .btn, 
    .message,
    .btn-print {
        display: none;
    }
    
    .ticket {
        border: 1px solid black;
        background: white;
    }
    
    .ticket-qr img {
        background: white;
        border: 1px solid black;
    }
}

/* ===== LOGIN ===== */

.login-wrapper {
    width: 100%;
    max-width: 400px;
    padding: 50px;
}

.login-wrapper h1 {
    font-family: 'Freight', serif;
    font-size: 36px;
    margin-bottom: 30px;
    color: #333333;
    text-align: center;
    font-weight: 400;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.login-form input {
    padding: 12px;
    background-color: #ffffff;
    border: 1px solid #C59C2C;
    color: #333333;
    font-family: 'Montserrat', sans-serif;
    border-radius: 6px;
}

.login-form input::placeholder {
    color: #cccccc;
}

.login-form input:focus {
    outline: none;
    border-color: #C59C2C;
    box-shadow: 0 0 0 3px rgba(12, 113, 195, 0.1);
}

.login-form .btn {
    margin-top: 0;
}

/* ===== ADMIN ===== */

.admin-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.admin-header h1 {
    font-family: 'Freight', serif;
    font-size: 36px;
    color: #333333;
    font-weight: 400;
}

.btn-small {
    padding: 8px 16px;
    background-color: #C59C2C;
    border: none;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.3s;
}

.btn-small:hover {
    background-color: #9B7626;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(12, 113, 195, 0.2);
}

/* Event selector */
.event-selector {
    margin-bottom: 20px;
}

.select-evento {
    padding: 8px 12px;
    background-color: #ffffff;
    border: 1px solid #C59C2C;
    color: #333333;
    font-family: 'Montserrat', sans-serif;
    border-radius: 6px;
    cursor: pointer;
}

.select-evento:focus {
    outline: none;
    border-color: #ffffff;
}

/* Tabs */
.admin-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.tab-btn {
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #666666;
    cursor: pointer;
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.3s;
    text-decoration: none;
}

.tab-btn:hover {
    color: #C59C2C;
}

.tab-btn.active {
    border-bottom-color: #C59C2C;
    color: #C59C2C;
}

/* Tab content */
.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

/* ===== CHECK-IN ===== */

.checkin-header {
    margin-bottom: 30px;
}

.checkin-header h2 {
    font-family: 'Freight', serif;
    font-size: 28px;
    margin-bottom: 20px;
    color: #333333;
    font-weight: 400;
}

.checkin-stats {
    display: flex;
    gap: 20px;
}

.stat {
    background: transparent;
    border: none;
    padding: 0;
    border-radius: 0;
    text-align: left;
}

.stat-num {
    display: block;
    font-size: 18px;
    font-weight: 600;
    color: #C59C2C;
    margin-bottom: 2px;
}

.stat-label {
    display: block;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #666666;
    opacity: 1;
}

.checkin-search {
    display: flex;
    gap: 10px;
    margin: 20px 0 30px 0;
    max-width: 400px;
}

.checkin-search input {
    flex: 1;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid #C59C2C;
    color: #333333;
    font-family: 'Montserrat', sans-serif;
    border-radius: 6px;
}

.checkin-search input:focus {
    outline: none;
    border-color: #C59C2C;
    box-shadow: 0 0 0 3px rgba(12, 113, 195, 0.1);
}

.checkin-search .btn-small {
    padding: 10px 16px;
    margin: 0;
}

.checkin-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.checkin-card {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-bottom: 1px solid #e0e0e0;
    padding: 12px;
    border-radius: 6px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.checkin-card h3 {
    font-size: 14px;
    margin-bottom: 0;
    color: #333333;
    word-break: break-word;
    font-weight: 600;
}

.checkin-card p {
    font-size: 12px;
    color: #999999;
    margin-bottom: 0;
    margin-left: 15px;
    word-break: break-all;
}

.card-actions {
    display: flex;
    gap: 8px;
    margin-left: 15px;
}

.btn-card {
    padding: 6px 12px;
    background-color: #C59C2C;
    border: none;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    text-transform: uppercase;
    transition: all 0.3s;
}

.btn-card:hover {
    background-color: #9B7626;
    transform: translateY(-2px);
}

.status-label {
    display: inline-block;
    padding: 6px 10px;
    background: #f5f5f5;
    border: 1px solid #C59C2C;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    color: #C59C2C;
}

/* ===== REGISTROS ===== */

.search-form {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    max-width: 400px;
}

.search-form input {
    flex: 1;
    padding: 10px;
    background-color: #ffffff;
    border: 1px solid #C59C2C;
    color: #333333;
    font-family: 'Montserrat', sans-serif;
    border-radius: 6px;
}

.search-form input:focus {
    outline: none;
    border-color: #C59C2C;
    box-shadow: 0 0 0 3px rgba(12, 113, 195, 0.1);
}

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table thead {
    border-bottom: 2px solid #C59C2C;
}

.table th {
    text-align: left;
    padding: 10px;
    font-weight: 600;
    color: #C59C2C;
    text-transform: uppercase;
    font-size: 11px;
    letter-spacing: 1px;
}

.table td {
    padding: 10px;
    border-bottom: 1px solid #e0e0e0;
    color: #333333;
}

.table a {
    color: #C59C2C;
    text-decoration: underline;
    transition: color 0.3s;
}

.table a:hover {
    color: #9B7626;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    background: #f5f5f5;
    border: 1px solid #C59C2C;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 6px;
    color: #C59C2C;
}

.btn-table {
    padding: 6px 10px;
    background-color: #C59C2C;
    border: none;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    border-radius: 6px;
    text-transform: uppercase;
    margin-right: 5px;
    transition: all 0.3s;
}

.btn-table:hover {
    background-color: #9B7626;
    transform: translateY(-2px);
}

.btn-danger {
    opacity: 0.8;
}

/* ===== CONFIGURACIÓN ===== */

.config-form {
    max-width: 500px;
}

.config-form .form-group {
    margin-bottom: 15px;
}

.config-form label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #ffffff;
    margin-bottom: 6px;
}

.config-form input,
.config-form select {
    width: 100%;
    padding: 10px;
    background-color: #3e434a;
    border: 1px solid #ffffff;
    color: #ffffff;
    font-family: 'Montserrat', sans-serif;
    border-radius: 4px;
}

.config-form input:focus,
.config-form select:focus {
    outline: none;
    border-color: #ffffff;
}

.select-input {
    cursor: pointer;
}

.config-form .btn {
    max-width: 300px;
}

/* ===== RESPONSIVE ===== */

@media (max-width: 768px) {
    .container {
        padding: 15px;
    }

    .title {
        font-size: 36px;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .admin-header h1 {
        font-size: 28px;
    }

    .ticket {
        padding: 20px 15px;
    }

    .ticket-qr img {
        width: 150px;
        height: 150px;
    }

    .table {
        font-size: 12px;
    }

    .table th,
    .table td {
        padding: 8px;
    }

    .admin-tabs {
        flex-wrap: wrap;
    }

    .tab-btn {
        font-size: 12px;
        padding: 8px 12px;
    }

    .search-form,
    .checkin-search {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .title {
        font-size: 28px;
    }

    .form-group input {
        font-size: 16px;
    }

    .ticket-header h2 {
        font-size: 24px;
    }

    .ticket-qr img {
        width: 130px;
        height: 130px;
    }

    .checkin-search {
        flex-direction: column;
        max-width: 100%;
    }

    .checkin-search .btn-small {
        width: 100%;
    }

    .btn {
        font-size: 13px;
        padding: 10px;
    }

    .table {
        font-size: 11px;
    }

    .btn-table {
        display: block;
        width: 100%;
        margin: 4px 0;
    }

    .search-form {
        max-width: 100%;
        flex-direction: column;
    }

    .search-form .btn-small {
        width: 100%;
    }
}