/* =====================================================
   RAMYAA NETWORK — Premium Onboarding UI
   ===================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

/* ── Design Tokens ── */
:root {
    --primary:       #1A4FD6;
    --primary-dark:  #1039A8;
    --primary-light: #4A7AFF;
    --orange:        #F59A1B;
    --orange-dark:   #D4820F;
    --success:       #22C55E;
    --danger:        #EF4444;

    --surface:       rgba(255, 255, 255, 0.92);
    --surface-hover: rgba(255, 255, 255, 0.96);
    --border:        rgba(26, 79, 214, 0.12);
    --text-primary:  #0F172A;
    --text-secondary:#64748B;
    --text-muted:    #94A3B8;

    --radius-sm: 10px;
    --radius:    16px;
    --radius-lg: 24px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
    --shadow:    0 4px 16px rgba(26,79,214,0.10), 0 1px 4px rgba(0,0,0,0.06);
    --shadow-lg: 0 20px 60px rgba(26,79,214,0.15), 0 4px 16px rgba(0,0,0,0.06);
}

/* ── Base ── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-primary);
    min-height: 100vh;
    background:
        radial-gradient(ellipse 900px 600px at 10% 0%, rgba(26,79,214,0.18) 0%, transparent 60%),
        radial-gradient(ellipse 700px 500px at 90% 100%, rgba(245,154,27,0.12) 0%, transparent 60%),
        linear-gradient(160deg, #0B1437 0%, #0F1E55 40%, #1A1040 100%);
    background-attachment: fixed;
}

/* ── Scrollbar ── */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(26,79,214,0.3); border-radius: 99px; }

/* ── Header ── */
.app-header {
    background: rgba(11, 20, 55, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 14px 0;
}

.brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.brand-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 17px;
    box-shadow: 0 4px 14px rgba(26,79,214,0.45);
}

.brand-name {
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.3px;
}

.brand-tagline {
    font-size: 0.68rem;
    color: rgba(255,255,255,0.45);
    font-weight: 400;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    display: block;
    line-height: 1;
    margin-top: 1px;
}

/* ── Main Canvas ── */
.app-main {
    padding: 36px 16px 80px;
    min-height: calc(100vh - 70px);
}

/* ── Glass Card ── */
.app-container {
    background: var(--surface);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: var(--radius-lg);
    border: 1px solid rgba(255,255,255,0.55);
    box-shadow: var(--shadow-lg);
    padding: 36px 32px;
    min-height: 70vh;
    animation: slideUp 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes slideUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ── Typography ── */
h1, h2, h3, h4, h5, h6 { font-weight: 700; color: var(--text-primary); letter-spacing: -0.3px; }

.page-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.page-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

/* ── Progress Tracker ── */
.progress-tracker {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 32px;
    position: relative;
    padding: 0 4px;
}

.progress-track-bg {
    position: absolute;
    top: 50%;
    left: 16px;
    right: 16px;
    height: 2px;
    background: #E2E8F0;
    transform: translateY(-50%);
    z-index: 0;
    border-radius: 99px;
}

.progress-track-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 99px;
    transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

.step-circle {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
    z-index: 2;
    position: relative;
    transition: all 0.3s ease;
    flex-shrink: 0;
    border: 2.5px solid #E2E8F0;
    background: #fff;
    color: var(--text-muted);
}

.step-circle.completed {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 0 0 4px rgba(26,79,214,0.15);
}

.step-circle.active {
    background: #fff;
    border-color: var(--orange);
    color: var(--orange);
    box-shadow: 0 0 0 5px rgba(245,154,27,0.18), 0 2px 8px rgba(245,154,27,0.25);
    transform: scale(1.12);
}

/* ── Step Label ── */
.step-label-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.step-label-text {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.step-label-text.active { color: var(--orange); }
.step-label-text.completed { color: var(--primary); }

/* ── Section Label ── */
.section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* ── Cards inside container ── */
.form-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}

/* ── Type Selection Cards ── */
.type-card {
    background: #fff;
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 28px 24px;
    text-decoration: none !important;
    display: block;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
}

.type-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(26,79,214,0.04), rgba(74,122,255,0.02));
    opacity: 0;
    transition: opacity 0.25s ease;
}

