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

body {
    font-family: "Arial", sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.container {
    max-width: 400px;
    width: 100%;
}

.carnet-card {
    background: white;
    border-radius: 20px;
    padding: 40px 30px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
}

.logo {
    width: 120px;
    height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    background: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border: 3px solid #667eea;
}

.logo img {
    max-width: 100%;
    max-height: 100%;
}

.company-info {
    margin-bottom: 20px;
}

.company-nit {
    font-size: 13px;
    color: #667eea;
    font-weight: 600;
    margin-bottom: 5px;
    letter-spacing: 0.5px;
}

.company-phone {
    font-size: 13px;
    color: #666;
    font-weight: 500;
    letter-spacing: 0.3px;
}

h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 24px;
}

h2 {
    color: #666;
    font-size: 14px;
    font-weight: normal;
    margin-bottom: 30px;
    padding: 8px 20px;
    background: linear-gradient(135deg, #667eea15, #764ba215);
    border-radius: 20px;
    display: inline-block;
}

.carnet-info {
    display: none;
    margin-top: 20px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 15px;
    animation: fadeIn 0.5s;
    border: 2px solid #e0e0e0;
}

.carnet-info.active {
    display: block;
}

/* ========== CONTENEDOR DE INPUTS (info-field) ========== */
.info-field {
    margin-bottom: 20px;
    text-align: left;
    background: transparent;
    padding: 0;
    border-radius: 0;
    box-shadow: none;
    transition: none;
}

.info-field:hover {
    transform: none;
    box-shadow: none;
}

.info-field:last-child {
    margin-bottom: 0;
}

/* ========== LABELS (info-label) ========== */
.info-label {
    font-size: 12px;
    color: #667eea;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
    display: block;
}

/* ========== INPUTS MEJORADOS ========== */
form input[type="text"],
form input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #d0d7de;
    border-radius: 8px;
    font-size: 15px;
    background: #f6f8fa;
    color: #333;
    transition: all 0.25s ease;
    font-family: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

form input[type="text"]::placeholder,
form input[type="tel"]::placeholder {
    color: #9ca3af;
}

form input[type="text"]:hover,
form input[type="tel"]:hover {
    border-color: #8b92a0;
    background: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

form input[type="text"]:focus,
form input[type="tel"]:focus {
    border-color: #667eea;
    background: #fff;
    box-shadow:
        0 0 0 4px rgba(102, 126, 234, 0.15),
        0 2px 8px rgba(0, 0, 0, 0.1);
    outline: none;
    transform: translateY(-1px);
}

/* ========== BOTÓN MEJORADO ========== */
form button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

form button[type="submit"]:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.45);
    background: linear-gradient(135deg, #7689f5, #8559b8);
}

form button[type="submit"]:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(102, 126, 234, 0.35);
}

.info-value {
    font-size: 15px;
    color: #333;
    font-weight: 600;
    line-height: 1.4;
}

#userName {
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.error-message {
    display: none;
    color: #e74c3c;
    margin-top: 15px;
    padding: 15px;
    background: #ffe6e6;
    border-radius: 8px;
    font-size: 14px;
    border-left: 4px solid #e74c3c;
}

.error-message.active {
    display: block;
}

.loading {
    display: none;
    margin-top: 15px;
}

.loading.active {
    display: block;
}

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

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #667eea;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.loading-text {
    color: #666;
    font-size: 14px;
    margin-top: 10px;
}

@media (max-width: 480px) {
    .carnet-card {
        padding: 30px 20px;
    }

    .logo {
        width: 100px;
        height: 100px;
    }

    h1 {
        font-size: 20px;
    }

    .info-value {
        font-size: 14px;
    }

    form input[type="text"],
    form input[type="tel"] {
        padding: 12px 14px;
    }
}

.form-wrapper {
    margin-top: 25px;
    text-align: left;
}

.form-group {
    margin-bottom: 18px;
}

.form-label {
    font-size: 12px;
    color: #667eea;
    font-weight: bold;
    margin-bottom: 6px;
    display: block;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 12px;
    font-size: 15px;
    background: #fafafa;
    transition:
        border 0.2s,
        box-shadow 0.2s;
}

.form-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 6px rgba(102, 126, 234, 0.4);
    outline: none;
}

.submit-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    border: none;
    color: white;
    font-size: 16px;
    font-weight: bold;
    border-radius: 14px;
    cursor: pointer;
    margin-top: 10px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(102, 126, 234, 0.4);
}

.form-message {
    margin-top: 20px;
    padding: 12px;
    border-radius: 10px;
    font-size: 14px;
    display: none;
}

.form-success {
    background: #d4edda;
    color: #155724;
}

.form-error {
    background: #f8d7da;
    color: #721c24;
}

.status-active {
    color: #22c55e;
    font-weight: 600;
}

.status-inactive {
    color: #ef4444;
    font-weight: 600;
}

.company-info {
    text-align: center;
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 1rem;
}

.company-nit,
.company-phone {
    margin: 2px 0;
}
