/* ═══════════════════════════════════════════════════════════════════════════
   WhatsApp Bot Panel — CSS  (no external CDN, system fonts only)
═══════════════════════════════════════════════════════════════════════════ */

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.hidden {
    display: none !important;
}

:root {
    --g: #25d366;
    --g2: #128c7e;
    --g-glow: rgba(37, 211, 102, 0.4);
    --pur: #8b5cf6;
    --cyan: #06d6a0;
    --bg: #050810;
    --card: rgba(10, 15, 25, 0.85);
    --bord: rgba(255, 255, 255, 0.08);
    --text: #eef2ff;
    --mute: rgba(238, 242, 255, 0.45);
    --err: #ff5370;
    --warn: #ffd166;
    --r: 20px;
    --trans: 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ── System font stack (Inter on most modern OS, SF Pro on Apple, Segoe on Windows) */
body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Particle canvas ──────────────────────────────────────────────────────── */
#particles {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    opacity: 0.55;
}

/* ── 3D Floating shapes ───────────────────────────────────────────────────── */
.shapes {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
}

.shape-ring {
    width: 360px;
    height: 360px;
    top: -80px;
    right: -80px;
    border-radius: 50%;
    border: 1.5px solid rgba(37, 211, 102, 0.12);
    box-shadow: inset 0 0 60px rgba(37, 211, 102, 0.05), 0 0 60px rgba(37, 211, 102, 0.05);
    animation: ringRotate 18s linear infinite;
    transform-style: preserve-3d;
}

.shape-ring::after {
    content: '';
    position: absolute;
    inset: 20px;
    border-radius: 50%;
    border: 1px solid rgba(139, 92, 246, 0.1);
    animation: ringRotate 10s linear infinite reverse;
}

.shape-cube {
    width: 80px;
    height: 80px;
    bottom: 15%;
    left: 5%;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.08), rgba(6, 214, 160, 0.04));
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    animation: cubeFloat 6s ease-in-out infinite;
    transform: rotate(20deg);
}

.shape-dot-grid {
    width: 180px;
    height: 180px;
    top: 55%;
    left: -40px;
    background-image: radial-gradient(circle, rgba(37, 211, 102, 0.25) 1px, transparent 1px);
    background-size: 18px 18px;
    animation: dotDrift 14s ease-in-out infinite alternate;
}

@keyframes ringRotate {
    to {
        transform: rotate(360deg) rotateX(30deg);
    }
}

@keyframes cubeFloat {

    0%,
    100% {
        transform: rotate(20deg) translateY(0);
    }

    50% {
        transform: rotate(30deg) translateY(-20px);
    }
}

@keyframes dotDrift {
    from {
        transform: translateY(0);
    }

    to {
        transform: translateY(-30px);
    }
}

/* ── Page layout ─────────────────────────────────────────────────────────── */
.page {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 28px 16px 20px;
    gap: 16px;
}

/* ── Card shell (animated border) ────────────────────────────────────────── */
.card-shell {
    width: 100%;
    max-width: 500px;
    padding: 2px;
    border-radius: calc(var(--r) + 2px);
    background: linear-gradient(135deg,
            rgba(37, 211, 102, 0.5) 0%,
            rgba(139, 92, 246, 0.4) 40%,
            rgba(6, 214, 160, 0.3) 70%,
            rgba(37, 211, 102, 0.5) 100%);
    background-size: 300% 300%;
    animation: shellGlow 5s ease infinite;
    box-shadow: 0 0 60px rgba(37, 211, 102, 0.12), 0 40px 100px rgba(0, 0, 0, 0.6);
}

@keyframes shellGlow {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

/* ── Card ────────────────────────────────────────────────────────────────── */
.card {
    background: var(--card);
    backdrop-filter: blur(32px) saturate(1.5);
    -webkit-backdrop-filter: blur(32px) saturate(1.5);
    border-radius: var(--r);
    padding: 36px 32px;
    display: flex;
    flex-direction: column;
    gap: 26px;
    transition: transform 0.1s ease;
    transform-style: preserve-3d;
    will-change: transform;
}

/* ── Brand ───────────────────────────────────────────────────────────────── */
.brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
}

