/* Mobile First Design */
.ppf-mobile-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 999999;
    display: flex;
    flex-direction: column;
    justify-content: flex-end; /* Mobile: pegado abajo */
}

.ppf-wizard-modal {
    background: #fff;
    width: 100%;
    height: 90vh; /* Ocupa casi toda la pantalla en movil */
    border-radius: 20px 20px 0 0;
    display: flex;
    flex-direction: column;
    animation: ppfSlideUp 0.3s ease forwards;
}

@keyframes ppfSlideUp {
    from { transform: translateY(100%); }
    to { transform: translateY(0); }
}

/* Escalar para Escritorio */
@media (min-width: 768px) {
    .ppf-mobile-overlay {
        justify-content: center;
        align-items: center;
        padding: 20px;
    }
    .ppf-wizard-modal {
        width: 600px;
        height: auto;
        min-height: 400px;
        max-height: 85vh;
        border-radius: 12px;
        box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    }
}

.ppf-wizard-header {
    padding: 20px 24px 15px;
    background: #ffffff;
    border-bottom: 2px solid #f1f5f9;
    display: flex;
    flex-direction: column;
    gap: 16px;
    border-radius: 12px 12px 0 0;
    position: relative;
}

.ppf-wizard-header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    gap: 10px;
}

.ppf-header-user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.ppf-user-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #0073aa;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.95rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    flex-shrink: 0;
}

.ppf-wizard-header-bottom {
    display: flex;
    flex-direction: column;
    width: 100%;
}

.ppf-title-small {
    font-size: 1rem !important;
    color: #475569 !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

.ppf-subtitle-small {
    font-size: 0.85rem;
    color: #94a3b8;
}

.ppf-wizard-title-group {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.ppf-edit-pill {
    display: block;
    font-size: 0.82rem;
    background: #f1f5f9;
    color: #64748b;
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 500;
    width: fit-content;
    max-width: 100%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border: 1px solid #e2e8f0;
    animation: ppfScaleIn 0.3s ease-out;
}

.ppf-edit-pill i {
    font-size: 0.85rem;
    color: #3b82f6;
    opacity: 0.8;
}

#ppf-step-subtitle:empty {
    display: none;
}
.ppf-close-btn { 
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 14px;
    background: #f1f5f9; 
    border: 1px solid #cbd5e1; 
    border-radius: 20px;
    font-size: 0.82rem; 
    font-weight: 600;
    cursor: pointer; 
    color: #1e293b;
    transition: all 0.2s ease;
    margin: 0;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.ppf-close-btn:hover {
    background: #e2e8f0;
    border-color: #94a3b8;
    color: #0f172a;
    transform: translateY(-1px);
}

.ppf-close-btn:active {
    transform: translateY(1px);
    background: #cbd5e1;
}

.ppf-wizard-progress { 
    height: 4px; 
    background: #e0e0e0; 
    width: 100%; 
}
#ppf-progress-bar { 
    height: 100%; 
    background: #0073aa; 
    transition: width 0.3s ease; 
}

.ppf-wizard-body {
    padding: 24px;
    flex-grow: 1;
    overflow-y: auto;
}

.ppf-wizard-footer {
    padding: 15px 24px;
    border-top: 1px solid #ebebeb;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ppf-btn {
    padding: 12px 24px;
    border: none; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600;
    font-size: 1rem;
    transition: background 0.2s;
}
.ppf-btn-primary { 
    background: #0073aa; 
    color: #fff; 
}
.ppf-btn-primary:hover { background: #005a87; }
.ppf-btn-secondary { 
    background: #f0f0f1; 
    color: #333; 
}
.ppf-btn-secondary:hover { background: #dcdcdc; }

.ppf-btn-activate { 
    background: #00b34d; 
    color: #fff; 
    width: 100%; 
    padding: 15px; 
    margin-top: 20px;
}
.ppf-btn-activate:hover { background: #009941; }

.ppf-field-wrap { 
    margin-bottom: 20px; 
}
.ppf-field-wrap label { 
    display: block; 
    margin-bottom: 8px; 
    font-weight: 500; 
    color: #444; 
}
.ppf-field-wrap input[type="text"], 
.ppf-field-wrap input[type="number"],
.ppf-field-wrap select, 
.ppf-field-wrap textarea {
    width: 100%; 
    padding: 12px; 
    border: 1px solid #ccc; 
    border-radius: 6px; 
    box-sizing: border-box;
    font-family: inherit;
    font-size: 1rem;
}
.ppf-field-wrap textarea {
    min-height: 100px;
    resize: vertical;
}

/* Checkboxes y Radios */
.ppf-field-wrap label.ppf-radio-label,
.ppf-field-wrap label.ppf-check-label {
    display: flex;
    align-items: center;
    font-weight: normal;
    margin-bottom: 8px;
    cursor: pointer;
}
.ppf-field-wrap label input[type="radio"],
.ppf-field-wrap label input[type="checkbox"] {
    margin-right: 10px;
    transform: scale(1.2);
}

.ppf-conditional-hidden { 
    display: none !important; 
}



/* =====================================================================
   ICON PICKER MODAL
   ===================================================================== */
.ppf-icon-picker-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 2000000; /* Aseguramos que esté por encima del wizard que tiene 999999 */
    background: rgba(0, 0, 0, 0.55);
    align-items: center;
    justify-content: center;
}

.ppf-icon-picker-content {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    width: 92%;
    max-width: 420px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.3);
}

.ppf-icon-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.ppf-icon-picker-header strong {
    font-size: 1em;
    color: #333;
}

#ppf-icon-picker-close {
    background: none;
    border: none;
    font-size: 1.4em;
    cursor: pointer;
    color: #888;
    line-height: 1;
}

#ppf-icon-picker-close:hover {
    color: #333;
}

