/* ============================================
   BRAND COLOR THEMING
   
   РњРµРЅРµРґР¶РµСЂ Р·Р°РґР°С‘С‚ РѕРґРёРЅ HEX-С†РІРµС‚ Р±СЂРµРЅРґР°.
   РЎРµСЂРІРµСЂ РёРЅР¶РµРєС‚РёС‚ РµРіРѕ РІ :root С‡РµСЂРµР· inline style
   РЅР° <html> РёР»Рё С‡РµСЂРµР· PHP: 
     style="--brand: #A855F7;"
   
   Р’СЃРµ РїСЂРѕРёР·РІРѕРґРЅС‹Рµ СЂР°СЃСЃС‡РёС‚С‹РІР°СЋС‚СЃСЏ РѕС‚ --brand.
   РџРѕ СѓРјРѕР»С‡Р°РЅРёСЋ вЂ” С„РёРѕР»РµС‚РѕРІС‹Р№ #A855F7.
   ============================================ */
:root {
    /* === BRAND вЂ” РµРґРёРЅСЃС‚РІРµРЅРЅР°СЏ РЅР°СЃС‚СЂРѕР№РєР° === */
    --brand: #A855F7;

    /* РџСЂРѕРёР·РІРѕРґРЅС‹Рµ РѕС‚ brand (CSS) */
    --brand-bright: color-mix(in srgb, var(--brand) 70%, white);
    --brand-dim: color-mix(in srgb, var(--brand) 70%, black);
    --brand-glow: color-mix(in srgb, var(--brand) 25%, transparent);
    --brand-subtle: color-mix(in srgb, var(--brand) 8%, transparent);
    --brand-border: color-mix(in srgb, var(--brand) 20%, transparent);

    /* === PALETTE вЂ” РЅРµРёР·РјРµРЅРЅР°СЏ Р±Р°Р·Р° === */
    --bg-primary: #09090B;
    --bg-card: #18181B;
    --bg-card-hover: #1F1F23;
    --bg-elevated: #27272A;
    --bg-input: #1C1C1F;

    --text-primary: #FAFAFA;
    --text-secondary: #A1A1AA;
    --text-tertiary: #71717A;

    --success: #34D399;
    --success-bg: rgba(52, 211, 153, 0.1);
    --warning: #FBBF24;
    --warning-bg: rgba(251, 191, 36, 0.1);
    --danger: #F87171;
    --danger-bg: rgba(248, 113, 113, 0.1);

    --border: rgba(255, 255, 255, 0.06);

    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 22px;
    --radius-xl: 28px;
    --radius-full: 9999px;

    --shadow-glow: 0 0 40px var(--brand-glow);
    --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --transition: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --spring: 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   ICONS вЂ” inline SVG line style
   ============================================ */
.icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.icon svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.icon-sm svg { width: 18px; height: 18px; }
.icon-lg svg { width: 28px; height: 28px; }
.icon-xl svg { width: 32px; height: 32px; }

/* ============================================
   RESET & BASE
   ============================================ */
*, *::before, *::after {
    margin: 0; padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font);
    background: var(--bg-primary);
    color: var(--text-primary);
    min-height: 100dvh;
    overflow-x: hidden;
}

.app-shell {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100dvh;
    position: relative;
    /* Чтобы контент не скрывался под фиксированной нижней навигацией */
    padding-bottom: max(100px, env(safe-area-inset-bottom, 0px) + 80px);
}

/* ============================================
   SCREENS
   ============================================ */
.screen {
    display: none;
    min-height: 100dvh;
    padding-bottom: 100px;
    animation: screenIn 0.35s ease-out;
}
.screen.active { display: block; }

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

/* ============================================
   HEADER
   ============================================ */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(9, 9, 11, 0.72);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-bottom: 1px solid var(--border);
}

.header-back {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--brand-bright);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: opacity var(--transition);
}
.header-back:active { opacity: 0.6; }

.header-title {
    font-size: 0.95rem;
    font-weight: 700;
    letter-spacing: -0.01em;
}

.header-avatar {
    width: 34px;
    height: 34px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--brand-dim), var(--brand-bright));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 700;
    color: white;
    cursor: pointer;
    transition: transform var(--transition);
}
.header-avatar:active { transform: scale(0.9); }

.balance-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: var(--brand-subtle);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-bright);
    cursor: pointer;
    transition: all var(--transition);
}
.balance-chip:active {
    transform: scale(0.95);
    background: color-mix(in srgb, var(--brand) 15%, transparent);
}