/* 3D Logo */
.brand-logo-3d {
    width: 52px;
    height: 52px;
    perspective: 300px;
    flex-shrink: 0;
}

.logo-face {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--g), var(--g2));
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    box-shadow:
        0 8px 24px var(--g-glow),
        0 2px 4px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    animation: logo3d 6s ease-in-out infinite;
    transform-style: preserve-3d;
    transform-origin: center center;
}

@keyframes logo3d {

    0%,
    100% {
        transform: rotateY(0deg) rotateX(0deg);
        box-shadow: 0 8px 24px var(--g-glow), 4px 4px 20px rgba(0, 0, 0, 0.5);
    }

    25% {
        transform: rotateY(15deg) rotateX(8deg);
        box-shadow: -4px 12px 32px var(--g-glow), 8px 4px 20px rgba(0, 0, 0, 0.3);
    }

    75% {
        transform: rotateY(-15deg) rotateX(-8deg);
        box-shadow: 4px 12px 32px var(--g-glow), -8px 4px 20px rgba(0, 0, 0, 0.3);
    }
}

.brand-text {
    flex: 1;
    min-width: 0;
}

.brand-name {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.brand-sub {
    display: block;
    font-size: 0.7rem;
    color: var(--mute);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 1px;
}

/* Server pill */
.server-pill {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 100px;
    font-size: 0.73rem;
    font-weight: 600;
    border: 1px solid var(--bord);
    background: rgba(255, 255, 255, 0.04);
    transition: all var(--trans);
    white-space: nowrap;
    margin-left: auto;
}

.server-pill.online {
    border-color: rgba(37, 211, 102, 0.4);
    background: rgba(37, 211, 102, 0.08);
    color: var(--g);
}

.server-pill.offline {
    border-color: rgba(255, 83, 112, 0.4);
    background: rgba(255, 83, 112, 0.08);
    color: var(--err);
}

.pill-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--mute);
    transition: background var(--trans);
}

.server-pill.online .pill-dot {
    background: var(--g);
    animation: blip 2s ease infinite;
}

.server-pill.offline .pill-dot {
    background: var(--err);
}

@keyframes blip {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.6);
    }

    50% {
        box-shadow: 0 0 0 5px rgba(37, 211, 102, 0);
    }
}

/* Divider */
.divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.07), transparent);
    margin: -8px 0;
}

/* ── Steps ───────────────────────────────────────────────────────────────── */
.step {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.step.hidden {
    display: none !important;
}

.step-hero {
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.hero-title {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--text) 60%, var(--g));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.step-title {
    font-size: 1.35rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: -0.4px;
}

.hero-sub {
    font-size: 0.87rem;
    color: var(--mute);
    line-height: 1.7;
}

.step-sub {
    font-size: 0.87rem;
    color: var(--mute);
    line-height: 1.7;
    text-align: center;
}

/* ── Field ───────────────────────────────────────────────────────────────── */
.field-group {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.field-label {
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--mute);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.field-row {
    display: flex;
    gap: 10px;
}

.field-wrap {
    flex: 1;
    min-width: 0;
    position: relative;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.04);
    border: 1.5px solid var(--bord);
    border-radius: 14px;
    padding: 0 14px;
    transition: border-color var(--trans), box-shadow var(--trans);
    overflow: hidden;
}

.field-wrap:focus-within {
    border-color: rgba(37, 211, 102, 0.6);
    box-shadow: 0 0 0 3px rgba(37, 211, 102, 0.12), 0 4px 20px rgba(37, 211, 102, 0.08);
}

.field-glow {
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(37, 211, 102, 0.04), transparent);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--trans);
}

.field-wrap:focus-within .field-glow {
    opacity: 1;
}

.field-prefix {
    color: var(--mute);
    font-weight: 700;
    font-size: 1rem;
    flex-shrink: 0;
    margin-right: 2px;
}

