:root {
    --brand-primary: #2563eb;   /* Blue */
    --brand-secondary: #0ea5e9; /* Light blue */
    --brand-success: #16a34a;   /* Green */
    --brand-bg: #f8fafc;
    --brand-text: #0f172a;
    --brand-muted: #64748b;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont;
}

.progress {
    border-radius: 20px;
}

.btn-primary {
    background: var(--brand-primary);
    border: none;
}

.progress-bar {
    background: linear-gradient(
        90deg,
        var(--brand-primary),
        var(--brand-secondary)
    );
}

button {
    border-radius: 8px;
}
input.form-control {
    border-radius: 8px;
}
input.form-control:focus {
    box-shadow: none;
}
.otp-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: 24px 0;
    width:100%;
}

.otp-box {
    width: 44px;
    height: 52px;
    font-size: 1.4rem;
    text-align: center;
    border-radius: 10px;
    border: 1.5px solid #e5e7eb;
}

.otp-box:focus {
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.15);
    transform: translateY(-2px);
}
/* Background */
.onboarding-bg {
    background: linear-gradient(180deg, #f8fafc, #eef2f7);
    font-family: system-ui, -apple-system, BlinkMacSystemFont;
}


/* Logo */
.brand-logo {
    height: 42px;
}

/* Progress */
.onboarding-progress {
    height: 6px;
    border-radius: 6px;
}
.onboarding-progress .progress-bar {
    border-radius: 6px;
}

/* Text */
.onboarding-title {
    font-size: 2.5rem;
    font-weight: 600;
    text-align: left;
    margin-bottom: 8px;
}

.onboarding-subtitle {
    color: #6c757d;
    font-size: 1.2rem;
    margin-bottom: 28px;
    width: 33vw;
}

/* Inputs */
.form-control-lg {
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 1.2rem;
    line-height: 1;
}

/* Button */
.btn-primary {
    border-radius: 12px;
    padding: 10px 20px;
    font-weight: 600;
    letter-spacing: 0.2px;
    font-size: 1.5rem;
}

/* Footer */
.onboarding-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 0.9rem;
    color: #6c757d;
}
/* Layout */
.onboarding-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Left panel */
.onboarding-aside {
    width: 42%;
    background: linear-gradient(
        180deg,
        var(--brand-primary),
        var(--brand-secondary)
    );
    color: #fff;
    padding: 60px;
}

.aside-logo {
    height: 60px;
    margin-bottom: 70px;
}

.aside-title {
    font-size: 1.6rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.aside-text {
    opacity: 0.9;
    margin-bottom: 24px;
    font-size: 1.3rem;
}

.aside-points {
    list-style: none;
    padding: 0;
    font-size: 0.95rem;
}

.aside-points li {
    margin-bottom: 10px;
}

/* Right panel */
.onboarding-main {
    position: relative;
    width: 58%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--brand-bg);
}
.onboarding-main::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    width: 80px;
    height: 1px;
    background: rgba(255,255,255,0.3);
}
/* Card */
.onboarding-card {
    padding: 32px 24px;
    border-radius: 18px;
    border: 1px solid #e5e7eb;
    box-shadow: 0 12px 30px rgba(0,0,0,0.05);
}


/* Role css */
.role-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-top: 24px;
}

.role-card {
    display: block;
    padding: 16px 18px;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    background: #fff;
}

.role-card:hover {
    border-color: #c7d2fe;
    background: #f8faff;
}

.role-card input {
    position: absolute;
    opacity: 0;
}
.role-card:has(input[type="radio"]:checked) {
    border-color: #2563eb;
    background: #eef2ff;
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.15);
    transform: translateY(-2px);
}
.role-card input:checked + .role-icon,
.role-card input:checked ~ * {
    color: #2563eb;
}
.role-card:focus-within {
    outline: 3px solid rgba(37, 99, 235, 0.4);
    outline-offset: 2px;
}
.role-card input:checked ~ .role-title {
    font-weight: 600;
}

.role-card input:checked {
    border-color: #2563eb;
}

.role-icon {
    font-size: 1.8rem;
    margin-bottom: 8px;
}

.role-title {
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 4px;
}

.role-desc {
    font-size: 0.8rem;
    color: #6b7280;
}

