:root { --dole-blue: #1e3a8a; --dole-light: #f1f5f9; --text-main: #1e293b; --text-muted: #64748b; }
    .bg-gradient { min-height: 100vh; background: radial-gradient(circle at top left, #f8fafc, #e2e8f0); display: flex; align-items: center; justify-content: center; padding: 40px 20px; font-family: 'Inter', sans-serif; }
    .registration-card { background: white; padding: 40px; border-radius: 24px; box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.05); width: 100%; max-width: 550px; }
    .registration-header { text-align: center; margin-bottom: 25px; }
    .dole-logo { font-weight: 900; font-size: 28px; color: var(--dole-blue); }
    .form-grid { display: grid; gap: 12px; margin-bottom: 12px; }
    .grid-3 { grid-template-columns: 2fr 0.8fr 2fr; }
    .grid-4 { grid-template-columns: 1.5fr 0.8fr 1fr 1fr; }
    .grid-2 { grid-template-columns: 1fr 1fr; }
    .grid-3-edu { display: grid; grid-template-columns: 1.2fr 1fr 1.5fr; gap: 10px; margin-bottom: 12px; }
    .form-section-header { display: flex; align-items: center; gap: 10px; margin: 20px 0 12px; }
    .form-section-header hr { flex: 1; border: 0; border-top: 1px solid #f1f5f9; }
    .form-section-header span { font-size: 10px; font-weight: 800; text-transform: uppercase; color: var(--text-muted); }
    .input-modern { width: 100%; padding: 12px 16px; border: 2px solid var(--dole-light); border-radius: 12px; font-size: 14px; outline: none; transition: 0.2s; }
    .input-modern:focus { border-color: var(--dole-blue); box-shadow: 0 0 0 4px rgba(30, 58, 138, 0.05); }
    .checkbox-chips { display: flex; flex-wrap: wrap; gap: 8px; }
    .chip input { display: none; }
    .chip span { display: inline-block; padding: 8px 16px; background: #f1f5f9; border-radius: 50px; font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid #e2e8f0; transition: 0.2s; }
    .chip input:checked + span { background: var(--dole-blue); color: white; border-color: var(--dole-blue); }
    .btn-submit { width: 100%; padding: 16px; background: var(--dole-blue); color: white; border: none; border-radius: 12px; font-weight: 700; cursor: pointer; transition: 0.3s; margin-top: 10px; }
    .btn-submit:hover { background: #172554; transform: translateY(-1px); }
    .id-display { background: #f8fafc; border: 2px dashed var(--dole-blue); border-radius: 20px; padding: 30px 20px; margin: 25px 0; text-align: center; }
    .btn-primary-link { display: inline-block; padding: 14px; background: var(--dole-blue); color: #fff; text-decoration: none; border-radius: 12px; font-weight: 700; text-align: center; }
    @media (max-width: 500px) { .grid-3, .grid-4, .grid-2, .grid-3-edu { grid-template-columns: 1fr; } }
    /* Container for the positions */
    .positions-wrapper {
        min-height: 100px;
        max-height: 350px; /* Adjust based on how much you want visible before scrolling */
        overflow-y: auto;
        border: 1px dashed #cbd5e1; /* The dashed border from your image */
        padding: 20px;
        border-radius: 12px;
        margin-bottom: 20px;
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-content: flex-start;
        background-color: #f8fafc22; /* Subtle background tint */
    }

    /* Individual Chip Styling */
    .chip {
        cursor: pointer;
    }

    .chip input {
        display: none;
    }

    .chip span {
        display: inline-block;
        padding: 8px 18px;
        background: #eff6ff; /* Light blueish tint */
        color: #1e3a8a;
        border-radius: 50px;
        font-size: 13px;
        font-weight: 600;
        border: 1px solid #d1d5db;
        transition: all 0.2s ease;
        white-space: nowrap;
    }

    /* Hover effect */
    .chip:hover span {
        border-color: #1e3a8a;
        background: #dbeafe;
    }

    /* Selected state */
    .chip input:checked + span {
        background: #1e3a8a;
        color: white;
        border-color: #1e3a8a;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }

    /* Scrollbar styling to keep it clean */
    .positions-wrapper::-webkit-scrollbar {
        width: 6px;
    }
    .positions-wrapper::-webkit-scrollbar-thumb {
        background: #cbd5e1;
        border-radius: 10px;
    }
    @keyframes modalFadeIn {
    from { opacity: 0; transform: scale(0.95) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
    }
    .modal-open { overflow: hidden; }
    @keyframes spin { to { transform: rotate(360deg); } }
    /* Progress Stepper */

    /* Button Container for Step 1 */
.step-buttons.vertical {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

/* Primary Next Button */
.btn-next {
    background: var(--dole-blue);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    width: 100%;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.2);
}

.btn-next:active {
    transform: scale(0.98);
}

/* Subtle Cancel Link */
.btn-cancel-link {
    display: flex;
    align-items: center;
    gap: 5px;
    color: #94a3b8; /* Slate gray */
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 10px;
    transition: color 0.2s;
}

.btn-cancel-link:hover {
    color: #ef4444; /* Soft red on hover */
}

.btn-cancel-link ion-icon {
    font-size: 18px;
}
.stepper-wrapper { display: flex; justify-content: space-between; align-items: center; margin: 20px 0; }
.step-item { width: 35px; height: 35px; border-radius: 50%; background: #e2e8f0; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #64748b; transition: 0.3s; }
.step-item.active { background: var(--dole-blue); color: white; transform: scale(1.1); box-shadow: 0 4px 10px rgba(30, 58, 138, 0.3); }
.step-line { flex: 1; height: 2px; background: #e2e8f0; margin: 0 10px; }

/* Form Steps */
.form-step { display: none; animation: fadeIn 0.4s ease; }
.form-step.active { display: block; }

/* Buttons */
.btn-next, .btn-submit { background: var(--dole-blue); color: white; border: none; padding: 14px; border-radius: 8px; width: 100%; font-weight: 700; margin-top: 15px; cursor: pointer; }
.step-buttons { display: flex; gap: 10px; margin-top: 15px; }
.btn-back { background: #f1f5f9; color: #64748b; border: none; padding: 14px; border-radius: 8px; width: 100px; font-weight: 700; cursor: pointer; }
:root {
    --dole-blue: #1e3a8a;
    --dole-light: #f0f4ff;
    --glass: rgba(255, 255, 255, 0.95);
}

/* Success State Advanced UI */
.success-wrapper {
    padding: 20px 10px;
    text-align: center;
}

.success-icon-float {
    font-size: 64px;
    color: #22c55e;
    filter: drop-shadow(0 10px 15px rgba(34, 197, 94, 0.3));
    margin-bottom: 15px;
    animation: bounce 2s infinite;
}

.success-title {
    font-size: 28px;
    font-weight: 900;
    color: #1e293b;
    letter-spacing: -0.5px;
}

.digital-id-card {
    background: linear-gradient(135deg, #1e3a8a 0%, #3b82f6 100%);
    padding: 25px;
    border-radius: 20px;
    color: white;
    margin: 25px 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
}

.digital-id-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 100%;
    height: 200%;
    background: rgba(255,255,255,0.1);
    transform: rotate(45deg);
}

.card-header {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.8;
    text-transform: uppercase;
}

.id-number {
    font-size: 3.5rem;
    font-family: 'Monaco', monospace;
    font-weight: 900;
    margin: 20px 0;
    letter-spacing: 4px;
    text-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.action-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.action-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 15px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    text-decoration: none;
    color: #475569;
    font-weight: 700;
    transition: 0.2s;
    cursor: pointer;
}

.action-item ion-icon { font-size: 24px; margin-bottom: 5px; }
.action-item.primary { background: var(--dole-blue); color: white; border: none; }
.action-item:active { transform: scale(0.95); }

.return-link {
    display: block;
    margin-top: 25px;
    color: #94a3b8;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}
/* Custom processing button state */
.btn-processing {
    background: #64748b !important;
    cursor: not-allowed;
    opacity: 0.8;
}

/* Custom Spinner Animation if not using Ionicons */
@keyframes spin {
    to { transform: rotate(360deg); }
}

#btnSpinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

/* SweetAlert Customization */
.swal2-popup {
    border-radius: 20px !important;
    padding: 2rem !important;
}

.swal2-title {
    font-size: 22px !important;
    padding-bottom: 10px !important;
}

.processing-container {
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

@keyframes animateIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}
.animate-in { animation: animateIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275); }
@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
/* Container Spacing */
.step-actions-container {
    margin-top: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
}

/* Row for Back and Next */
.navigation-row {
    display: flex;
    gap: 12px;
    align-items: center;
}

/* Small Back Button */
.btn-back {
    flex: 1; /* Takes up less space */
    background: #f1f5f9;
    color: #475569;
    border: 1.5px solid #e2e8f0;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: 0.2s;
}

/* Large Primary Next Button */
.btn-next-step {
    flex: 2; /* Takes up more space to signify primary action */
    background: var(--dole-blue);
    color: white;
    border: none;
    padding: 14px;
    border-radius: 12px;
    font-weight: 700;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(30, 58, 138, 0.2);
}

/* Cancel Link Row */
.exit-row {
    display: flex;
    justify-content: center;
}

.btn-cancel-link {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #94a3b8;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    transition: 0.2s;
}

.btn-cancel-link:hover {
    color: #ef4444;
}

/* Feedback states */
.btn-back:active, .btn-next-step:active {
    transform: scale(0.96);
}
/* Navigation Row Consistency */
.navigation-row {
    display: flex;
    gap: 12px;
    align-items: center;
    width: 100%;
}

/* Final Submit Button Styling */
.btn-submit-final {
    flex: 2.5; /* Slightly wider than the 'Back' button */
    background: linear-gradient(135deg, #16a34a 0%, #059669 100%); /* Green Success Tone */
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-weight: 800;
    font-size: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(22, 163, 74, 0.2);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-submit-final:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 20px rgba(22, 163, 74, 0.3);
}

/* Modern Spinner */
.spinner-modern {
    width: 18px;
    height: 18px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top: 3px solid #ffffff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Ensure icons align with text */
.btn-submit-final ion-icon {
    font-size: 18px;
}
/* Grid Layout for Chips */
.checkbox-chips-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 columns for mobile 375px */
    gap: 10px;
    margin: 15px 0;
}

/* Hide the native checkbox */
.advanced-chip input[type="checkbox"] {
    display: none;
}

/* Base Chip Style */
.advanced-chip {
    cursor: pointer;
    display: block;
}

.chip-content {
    background: #ffffff;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 12px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 8px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.chip-content ion-icon {
    font-size: 20px;
    color: #64748b;
    transition: all 0.2s;
}

.chip-content span {
    font-size: 11px;
    font-weight: 700;
    color: #475569;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    line-height: 1.2;
}

/* ACTIVE/SELECTED STATE */
.advanced-chip input[type="checkbox"]:checked + .chip-content {
    background: #eff6ff; /* Light blue background */
    border-color: var(--dole-blue);
    box-shadow: 0 4px 12px rgba(30, 58, 138, 0.15);
    transform: translateY(-2px);
}

.advanced-chip input[type="checkbox"]:checked + .chip-content ion-icon {
    color: var(--dole-blue);
    transform: scale(1.1);
}

.advanced-chip input[type="checkbox"]:checked + .chip-content span {
    color: var(--dole-blue);
}

/* Hover effect for desktop, but safe for touch */
@media (hover: hover) {
    .chip-content:hover {
        border-color: #cbd5e1;
        background: #f8fafc;
    }
}