input[type=tel] {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text);
    font-family: inherit;
    font-size: 1rem;
    font-weight: 600;
    padding: 15px 0;
    letter-spacing: 0.5px;
}

input::placeholder {
    color: rgba(255, 255, 255, 0.18);
    font-weight: 400;
}

.field-hint {
    font-size: 0.74rem;
    color: var(--mute);
}

.field-hint code {
    background: rgba(255, 255, 255, 0.06);
    padding: 1px 6px;
    border-radius: 5px;
    font-size: 0.9em;
    color: var(--g);
}

/* ── Connect button ──────────────────────────────────────────────────────── */
.btn-connect {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 0 22px;
    height: 52px;
    background: linear-gradient(135deg, var(--g) 0%, var(--g2) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 0.92rem;
    font-weight: 700;
    border: none;
    border-radius: 14px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: 0.2px;
    box-shadow: 0 4px 20px var(--g-glow), inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transition: opacity var(--trans), transform var(--trans), box-shadow var(--trans);
    position: relative;
    overflow: hidden;
}

.btn-connect::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.4s ease;
}

.btn-connect:hover::before {
    transform: translateX(0);
}

.btn-connect:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px var(--g-glow);
}

.btn-connect:active:not(:disabled) {
    transform: scale(0.97);
}

.btn-connect:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--bord);
    color: var(--mute);
    padding: 10px 16px;
    border-radius: 10px;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--trans);
    align-self: flex-start;
}

.btn-ghost:hover {
    border-color: rgba(255, 255, 255, 0.2);
    color: var(--text);
    background: rgba(255, 255, 255, 0.04);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* ── Approved scene ──────────────────────────────────────────────────────── */
.approved-scene {
    position: relative;
    width: 90px;
    height: 90px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.approved-icon {
    font-size: 3rem;
    animation: popBounce 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.approved-ring {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 2px solid rgba(37, 211, 102, 0.4);
    animation: rippleOut 2s ease-out infinite;
}

.approved-ring::after {
    content: '';
    position: absolute;
    inset: -12px;
    border-radius: 50%;
    border: 1px solid rgba(37, 211, 102, 0.2);
    animation: rippleOut 2s ease-out 0.5s infinite;
}


/* ── Alert / loading ─────────────────────────────────────────────────────── */
.alert-error {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 10px;
    background: rgba(255, 83, 112, 0.1);
    border: 1px solid rgba(255, 83, 112, 0.3);
    border-radius: 10px;
    padding: 12px 14px;
    font-size: 0.84rem;
    color: #ff8fa3;
    animation: fadeUp 0.2s ease;
}

.alert-error.hidden {
    display: none !important;
}

.alert-error button {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    font-size: 1rem;
    flex-shrink: 0;
}

.loading-row {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--mute);
    font-size: 0.86rem;
}

.loading-row.hidden {
    display: none !important;
}

.spin-ring {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--g);
    border-radius: 50%;
    animation: spin 0.75s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Pending orbit scene ─────────────────────────────────────────────────── */
.pending-scene {
    position: relative;
    width: 120px;
    height: 120px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.orbit-ring {
    position: absolute;
    border-radius: 50%;
    border-style: solid;
    border-color: transparent;
    animation: orbitSpin 4s linear infinite;
}

.or-1 {
    inset: 0;
    border-width: 1.5px;
    border-top-color: rgba(251, 209, 102, 0.7);
    animation-duration: 3s;
}

.or-2 {
    inset: 14px;
    border-width: 1px;
    border-right-color: rgba(37, 211, 102, 0.5);
    animation-duration: 5s;
    animation-direction: reverse;
}

.or-3 {
    inset: 26px;
    border-width: 1px;
    border-bottom-color: rgba(139, 92, 246, 0.4);
    animation-duration: 7s;
}

@keyframes orbitSpin {
    to {
        transform: rotate(360deg);
    }
}

.orbit-dot {
    position: absolute;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    animation: orbitDot 3s linear infinite;
    transform-origin: 60px 60px;
}

.od-1 {
    background: var(--warn);
    top: calc(50% - 4px);
    left: -4px;
}

.od-2 {
    background: var(--g);
    top: -4px;
    left: calc(50% - 4px);
    animation-duration: 2s;
    animation-direction: reverse;
}

@keyframes orbitDot {
    to {
        transform: rotate(360deg);
    }
}

.hourglass {
    font-size: 2.5rem;
    animation: bob 2s ease-in-out infinite;
    z-index: 1;
}

@keyframes bob {

    0%,
    100% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(5deg);
    }
}

.scan-bar {
    width: 100%;
    height: 3px;
    background: rgba(251, 209, 102, 0.1);
    border-radius: 3px;
    overflow: hidden;
}

.scan-fill {
    height: 100%;
    width: 40%;
    background: linear-gradient(90deg, transparent, var(--warn), transparent);
    animation: scanMove 2s ease-in-out infinite;
}

@keyframes scanMove {
    0% {
        margin-left: -40%;
    }

    100% {
        margin-left: 110%;
    }
}

.scan-note {
    text-align: center;
    font-size: 0.74rem;
    color: rgba(251, 209, 102, 0.5);
}

/* ── Holographic code display ────────────────────────────────────────────── */
.code-holo {
    position: relative;
    background: rgba(37, 211, 102, 0.06);
    border: 1.5px solid rgba(37, 211, 102, 0.3);
    border-radius: 16px;
    padding: 28px 20px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    overflow: hidden;
    transition: all var(--trans);
}

.code-holo:hover {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.6);
    transform: scale(1.015);
    box-shadow: 0 0 40px rgba(37, 211, 102, 0.15);
}

.code-holo:active {
    transform: scale(0.98);
}

.code-holo.copied {
    background: rgba(37, 211, 102, 0.16);
    border-color: var(--g);
    box-shadow: 0 0 50px rgba(37, 211, 102, 0.25);
}

/* Scanline effect */
.holo-scanline {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(37, 211, 102, 0.015) 2px, rgba(37, 211, 102, 0.015) 4px);
    animation: scanlineScroll 4s linear infinite;
}

