* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Arial', sans-serif;
    background: linear-gradient(135deg, #22274f 0%, #fda117 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.container {
    background: rgba(255, 255, 255, 0.95);
    padding: 40px 40px 50px 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 550px;
    width: 90%;
    backdrop-filter: blur(10px);
}

.title {
    color: #22274f;
    font-size: 28px;
    font-weight: bold;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.1);
}

.subtitle {
    color: #22274f;
    font-size: 18px;
    margin-bottom: 25px;
    opacity: 0.8;
}

.form-group {
    margin-bottom: 30px;
}

.form-label {
    display: block;
    color: #22274f;
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 10px;
}

.form-input {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    outline: none;
}

.form-input:focus {
    border-color: #fda117;
    box-shadow: 0 0 10px rgba(253, 161, 23, 0.3);
    transform: translateY(-2px);
}

.btn-submit {
    background: linear-gradient(135deg, #22274f 0%, #fda117 100%);
    color: white;
    padding: 15px 30px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
    margin-top: 10px;
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

.btn-submit:active {
    transform: translateY(-1px);
}

.logo {
    color: #22274f;
    font-size: 36px;
    font-weight: bold;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-accent {
    color: #fda117;
}

/* Estilos para el header y logo institucional */
.header-section {
    text-align: center;
    margin-bottom: 20px;
}

.institutional-logo {
    margin-bottom: 15px;
}

.logo-img {
    max-width: 200px;
    max-height: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s ease;
}

.logo-img:hover {
    transform: scale(1.05);
}

/* Estilos para mensajes */
.message {
    padding: 12px 15px;
    margin: 15px 0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-align: center;
}

.message-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.message-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.message-warning {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.message-info {
    background-color: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive design para pantallas más pequeñas */
@media (max-width: 480px) {
    .key-button {
        width: 60px;
        height: 60px;
        font-size: 20px;
    }

    .key-button.clear {
        width: 130px;
    }

    .keyboard-row {
        gap: 8px;
    }

    .virtual-keyboard {
        padding: 15px;
    }

    .container {
        padding: 30px 20px 40px 20px;
        max-width: 95%;
    }

    .logo-img {
        max-width: 80px;
        max-height: 80px;
    }

    .logo {
        font-size: 28px;
    }

    .title {
        font-size: 24px;
    }
}

/* Estilos adicionales para el input cuando es readonly */
.form-input[readonly] {
    background: rgba(255, 255, 255, 0.95);
    cursor: default;
    color: #22274f;
    font-weight: 600;
    font-size: 18px;
    text-align: center;
    letter-spacing: 1px;
}

/* Estilos para la página de confirmación */
.student-info {
    margin: 30px 0;
}

.info-card {
    background: rgba(34, 39, 79, 0.05);
    border-radius: 15px;
    padding: 25px;
    border: 2px solid rgba(34, 39, 79, 0.1);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.info-title {
    color: #22274f;
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #fda117;
    padding-bottom: 10px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(34, 39, 79, 0.1);
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #22274f;
    font-size: 16px;
    min-width: 80px;
}

.info-value {
    color: #22274f;
    font-size: 16px;
    font-weight: 500;
    text-align: right;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.form-actions.vertical {
    flex-direction: column;
    align-items: center;
}

.form-actions form,
.form-actions a {
    flex: 1;
    min-width: 200px;
}

.form-actions.vertical form,
.form-actions.vertical a {
    width: 100%;
    flex: none;
}

.btn-confirm {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
}

.btn-confirm:hover {
    background: linear-gradient(135deg, #20c997 0%, #28a745 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(40, 167, 69, 0.3);
}

.btn-large {
    padding: 20px 40px;
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 15px;
}

.btn-small {
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    margin-top: 0;
}

.btn-secondary {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    margin-top: 10px;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #495057 0%, #6c757d 100%);
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(108, 117, 125, 0.3);
}

.error-message {
    background: rgba(220, 53, 69, 0.1);
    border: 2px solid rgba(220, 53, 69, 0.2);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.error-message p {
    color: #dc3545;
    font-size: 16px;
    margin: 0;
}

/* Responsive para la página de confirmación */
@media (max-width: 480px) {
    .form-actions {
        flex-direction: column;
    }

    .form-actions form,
    .form-actions a {
        min-width: auto;
    }

    .btn-large {
        padding: 18px 30px;
        font-size: 18px;
    }

    .btn-small {
        padding: 8px 16px;
        font-size: 13px;
    }

    .info-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }

    .info-value {
        text-align: left;
    }

    .info-card {
        padding: 20px;
    }
}

/* Estilos para la previsualización del ticket */
.ticket-preview {
    margin: 30px auto;
    max-width: 300px;
    display: flex;
    justify-content: center;
}

.ticket-container {
    width: 220px;
    /* Simula el ancho de 58mm en pantalla */
    background: white;
    border: 2px solid #ddd;
    border-radius: 10px;
    padding: 15px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    line-height: 1.3;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    color: #000;
}

.ticket-header {
    text-align: center;
    margin-bottom: 8px;
}

.ticket-logo {
    font-size: 16px;
    font-weight: bold;
    color: #22274f;
    margin-bottom: 4px;
}

.ticket-subtitle {
    font-size: 10px;
    color: #666;
    margin-bottom: 8px;
}

.ticket-divider {
    font-size: 10px;
    text-align: center;
    margin: 6px 0;
    color: #666;
    font-family: monospace;
}

.ticket-line {
    display: flex;
    justify-content: space-between;
    margin-bottom: 3px;
    font-size: 11px;
}

.ticket-label {
    font-weight: bold;
    min-width: 50px;
    color: #333;
}

.ticket-value {
    text-align: right;
    max-width: 140px;
    word-wrap: break-word;
    color: #000;
}

.ticket-center {
    text-align: center;
    margin: 10px 0;
}

.ticket-type {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 6px;
    color: #dc3545;
}

.ticket-message {
    font-size: 10px;
    margin-bottom: 6px;
    color: #666;
}

.ticket-footer {
    text-align: center;
    font-size: 9px;
    margin-top: 10px;
    color: #666;
}

.ticket-institution {
    margin-bottom: 3px;
    font-weight: bold;
}

.ticket-website {
    font-style: italic;
}

.ticket-stamp {
    margin-top: 10px;
    text-align: center;
}

.stamp-img {
    max-width: 130px;
    max-height: 65px;
    width: auto;
    height: auto;
    object-fit: contain;
    opacity: 0.8;
}

/* Responsive para el ticket */
@media (max-width: 480px) {
    .ticket-container {
        width: 200px;
        padding: 12px;
        font-size: 11px;
    }

    .ticket-logo {
        font-size: 14px;
    }

    .ticket-type {
        font-size: 12px;
    }

    .stamp-img {
        max-width: 95px;
        max-height: 47px;
    }
}