/* success page */
.success-wrapper {
    text-align: center;
    padding: 24px 8px;
}
.success-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: #16a34a;
    color: #fff;
    font-size: 2.4rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.success-icon::after {
    content: '';
    position: absolute;
    width: 72px;
    height: 72px;
    border-radius: 50%;
    border: 2px solid rgba(22,163,74,0.3);
    animation: successPulse 1.5s ease-out infinite;
}
@keyframes successPulse {
    0% {
        transform: scale(1);
        opacity: 0.8;
    }
    100% {
        transform: scale(1.6);
        opacity: 0;
    }
}
.success-next {
    font-size: 0.9rem;
    color: #6b7280;
    margin-top: 12px;
}
@media (max-width: 768px) {
    .success-icon {
        width: 64px;
        height: 64px;
        font-size: 2rem;
    }

    .success-wrapper {
        padding-top: 16px;
    }
}
.animate-success {
    animation: successPop 0.6s ease-out both;
}
.success-message {
    font-size: 1rem;
    color: var(--brand-muted);
}
.btn-link {
    color: var(--brand-muted);
    font-size: 0.9rem;
}

.btn-link:hover {
    color: var(--brand-primary);
    text-decoration: underline;
}
@keyframes successPop {
    0% {
        transform: scale(0.6);
        opacity: 0;
    }
    60% {
        transform: scale(1.05);
        opacity: 1;
    }
    100% {
        transform: scale(1);
    }
}
/* ==============================
   Page Transitions
================================ */

.page-transition {
    opacity: 0;
    transform: translateY(12px);
    animation: fadeSlideIn 0.35s ease forwards;
}
@keyframes fadeSlideIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes pageFadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Fade out when leaving */
.page-transition.fade-out {
    opacity: 0;
    transform: translateY(-10px);
    transition: all 0.25s ease;
}

/* Reduce motion for accessibility */
@media (prefers-reduced-motion: reduce) {
    .page-transition,
    .page-transition.fade-out {
        animation: none;
        transition: none;
        transform: none;
        opacity: 1;
    }
}
.step-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: var(--brand-muted);
}

.step-item {
    position: relative;
    text-align: center;
    flex: 1;
}

.step-item.active {
    color: var(--brand-primary);
    font-weight: 600;
}
/* Skeleton Loader */
#skeleton {
    animation: pulse 1.5s infinite;
}

.skeleton-title {
    height: 24px;
    width: 60%;
    background: #e5e7eb;
    border-radius: 8px;
    margin-bottom: 20px;
}

.skeleton-line {
    height: 16px;
    width: 100%;
    background: #e5e7eb;
    border-radius: 8px;
    margin-bottom: 12px;
}

.skeleton-line.short {
    width: 70%;
}

.skeleton-button {
    height: 44px;
    width: 100%;
    background: #e5e7eb;
    border-radius: 12px;
    margin-top: 24px;
}

@keyframes pulse {
    0% { opacity: 1; }
    50% { opacity: 0.4; }
    100% { opacity: 1; }
}
/* Validation */
.form-control.is-invalid {
    border-color: #dc2626;
}

.form-control.is-valid {
    border-color: #16a34a;
}

.invalid-feedback {
    display: none;
    font-size: 1.2rem;
    color: #dc2626;
    margin-top: 6px;
}

