/* =============================================
   KYC Portal – Pure CSS Conversion
   ============================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --background: #f3f7f5;
    --foreground: #152E23;
    --primary: #10963D;
    --primary-hover: #0e7e33;
    --primary-shadow: rgba(16, 150, 61, 0.2);
    --primary-shadow-hover: rgba(16, 150, 61, 0.3);
    --primary-light: #e8f5ec;
    --card: #ffffff;
    --border: #d5e3dc;
    --border-focus: #10963D;
    --ring: rgba(16, 150, 61, 0.1);
    --radius: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.25rem;
    --slate-400: #7a9589;
    --slate-500: #3d5a4e;
    --slate-700: #234C3D;
    --slate-800: #152E23;
    --slate-900: #0f1f18;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--background);
    color: var(--foreground);
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--slate-400);
}


/* =============================================
   BACKGROUND BLOBS
   ============================================= */
.blob {
    position: fixed;
    border-radius: 50%;
    pointer-events: none;
    filter: blur(120px);
    z-index: 0;
}

.blob-top {
    top: -100px;
    left: 50%;
    transform: translateX(-50%);
    width: min(1000px, 100%);
    height: 500px;
    background: rgba(35, 76, 61, 0.08);
    /* Primary semi-transparent */
}

.blob-bottom-right {
    bottom: 0;
    right: -10%;
    width: 500px;
    height: 500px;
    background: rgba(16, 150, 61, 0.08);
    /* Accent semi-transparent */
    filter: blur(100px);
}

.blob-left {
    top: 20%;
    left: -10%;
    width: 400px;
    height: 400px;
    background: rgba(35, 76, 61, 0.05);
    filter: blur(100px);
}


/* =============================================
   PAGE LAYOUT
   ============================================= */
.page-wrapper {
    position: relative;
    z-index: 10;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 3rem 1rem;
    width: 100%;
    max-width: 64rem;
    /* max-w-4xl */
    margin: 0 auto;
}

.page-header {
    text-align: center;
    margin-bottom: 2.5rem;
}

.page-title {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    color: var(--slate-900);
    letter-spacing: -0.02em;
    line-height: 1.1;
}

.page-title .accent {
    color: var(--primary);
}

.page-subtitle {
    margin-top: 1rem;
    font-size: 1.125rem;
    color: var(--slate-500);
    max-width: 42rem;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}


/* =============================================
   GLASS CARD
   ============================================= */
.glass-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(226, 232, 240, 0.5);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
    border-radius: 1.25rem;
    transition: box-shadow 0.3s ease;
}

.glass-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}

.kyc-card {
    width: 100%;
    padding: 2.5rem 2.5rem 2rem;
    position: relative;
    overflow: hidden;
}

@media (max-width: 640px) {
    .kyc-card {
        padding: 1.5rem 1rem 1.5rem;
    }
}


/* =============================================
   PROGRESS BAR
   ============================================= */
.progress-bar-container {
    width: 100%;
    margin-bottom: 3rem;
    position: relative;
}

.progress-steps {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Background track */
.progress-track-bg {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 4px;
    transform: translateY(-50%);
    background: #e2e8f0;
    border-radius: 99px;
}

/* Active track */
.progress-track-fill {
    position: absolute;
    top: 50%;
    left: 0;
    height: 4px;
    transform: translateY(-50%);
    background: var(--primary);
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(.4, 0, .2, 1);
}

/* Each step node */
.progress-step-item {
    position: relative;
    z-index: 10;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.step-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    border: 2px solid #e2e8f0;
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-400);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: background 0.3s ease, border-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
}

.step-circle.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    transform: scale(1.1);
}

.step-circle.completed {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

.step-circle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.step-label {
    position: absolute;
    top: 3rem;
    white-space: nowrap;
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--slate-400);
    transition: color 0.3s ease;
}

.step-label.active {
    color: var(--primary);
}