.ppf-icon-picker-category {
    margin-bottom: 12px;
}

.ppf-icon-picker-category-title {
    font-size: 0.78em;
    font-weight: 700;
    color: #888;
    text-transform: uppercase;
    letter-spacing: .06em;
    margin-bottom: 6px;
}

.ppf-icon-picker-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.ppf-icon-pick-btn {
    width: 40px;
    height: 40px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f9f9f9;
    cursor: pointer;
    font-size: 1.1em;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #555;
    transition: all 0.2s ease;
}

.ppf-icon-pick-btn:hover {
    background: #eef3f6;
    border-color: #0073aa;
    color: #0073aa;
    transform: scale(1.05);
}

/* =====================================================================
   CAMPOS REPETIBLES — Island UI / Tarjetas Apiladas
   ===================================================================== */

/* Reset: los inputs/select dentro del input-group NO heredan el estilo global */
.ppf-field-wrap .ppf-input-group input[type="text"],
.ppf-field-wrap .ppf-input-group input[type="number"],
.ppf-field-wrap .ppf-input-group input[type="email"],
.ppf-field-wrap .ppf-input-group input[type="tel"],
.ppf-field-wrap .ppf-input-group input[type="url"],
.ppf-field-wrap .ppf-input-group input[type="password"],
.ppf-field-wrap .ppf-input-group select,
.ppf-field-wrap .ppf-input-group textarea,
.ppf-field-wrap .ppf-location-item-header input[type="text"],
.ppf-field-wrap .ppf-location-item-header select.ppf-label-select {
    width: auto;
    padding: 0;
    border: none;
    border-radius: 0;
    box-sizing: border-box;
}

.ppf-repeatable-group {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.ppf-location-item {
    padding: 0.875rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    background-color: rgba(249, 250, 251, 0.5);
    transition: all 0.2s;
    margin-bottom: 12px;
}

.ppf-location-item:hover {
    border-color: #d1d5db;
}

.ppf-location-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.625rem;
}

.ppf-input-transparent {
    width: 100%;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    background-color: transparent;
    border: none !important;
    outline: none;
    padding: 0 !important;
    box-shadow: none !important;
}

.ppf-input-transparent::placeholder {
    color: #9ca3af;
    font-weight: 400;
}

/* =====================================================================
   LABEL SELECT — dropdown discreto en la cabecera del ítem repetible
   ===================================================================== */
.ppf-label-select {
    width: 100%;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
    background-color: transparent;
    border: none !important;
    outline: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
    font-family: inherit;
    /* Chevron sutil como único indicador visual de dropdown */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='%239ca3af'%3E%3Cpath fill-rule='evenodd' d='M5.23 7.21a.75.75 0 011.06.02L10 11.168l3.71-3.938a.75.75 0 111.08 1.04l-4.25 4.5a.75.75 0 01-1.08 0l-4.25-4.5a.75.75 0 01.02-1.06z' clip-rule='evenodd'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 1em;
    padding-right: 1.25em !important;
    transition: color 0.15s;
}