@keyframes scanlineScroll {
    from {
        background-position-y: 0;
    }

    to {
        background-position-y: 100px;
    }
}

.code-digits {
    display: flex;
    align-items: center;
    gap: 12px;
}

.code-seg {
    font-size: clamp(2rem, 8vw, 3rem);
    font-weight: 900;
    letter-spacing: 10px;
    color: var(--g);
    text-shadow: 0 0 20px rgba(37, 211, 102, 0.6), 0 0 60px rgba(37, 211, 102, 0.3);
    font-variant-numeric: tabular-nums;
    animation: glowPulse 3s ease-in-out infinite;
}

@keyframes glowPulse {

    0%,
    100% {
        text-shadow: 0 0 20px rgba(37, 211, 102, 0.6), 0 0 60px rgba(37, 211, 102, 0.3);
    }

    50% {
        text-shadow: 0 0 30px rgba(37, 211, 102, 0.9), 0 0 80px rgba(37, 211, 102, 0.5), 0 0 120px rgba(37, 211, 102, 0.2);
    }
}

.code-sep {
    font-size: 1.6rem;
    color: rgba(37, 211, 102, 0.3);
}

.copy-badge {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.73rem;
    color: rgba(37, 211, 102, 0.65);
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: color var(--trans);
}

.code-holo.copied .copy-badge {
    color: var(--g);
}

.how-list {
    list-style: none;
    counter-reset: steps;
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.how-list li {
    counter-increment: steps;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 0.86rem;
    color: var(--mute);
}

.how-list li::before {
    content: counter(steps);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.25);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 800;
    color: var(--g);
    margin-top: 1px;
}

.how-list li strong {
    color: var(--text);
}

.expire-note {
    text-align: center;
    font-size: 0.76rem;
    color: var(--mute);
}

.approved-title {
    color: var(--g);
}