.header-balance-inline {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--brand-bright);
}

/* ============================================
   HERO
   ============================================ */
.hero {
    padding: 28px 20px 24px;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
    pointer-events: none;
    opacity: 0.5;
}

.hero-event-label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    background: var(--brand-subtle);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-full);
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--brand-bright);
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 14px;
}

.hero-event-label .dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.hero h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin-bottom: 8px;
}

.hero-date {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ============================================
   BALANCE CARD
   ============================================ */
.balance-card {
    margin: 0 20px 28px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    position: relative;
    overflow: hidden;
}

.balance-card::after {
    content: '';
    position: absolute;
    top: -30px; right: -30px;
    width: 120px; height: 120px;
    background: radial-gradient(circle, var(--brand-glow) 0%, transparent 70%);
    pointer-events: none;
}

.balance-label {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 8px;
}

.balance-value {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    line-height: 1;
    margin-bottom: 4px;
    background: linear-gradient(135deg, var(--text-primary) 30%, var(--brand-bright));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.balance-subtitle {
    font-size: 0.8rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.actions {
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 20px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    text-decoration: none;
    color: var(--text-primary);
    transition: all var(--transition);
    cursor: pointer;
}

.action-btn:active {
    transform: scale(0.98);
    background: var(--bg-card-hover);
}

.action-btn .icon-wrap {
    width: 50px; height: 50px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
}

.action-btn .icon-wrap.accent-bg {
    background: var(--brand-subtle);
    border: 1px solid var(--brand-border);
}
.action-btn .icon-wrap.success-bg {
    background: var(--success-bg);
    border: 1px solid rgba(52, 211, 153, 0.15);
}
.action-btn .icon-wrap.warning-bg {
    background: var(--warning-bg);
    border: 1px solid rgba(251, 191, 36, 0.15);
}

.action-btn .action-text { flex: 1; }
.action-btn .action-title {
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 2px;
}
.action-btn .action-desc {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

.action-btn .arrow {
    color: var(--text-tertiary);
}

/* ============================================
   SCAN AREA
   ============================================ */
.scan-area {
    padding: 40px 20px;
    text-align: center;
}

.scan-circle {
    width: 200px; height: 200px;
    border-radius: 50%;
    border: 2px dashed var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 28px;
    color: var(--text-secondary);
    animation: scanPulse 3s infinite;
}

@keyframes scanPulse {
    0%, 100% { border-color: var(--brand-border); }
    50% { border-color: var(--brand); box-shadow: 0 0 30px var(--brand-glow); }
}

.scan-circle .icon svg { width: 56px; height: 56px; stroke-width: 1.2; }

.scan-title {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}

.scan-desc {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    font-weight: 500;
    line-height: 1.5;
    margin-bottom: 28px;
}

/* ============================================
   BUTTONS
   ============================================ */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 40px;
    background: linear-gradient(135deg, var(--brand-dim), var(--brand));
    color: white;
    border: none;
    border-radius: var(--radius-full);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-glow);
    letter-spacing: -0.01em;
}
.btn-primary:active {
    transform: scale(0.96);
    box-shadow: 0 0 20px var(--brand-glow);
}

.btn-full {
    width: 100%;
    padding: 18px;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    letter-spacing: -0.01em;
}
.btn-full:active { transform: scale(0.98); }
.btn-full.confirm {
    background: linear-gradient(135deg, var(--brand-dim), var(--brand));
    color: white;
    box-shadow: var(--shadow-glow);
}
.btn-full.cancel {
    background: transparent;
    color: var(--text-tertiary);
    margin-top: 8px;
}

.btn-telegram {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, var(--brand-dim), var(--brand));
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all var(--transition);
    box-shadow: var(--shadow-glow);
    margin-top: 8px;
}
.btn-telegram:active { transform: scale(0.98); }
.btn-telegram:disabled { opacity: 0.35; box-shadow: none; cursor: not-allowed; }

.btn-logout {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 24px 20px 0;
    padding: 16px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--danger);
    cursor: pointer;
    transition: all var(--transition);
}
.btn-logout:active { background: var(--bg-card-hover); }

/* ============================================
   EARN SUCCESS
   ============================================ */
.earn-success {
    padding: 40px 20px;
    text-align: center;
    animation: successIn 0.5s var(--spring);
}