.step-label.completed {
    color: var(--slate-700);
}


/* =============================================
   STEP WRAPPER / ANIMATION
   ============================================= */
.step-wrapper {
    margin-top: 3rem;
    min-height: 400px;
    position: relative;
    overflow: hidden;
}

.step-content {
    width: 100%;
    animation: slideIn 0.3s cubic-bezier(.4, 0, .2, 1) both;
}

.step-content.exit-left {
    animation: slideOutLeft 0.25s cubic-bezier(.4, 0, .2, 1) forwards;
}

.step-content.exit-right {
    animation: slideOutRight 0.25s cubic-bezier(.4, 0, .2, 1) forwards;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideInFromLeft {
    from {
        opacity: 0;
        transform: translateX(-40px) scale(0.98);
    }

    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes slideOutLeft {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(-40px) scale(0.98);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0) scale(1);
    }

    to {
        opacity: 0;
        transform: translateX(40px) scale(0.98);
    }
}


/* =============================================
   FORM TYPOGRAPHY
   ============================================= */
.step-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--slate-800);
    letter-spacing: -0.02em;
}

.step-subtitle {
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-top: 0.25rem;
}

.section-divider {
    grid-column: 1 / -1;
    border-top: 1px solid #f1f5f9;
    padding-top: 1.25rem;
    margin-top: 0.5rem;
}

.section-divider h3 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 0;
}


/* =============================================
   FORM CONTROLS
   ============================================= */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-700);
    display: block;
}

.form-label.small-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-weight: 600;
    color: var(--slate-500);
}

.form-input,
.form-select {
    height: 3rem;
    width: 100%;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.5);
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    font-family: 'Inter', sans-serif;
    color: var(--foreground);
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    appearance: none;
    -webkit-appearance: none;
}

.form-input::placeholder {
    color: var(--slate-400);
}

.form-input:focus,
.form-select:focus {
    border-color: var(--border-focus);
    background: #fff;
    box-shadow: 0 0 0 4px var(--ring);
}

.form-input:disabled,
.form-select:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Input with icon */
.input-icon-wrap {
    position: relative;
}

.input-icon-wrap .form-input {
    padding-left: 2.5rem;
}

.input-icon-wrap .input-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--slate-400);
    width: 1.25rem;
    height: 1.25rem;
    pointer-events: none;
}

/* Select arrow */
.select-wrap {
    position: relative;
}

.select-wrap::after {
    content: '';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 6px solid var(--slate-400);
    pointer-events: none;
}

.select-wrap .form-select {
    width: 100%;
}


/* =============================================
   GRID LAYOUTS
   ============================================= */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem 1.5rem;
}

@media (min-width: 768px) {
    .form-grid-2 {
        grid-template-columns: 1fr 1fr;
    }
}

.col-span-2 {
    grid-column: 1 / -1;
}

.two-col-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}


/* =============================================
   STEP: REGISTRATION
   ============================================= */
.step-space {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}


/* =============================================
   STEP: BILLING INFO
   ============================================= */
.badge-secure {
    display: flex;
    align-items: center;
    gap: 0.375rem;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.375rem 0.75rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
}

.badge-secure svg {
    width: 1rem;
    height: 1rem;
}

.billing-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

@media (max-width: 640px) {
    .badge-secure {
        display: none;
    }
}

.card-section {
    background: rgba(248, 250, 252, 0.5);
    border: 1px solid var(--border);
    border-radius: 1rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.card-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.icon-circle {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon-circle.indigo {
    background: var(--primary-light);
    color: var(--primary);
}

.icon-circle svg {
    width: 1.25rem;
    height: 1.25rem;
}

.card-section-label {
    font-weight: 500;
    color: var(--slate-900);
}

/* Billing address collapsible */
.billing-address-wrap {
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(.4, 0, .2, 1), opacity 0.3s ease, margin-top 0.3s ease;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.billing-address-wrap.visible {
    max-height: 200px;
    opacity: 1;
    margin-top: 1rem;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.checkbox-row input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--primary);
    cursor: pointer;
    border: 1px solid #cbd5e1;
    border-radius: 0.25rem;
}

.checkbox-label {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--slate-700);
    cursor: pointer;
    user-select: none;
}


/* =============================================
   STEP: PRODUCTS SELECTION
   ============================================= */
.products-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-top: 1.5rem;
}