/* ── Success state ───────────────────────────────────────────────────────── */
.success-scene {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.success-ripple {
    position: absolute;
    border-radius: 50%;
    border: 1.5px solid rgba(37, 211, 102, 0.4);
    animation: rippleOut 2.4s ease-out infinite;
}

.sr-1 {
    width: 100%;
    height: 100%;
    animation-delay: 0s;
}

.sr-2 {
    width: 100%;
    height: 100%;
    animation-delay: 0.6s;
}

.sr-3 {
    width: 100%;
    height: 100%;
    animation-delay: 1.2s;
}

@keyframes rippleOut {
    0% {
        transform: scale(0.6);
        opacity: 1;
    }

    100% {
        transform: scale(1.8);
        opacity: 0;
    }
}

.check-circle {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--g), var(--g2));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    z-index: 1;
    position: relative;
    box-shadow: 0 0 40px var(--g-glow), 0 8px 24px rgba(0, 0, 0, 0.4);
    animation: popBounce 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes popBounce {
    from {
        transform: scale(0) rotate(-180deg);
    }

    to {
        transform: scale(1) rotate(0deg);
    }
}

/* ── Feature grid ────────────────────────────────────────────────────────── */
.feat-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.feat-tile {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bord);
    border-radius: 12px;
    padding: 16px 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    transition: border-color var(--trans), background var(--trans), transform var(--trans);
    cursor: default;
}

.feat-tile:hover {
    border-color: rgba(37, 211, 102, 0.3);
    background: rgba(37, 211, 102, 0.05);
    transform: translateY(-2px);
}

.feat-tile span {
    font-size: 1.5rem;
}

.feat-tile small {
    color: var(--mute);
    font-size: 0.71rem;
    font-weight: 400;
}

.cmd-row {
    text-align: center;
    font-size: 0.83rem;
    color: var(--mute);
}

.cmd-row code {
    background: rgba(37, 211, 102, 0.12);
    color: var(--g);
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 0.9em;
}

/* ── Animations ──────────────────────────────────────────────────────────── */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

/* ── Page footer ─────────────────────────────────────────────────────────── */
.page-footer {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.15);
    text-align: center;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 520px) {
    .card {
        padding: 26px 18px;
        gap: 20px;
    }

    .brand {
        gap: 10px;
    }

    .brand-name {
        font-size: 1rem;
    }

    .server-pill {
        font-size: 0.68rem;
        padding: 4px 10px;
    }

    .qr-frame {
        width: 230px;
        height: 230px;
    }

    .qr-modal-content {
        padding: 24px 18px;
    }
}

@media (max-width: 400px) {
    .field-row {
        flex-direction: column;
    }

    .btn-connect {
        width: 100%;
        justify-content: center;
    }

    .code-seg {
        letter-spacing: 6px;
    }

    .btn-ghost {
        align-self: center;
    }

    .qr-frame {
        width: 210px;
        height: 210px;
    }
}

@media (hover: none) {

    /* Disable 3D tilt on touch devices */
    .card {
        transform: none !important;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   METHOD SELECTION CARDS (Dual option: Pairing Code or QR Code)
═══════════════════════════════════════════════════════════════════════════ */
.method-cards {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
}

.method-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--bord);
    color: var(--text);
    cursor: pointer;
    text-align: left;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.method-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, rgba(37, 211, 102, 0.08), transparent 70%);
    opacity: 0;
    transition: opacity var(--trans);
}