.ppf-label-select:focus {
    outline: none !important;
    box-shadow: none !important;
}

.ppf-label-select option[value=""] {
    color: #9ca3af;
    font-weight: 400;
}

/* Cuando tiene valor seleccionado: acento azul sutil */
.ppf-location-item:has(.ppf-label-select:not([value=""])) .ppf-label-select {
    color: #1f2937;
}

.ppf-btn-delete {
    color: #9ca3af;
    background: none;
    border: none;
    padding: 0.375rem;
    border-radius: 0.375rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.ppf-btn-delete:hover {
    color: #ef4444;
    background-color: #fef2f2;
}

.ppf-input-group {
    display: flex;
    align-items: center;
    background-color: #ffffff;
    padding: 0.625rem 0.75rem;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    transition: box-shadow 0.2s, border-color 0.2s;
}

.ppf-input-group:focus-within {
    border-color: #006A9C;
    box-shadow: 0 0 0 1px #006A9C;
}

.ppf-input-icon {
    color: #9ca3af;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.ppf-input-standard {
    width: 100%;
    font-size: 0.875rem;
    color: #374151;
    background-color: transparent;
    border: none !important;
    outline: none;
    padding: 0 !important;
    box-shadow: none !important;
    resize: vertical;
    font-family: inherit;
}

.ppf-btn-add-dashed {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border-radius: 0.75rem;
    border: 2px dashed #d1d5db;
    color: #006A9C;
    font-weight: 500;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background-color: transparent;
    cursor: pointer;
    transition: all 0.2s;
}

.ppf-btn-add-dashed:hover {
    background-color: #eff6ff;
    border-color: #bfdbfe;
}

/* =====================================================================
   SELECT — Island UI
   ===================================================================== */
.ppf-select-standard {
    -webkit-appearance: none;
    appearance: none;
    flex: 1;
    background: transparent;
    color: #374151;
    font-size: 0.875rem;
    font-family: inherit;
    cursor: pointer;
}
.ppf-select-standard:focus { outline: none; }
.ppf-select-standard option { color: #374151; background: #fff; }

/* =====================================================================
   TEXTAREA — Island UI (permite crecer verticalmente)
   ===================================================================== */
.ppf-input-group--textarea { align-items: flex-start; }
.ppf-input-group--textarea .ppf-input-standard {
    min-height: 90px;
    resize: vertical;
}

/* =====================================================================
   RADIO & CHECKBOX — Island UI Cards
   ===================================================================== */
.ppf-field-wrap label.ppf-option-card {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    padding: 10px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 0.75rem;
    background: rgba(249, 250, 251, 0.5);
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
    font-weight: normal;
}
.ppf-field-wrap label.ppf-option-card:hover {
    border-color: #d1d5db;
    background: #fff;
    box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.ppf-option-radio,
.ppf-option-checkbox {
    flex-shrink: 0;
    transform: scale(1.15);
    accent-color: #006A9C;
    margin: 0;
}
/* Checked state: borde azul sutil */
.ppf-field-wrap label.ppf-option-card:has(.ppf-option-radio:checked),
.ppf-field-wrap label.ppf-option-card:has(.ppf-option-checkbox:checked) {
    border-color: #006A9C;
    background: #f0f7ff;
}

/* =====================================================================
   FILE / IMAGE UPLOAD — Island UI Card
   ===================================================================== */
.ppf-upload-card {
    display: block;
    position: relative;
    border: 2px dashed #cbd5e1;
    border-radius: 14px;
    background: #f8fafc;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    box-sizing: border-box;
}

.ppf-upload-card:hover {
    border-color: #006A9C;
    background: #f0f7ff;
    box-shadow: 0 6px 20px rgba(0, 106, 156, 0.08);
    transform: translateY(-2px);
}

.ppf-upload-card:active {
    transform: translateY(0);
}

/* -------------------------------------------------------------
   1. AVATAR CARD (Foto de Perfil)
   ------------------------------------------------------------- */
.ppf-upload-card--avatar {
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    padding: 16px 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.ppf-upload-card--avatar:hover {
    border-color: #006A9C;
    background: #fafcff;
    box-shadow: 0 8px 24px rgba(0, 106, 156, 0.1);
}

.ppf-upload-avatar-layout {
    display: flex;
    align-items: center;
    gap: 18px;
}

.ppf-upload-avatar-box {
    position: relative;
    width: 84px;
    height: 84px;
    border-radius: 50%;
    flex-shrink: 0;
    background: #f1f5f9;
    border: 3px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}

.ppf-upload-card--avatar:hover .ppf-upload-avatar-box {
    box-shadow: 0 6px 18px rgba(0, 106, 156, 0.25);
    border-color: #e0f2fe;
}

.ppf-upload-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ppf-upload-avatar-placeholder {
    font-size: 2.2rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ppf-upload-avatar-badge {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #006A9C;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease;
}

.ppf-upload-card--avatar:hover .ppf-upload-avatar-badge {
    transform: scale(1.15);
    background: #0088c7;
}

.ppf-upload-avatar-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s ease;
    font-size: 11px;
    font-weight: 600;
}

.ppf-upload-card--avatar:hover .ppf-upload-avatar-overlay {
    opacity: 1;
}

.ppf-upload-avatar-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.ppf-upload-avatar-heading {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.3;
}

.ppf-upload-card--avatar:hover .ppf-upload-avatar-heading {
    color: #006A9C;
}

.ppf-upload-avatar-sub {
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}

.ppf-upload-meta-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ppf-upload-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    background: #f1f5f9;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 600;
    color: #475569;
    border: 1px solid #e2e8f0;
}

/* -------------------------------------------------------------
   2. BANNER / PORTADA CARD (Foto de Portada)
   ------------------------------------------------------------- */
.ppf-upload-card--banner {
    border: 1.5px solid #e2e8f0;
    border-radius: 16px;
    background: #ffffff;
    padding: 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
}

.ppf-upload-banner-layout {
    width: 100%;
    min-height: 140px;
    background-size: cover;
    background-position: center;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 15px;
    overflow: hidden;
}

.ppf-upload-banner-layout--empty {
    background: linear-gradient(135deg, #f8fafc 0%, #edf2f7 100%);
    border: 2px dashed #cbd5e1;
    margin: -1.5px;
    transition: all 0.25s ease;
}

.ppf-upload-card--banner:hover .ppf-upload-banner-layout--empty {
    border-color: #006A9C;
    background: linear-gradient(135deg, #f0f7ff 0%, #e0f2fe 100%);
}

.ppf-upload-banner-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 24px 16px;
    text-align: center;
}

.ppf-upload-banner-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #ffffff;
    color: #006A9C;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    transition: transform 0.25s ease;
}

.ppf-upload-card--banner:hover .ppf-upload-banner-icon {
    transform: scale(1.1);
    background: #006A9C;
    color: #ffffff;
}

.ppf-upload-banner-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1e293b;
}

.ppf-upload-banner-hint {
    font-size: 0.775rem;
    color: #64748b;
}

.ppf-upload-banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.1) 0%, rgba(15, 23, 42, 0.7) 100%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
    transition: background 0.25s ease;
}

