/* ============================================
   signinv3.css — Formulario de solicitud v3
   ============================================ */

/* --- Reset & Base --- */
html,
body {
    min-height: 100%;
}

body {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: 100vh;
    padding: 30px 16px 50px;
    background-color: #f0f2f5;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow-y: auto;
}

::placeholder {
    color: #adb5bd !important;
}

*:focus::placeholder {
    color: transparent !important;
}

*:focus::-webkit-input-placeholder {
    color: transparent !important;
}

*:focus:-moz-placeholder {
    color: transparent !important;
}

*:focus::-moz-placeholder {
    color: transparent !important;
}

/* --- Card container --- */
.form-signin {
    width: 100%;
    max-width: 768px;
    margin: 0 auto 24px;
    padding: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, .07), 0 0 1px rgba(0, 0, 0, .1);
    overflow: hidden;
}

/* --- Header / Logo --- */
.form-header {
    background: #fff;
    padding: 32px 40px 24px;
    text-align: center;
    border-bottom: 1px solid #e9ecef;
}


.form-header .form-title {
    color: #6c757d;
    font-size: 1rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin: 16px 0 0;
    text-align: center;
}

/* --- Body --- */
.form-body {
    padding: 36px 40px 28px;
}

/* --- Secciones agrupadas --- */
.form-section {
    margin-bottom: 28px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.section-label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    color: #dc3545;
    margin-bottom: 14px;
    padding-bottom: 6px;
    border-bottom: 2px solid #f8d7da;
}

/* --- Field groups --- */
.field-group {
    margin-bottom: 18px;
}

.field-group:last-child {
    margin-bottom: 0;
}

.field-group label,
.field-group .field-label {
    display: block;
    font-size: .875rem;
    font-weight: 500;
    color: #495057;
    margin-bottom: 6px;
}

.field-group label .required,
.field-group .field-label .required {
    color: #dc3545;
    margin-left: 2px;
}

/* --- Inputs --- */
.form-signin .form-control {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .9rem;
    color: #495057;
    transition: border-color .2s, box-shadow .2s;
    background-color: #fafbfc;
}

.form-signin .form-control:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .12);
    background-color: #fff;
    color: #495057;
}

.form-signin .form-select {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: .9rem;
    color: #495057;
    transition: border-color .2s, box-shadow .2s;
    background-color: #fafbfc;
}

.form-signin .form-select:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .12);
    background-color: #fff;
    color: #495057;
}

.form-signin .form-select:required:invalid {
    color: #adb5bd;
}

.form-signin .form-select option {
    color: #495057;
}

/* --- Row con gap (nombre + apellidos) --- */
.fields-row {
    display: flex;
    gap: 12px;
}

.fields-row .field-group {
    flex: 1;
}

.fields-row .field-group.grow-2 {
    flex: 2;
}

/* --- Textarea --- */
.form-signin textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

/* --- Tom Select overrides --- */
.ts-wrapper {
    margin-bottom: 0;
}

.ts-wrapper .ts-control {
    border: 1px solid #dee2e6 !important;
    border-radius: 8px !important;
    min-height: 42px;
    padding: 6px 10px !important;
    background-color: #fafbfc !important;
    transition: border-color .2s, box-shadow .2s;
}

.ts-wrapper.focus .ts-control {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, .12) !important;
    background-color: #fff !important;
}

.ts-wrapper .ts-control .item {
    background: #dc3545 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    padding: 3px 10px !important;
    margin: 3px 4px 3px 0 !important;
    font-size: .82rem !important;
    font-weight: 500 !important;
    line-height: 1.5 !important;
}

.ts-wrapper .ts-control .item .remove {
    color: rgba(255, 255, 255, .7) !important;
    border-left: 1px solid rgba(255, 255, 255, .25) !important;
    margin-left: 6px !important;
    padding-left: 6px !important;
    font-size: 14px !important;
}

.ts-wrapper .ts-control .item .remove:hover {
    color: #fff !important;
}

.ts-dropdown {
    border-radius: 8px !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 6px 20px rgba(0, 0, 0, .1) !important;
    margin-top: 4px !important;
}

.ts-dropdown .option {
    padding: 9px 14px !important;
    font-size: .875rem !important;
    transition: background .15s;
}

.ts-dropdown .option.active,
.ts-dropdown .option:hover {
    background-color: #dc3545 !important;
    color: #fff !important;
}

.ts-dropdown .no-results {
    padding: 12px 14px;
    color: #6c757d;
    font-size: .875rem;
    text-align: center;
}

/* Checkbox dentro del dropdown */
.ts-dropdown .option input[type="checkbox"] {
    accent-color: #dc3545;
}

/* --- Alerta de error --- */
.form-signin .alert-danger {
    border-radius: 8px;
    font-size: .875rem;
    border: none;
    background: #fff5f5;
    color: #c0392b;
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 0 0 1px #f8d7da;
}

.form-signin .alert-danger ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.form-signin .alert-danger ul li {
    margin-bottom: 4px;
}

/* --- Checkbox privacidad --- */
.privacy-check {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 16px 18px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 24px;
}

.privacy-check input[type="checkbox"] {
    margin-top: 3px;
    accent-color: #dc3545;
    min-width: 16px;
    min-height: 16px;
}

.privacy-check span {
    font-size: .85rem;
    color: #495057;
    line-height: 1.5;
}

.privacy-check a {
    color: #dc3545;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.privacy-check a:hover {
    color: #b02a37;
}

/* --- Botón enviar --- */
.btn-submit {
    display: block;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: .3px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: #fff;
    cursor: pointer;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 12px rgba(220, 53, 69, .3);
}

.btn-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(220, 53, 69, .4);
}

.btn-submit:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(220, 53, 69, .3);
}

/* --- Footer --- */
.form-footer {
    padding: 20px 40px;
    text-align: center;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

.form-footer p {
    margin: 0;
    font-size: .75rem;
    color: #adb5bd;
}

/* --- Mensaje de éxito --- */
.success-message {
    text-align: center;
    padding: 48px 40px;
}

.success-message .success-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #d4edda;
    color: #28a745;
    font-size: 28px;
    margin-bottom: 20px;
}

.success-message h3 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    margin-bottom: 10px;
}

.success-message p {
    font-size: .9rem;
    color: #6c757d;
    line-height: 1.6;
    max-width: 420px;
    margin: 0 auto;
}

/* --- Responsive --- */
@media (max-width: 576px) {
    body {
        padding: 16px 10px 28px;
    }

    .form-header {
        padding: 24px 20px 20px;
    }

    .form-body {
        padding: 24px 20px 20px;
    }

    .form-footer {
        padding: 16px 20px;
    }

    .fields-row {
        flex-direction: column;
        gap: 0;
    }

    .field-group label,
    .field-group .field-label {
        font-size: .82rem;
    }

    .btn-submit {
        max-width: 100%;
    }
}