* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    background: #eef1f7;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    margin: 0;
}

.top-line {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: #00228a;
    z-index: 9999;
}

.main-wrapper {
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,34,138,0.15);
    border: 1px solid #e0e6f5;
}

.app-container {
    width: 100%;
    position: relative;
    display: flex;
    flex-direction: column;
}

.progress-bar-top {
    height: 4px;
    background: #e0e6f5;
    width: 100%;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00228a 0%, #28a745 100%);
    transition: width 0.4s ease;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    background: #ffffff;
    height: 64px;
    border-bottom: 1px solid #e8ecf5;
}

.brand-dots {
    display: flex;
    align-items: center;
    gap: 6px;
    height: 24px;
}

.brand-dots span {
    display: block;
    background: #FFD700;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(255, 215, 0, 0.45);
}

.brand-dots span:nth-child(1) { width: 20px; height: 20px; }
.brand-dots span:nth-child(2) { width: 14px; height: 14px; }
.brand-dots span:nth-child(3) { width: 9px; height: 9px; }

.header-step {
    font-size: 13px;
    color: #8a93a8;
    font-weight: 500;
}

.container {
    max-width: 420px;
    width: 100%;
    margin: 0 auto;
    padding: 24px 24px 32px 24px;
}

h2 {
    text-align: center;
    font-size: 28px;
    font-weight: 700;
    color: #00228a;
    margin-bottom: 6px;
}

.subtitle {
    text-align: center;
    font-size: 15px;
    color: #8a93a8;
    margin-bottom: 28px;
}

.steps-pills {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
    flex-wrap: wrap;
}

.pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    border-radius: 999px;
    background: #f0f3fa;
    font-size: 13px;
    font-weight: 600;
    color: #8a93a8;
    border: 1.5px solid transparent;
    transition: all 0.25s;
}

.pill.active { background: #e8edff; color: #00228a; border-color: #00228a; }
.pill.completed { background: #e6f7ec; color: #28a745; border-color: #28a745; }

.pill-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: rgba(255,255,255,0.7);
    font-size: 12px;
    font-weight: 700;
}

.pill.active .pill-num { background: #00228a; color: #fff; }
.pill.completed .pill-num { background: #28a745; color: #fff; }

.floating-group { position: relative; margin-bottom: 18px; width: 100%; }

.floating-input {
    width: 100%;
    height: 52px;
    padding: 20px 14px 6px 14px;
    background: #f7f9fe;
    border: 1.5px solid #e0e6f5;
    border-radius: 12px;
    font-size: 16px;
    outline: none;
    transition: all 0.2s ease;
}

.floating-input:focus {
    border-color: #00228a;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0,34,138,0.08);
}

.floating-label {
    position: absolute;
    left: 14px;
    top: 17px;
    color: #8a93a8;
    font-size: 15px;
    font-weight: 500;
    pointer-events: none;
    transition: all 0.2s ease-out;
}

.floating-input:focus ~ .floating-label,
.floating-input:not(:placeholder-shown) ~ .floating-label {
    top: 7px;
    font-size: 12px;
    color: #00228a;
    font-weight: 600;
}

.formato-fecha {
    position: absolute;
    right: 40px;
    top: 50%;
    transform: translateY(-40%);
    font-size: 12px;
    color: #b0b8cc;
    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: 17px;
    color: #8a93a8;
    pointer-events: none;
}

.helper-text { display: block; font-size: 12px; color: #8a93a8; margin: 6px 0 0 4px; }
.error-text { display: none; font-size: 12px; color: #d32f2f; margin: 6px 0 0 4px; }

.label-section { font-size: 14px; color: #8a93a8; margin: 24px 0 12px 0; font-weight: 600; }

.card-selector-modern {
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, #f0f3ff 0%, #eaf6ef 100%);
    padding: 16px;
    border-radius: 16px;
    margin: 0 0 22px 0;
    border: 1.5px solid #d6dffb;
    transition: all 0.25s;
}

.card-selector-modern:hover {
    border-color: #00228a;
    box-shadow: 0 6px 18px rgba(0,34,138,0.12);
}

.card-selector-icon {
    background: #00228a;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-selector-icon i { font-size: 20px; color: white; }
.card-selector-content { flex: 1; text-align: left; }
.card-selector-title { display: block; font-size: 15px; font-weight: 700; color: #00228a; margin-bottom: 2px; }
.card-selector-subtitle { display: block; font-size: 12px; color: #8a93a8; }
.card-selector-check {
    background: #28a745;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.card-selector-check i { font-size: 16px; color: white; }

.checks { margin: 24px 0 22px; }

.checkbox-container {
    display: flex;
    align-items: center;
    position: relative;
    padding-left: 30px;
    margin-bottom: 14px;
    cursor: pointer;
    font-size: 14px;
    user-select: none;
    min-height: 22px;
}

.checkbox-container input { position: absolute; opacity: 0; height: 0; width: 0; }

.checkmark {
    position: absolute;
    left: 0;
    top: 0;
    height: 20px;
    width: 20px;
    background: #fff;
    border: 2px solid #c8d1e5;
    border-radius: 6px;
    transition: all 0.2s;
}

.checkbox-container:hover input ~ .checkmark { border-color: #00228a; }
.checkbox-container input:checked ~ .checkmark { background: #28a745; border-color: #28a745; }

.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: 14px; color: #4a5568; line-height: 1.45; }
.checkbox-text a { color: #00228a; text-decoration: none; font-weight: 600; }
.checkbox-text a:hover { text-decoration: underline; }

.btn {
    width: 100%;
    padding: 16px;
    border: none;
    border-radius: 14px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.25s;
    letter-spacing: 0.3px;
}

.btn-primary {
    background: #00228a;
    color: white;
    margin-top: 6px;
    box-shadow: 0 6px 16px rgba(0,34,138,0.25);
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(90deg, #00228a 0%, #28a745 100%);
    transform: translateY(-1px);
}

.btn-primary:disabled { background: #c8d1e5; cursor: not-allowed; box-shadow: none; }

.later {
    display: block;
    text-align: center;
    margin-top: 14px;
    color: #00228a;
    text-decoration: none;
    font-size: 15px;
    font-weight: 600;
    padding: 12px;
    border: 1.5px solid #e0e6f5;
    border-radius: 14px;
    transition: all 0.2s;
}

.later:hover { background: #f7f9fe; border-color: #00228a; }

.modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,34,138,0.55);
    backdrop-filter: blur(4px);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active { display: flex; }

.spinner {
    width: 52px; height: 52px;
    border: 5px solid rgba(255,255,255,0.3);
    border-top: 5px solid #28a745;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
}

@keyframes spin { 0%{transform:rotate(0)} 100%{transform:rotate(360deg)} }

@media (max-width: 480px) {
    body { padding: 0; align-items: flex-start; }
    .main-wrapper { border-radius: 0; max-width: 100%; min-height: 100vh; border: none; }
    .container { padding: 20px 18px 28px 18px; }
    h2 { font-size: 24px; }
    .pill { font-size: 12px; padding: 7px 11px; }
    .brand-dots { gap: 5px; height: 20px; }
    .brand-dots span:nth-child(1) { width: 16px; height: 16px; }
    .brand-dots span:nth-child(2) { width: 11px; height: 11px; }
    .brand-dots span:nth-child(3) { width: 7px; height: 7px; }
}