@media (min-width: 640px) {
    .products-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.product-card {
    position: relative;
    border-radius: 1rem;
    border: 2px solid transparent;
    padding: 1.25rem;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    background: rgba(248, 250, 252, 0.5);
    transition: background 0.2s ease, border-color 0.2s ease,
        box-shadow 0.2s ease, transform 0.15s ease;
    overflow: hidden;
    user-select: none;
}

.product-card:hover {
    background: #fff;
    border-color: #e2e8f0;
    transform: translateY(-2px);
}

.product-card.selected {
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.07);
}

.product-card:active {
    transform: scale(0.98);
}

.product-card-header {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0;
}

.product-title {
    font-weight: 600;
    color: var(--slate-800);
}

.product-desc {
    font-size: 0.875rem;
    color: var(--slate-500);
    margin-top: 0.25rem;
    line-height: 1.55;
}

.product-check {
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s, border-color 0.2s;
    margin-top: 3px;
}

.product-check.checked {
    background: var(--primary);
    border-color: var(--primary);
}

.product-check svg {
    width: 0.75rem;
    height: 0.75rem;
    color: #fff;
    display: none;
}

.product-check.checked svg {
    display: block;
}

/* Product detail expand */
.product-detail-expand {
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(.4, 0, .2, 1), opacity 0.3s ease, margin-top 0.3s ease;
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.product-detail-expand.visible {
    max-height: 200px;
    opacity: 1;
    margin-top: 0.75rem;
}

.product-detail-inner {
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
}

.product-detail-expand .form-input {
    height: 2.5rem;
    font-size: 0.875rem;
    background: #f8fafc;
}

/* Product icon colors */
.bg-blue-100 {
    background: var(--primary-light);
}

.text-blue-600 {
    color: var(--primary);
}

.bg-indigo-100 {
    background: var(--primary-light);
}

.text-indigo-600 {
    color: var(--primary);
}

.bg-purple-100 {
    background: var(--primary-light);
}

.text-purple-600 {
    color: var(--primary);
}

.bg-emerald-100 {
    background: var(--primary-light);
}

.text-emerald-600 {
    color: var(--primary);
}

/* Product card border when selected */
.product-card.selected.border-blue-600 {
    border-color: var(--primary);
}

.product-card.selected.border-indigo-600,
.product-card.selected.border-purple-600,
.product-card.selected.border-emerald-600 {
    border-color: var(--primary);
}


/* =============================================
   NAVIGATION BUTTONS
   ============================================= */
.nav-buttons {
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    font-size: 1rem;
    height: 3rem;
    padding: 0.5rem 2rem;
    border-radius: var(--radius-xl);
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    text-decoration: none;
}

.btn:disabled {
    pointer-events: none;
    opacity: 0.5;
}

.btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-shadow);
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px var(--primary-shadow-hover);
    transform: translateY(-1px);
}

.btn-outline {
    border: 2px solid var(--border);
    background: rgba(255, 255, 255, 0.5);
    color: var(--slate-700);
}

.btn-outline:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.btn-success {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 14px var(--primary-shadow);
}

.btn-success:hover {
    background: var(--primary-hover);
    box-shadow: 0 6px 20px var(--primary-shadow-hover);
    transform: translateY(-1px);
}

.invisible {
    visibility: hidden;
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeSlideInToast {
    from {
        opacity: 0;
        transform: translate(-50%, 20px);
    }

    to {
        opacity: 1;
        transform: translate(-50%, 0);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}