* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #f0f2f5;
    margin: 0;
}

.app-container {
    max-width: 480px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    position: relative;
}

/* ===== HEADER CON LOGO MÁS GRANDE ===== */
.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 5px 20px;
    background: #00228a;
    height: 90px;
    border-bottom: 1px solid #00228a;
}

.logo {
    flex-shrink: 0;
    width: 260px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.logo img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    object-position: left center;
}

.menu-arabe {
    display: flex;
    gap: 20px;
    direction: rtl;
}

.menu-item {
    font-size: 14px;
    color: white;
    cursor: default;
    font-family: 'Arial', sans-serif;
}

.menu-item:first-child {
    color: white;
    font-weight: 500;
}

.container {
    max-width: 400px;
    width: 100%;
    margin: 0 auto;
    background: white;
    padding: 20px 25px 30px 25px;
}

h2 {
    text-align: center;
    font-size: 29px;
    font-weight: 600;
    color: #323232;
    margin-bottom: 25px;
}

/* ===== STEPS CON AZUL ===== */
.steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
}

.step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 16px;
    color: #e0dede;
}

.step.active {
    background: #00228a;
    color: white;
}

.step.completed {
    background: #28a745;
    color: white;
    font-size: 20px;
    font-weight: bold;
}

.line {
    height: 2px;
    width: 50px;
    background: #e0e0e0;
    margin: 0 5px;
}

/* ===== FLOATING LABELS - INPUTS ===== */
.floating-group {
    position: relative;
    margin-bottom: 25px;
    width: 100%;
}

.fecha-group {
    position: relative;
}

.floating-input {
    width: 100%;
    height: 57px;
    padding: 14px 14px 0 14px;
    background-color: #f5f5f7;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.floating-input:focus {
    border-color: #0066b3;
    background-color: #ffffff;
}

.floating-label {
    position: absolute;
    left: 14px;
    top: 12px;
    color: #898888;
    font-size: 16px;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.2s ease-out;
    background-color: transparent;
    padding: 0 4px;
    line-height: 1;
}

.floating-group:first-of-type .floating-label {
    top: 50%;
    transform: translateY(-110%);
    display: flex;
    align-items: center;
    height: auto;
    margin: 0;
}

.floating-group:first-of-type .floating-input:focus ~ .floating-label,
.floating-group:first-of-type .floating-input:not(:placeholder-shown) ~ .floating-label {
    top: 6px;
    transform: translateY(0);
    font-size: 14px;
    color: #0066b3;
    align-items: flex-start;
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
    top: 6px;
    font-size: 13px;
    color: #0066b3;
}

.formato-fecha {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-40%);
    font-size: 13px;
    color: #999;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.floating-input:focus ~ .formato-fecha {
    opacity: 1;
}

.icono-calendario {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 18px;
    color: #666;
    pointer-events: none;
}

.helper-text {
    display: block;
    font-size: 12px;
    color: #666;
    margin-left: 5px;
    margin-top: 4px;
}

.error-text {
    display: none;
    font-size: 12px;
    color: #d32f2f;
    margin-left: 5px;
    margin-top: 4px;
}

.label-section {
    font-size: 15px;
    color: #666;
    margin: 20px 0 10px 0;
}

/* ===== CARD SELECTOR ===== */
.card-selector {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f9f9f9;
    padding: 14px;
    border-radius: 8px;
    margin: 10px 0 15px 0;
    font-size: 16px;
    color: #333;
    border: 1px solid #e5e5e5;
}

.check-verde {
    color: #28a745;
    font-size: 20px;
    font-weight: bold;
}

/* ===== CARD HEADER ===== */
.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 15px 0 8px 0;
}

.card-label-bold {
    font-size: 16px;
    color: #333;
    font-weight: 500;
}

/* ===== CHECKBOXES ===== */
.checks {
    margin: 25px 0 20px;
}

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    margin-bottom: 15px;
    cursor: pointer;
    font-size: 15px;
    user-select: none;
    min-height: 22px;
}

.checkbox-container input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 20px;
    width: 20px;
    background-color: #fff;
    border: 2px solid #ccc;
    border-radius: 4px;
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark {
    border-color: #0066b3;
}

.checkbox-container input:checked ~ .checkmark {
    background-color: #0066b3;
    border-color: #0066b3;
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.checkbox-container input:checked ~ .checkmark:after {
    display: block;
}

.checkbox-container .checkmark:after {
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.checkbox-text {
    font-size: 15px;
    color: #333;
    line-height: 1.4;
}

.checkbox-text a {
    color: #0066b3;
    text-decoration: none;
    font-weight: 500;
    font-size: 15px;
}

.checkbox-text a:hover {
    text-decoration: underline;
}

/* ===== BOTONES ===== */
.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 10px;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-primary {
    background: #00228a;
    color: white;
    margin-top: 10px;
}

.btn-primary:hover {
    background: #00228a;
}

.btn-primary:disabled {
    background: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

.later {
    display: block;
    text-align: center;
    margin-top: 15px;
    color: #0066b3;
    text-decoration: none;
    font-size: 16px;
    font-weight: 500;
    padding: 12px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    background: white;
    transition: all 0.2s;
}

.later:hover {
    background: #f5f5f5;
}

/* ===== MODAL DE CARGA ===== */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #00228a;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===== ANIMACIONES ===== */
@keyframes spinFinal {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes popIn {
    0% { transform: scale(0); }
    50% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

@keyframes scaleIn {
    0% { transform: scale(0); }
    70% { transform: scale(1.1); }
    100% { transform: scale(1); }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
    .header {
        height: 75px;
        padding: 5px 15px;
    }
    
    .logo {
        width: 200px;
        height: 60px;
    }

    .menu-arabe {
        gap: 12px;
    }

    .menu-item {
        font-size: 12px;
    }

    .container {
        padding: 15px 20px;
    }

    .line {
        width: 30px;
    }
}