.type-card:hover {
    border-color: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 12px 32px rgba(26,79,214,0.14);
}

.type-card:hover::before { opacity: 1; }

.type-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(26,79,214,0.1), rgba(74,122,255,0.08));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    color: var(--primary);
    margin-bottom: 14px;
    transition: all 0.25s ease;
}

.type-card:hover .type-card-icon {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 6px 20px rgba(26,79,214,0.35);
}

.type-card-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.type-card-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.type-card-arrow {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%) translateX(-4px);
    opacity: 0;
    color: var(--primary);
    font-size: 1.2rem;
    transition: all 0.25s ease;
}

.type-card:hover .type-card-arrow {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}

/* ── Upload Box ── */
.upload-box {
    border: 2px dashed #CBD5E1;
    border-radius: var(--radius);
    padding: 32px 24px;
    text-align: center;
    background: #F8FAFF;
    transition: all 0.2s ease;
    cursor: pointer;
}

.upload-box:hover {
    border-color: var(--primary);
    background: rgba(26,79,214,0.04);
}

.upload-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, rgba(26,79,214,0.1), rgba(74,122,255,0.06));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin: 0 auto 14px;
}

/* ── Camera View ── */
.camera-box {
    background: linear-gradient(160deg, #0F1833 0%, #1A2455 100%);
    border-radius: var(--radius);
    height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    margin-bottom: 16px;
    border: 1px solid rgba(255,255,255,0.08);
}

.camera-face-guide {
    width: 180px;
    height: 230px;
    border: 2.5px dashed rgba(255,255,255,0.3);
    border-radius: 50%;
    position: absolute;
    animation: pulseGuide 2.5s ease-in-out infinite;
}

.camera-corners {
    position: absolute;
    width: 200px;
    height: 250px;
}

.camera-corners::before,
.camera-corners::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--orange);
    border-style: solid;
}

.camera-corners::before { top: 0; left: 0; border-width: 3px 0 0 3px; border-radius: 4px 0 0 0; }
.camera-corners::after  { bottom: 0; right: 0; border-width: 0 3px 3px 0; border-radius: 0 0 4px 0; }

.camera-label {
    position: absolute;
    bottom: 0;
    left: 0; right: 0;
    padding: 14px;
    background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, transparent 100%);
    color: rgba(255,255,255,0.8);
    font-size: 0.78rem;
    font-weight: 500;
    text-align: center;
}

@keyframes pulseGuide {
    0%, 100% { opacity: 0.4; transform: scale(1); }
    50%       { opacity: 0.8; transform: scale(1.02); }
}

/* ── Form Controls ── */
.form-floating > .form-control,
.form-floating > .form-select {
    border-radius: var(--radius-sm);
    border: 1.5px solid #E2E8F0;
    font-size: 0.9rem;
    font-family: 'Inter', sans-serif;
    background: #FAFBFF;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    color: var(--text-primary);
}

.form-floating > .form-control:focus,
.form-floating > .form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26,79,214,0.1);
    background: #fff;
    outline: none;
}

.form-floating > label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.form-check-input:checked {
    background-color: var(--primary);
    border-color: var(--primary);
}

/* ── Buttons ── */
.btn-primary-brand {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    color: #fff;
    font-weight: 600;
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
    padding: 14px 20px;
    border-radius: 12px;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(26,79,214,0.35);
    letter-spacing: -0.1px;
}

.btn-primary-brand:hover:not(:disabled) {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(26,79,214,0.4);
    color: #fff;
}

.btn-primary-brand:active:not(:disabled) {
    transform: translateY(0px);
    box-shadow: 0 4px 12px rgba(26,79,214,0.3);
}

.btn-primary-brand:disabled {
    background: #CBD5E1;
    box-shadow: none;
    cursor: not-allowed;
    color: #94A3B8;
}

.btn-outline-brand {
    background: transparent;
    border: 1.5px solid #E2E8F0;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    padding: 12px 18px;
    border-radius: 12px;
    transition: all 0.2s ease;
}

