/* ═══════════════════════════════════════════════════════
   qr-aurora.css — shared base styles for all QR pages
   Aurora Gradient + Mesh + Abstract Wave + Soft Glow
   ═══════════════════════════════════════════════════════ */

/* Loaded once here so every page that links this stylesheet
   (home, qr/welcome, qr/setup-links, login, analytics, leads)
   gets the same typeface without editing each <head>. */
/* Inter, self-hosted (SIL Open Font License). Served from our own server so the page does not wait on
   fonts.googleapis.com / fonts.gstatic.com. Two files: "latin" covers English text, "latin-ext" covers the
   rupee sign and accented letters. A browser downloads a file only when the page uses one of its characters.
   Keep this block identical in css/qr-aurora.css, css/app.css and css/inter-fonts.css. */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter/inter-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
    src: url('../fonts/inter/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ── CSS Variables — Soft Modern SaaS (orange) ── */
:root {
    --clr-primary:       #F97316;
    --clr-primary-dark:  #EA580C;
    --clr-primary-mid:   #FB923C;
    --clr-primary-light: #FED7AA;
    --clr-bg:            #FFFFFF;
    --clr-bg-soft:       #FFF7ED;
    --clr-bg-section:    #FFF4E6;
    --clr-text:          #111827;
    --clr-text-sub:      #6B7280;
    --clr-text-muted:    #9CA3AF;
    --clr-input-bg:      #F9FAFB;
    --clr-input-border:  #E5E7EB;
    --clr-link:          #2563EB;
    --clr-danger:        #EF4444;
    --clr-danger-bg:     rgba(239, 68, 68, 0.08);
    --clr-divider:       #E5E7EB;
    --clr-border:        #F3F4F6;
    --clr-success:       #22C55E;
    --clr-success-bg:    #ECFDF5;
    --clr-warning:       #F59E0B;
    --clr-shadow:        rgba(15, 23, 42, 0.08);
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* reset.css loaded before this file handles box-model, normalize, and font-smoothing */
body {
    font-family: var(--font-sans);
}

/* ════════════════════════════════════════
   WARM LIGHT BACKGROUND (premium SaaS)
   ════════════════════════════════════════ */
.aurora-wrap {
    min-height: 100vh;
    position: relative;
    overflow: hidden;
    background: var(--clr-bg-soft);
}

/* Soft blurred orange blobs, top-left + bottom-right */
.aurora-wrap::before {
    content: '';
    position: absolute;
    top: -120px; left: -100px;
    width: 340px; height: 340px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(249,115,22,0.16) 0%, transparent 70%);
}
.aurora-wrap::after {
    content: '';
    position: absolute;
    bottom: -140px; right: -110px;
    width: 380px; height: 380px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    background: radial-gradient(circle, rgba(249,115,22,0.13) 0%, transparent 70%);
}

/* Dotted-grid + QR-module decorative motifs (absolute, not fixed — so they
   scroll with the page instead of staying pinned when content is taller
   than the viewport, avoiding the mismatch that reads as a scroll glitch). */
.aurora-dots {
    position: absolute;
    width: 110px; height: 110px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.6;
    background-image: radial-gradient(circle, var(--clr-primary-light) 1.5px, transparent 1.5px);
    background-size: 14px 14px;
}
.aurora-dots.tl { top: 32px; left: 20px; }
.aurora-dots.br { bottom: 40px; right: 20px; }

.aurora-qr-pattern {
    position: absolute;
    width: 90px; height: 90px;
    opacity: 0.35;
    pointer-events: none;
    z-index: 0;
    background-image:
        repeating-linear-gradient(0deg, var(--clr-primary-light) 0 2px, transparent 2px 7px),
        repeating-linear-gradient(90deg, var(--clr-primary-light) 0 2px, transparent 2px 7px);
    -webkit-mask-image: radial-gradient(circle, #000 40%, transparent 75%);
    mask-image: radial-gradient(circle, #000 40%, transparent 75%);
}

.aurora-sparkle {
    position: absolute;
    color: var(--clr-primary-mid);
    opacity: 0.8;
    pointer-events: none;
    z-index: 0;
}

/* ════════════════════════════════
   LAYOUT PRIMITIVES
   ════════════════════════════════ */

/* Outer centering wrapper — sits above fixed pseudo-elements */
.body-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-start;
}

/* Phone-width page column */
.page {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 480px;
    min-height: 100vh;
    background: transparent;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Top spacer — holds the back button; the floating avatar itself lives
   inside .white-body (absolutely positioned to poke above its top edge). */
.green-top {
    background: transparent;
    padding: 60px 24px 0;
    position: relative;
    z-index: 2;
    flex-shrink: 0;
}

/* Back/navigation button — light theme */
.back-btn {
    position: absolute;
    top: 18px;
    left: 18px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--clr-text-sub);
    background: #fff;
    font-size: 40px;
    font-weight: 300;
    text-decoration: none;
    border-radius: 50%;
    line-height: 1;
    box-shadow: 0 2px 10px rgba(15,23,42,0.08);
    transition: background 0.2s, color 0.2s;
}
.back-btn:hover { background: var(--clr-bg-section); color: var(--clr-primary-dark); }

/* ════════════════════════════════
   Plain white card + floating avatar
   (avatar is the card's first child, absolutely positioned so it pokes
   above the card's own top edge — simpler and more robust than a
   negative-margin trick, and doesn't collapse sibling flow spacing)
   ════════════════════════════════ */
.white-body {
    background: #fff;
    border-radius: 28px;
    margin: 0 20px 32px;
    position: relative;
    z-index: 2;
    flex: 1;
    padding: 60px 26px 36px;
    box-shadow: 0 4px 28px rgba(15,23,42,0.06);
}

/* Base icon-circle — a normal in-flow, centered circle. Usable standalone
   (e.g. a page header avatar) or, when it's the direct first child of
   .white-body, pinned absolute so it pokes above the card's top edge. */
.icon-circle {
    width: 96px;
    height: 96px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(249,115,22,0.20), 0 2px 8px rgba(15,23,42,0.06);
    margin: 0 auto;
}
.icon-circle svg { color: var(--clr-primary); }

.white-body > .icon-circle {
    position: absolute;
    top: -48px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 3;
    margin: 0;
}

/* ════════════════════════════════
   SHARED COMPONENTS
   ════════════════════════════════ */

/* Alert boxes */
.errors-box {
    width: 100%;
    background: var(--clr-danger-bg);
    border: 1px solid rgba(239,68,68,0.25);
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 16px;
    color: var(--clr-danger);
    font-size: 13px;
}
.errors-box div + div { margin-top: 4px; }

.status-box {
    width: 100%;
    background: var(--clr-success-bg);
    border: 1px solid rgba(34,197,94,0.25);
    border-radius: 10px;
    padding: 11px 14px;
    margin-bottom: 16px;
    color: #15803D;
    font-size: 13px;
}

/* Primary orange button (works on <button> and <a>) */
.qr-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 58px;
    padding: 0 16px;
    background: linear-gradient(135deg, #FF7A18, var(--clr-primary));
    color: #fff;
    border: none;
    border-radius: 16px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.2px;
    text-align: center;
    text-decoration: none;
    box-shadow: 0 12px 26px rgba(249,115,22,0.28);
    transition: filter 0.2s, transform 0.15s;
    font-family: inherit;
}
.qr-btn:hover  { filter: brightness(0.95); transform: translateY(-1px); }
.qr-btn:active { transform: translateY(0); }
.qr-btn:disabled { background: #FDBA74; box-shadow: none; cursor: not-allowed; transform: none; }

/* Shared mobile number input group */
.input-group {
    display: flex;
    align-items: center;
    width: 100%;
    background: #fff;
    border: 1.5px solid var(--clr-input-border);
    border-radius: 16px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: border-color 0.2s;
}
.input-group:focus-within { border-color: var(--clr-primary); }

.input-group .prefix {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 0 14px;
    height: 58px;
    background: var(--clr-bg-section);
    border-right: 1.5px solid var(--clr-input-border);
    color: var(--clr-text);
    font-size: 15px;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
    -webkit-user-select: none;
    user-select: none;
}

.input-group input[type="tel"] {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--clr-text);
    font-size: 15.5px;
    padding: 0 16px;
    height: 58px;
    font-family: inherit;
}
.input-group input[type="tel"]::placeholder { color: var(--clr-text-muted); }

/* Page heading & subtitle (dome pages) */
.page-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--clr-text);
    text-align: center;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}
.page-subtitle {
    font-size: 14px;
    color: var(--clr-text-sub);
    text-align: center;
    line-height: 1.65;
    margin-bottom: 30px;
    max-width: 260px;
}