.ppf-upload-card--banner:hover .ppf-upload-banner-overlay {
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.25) 0%, rgba(15, 23, 42, 0.85) 100%);
}

.ppf-upload-banner-pill-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    color: #0f172a;
    font-size: 0.825rem;
    font-weight: 700;
    padding: 8px 18px;
    border-radius: 30px;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
    transition: all 0.2s ease;
}

.ppf-upload-banner-pill-btn--active {
    background: #10b981 !important;
    color: #ffffff !important;
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4) !important;
}

.ppf-upload-card--has-new-file {
    border-color: #10b981 !important;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.15) !important;
}

.ppf-upload-pill--active {
    background: #ecfdf5 !important;
    border-color: #a7f3d0 !important;
    color: #065f46 !important;
    font-weight: 700 !important;
}

.ppf-upload-avatar-img--new {
    animation: ppf-img-fade 0.35s ease-out;
}

@keyframes ppf-img-fade {
    0% { opacity: 0.4; transform: scale(0.92); }
    100% { opacity: 1; transform: scale(1); }
}

/* -------------------------------------------------------------
   3. GENERAL UPLOAD ZONE (Documentos u otras imágenes)
   ------------------------------------------------------------- */
.ppf-upload-preview {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 14px 0;
}
.ppf-upload-thumb {
    max-width: 100px;
    max-height: 100px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
    background: #fff;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.ppf-upload-preview--doc {
    gap: 8px;
    padding: 14px 14px 0;
    justify-content: flex-start;
}
.ppf-upload-preview-icon {
    font-size: 1.5em;
    color: #ef4444;
}
.ppf-upload-preview-link {
    color: #006A9C;
    font-size: 0.875rem;
    text-decoration: underline;
    font-weight: 600;
}

