/* ==========================================================================
   MÓDULO DE SOLICITUD DE PROGRAMAS ESTUDIANTILES (FCM USAC)
   Diseño Oficial Compacto y Profesional - Facultad de Ciencias Médicas
   Optimizado para laptops y pantallas de escritorio (Evita desbordes y tamaños gigantes)
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. CONTENEDOR PRINCIPAL Y AMBIENTE VISUAL
   -------------------------------------------------------------------------- */
.spp-wrapper {
    width: 100%;
    padding: 24px 0 50px 0;
    background: linear-gradient(180deg, #f1f5f9 0%, #e2e8f0 100%);
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    color: #1e293b;
    position: relative;
    overflow: hidden;
}

.spp-wrapper *,
.spp-wrapper *::before,
.spp-wrapper *::after {
    box-sizing: border-box;
}

/* Orbes ambientales decorativos en el fondo */
.spp-wrapper::before,
.spp-wrapper::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    opacity: 0.35;
}

.spp-wrapper::before {
    top: -40px;
    left: 5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(14, 111, 183, 0.3) 0%, rgba(246, 191, 17, 0.1) 70%, transparent 100%);
    animation: sppAmbientFloat1 18s ease-in-out infinite alternate;
}

.spp-wrapper::after {
    bottom: 30px;
    right: 5%;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(246, 191, 17, 0.2) 0%, rgba(10, 40, 76, 0.18) 70%, transparent 100%);
    animation: sppAmbientFloat2 22s ease-in-out infinite alternate;
}

@keyframes sppAmbientFloat1 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(30px, 40px) scale(1.1); }
}

@keyframes sppAmbientFloat2 {
    0%   { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-35px, -30px) scale(1.08); }
}

.spp-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* --------------------------------------------------------------------------
   2. HERO BADGE & ENCABEZADO
   -------------------------------------------------------------------------- */
.spp-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 14px;
    border-radius: 999px;
    background: rgba(14, 111, 183, 0.15);
    border: 1px solid rgba(246, 191, 17, 0.4);
    color: #f6bf11;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15);
    animation: sppPulseGlow 3s ease-in-out infinite;
}

.spp-pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: #f6bf11;
    box-shadow: 0 0 8px #f6bf11;
    animation: sppDotPulse 1.8s infinite;
}

@keyframes sppDotPulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50%      { transform: scale(1.35); opacity: 0.6; }
}

@keyframes sppPulseGlow {
    0%, 100% { box-shadow: 0 4px 14px rgba(0, 0, 0, 0.15); border-color: rgba(246, 191, 17, 0.4); }
    50%      { box-shadow: 0 4px 18px rgba(246, 191, 17, 0.35); border-color: rgba(246, 191, 17, 0.8); }
}

/* --------------------------------------------------------------------------
   3. BARRA DE PROGRESO POR PASOS (STEPPER COMPACTO)
   -------------------------------------------------------------------------- */
.spp-stepper {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 860px;
    margin: 0 auto 22px auto;
    padding: 10px 22px;
    background: rgba(255, 255, 255, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(10, 40, 76, 0.05);
}

.spp-step {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    cursor: default;
    transition: all 0.3s ease;
}

.spp-step-circle {
    width: 32px;
    height: 32px;
    min-width: 32px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    font-size: 13px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.spp-step-circle .spp-step-check {
    display: none;
    font-size: 14px;
}

.spp-step.active .spp-step-circle {
    background: linear-gradient(135deg, #0e6fb7 0%, #0a284c 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(14, 111, 183, 0.4);
    transform: scale(1.05);
}

.spp-step.completed .spp-step-circle {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 3px 10px rgba(16, 185, 129, 0.35);
}

.spp-step.completed .spp-step-circle span:first-child {
    display: none;
}

.spp-step.completed .spp-step-circle .spp-step-check {
    display: inline;
}

.spp-step-content {
    display: flex;
    flex-direction: column;
}

.spp-step-title {
    font-size: 12.5px;
    font-weight: 700;
    color: #0a284c;
    letter-spacing: -0.2px;
    font-family: 'Montserrat', sans-serif !important;
}

.spp-step-subtitle {
    font-size: 11px;
    color: #64748b;
    font-weight: 500;
    font-family: 'Montserrat', sans-serif !important;
}

.spp-step-line {
    flex: 1;
    height: 2px;
    background: #e2e8f0;
    margin: 0 14px;
    border-radius: 99px;
    transition: background 0.4s ease;
    position: relative;
}

.spp-step-line.completed {
    background: linear-gradient(90deg, #10b981 0%, #0e6fb7 100%);
}

/* --------------------------------------------------------------------------
   4. GRID PRINCIPAL Y TARJETAS ELEVADAS (COMPACTAS)
   -------------------------------------------------------------------------- */
.spp-main-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: 22px;
    align-items: start;
}

.spp-card {
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 14px;
    padding: 18px 20px;
    box-shadow: 0 12px 30px -8px rgba(10, 40, 76, 0.08),
                0 2px 6px rgba(0, 0, 0, 0.02),
                0 0 0 1px rgba(226, 232, 240, 0.9);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1),
                box-shadow 0.3s ease;
}

/* Barra superior decorativa tricolor */
.spp-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #0a284c 0%, #0e6fb7 45%, #f6bf11 100%);
    transition: height 0.2s ease;
}

.spp-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 36px -8px rgba(10, 40, 76, 0.12),
                0 3px 8px rgba(0, 0, 0, 0.03),
                0 0 0 1.5px rgba(14, 111, 183, 0.25);
}