@keyframes successIn {
    from { opacity: 0; transform: scale(0.9) translateY(20px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.earn-success .success-icon-big {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--brand-subtle);
    border: 2px solid var(--brand-border);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--brand-bright);
    animation: bounce 0.6s ease-out;
}
.earn-success .success-icon-big svg { width: 36px; height: 36px; stroke-width: 1.5; }

@keyframes bounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

.earn-success .points-earned {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.04em;
    color: var(--brand-bright);
    margin-bottom: 6px;
}
.earn-success .earn-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 4px;
}
.earn-success .earn-activity {
    font-size: 0.85rem;
    color: var(--text-tertiary);
    margin-bottom: 24px;
}

.new-balance-card {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 700;
}

.new-balance-card .accent { color: var(--brand-bright); }

.mt-20 { margin-top: 20px; }

/* ============================================
   SHOP
   ============================================ */
.shop-grid {
    padding: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.product-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all var(--transition);
}
.product-card:active { transform: scale(0.97); }

.product-img {
    width: 100%;
    aspect-ratio: 1;
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
}
.product-img .icon svg { width: 48px; height: 48px; stroke-width: 1; }

.product-info { padding: 14px; }
.product-name {
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: -0.01em;
    margin-bottom: 6px;
    line-height: 1.3;
}
.product-price {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    background: var(--brand-subtle);
    border-radius: var(--radius-full);
    font-size: 0.78rem;
    font-weight: 700;
    color: var(--brand-bright);
}
.product-stock {
    font-size: 0.72rem;
    color: var(--text-tertiary);
    margin-top: 6px;
    font-weight: 500;
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    z-index: 200;
    align-items: flex-end;
    justify-content: center;
}
.modal-overlay.visible { display: flex; animation: fadeIn 0.2s ease-out; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.modal-sheet {
    width: 100%;
    max-width: 430px;
    background: var(--bg-card);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 12px 24px 40px;
    animation: slideUp 0.35s var(--spring);
}
@keyframes slideUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.modal-handle {
    width: 36px; height: 4px;
    border-radius: 2px;
    background: var(--bg-elevated);
    margin: 0 auto 20px;
}

.modal-product-img {
    width: 100%; height: 200px;
    border-radius: var(--radius-md);
    background: var(--bg-elevated);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--text-tertiary);
}
.modal-product-img .icon svg { width: 64px; height: 64px; stroke-width: 0.8; }

.modal-product-name {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    margin-bottom: 8px;
}
.modal-product-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--brand-bright);
    margin-bottom: 16px;
}
.modal-balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 0;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    margin-bottom: 24px;
    font-size: 0.9rem;
}
.modal-balance-row .label { color: var(--text-tertiary); font-weight: 500; }
.modal-balance-row .value { font-weight: 700; }
.modal-balance-row .value.enough { color: var(--success); }

/* ============================================
   HISTORY
   ============================================ */
.history-list { padding: 0 20px; }
.history-day { margin-bottom: 24px; }
.history-day-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0 0 10px;
}

.history-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.history-item:last-child { border-bottom: none; }

.history-icon {
    width: 42px; height: 42px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    color: var(--text-primary);
}
.history-icon.earn { background: var(--brand-subtle); }
.history-icon.spend { background: var(--danger-bg); }
.history-icon.manual { background: var(--warning-bg); }

.history-details { flex: 1; min-width: 0; }
.history-title {
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.history-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-top: 2px;
}

.history-points {
    font-size: 0.95rem;
    font-weight: 700;
    flex-shrink: 0;
}
.history-points.positive { color: var(--success); }
.history-points.negative { color: var(--danger); }

/* ============================================
   INFO / SCHEDULE
   ============================================ */
.info-content { padding: 24px 20px; }

.info-section-title {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    padding-top: 20px;
}

.info-detail-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    font-size: 0.88rem;
    color: var(--text-secondary);
    font-weight: 500;
}
.info-detail-row .icon { color: var(--text-tertiary); }

.schedule-item {
    display: flex;
    gap: 14px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border);
}
.schedule-time {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--brand-bright);
    min-width: 50px;
    padding-top: 2px;
}
.schedule-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 2px;
}
.schedule-speaker {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* ============================================
   PROFILE
   ============================================ */
.profile-section {
    padding: 32px 20px;
    text-align: center;
}

.profile-avatar {
    width: 80px; height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-dim), var(--brand-bright));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    color: white;
    margin: 0 auto 16px;
}
.profile-name {
    font-size: 1.4rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
}
.profile-phone {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 28px;
}