.ppf-upload-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 22px 16px;
    text-align: center;
}

.ppf-upload-icon-circle {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e2e8f0;
    color: #64748b;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    margin-bottom: 2px;
    transition: all 0.25s ease;
}

.ppf-upload-card:hover .ppf-upload-icon-circle {
    background: #e0f2fe;
    color: #006A9C;
    transform: scale(1.08);
}

.ppf-upload-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: #1e293b;
}

.ppf-upload-hint {
    font-size: 0.775rem;
    color: #64748b;
}

/* Ocultar el input file nativo pero mantenerlo accesible */
.ppf-upload-input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    overflow: hidden;
    clip: rect(0,0,0,0);
    white-space: nowrap;
    border: 0;
}

/* Dragover Highlight */
.ppf-upload-card.ppf-drag-over {
    border-color: #e7356f !important;
    background: #fff5f8 !important;
    box-shadow: 0 0 0 3px rgba(231, 53, 111, 0.15);
}

/* Staged File Cards & Previews */
.ppf-staged-file-card {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    margin-top: 10px;
    gap: 12px;
}
.ppf-staged-file-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    flex: 1;
}
.ppf-staged-file-thumb {
    width: 48px;
    height: 48px;
    border-radius: 8px;
    object-fit: cover;
    border: 1.5px solid #cbd5e1;
    flex-shrink: 0;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}
.ppf-staged-file-thumb--avatar {
    border-radius: 50%;
    width: 52px;
    height: 52px;
    border-color: #006A9C;
}
.ppf-staged-file-thumb--banner {
    width: 80px;
    height: 48px;
    border-radius: 6px;
    aspect-ratio: 16/9;
}
.ppf-staged-doc-icon {
    font-size: 2rem;
    color: #ef4444;
    flex-shrink: 0;
}
.ppf-staged-details {
    display: flex;
    flex-direction: column;
    min-width: 0;
}
.ppf-staged-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.ppf-staged-meta {
    font-size: 0.75rem;
    color: #64748b;
    display: flex;
    align-items: center;
    gap: 8px;
}
.ppf-staged-badge {
    background: #dcfce7;
    color: #166534;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.ppf-staged-remove-btn {
    background: #fee2e2;
    color: #ef4444;
    border: none;
    border-radius: 6px;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
    flex-shrink: 0;
}
.ppf-staged-remove-btn:hover {
    background: #ef4444;
    color: #fff;
}

/* =====================================================================
   GALLERY FIELD — Island UI
   ===================================================================== */
.ppf-gallery-container {
    width: 100%;
}
.ppf-gallery-upload-card {
    margin-bottom: 15px;
}
.ppf-gallery-preview-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}
.ppf-gallery-thumb-wrap {
    position: relative;
    width: 80px;
    height: 80px;
    border-radius: 0.5rem;
    border: 1px solid #e5e7eb;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.ppf-gallery-thumb-wrap.ppf-new-file {
    border-color: #3b82f6;
    border-style: dashed;
}
.ppf-gallery-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.ppf-gallery-remove-btn {
    position: absolute;
    top: -5px;
    right: -5px;
    width: 20px;
    height: 20px;
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
    transition: transform 0.2s;
}
.ppf-gallery-remove-btn:hover {
    transform: scale(1.1);
    background: #dc2626;
}

/* =====================================================================
   TAG SELECTOR (MULTI-LOCATION)
   ===================================================================== */
.ppf-tags-wrapper {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 12px;
    min-height: 20px;
}