.spp-card:hover::before {
    height: 5px;
}

/* Encabezado de Tarjeta con icono distintivo y proporciones equilibradas */
.spp-card-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 10px;
    border-bottom: 1.5px solid #f1f5f9;
}

.spp-card-icon-wrapper {
    width: 38px;
    height: 38px;
    min-width: 38px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(14, 111, 183, 0.12) 0%, rgba(246, 191, 17, 0.18) 100%);
    color: #0e6fb7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    border: 1px solid rgba(14, 111, 183, 0.2);
    box-shadow: 0 3px 8px rgba(14, 111, 183, 0.08);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spp-card:hover .spp-card-icon-wrapper {
    transform: scale(1.08) rotate(4deg);
}

.spp-card-title-group {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* FORZADO ESTRICTO DE TIPOGRAFÍA SANS-SERIF Y TAMAÑO MODERADO PARA TÍTULOS */
.spp-card-title,
.spp-wrapper h2.spp-card-title,
.spp-wrapper div.spp-card-title,
.post-content .spp-wrapper .spp-card-title,
#content .post-content .spp-card-title,
body #main .post-content .spp-card-title {
    font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #0a284c !important;
    letter-spacing: -0.2px !important;
    line-height: 1.25 !important;
    margin: 0 !important;
    padding: 0 !important;
    text-transform: none !important;
}

.spp-card-subtitle,
.spp-wrapper .spp-card-subtitle {
    margin: 2px 0 0 0 !important;
    font-size: 11px !important;
    color: #64748b !important;
    font-weight: 400 !important;
    line-height: 1.35 !important;
    font-family: 'Montserrat', sans-serif !important;
}

/* --------------------------------------------------------------------------
   5. CAMPOS DEL FORMULARIO E INTERACTIVIDAD
   -------------------------------------------------------------------------- */
.spp-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 9px;
}

.spp-form-row .spp-form-group {
    margin-bottom: 0;
}

@media (max-width: 600px) {
    .spp-form-row {
        grid-template-columns: 1fr;
        gap: 9px;
    }
}

.spp-form-group {
    margin-bottom: 9px;
    position: relative;
}

.spp-form-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3px;
    font-weight: 700;
    color: #1e293b;
    font-size: 11.5px;
    letter-spacing: -0.1px;
    font-family: 'Montserrat', sans-serif !important;
}

.spp-form-label .required {
    color: #ef4444;
    font-weight: bold;
    margin-left: 2px;
}

/* Badge de verificación en vivo del carnet */
.spp-carnet-status {
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    display: none;
    align-items: center;
    gap: 4px;
    transition: all 0.3s ease;
}

.spp-carnet-status.checking {
    display: inline-flex;
    background: #f1f5f9;
    color: #0e6fb7;
    border: 1px solid #cbd5e1;
}