.method-card:hover {
    border-color: rgba(37, 211, 102, 0.4);
    background: rgba(37, 211, 102, 0.04);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

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

.method-card:active {
    transform: translateY(0);
}

.method-icon-wrap {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.35rem;
    flex-shrink: 0;
    position: relative;
}

.method-card-qr .method-icon-wrap {
    background: rgba(139, 92, 246, 0.12);
    border-color: rgba(139, 92, 246, 0.3);
}

.method-card-qr:hover {
    border-color: rgba(139, 92, 246, 0.45);
    background: rgba(139, 92, 246, 0.05);
}

.method-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.method-title {
    font-weight: 700;
    font-size: 0.98rem;
    color: #fff;
    letter-spacing: -0.2px;
}

.method-desc {
    font-size: 0.77rem;
    color: var(--mute);
    line-height: 1.35;
}

.method-arrow {
    font-size: 1.1rem;
    color: var(--mute);
    transition: transform var(--trans), color var(--trans);
}

.method-card:hover .method-arrow {
    transform: translateX(4px);
    color: var(--g);
}

.method-card-qr:hover .method-arrow {
    color: #a78bfa;
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIVE BADGE & PULSE
═══════════════════════════════════════════════════════════════════════════ */
.live-badge {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 3px 12px;
    border-radius: 999px;
    background: rgba(37, 211, 102, 0.1);
    border: 1px solid rgba(37, 211, 102, 0.3);
    font-size: 0.73rem;
    font-weight: 600;
    color: var(--g);
    margin-bottom: 8px;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}

.live-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--g);
    box-shadow: 0 0 10px var(--g);
    animation: livePulse 1.5s ease-in-out infinite alternate;
}

@keyframes livePulse {
    0% {
        transform: scale(0.85);
        opacity: 0.7;
    }

    100% {
        transform: scale(1.25);
        opacity: 1;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   CLEAN & CRISP HIGH-TECH QR SCANNER
═══════════════════════════════════════════════════════════════════════════ */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    width: 100%;
}

.qr-wrapper {
    position: relative;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qr-corner {
    position: absolute;
    width: 22px;
    height: 22px;
    border-color: var(--g);
    border-style: solid;
    pointer-events: none;
    z-index: 10;
}

.corner-tl {
    top: 0;
    left: 0;
    border-width: 3.5px 0 0 3.5px;
    border-top-left-radius: 8px;
}

.corner-tr {
    top: 0;
    right: 0;
    border-width: 3.5px 3.5px 0 0;
    border-top-right-radius: 8px;
}

.corner-bl {
    bottom: 0;
    left: 0;
    border-width: 0 0 3.5px 3.5px;
    border-bottom-left-radius: 8px;
}

.corner-br {
    bottom: 0;
    right: 0;
    border-width: 0 3.5px 3.5px 0;
    border-bottom-right-radius: 8px;
}

.qr-card {
    position: relative;
    width: 260px;
    height: 260px;
    background: #ffffff;
    border-radius: 16px;
    padding: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.65), 0 0 25px rgba(37, 211, 102, 0.12);
    overflow: hidden;
}

.qr-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    height: 100%;
    color: #475569;
    font-size: 0.82rem;
    font-weight: 600;
}

.qr-placeholder .spin-ring {
    border-color: rgba(37, 211, 102, 0.25);
    border-top-color: var(--g2);
    width: 32px;
    height: 32px;
}

.qr-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    display: block;
    border-radius: 6px;
    animation: qrFadeIn 0.3s ease-out;
}

@keyframes qrFadeIn {
    from {
        opacity: 0;
        transform: scale(0.97);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Fullscreen Toggle Button */
.btn-fullscreen-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--bord);
    color: var(--mute);
    font-size: 0.78rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--trans);
}

.btn-fullscreen-toggle:hover {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.3);
    color: var(--text);
    transform: translateY(-1px);
}

.btn-fullscreen-toggle svg {
    color: var(--g);
}

.qr-status-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 0.78rem;
    color: var(--mute);
    margin-top: -2px;
}

.qr-pulse-ring {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--cyan);
    box-shadow: 0 0 8px var(--cyan);
    animation: livePulse 1.8s ease-in-out infinite alternate;
}

.qr-actions,
.code-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    width: 100%;
    margin-top: 4px;
}

/* ═══════════════════════════════════════════════════════════════════════════
   FULLSCREEN QR MODAL (Big Screen View)
═══════════════════════════════════════════════════════════════════════════ */
.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.qr-modal.hidden {
    display: none !important;
}

.qr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.qr-modal-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid rgba(37, 211, 102, 0.3);
    border-radius: 28px;
    padding: 28px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 60px rgba(37, 211, 102, 0.15);
    max-width: 92vw;
    max-height: 92vh;
}