.ppf-tag-pill {
    background: #e1f0ff;
    color: #0073aa;
    padding: 6px 12px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    font-size: 0.85em;
    font-weight: 600;
    animation: ppfScaleIn 0.2s ease-out;
    border: 1px solid #c2e0ff;
    box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

.ppf-tag-remove {
    margin-left: 8px;
    cursor: pointer;
    font-weight: bold;
    opacity: 0.6;
    transition: all 0.2s;
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.ppf-tag-remove:hover {
    opacity: 1;
    background: rgba(0,115,170,0.1);
    color: #c02b0a;
}


/* Status Badges para Dashboard (Obsoleto: ahora se colorea el avatar) */
.employee-avatar-container {
    position: relative;
    display: inline-block;
}
/* =====================================================================
   CUSTOM SVG ICONS — Renderizado inline
   ===================================================================== */
.ppf-custom-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1em;
    height: 1em;
    vertical-align: -0.125em;
    flex-shrink: 0;
    color: inherit;
}

.ppf-custom-icon svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Mini preview en el Icon Picker */
.ppf-custom-icon-mini {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 1.1em;
    height: 1.1em;
}

.ppf-custom-icon-mini svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Custom icon en el trigger de opciones personalizadas */
.ppf-custom-icon-inline {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    width: 1.25em;
    height: 1.25em;
    color: #0073aa;
}

.ppf-custom-icon-inline svg {
    width: 100%;
    height: 100%;
    fill: currentColor;
}

/* Estilo especial para botones de iconos custom en el picker */
.ppf-icon-pick-custom {
    background: #eff6ff !important;
    border-color: #bfdbfe !important;
}

.ppf-icon-pick-custom:hover {
    background: #dbeafe !important;
    border-color: #3b82f6 !important;
}

@keyframes ppfScaleIn {
    from { transform: scale(0.8); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* --- Interactive Step Index --- */
.ppf-title-flex-row {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    gap: 8px;
}

.ppf-step-index-caret {
    font-size: 0.8rem;
    color: #64748b;
    transition: transform 0.3s ease, color 0.2s ease;
}

.ppf-wizard-title-group:hover .ppf-step-index-caret {
    color: #0073aa;
}

.ppf-step-index-caret.ppf-caret-rotated {
    transform: rotate(180deg);
}

.ppf-steps-popup {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    z-index: 100;
    max-height: calc(90vh - 120px);
    overflow-y: auto;
    border-top: 1px solid #f1f5f9;
    border-bottom: 2px solid #e2e8f0;
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), 
                visibility 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

@media (min-width: 768px) {
    .ppf-steps-popup {
        max-height: 450px;
    }
}

.ppf-steps-popup.ppf-show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.ppf-steps-popup-list {
    padding: 16px 20px;
}

.ppf-step-item {
    display: flex;
    align-items: center;
    padding: 10px 14px;
    margin-bottom: 8px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.ppf-step-item:last-child {
    margin-bottom: 0;
}

.ppf-step-item:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: translateX(2px);
}

.ppf-step-item.ppf-active {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
    font-weight: 600;
}

.ppf-step-number {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #cbd5e1;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    margin-right: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.ppf-step-item.ppf-active .ppf-step-number {
    background: #3b82f6;
    color: #fff;
}

.ppf-step-title-text {
    font-size: 0.88rem;
    flex: 1;
    color: #334155;
}

.ppf-step-item.ppf-active .ppf-step-title-text {
    color: #1e3a8a;
}

/* Skeleton Loader Styles */
.ppf-skeleton-wrapper {
    display: flex;
    flex-direction: column;
    gap: 24px;
    animation: ppfFadeIn 0.3s ease-out;
}

.ppf-skeleton-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ppf-skeleton-label {
    width: 35%;
    height: 14px;
    background: #e2e8f0;
    border-radius: 4px;
    position: relative;
    overflow: hidden;
}

.ppf-skeleton-input {
    width: 100%;
    height: 42px;
    background: #e2e8f0;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

.ppf-skeleton-input-large {
    width: 100%;
    height: 100px;
    background: #e2e8f0;
    border-radius: 8px;
    position: relative;
    overflow: hidden;
}

/* Shimmer animation effect */
.ppf-skeleton-label::after,
.ppf-skeleton-input::after,
.ppf-skeleton-input-large::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.4) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    animation: ppfShimmer 1.5s infinite;
}

@keyframes ppfShimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

@keyframes ppfFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Smooth transition for form content */
.ppf-fade-in-quick {
    animation: ppfFadeIn 0.3s ease-out forwards;
}

/* =====================================================================
   SCORE RING — Profile completion indicator in wizard header
   ===================================================================== */
.ppf-score-ring {
    position: relative;
    background: none !important; /* Override the solid blue background */
    /* conic-gradient is set via inline style --score-pct and --score-color */
    animation: ppfScoreIn 0.4s ease-out;
}
.ppf-score-ring::before {
    content: '';
    position: absolute;
    inset: 3px;
    border-radius: 50%;
    background: #fff;
}
.ppf-score-number {
    position: relative;
    z-index: 1;
    font-size: 0.65rem;
    font-weight: 800;
    color: var(--score-color, #475569);
    line-height: 1;
}

@keyframes ppfScoreIn {
    from { transform: scale(0.5); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