.spp-carnet-status.valid {
    display: inline-flex;
    background: #ecfdf5;
    color: #059669;
    border: 1px solid #a7f3d0;
    box-shadow: 0 0 8px rgba(16, 185, 129, 0.2);
    animation: sppBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spp-carnet-status.invalid {
    display: inline-flex;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    animation: sppBadgePop 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sppBadgePop {
    0%   { transform: scale(0.8); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.spp-spinner-sm {
    width: 11px;
    height: 11px;
    border: 2px solid rgba(14, 111, 183, 0.25);
    border-radius: 50%;
    border-top-color: #0e6fb7;
    animation: sppSpin 0.7s linear infinite;
    display: inline-block;
}

/* Inputs y Selectores Compactos */
.spp-input,
.spp-form-group input[type="text"],
.spp-form-group input[type="tel"],
.spp-form-group input[type="email"],
.spp-form-group select,
.spp-search-box input {
    width: 100%;
    padding: 6px 10px;
    height: 35px;
    border: 1.5px solid #cbd5e1;
    border-radius: 7px;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    box-sizing: border-box;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.spp-wrapper input::placeholder,
.spp-wrapper textarea::placeholder {
    color: #94a3b8 !important;
    font-weight: 400;
    font-size: 11.5px;
}

.spp-input:hover,
.spp-form-group input:hover,
.spp-form-group textarea:hover,
.spp-form-group select:hover {
    border-color: #94a3b8;
}

.spp-input:focus,
.spp-form-group input[type="text"]:focus,
.spp-form-group input[type="tel"]:focus,
.spp-form-group input[type="email"]:focus,
.spp-form-group textarea:focus,
.spp-form-group select:focus,
.spp-search-box input:focus {
    outline: none;
    border-color: #0e6fb7 !important;
    background-color: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(14, 111, 183, 0.16), 0 2px 6px rgba(14, 111, 183, 0.08) !important;
    transform: translateY(-1px);
}

.spp-form-group textarea {
    width: 100%;
    padding: 6px 10px;
    min-height: 48px;
    height: 50px;
    border: 1.5px solid #cbd5e1;
    border-radius: 7px;
    font-size: 12px;
    font-family: 'Montserrat', sans-serif !important;
    background-color: #ffffff !important;
    color: #0f172a !important;
    box-sizing: border-box;
    resize: vertical;
    line-height: 1.35;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* Helper Box */
.spp-helper-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 3px solid #0e6fb7;
    border-radius: 6px;
    padding: 5px 9px;
    font-size: 10.5px;
    color: #0369a1;
    margin-bottom: 5px;
    line-height: 1.35;
    border: 1px solid #bae6fd;
    border-left-width: 3px;
}

/* --------------------------------------------------------------------------
   6. DROPZONE INTERACTIVO DE SUBIDA DE PDF (COMPACTO)
   -------------------------------------------------------------------------- */
.spp-file-upload-wrapper {
    position: relative;
    border: 1.5px dashed #93c5fd;
    border-radius: 8px;
    padding: 6px 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: linear-gradient(180deg, #f8fafc 0%, #f0f7ff 100%);
    cursor: pointer;
    transition: all 0.25s ease;
    box-shadow: 0 1px 3px rgba(14, 111, 183, 0.03);
    min-height: 40px;
    box-sizing: border-box;
}

.spp-file-upload-wrapper:hover,
.spp-file-upload-wrapper.dragover {
    border-color: #0e6fb7;
    background: #e0f2fe;
    box-shadow: 0 2px 8px rgba(14, 111, 183, 0.12);
    transform: translateY(-1px);
}

.spp-file-upload-wrapper input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 2;
}

.spp-file-icon {
    font-size: 20px;
    color: #0e6fb7;
    display: inline-block;
    transition: transform 0.25s ease;
    flex-shrink: 0;
    line-height: 1;
}

.spp-file-upload-wrapper:hover .spp-file-icon {
    transform: scale(1.1) translateY(-1px);
}

.spp-file-text-col {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.spp-file-info {
    font-size: 11.5px;
    font-weight: 600;
    color: #0e6fb7;
    line-height: 1.2;
    margin-bottom: 1px;
}

.spp-file-subtext {
    font-size: 10px;
    color: #64748b;
    line-height: 1.2;
}

/* Cápsula de archivo seleccionado */
.spp-file-selected-card {
    display: none;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1.5px solid #10b981;
    border-radius: 8px;
    padding: 7px 12px;
    margin-top: 8px;
    box-shadow: 0 3px 8px rgba(16, 185, 129, 0.1);
    animation: sppBadgePop 0.3s ease;
}

.spp-file-selected-name {
    font-size: 12px;
    font-weight: 700;
    color: #065f46;
    display: flex;
    align-items: center;
    gap: 6px;
    word-break: break-all;
}

.spp-file-badge-ok {
    background: #10b981;
    color: #ffffff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 99px;
}

/* --------------------------------------------------------------------------
   7. CATÁLOGO DE PROGRAMAS Y LISTAS DINÁMICAS (COMPACTAS)
   -------------------------------------------------------------------------- */
.spp-alert-normativa {
    background: linear-gradient(135deg, #fffbeb 0%, #fef3c7 100%);
    border: 1px solid #fde68a;
    border-left: 4px solid #f59e0b;
    border-radius: 9px;
    padding: 9px 12px;
    margin-bottom: 12px;
    font-size: 11.5px;
    color: #78350f;
    line-height: 1.45;
    box-shadow: 0 2px 6px rgba(245, 158, 11, 0.06);
}

.spp-alert-normativa strong {
    color: #92400e;
}

/* Buscador de Programas */
.spp-search-box {
    margin-bottom: 12px;
    position: relative;
}

.spp-search-box input {
    padding-left: 36px !important;
    padding-right: 30px !important;
    font-size: 12.5px;
    border-radius: 9px;
}

.spp-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #0e6fb7;
    font-size: 14px;
    pointer-events: none;
}

.spp-search-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    cursor: pointer;
    font-size: 13px;
    display: none;
    padding: 3px;
    transition: color 0.2s ease;
}

.spp-search-clear:hover {
    color: #dc2626;
}

/* Grid de Listas */
.spp-lists-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.spp-list-panel {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.02);
    transition: border-color 0.25s ease;
}

.spp-list-panel:focus-within {
    border-color: #94a3b8;
}

.spp-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    padding-bottom: 7px;
    border-bottom: 1.5px solid #e2e8f0;
}

.spp-list-title,
.spp-wrapper .spp-list-title,
.spp-wrapper .spp-list-header h3 {
    margin: 0 !important;
    padding: 0 !important;
    font-size: 12.5px !important;
    font-weight: 700 !important;
    color: #0a284c !important;
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: 'Montserrat', sans-serif !important;
}

/* Contadores Badge con micro-animación */
.spp-badge {
    background: linear-gradient(135deg, #0a284c 0%, #0e6fb7 100%);
    color: #ffffff;
    font-size: 10.5px;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: 999px;
    box-shadow: 0 1px 4px rgba(10, 40, 76, 0.15);
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.spp-badge.gold {
    background: linear-gradient(135deg, #f6bf11 0%, #f59e0b 100%);
    color: #0a284c;
    box-shadow: 0 1px 4px rgba(246, 191, 17, 0.3);
}

.spp-badge.bounce {
    animation: sppBadgeBounce 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sppBadgeBounce {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.3); }
    100% { transform: scale(1); }
}

/* Listas Scrollables (Altura controlada para evitar scrolls interminables) */
.spp-scrollable-list {
    min-height: 200px;
    max-height: 250px;
    overflow-y: auto;
    padding-right: 5px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.spp-scrollable-list::-webkit-scrollbar {
    width: 5px;
}

.spp-scrollable-list::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 99px;
}

.spp-scrollable-list::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 99px;
}

.spp-scrollable-list::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Elementos de Programa (Micro-tarjetas compactas) */
.spp-item {
    background: #ffffff;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 12px;
    color: #1e293b;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.2, 0.8, 0.2, 1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.35;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.02);
    position: relative;
    user-select: none;
}

.spp-item:hover {
    border-color: #0e6fb7;
    background: #f8fbff;
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(14, 111, 183, 0.1);
}

.spp-item.seleccionado {
    background: linear-gradient(135deg, #e0f2fe 0%, #f0f9ff 100%);
    border-color: #38bdf8;
    color: #0369a1;
    font-weight: 700;
}

.spp-item-btn-add {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: rgba(14, 111, 183, 0.1);
    color: #0e6fb7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 12px;
    transition: all 0.2s ease;
    margin-left: 6px;
}

.spp-item:hover .spp-item-btn-add {
    background: #0e6fb7;
    color: #ffffff;
    transform: scale(1.1);
}

.spp-item.seleccionado .spp-item-btn-add {
    background: #10b981;
    color: #ffffff;
}

/* Item en lista de seleccionados */
.programa-seleccionado {
    border-left: 3.5px solid #f6bf11;
    background: linear-gradient(135deg, #ffffff 0%, #fffdf5 100%);
}

.programa-seleccionado:hover {
    border-color: #ef4444;
    background: #fef2f2;
}

.spp-item-remove {
    width: 22px;
    height: 22px;
    min-width: 22px;
    border-radius: 50%;
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: bold;
    transition: all 0.2s ease;
    margin-left: 6px;
}

.programa-seleccionado:hover .spp-item-remove {
    background: #ef4444;
    color: #ffffff;
    transform: scale(1.1) rotate(90deg);
}

.spp-empty-msg {
    text-align: center;
    color: #94a3b8;
    font-size: 12px;
    padding: 40px 14px;
    font-style: italic;
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
   8. BOTONES DE ACCIÓN
   -------------------------------------------------------------------------- */
.spp-actions-group {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    align-items: center;
    margin-top: 12px;
    flex-wrap: wrap;
}

.spp-btn {
    padding: 10px 20px;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif !important;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    border: 1.5px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    letter-spacing: -0.1px;
    position: relative;
    overflow: hidden;
}

/* Botón Secundario: Confirmar Selección */
.spp-btn-secondary {
    background: #ffffff;
    color: #0a284c;
    border-color: #cbd5e1;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.03);
}

.spp-btn-secondary:hover {
    background: #f8fafc;
    border-color: #0e6fb7;
    color: #0e6fb7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(14, 111, 183, 0.12);
}

/* Estado Confirmado (Verde Éxito) */
.spp-btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%) !important;
    color: #ffffff !important;
    border-color: transparent !important;
    box-shadow: 0 3px 12px rgba(16, 185, 129, 0.3) !important;
}

.spp-btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%) !important;
    box-shadow: 0 5px 16px rgba(16, 185, 129, 0.4) !important;
    transform: translateY(-1px);
}

/* Botón Primario: Enviar Solicitud Oficial */
.spp-btn-primary {
    background: linear-gradient(135deg, #0a284c 0%, #0e6fb7 100%);
    color: #ffffff;
    border-color: transparent;
    box-shadow: 0 4px 14px rgba(10, 40, 76, 0.2);
}

.spp-btn-primary::after {
    content: "";
    position: absolute;
    top: 0;
    left: -130%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent 0%, rgba(255, 255, 255, 0.35) 50%, transparent 100%);
    transform: skewX(-20deg);
    transition: left 0.75s ease;
    pointer-events: none;
}

.spp-btn-primary:hover {
    background: linear-gradient(135deg, #061a33 0%, #09558f 100%);
    box-shadow: 0 6px 20px rgba(14, 111, 183, 0.35);
    transform: translateY(-1px);
}

.spp-btn-primary:hover::after {
    left: 140%;
}

.spp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
    transform: none !important;
    box-shadow: none !important;
}

/* --------------------------------------------------------------------------
   9. NOTIFICACIONES FLOTANTES & MENSAJES DE ERROR
   -------------------------------------------------------------------------- */
.spp-error-text {
    color: #dc2626;
    font-size: 11.5px;
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #fef2f2;
    border-left: 3px solid #dc2626;
    border-radius: 5px;
    display: none;
    line-height: 1.35;
    animation: sppBadgePop 0.25s ease;
}

.spp-input-error {
    border-color: #ef4444 !important;
    background-color: #fffbfb !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

.spp-input-success {
    border-color: #10b981 !important;
    background-color: #f0fdf4 !important;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15) !important;
}

.spp-notification {
    padding: 12px 18px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 13px;
    font-weight: 600;
    display: none;
    line-height: 1.45;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    position: relative;
    animation: sppSlideDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes sppSlideDown {
    0%   { transform: translateY(-12px); opacity: 0; }
    100% { transform: translateY(0); opacity: 1; }
}

.spp-notification.success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1.5px solid #6ee7b7;
}

.spp-notification.error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1.5px solid #fca5a5;
}

.spp-notification.info {
    background-color: #eff6ff;
    color: #1e40af;
    border: 1.5px solid #93c5fd;
}

.spp-loader {
    display: inline-block;
    width: 15px;
    height: 15px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: sppSpin 0.8s linear infinite;
}

@keyframes sppSpin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   10. RESPONSIVE
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .spp-main-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .spp-stepper {
        padding: 10px 16px;
    }
}

@media (max-width: 768px) {
    .spp-lists-grid {
        grid-template-columns: 1fr;
    }

    .spp-stepper {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .spp-step-line {
        display: none;
    }

    .spp-actions-group {
        flex-direction: column;
        width: 100%;
    }

    .spp-btn {
        width: 100%;
    }
}