.qr-modal-close {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid var(--bord);
    color: var(--text);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--trans);
}

.qr-modal-close:hover {
    background: rgba(255, 83, 112, 0.2);
    border-color: var(--err);
    color: var(--err);
    transform: rotate(90deg);
}

.qr-modal-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.92rem;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.2px;
}

.qr-modal-wrapper {
    position: relative;
    padding: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.qr-modal-card {
    width: min(75vw, 360px);
    height: min(75vw, 360px);
    padding: 14px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-modal-image {
    width: 100%;
    height: 100%;
    aspect-ratio: 1 / 1;
    object-fit: contain;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    display: block;
}

.qr-modal-hint {
    font-size: 0.78rem;
    color: var(--mute);
    text-align: center;
}

.qr-modal-hint strong {
    color: var(--g);
    background: rgba(37, 211, 102, 0.12);
    padding: 2px 6px;
    border-radius: 4px;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ── Dual Mode Enhancements (Browser vs Android + QR polish) ───────────── */
.hidden {
    display: none !important;
}

.method-title-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.mode-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 999px;
    letter-spacing: 0.2px;
}

.mode-pill-safe {
    background: rgba(37, 211, 102, 0.14);
    border: 1px solid rgba(37, 211, 102, 0.35);
    color: var(--g);
}

.mode-pill-vo {
    background: rgba(56, 189, 248, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.38);
    color: #38bdf8;
}

.method-card-android .method-icon-wrap {
    background: rgba(56, 189, 248, 0.12);
    border-color: rgba(56, 189, 248, 0.32);
}

.method-card-android:hover {
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.06);
}

.method-card-android:hover .method-arrow {
    color: #38bdf8;
}

.mode-pill-biz {
    background: rgba(168, 85, 247, 0.16);
    border: 1px solid rgba(168, 85, 247, 0.42);
    color: #c084fc;
}

.method-card-business .method-icon-wrap {
    background: rgba(168, 85, 247, 0.14);
    border-color: rgba(168, 85, 247, 0.35);
}

.method-card-business:hover {
    border-color: rgba(168, 85, 247, 0.5);
    background: rgba(168, 85, 247, 0.07);
}

.method-card-business:hover .method-arrow {
    color: #c084fc;
}

.active-mode-wrap {
    display: flex;
    justify-content: center;
}

.qr-expired-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    border-radius: 12px;
    background: rgba(255, 193, 7, 0.1);
    border: 1px solid rgba(255, 193, 7, 0.35);
    color: #fcd34d;
    font-size: 0.8rem;
    text-align: center;
    width: 100%;
    max-width: 280px;
}

.btn-refresh-qr {
    padding: 8px 16px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, var(--g) 0%, var(--g2) 100%);
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 4px 14px var(--g-glow);
    transition: transform var(--trans), opacity var(--trans);
}

.btn-refresh-qr:hover {
    transform: translateY(-1px);
}

.profile-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.profile-bar-label {
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--mute);
}

.profile-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px;
}

.profile-pill {
    padding: 6px 11px;
    border-radius: 999px;
    border: 1px solid var(--bord);
    background: rgba(255, 255, 255, 0.04);
    color: var(--mute);
    font-family: inherit;
    font-size: 0.72rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--trans);
}

.profile-pill:hover {
    color: var(--text);
    border-color: rgba(56, 189, 248, 0.45);
    background: rgba(56, 189, 248, 0.08);
}

.profile-pill.active {
    color: #38bdf8;
    border-color: rgba(56, 189, 248, 0.65);
    background: rgba(56, 189, 248, 0.16);
    box-shadow: 0 0 12px rgba(56, 189, 248, 0.16);
}

.qr-rejected-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 14px;
    background: rgba(255, 83, 112, 0.1);
    border: 1px solid rgba(255, 83, 112, 0.35);
    color: #fda4af;
    font-size: 0.79rem;
    line-height: 1.5;
    text-align: center;
}