.form-control.is-invalid + .invalid-feedback {
    display: block;
}
/* Password strength meter */
.password-meter {
    height: 6px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.password-meter-bar {
    height: 100%;
    width: 0%;
    background: #dc2626;
    transition: width 0.3s ease, background 0.3s ease;
}

/* Password rules */
.password-rules {
    list-style: none;
    padding-left: 0;
    font-size: 0.85rem;
    color: var(--brand-muted);
}
.mobile-header{
    display:none
}
.password-rules li {
    margin-bottom: 6px;
}

.password-rules li::before {
    content: "✖ ";
    color: #dc2626;
}

.password-rules li.valid {
    color: var(--brand-success);
}

.password-rules li.valid::before {
    content: "✔ ";
    color: var(--brand-success);
}
.password-toggle {
    position: absolute;
    right: 32px;
    top: 50%;
    /* transform: translateY(-50%); */
    cursor: pointer;
    font-size: 1.1rem;
    opacity: 0.7;
}

.password-toggle:hover {
    opacity: 1;
}
.password-rules {
    list-style: none;
    padding-left: 0;
    font-size: 0.8rem;
    color: #6b7280;
}

.password-rules li.valid {
    color: #16a34a;
}

.caps-warning {
    font-size: 0.8rem;
    color: #b45309;
}

.password-meter {
    height: 6px;
    background: #e5e7eb;
    border-radius: 6px;
    overflow: hidden;
}

.password-meter-bar {
    height: 100%;
    width: 0%;
    transition: width 0.2s ease;
}
.caps-warning {
    font-size: 0.85rem;
    color: #dc2626;
    margin-top: 6px;
}
.trust-footer {
    font-size: 1.2rem;
    margin-top: 14px;
    line-height: 1.5;
    opacity: 0.85;
}
.aside-divider {
    height: 1px;
    background: rgba(255,255,255,0.25);
    margin: 24px 0;
}
.aside-quote {
    margin-top: 40px;
    font-size: 1.4rem;
    opacity: 0.85;
    font-style: italic;
}
.input-helper {
    display: block;
    margin-top: 15px;
    font-size: 1.2rem;
    color: #6b7280;
}
.form-label {
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 6px;
}

/* =========================
   MOBILE FIX (CRITICAL)
========================= */
@media (max-width: 768px) {

    /* Disable two-column layout */
    .onboarding-wrapper {
        flex-direction: column;
        min-height: auto;
    }

    /* Hide left panel completely */
    .onboarding-aside {
        display: none !important;
    }

    /* Full width main area */
    .onboarding-main {
        width: 100%;
        min-height: auto;
        padding: 12px 14px 24px;
        display: flex;
        align-items: flex-start;
        justify-content: center;
        padding-top: 24px;
        background: #f8fafc;
    }
    .onboarding-card {
        width: 100%;
        max-width: 100%;
        padding: 24px 20px;
        border-radius: 16px;
        box-shadow: 0 10px 24px rgba(0,0,0,0.05);
    }
    .aside-content,
    .onboarding-card {
        animation-duration: 0.25s;
    }
    .onboarding-title {
        font-size: 1.35rem;
        line-height: 1.3;
        text-align: left;
    }

    .onboarding-subtitle {
        font-size: 0.9rem;
        margin-bottom: 20px;
        width: 100%;
    }
    .form-control-lg {
        padding: 12px 14px;
        font-size: 0.95rem;
    }
    .trust-footer{
        font-size: 0.75rem;
    }
    .invalid-feedback{
        font-size: 0.75rem;
    }
    .btn-primary.btn-lg {
        padding: 12px;
        font-size: 0.95rem;
        border-radius: 10px;
    }
    .input-helper,
    .compliance-note {
        font-size: 0.75rem;
        margin-top: 5px;
        line-height: 1.4;
    }
    .mobile-header{
        display: block;
    }
    .onboarding-trust {
        margin-top: 12px;
    }
    body.onboarding-bg {
        background: #f8fafc;
    }
    .otp-box {
        width: 38px;
        height: 48px;
        font-size: 1.2rem;
    }

    .otp-container {
        gap: 6px;
    }
    .role-grid {
        grid-template-columns: 1fr;
    }
}
.aside-step {
    font-size: 1.3rem;
    text-transform: uppercase;
    opacity: 0.8;
    margin-bottom: 10px;
}

.aside-heading {
    font-weight: 600;
    margin-bottom: 16px;
}

.aside-next {
    margin-top: 24px;
    font-size: 1.5rem;
    opacity: 0.9;
}

/* MOBILE HEADER */
.mobile-header {
    width: 100%;
    margin: auto;
    padding: 16px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: #fff;
    z-index: 10;
    border-bottom: 1px solid #e5e7eb;
}

.mobile-logo {
    height: 70px;
    margin-bottom: 4px;
}

.mobile-step {
    font-size: 0.7rem;
    color: #6b7280;
    letter-spacing: 0.05em;
}
.aside-content {
    animation: asideFadeIn 0.35s ease both;
}

@keyframes asideFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
.category-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
    border-radius: 8px;
    background: #fff;
    padding: 6px;
}

.option-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 14px 24px;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s ease;
}

.option-item:hover {
    border-color: #2563eb;
    background: #f8fafc;
}

.option-item input {
    width: 16px;
    height: 16px;
}

.option-item input:checked + span {
    font-weight: 500;
}

.option-item:has(input:checked) {
    border-color: #2563eb;
    background: #eff6ff;
}