.btn-outline-brand:hover {
    background: #F8FAFF;
    border-color: var(--primary);
    color: var(--primary);
}

/* ── Badges ── */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 99px;
    font-size: 0.73rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.status-badge.pending  { background: #FFF7ED; color: #C2410C; }
.status-badge.review   { background: #EFF6FF; color: #1D4ED8; }
.status-badge.success  { background: #F0FDF4; color: #15803D; }

/* ── Radio Selection Cards ── */
.option-card {
    border: 2px solid #E2E8F0;
    border-radius: var(--radius);
    padding: 16px 18px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: #fff;
    margin-bottom: 10px;
}

.option-card:hover { border-color: #A5B4FC; background: #F8FAFF; }

.option-card input[type="radio"]:checked ~ .option-content-wrapper,
.option-card:has(input[type="radio"]:checked) {
    /* parent selector for modern browsers */
}

.option-card.selected {
    border-color: var(--primary);
    background: #EFF6FF;
    box-shadow: 0 0 0 3px rgba(26,79,214,0.08);
}

/* ── Consent Box ── */
.consent-scroll {
    background: #F8FAFF;
    border: 1px solid #E2E8F0;
    border-radius: var(--radius-sm);
    padding: 16px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.65;
    margin-bottom: 16px;
}

/* ── Review Row ── */
.review-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #F1F5F9;
}

.review-row:last-child { border-bottom: none; }

.review-label { font-size: 0.8rem; color: var(--text-secondary); }

.review-value {
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--text-primary);
    text-align: right;
    max-width: 55%;
}

/* ── Info Banners ── */
.info-banner {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 0.82rem;
}

.info-banner.demo {
    background: linear-gradient(135deg, #FFFBEB, #FEF3C7);
    border: 1px solid #FDE68A;
    color: #92400E;
}

.info-banner.manual {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    border: 1px solid #BFDBFE;
    color: #1D4ED8;
}

.info-banner-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
    margin-top: 1px;
}

/* ── Success Screen ── */
.success-icon-wrapper {
    width: 90px;
    height: 90px;
    background: linear-gradient(135deg, #DCFCE7, #BBF7D0);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 2.5rem;
    color: #15803D;
    animation: popIn 0.5s cubic-bezier(0.34, 1.56, 0.64, 1) both;
    box-shadow: 0 0 0 12px rgba(34,197,94,0.1);
}

@keyframes popIn {
    from { opacity: 0; transform: scale(0.5); }
    to   { opacity: 1; transform: scale(1); }
}

.app-id-box {
    background: linear-gradient(135deg, #EFF6FF, #DBEAFE);
    border: 1px solid #BFDBFE;
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    margin-bottom: 24px;
}

.app-id-label {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #1D4ED8;
    margin-bottom: 6px;
}

.app-id-value {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--primary);
    letter-spacing: 1px;
}

/* ── Tracking ── */
.track-input-wrap {
    position: relative;
}

.track-input-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 1rem;
    z-index: 3;
    pointer-events: none;
}

.track-input-wrap .form-control {
    padding-left: 44px;
    border-radius: 12px;
    border: 1.5px solid #E2E8F0;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    height: 52px;
    font-weight: 500;
}

/* ── Footer strip ── */
.app-footer {
    text-align: center;
    padding: 20px;
    font-size: 0.73rem;
    color: rgba(255,255,255,0.3);
    letter-spacing: 0.3px;
}

/* ── Utilities ── */
.text-primary-brand  { color: var(--primary)  !important; }
.text-active-brand   { color: var(--orange)   !important; }
.bg-primary-brand    { background: var(--primary) !important; }

.hover-elevate { transition: transform 0.2s ease, box-shadow 0.2s ease; }
.hover-elevate:hover { transform: translateY(-3px); }

.divider-text {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: 0.78rem;
    margin: 16px 0;
}

.divider-text::before,
.divider-text::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #E2E8F0;
}

/* ── Mobile Responsiveness ── */
@media (max-width: 576px) {
    .app-container {
        padding: 24px 16px;
    }
    .app-main {
        padding: 24px 12px 60px;
    }
}