.profile-qr-wrap {
    display: inline-block;
    padding: 20px;
    background: white;
    border-radius: var(--radius-lg);
    margin-bottom: 10px;
}
.profile-qr-wrap svg { display: block; }

.profile-qr-hint {
    font-size: 0.78rem;
    color: var(--text-tertiary);
    font-weight: 500;
    margin-bottom: 32px;
}

.profile-events-label {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    text-align: left;
    margin-bottom: 10px;
    padding: 0 20px;
}

.profile-event-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-top: 1px solid var(--border);
    cursor: pointer;
    transition: background var(--transition);
}
.profile-event-item:active { background: var(--bg-card); }
.profile-event-name { font-size: 0.9rem; font-weight: 600; }
.profile-event-balance { font-size: 0.85rem; font-weight: 700; color: var(--brand-bright); }

/* ============================================
   REGISTRATION
   ============================================ */
.reg-screen {
    padding: 0 24px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100dvh;
}

.reg-logo {
    width: 56px; height: 56px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, var(--brand-dim), var(--brand));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: white;
}
.reg-logo svg { width: 28px; height: 28px; }

.reg-title {
    font-size: 1.6rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 6px;
}
.reg-subtitle {
    font-size: 0.88rem;
    color: var(--text-tertiary);
    text-align: center;
    font-weight: 500;
    margin-bottom: 36px;
}

.field { margin-bottom: 16px; }
.field label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 7px;
}
.field input {
    width: 100%;
    padding: 14px 16px;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    font-family: var(--font);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
    outline: none;
    transition: border-color var(--transition);
}
.field input:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 3px var(--brand-glow);
}
.field input::placeholder { color: var(--text-tertiary); }

.field-with-addon { position: relative; }
.field-with-addon input { padding-right: 56px; }
.field .scan-addon {
    position: absolute;
    right: 6px; top: 50%;
    transform: translateY(-50%);
    background: var(--brand-subtle);
    border: 1px solid var(--brand-border);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    cursor: pointer;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
}
.field .scan-addon:active { transform: translateY(-50%) scale(0.9); }
.field .scan-addon svg { width: 18px; height: 18px; }

.field-check {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    font-size: 0.82rem;
    color: var(--text-tertiary);
}
.field-check .icon { color: var(--success); }

/* ============================================
   BOTTOM NAV
   ============================================ */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 430px;
    background: rgba(9, 9, 11, 0.85);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: space-around;
    padding: 8px 0;
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    z-index: 100;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: var(--radius-sm);
    color: var(--text-tertiary);
    transition: color var(--transition);
}
.nav-item .nav-icon { transition: transform var(--transition); }
.nav-item .nav-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }

.nav-item .nav-label {
    font-size: 0.65rem;
    font-weight: 600;
}

.nav-item.active { color: var(--brand-bright); }
.nav-item:active .nav-icon { transform: scale(0.85); }

/* ============================================
   SECTION HELPERS
   ============================================ */
.section-pad { padding: 0 20px; }

/* ============================================
   THEME PICKER (demo only вЂ” remove in prod)
   ============================================ */
.theme-picker {
    position: fixed;
    top: 12px;
    right: 12px;
    z-index: 999;
    display: flex;
    gap: 6px;
    padding: 6px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-full);
}

.theme-dot {
    width: 24px; height: 24px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all var(--transition);
}
.theme-dot:hover { transform: scale(1.15); }
.theme-dot.active { border-color: var(--text-primary); }

/* Registration alerts & nav links */
.reg-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.reg-alert.alert-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.2); }
.reg-alert.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(251, 191, 36, 0.2); }
.reg-alert.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(52, 211, 153, 0.2); }
.bottom-nav .nav-item { text-decoration: none; color: inherit; }
.bottom-nav .nav-item.active { color: var(--brand-bright); }

/* Registration alerts & nav links */
.reg-alert {
    padding: 12px 16px;
    border-radius: var(--radius-md);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.reg-alert.alert-danger { background: var(--danger-bg); color: var(--danger); border: 1px solid rgba(248, 113, 113, 0.2); }
.reg-alert.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(251, 191, 36, 0.2); }
.reg-alert.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(52, 211, 153, 0.2); }
.bottom-nav .nav-item { text-decoration: none; color: inherit; }
.bottom-nav .nav-item.active { color: var(--brand-bright); }
