/* QR Gener — Dark Design System */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&display=swap');

:root {
    --qg-body: #1b1d26;
    --qg-section: #1f222d;
    --qg-card: #252836;
    --qg-card-hover: #2c3040;
    --qg-elevated: #2a2e3c;
    --qg-border: rgba(255, 255, 255, 0.07);
    --qg-border-hover: rgba(255, 255, 255, 0.14);
    --qg-text: #e8eaef;
    --qg-text-secondary: #a0a8b8;
    --qg-text-muted: #6b7289;
    --qg-accent: #7c6df0;
    --qg-accent-light: #9d8ff5;
    --qg-accent-cyan: #38bdf8;
    --qg-accent-green: #34d399;
    --qg-gradient: linear-gradient(135deg, #7c6df0 0%, #6366f1 50%, #38bdf8 100%);
    --qg-gradient-subtle: linear-gradient(135deg, rgba(124, 109, 240, 0.15) 0%, rgba(56, 189, 248, 0.08) 100%);
    --qg-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
    --qg-shadow-lg: 0 12px 48px rgba(0, 0, 0, 0.45);
    --qg-glow: 0 0 40px rgba(124, 109, 240, 0.15);
    --qg-radius: 16px;
    --qg-radius-lg: 24px;
    --qg-radius-xl: 32px;
    --qg-font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

*, *::before, *::after {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--qg-font);
    background-color: var(--qg-body);
    color: var(--qg-text);
    min-height: 100vh;
}

/* Subtle grid overlay */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
}

/* ── Background effects ── */
#neuralCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
    opacity: 0.25;
}

.ai-particle {
    position: fixed;
    width: 3px;
    height: 3px;
    background: linear-gradient(135deg, var(--qg-accent), var(--qg-accent-cyan));
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(124, 109, 240, 0.5);
    pointer-events: none;
    animation: float-particle linear infinite;
    z-index: 1;
}

@keyframes float-particle {
    0% { transform: translate(0, 0) scale(1); opacity: 0; }
    10% { opacity: 0.7; }
    90% { opacity: 0.7; }
    100% { transform: translate(var(--tx), var(--ty)) scale(0.5); opacity: 0; }
}

.mesh-gradient {
    position: fixed;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.18;
    pointer-events: none;
    animation: float-orb 20s ease-in-out infinite, pulse-ai 4s ease-in-out infinite;
}

.mesh-1 { background: radial-gradient(circle, rgba(124, 109, 240, 0.5) 0%, transparent 70%); top: 5%; left: 5%; }
.mesh-2 { background: radial-gradient(circle, rgba(56, 189, 248, 0.4) 0%, transparent 70%); top: 40%; right: 5%; animation-delay: 7s; }
.mesh-3 { background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, transparent 70%); bottom: 10%; left: 25%; animation-delay: 14s; }

#aiParticles {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 1;
}

@keyframes float-orb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(20px, -30px) scale(1.1); }
    66% { transform: translate(-30px, 20px) scale(0.9); }
}

@keyframes pulse-ai {
    0%, 100% { opacity: 0.15; }
    50% { opacity: 0.25; }
}

/* ── Navbar ── */
.qg-navbar {
    background: rgba(27, 29, 38, 0.85);
    backdrop-filter: blur(20px) saturate(150%);
    -webkit-backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--qg-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 1000;
    overflow: visible;
}

.qg-navbar .max-w-7xl,
.qg-navbar .flex {
    overflow: visible;
}

.qg-navbar-actions {
    position: relative;
    z-index: 1002;
}

.qg-user-menu {
    position: relative;
    z-index: 1001;
}

.qg-logo-text {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
    background: var(--qg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.qg-nav-link {
    color: var(--qg-text-secondary);
    font-weight: 500;
    font-size: 0.875rem;
    padding: 0.5rem 1rem;
    border-radius: 12px;
    transition: all 0.2s ease;
    text-decoration: none;
}

.qg-nav-link:hover {
    color: var(--qg-text);
    background: rgba(255, 255, 255, 0.05);
}

.qg-nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    flex-shrink: 0;
}

.qg-btn-nav {
    padding: 0.5rem 0.75rem;
    font-size: 0.8125rem;
    white-space: nowrap;
    flex-shrink: 0;
}

@media (min-width: 640px) {
    .qg-btn-nav {
        padding: 0.5rem 1.25rem;
        font-size: 0.875rem;
    }
}

.qg-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    padding: 0.45rem 0.85rem;
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--qg-text-secondary);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--qg-border);
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.qg-back-link:hover {
    color: var(--qg-text);
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--qg-border-hover);
}

.qg-user-menu-trigger:hover {
    background: rgba(255, 255, 255, 0.05);
}

.qg-user-menu-dropdown {
    position: fixed;
    min-width: 220px;
    padding: 0.5rem;
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: 14px;
    box-shadow: var(--qg-shadow-lg);
    z-index: 10000;
}

.qg-user-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.65rem 0.85rem;
    border-radius: 10px;
    color: var(--qg-text);
    font-size: 0.9rem;
    font-weight: 500;
    text-decoration: none;
    border: none;
    background: transparent;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.qg-user-menu-item:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--qg-text);
}

.qg-user-menu-item.is-active {
    background: rgba(124, 109, 240, 0.15);
    color: var(--qg-accent-light);
}

.qg-user-menu-item-danger {
    color: #f87171;
}

.qg-user-menu-item-danger:hover {
    background: rgba(239, 68, 68, 0.12);
    color: #fca5a5;
}

.qg-user-menu-divider {
    height: 1px;
    margin: 0.35rem 0.25rem;
    background: var(--qg-border);
}

/* ── Buttons ── */
.qg-btn {
    background: var(--qg-gradient);
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9375rem;
    box-shadow: 0 4px 20px rgba(124, 109, 240, 0.35);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    cursor: pointer;
    text-align: center;
}

.qg-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 32px rgba(124, 109, 240, 0.45);
    color: white;
}

.qg-btn-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--qg-text);
    padding: 0.75rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1px solid var(--qg-border);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
}

.qg-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--qg-border-hover);
    transform: translateY(-2px);
    color: var(--qg-text);
}

.qg-btn-primary {
    background: var(--qg-gradient);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 8px 24px rgba(124, 109, 240, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.qg-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 36px rgba(124, 109, 240, 0.4);
}

/* ── Sections ── */
.qg-section {
    background: var(--qg-section);
    border-radius: var(--qg-radius-xl);
    border: 1px solid var(--qg-border);
    padding: 2.5rem;
}

.qg-section-alt {
    background: var(--qg-section);
    border-top: 1px solid var(--qg-border);
    border-bottom: 1px solid var(--qg-border);
}

/* ── Cards ── */
.qg-card {
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-lg);
    padding: 2rem;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    position: relative;
    overflow: hidden;
}

.qg-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--qg-gradient-subtle);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;
}

.qg-card:hover {
    border-color: var(--qg-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--qg-shadow-lg), var(--qg-glow);
}

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

.qg-card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    background: var(--qg-gradient);
    box-shadow: 0 8px 24px rgba(124, 109, 240, 0.3);
    transition: transform 0.3s ease;
}

.qg-card:hover .qg-card-icon {
    transform: scale(1.08) rotate(-3deg);
}

.qg-card-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--qg-text);
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.qg-card-text {
    color: var(--qg-text-secondary);
    line-height: 1.6;
    font-size: 0.9375rem;
}

/* ── Hero ── */
.qg-hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.045em;
    color: var(--qg-text);
}

.qg-hero-accent {
    background: var(--qg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.qg-hero-subtitle {
    font-size: 1.2rem;
    line-height: 1.65;
    color: var(--qg-text-secondary);
    font-weight: 400;
}

/* ── CTA ── */
.qg-cta {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    padding: 3.5rem 2rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}

@media (max-width: 639px) {
    .qg-cta {
        padding: 1.75rem 1.25rem;
    }

    .qg-cta h2 {
        font-size: 1.5rem !important;
        margin-bottom: 0.75rem !important;
    }

    .qg-cta p {
        font-size: 1rem !important;
        margin-bottom: 1.25rem !important;
    }

    .qg-home-cta-section {
        padding-bottom: 1.5rem !important;
    }

    .qg-footer {
        padding: 2rem 0 1.25rem !important;
    }
}

.qg-cta::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--qg-gradient-subtle);
    pointer-events: none;
}

.qg-cta::after {
    content: '';
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 300px;
    background: radial-gradient(ellipse, rgba(124, 109, 240, 0.2) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Footer ── */
.qg-footer {
    background: var(--qg-section);
    border-top: 1px solid var(--qg-border);
    padding: 4rem 0 2rem;
}

.qg-footer-title {
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--qg-text);
    margin-bottom: 1rem;
}

.qg-footer-link {
    color: var(--qg-text-muted);
    transition: color 0.2s ease;
    text-decoration: none;
    font-size: 0.9375rem;
}

.qg-footer-link:hover {
    color: var(--qg-text);
}

.qg-social-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--qg-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--qg-text-muted);
    transition: all 0.2s ease;
    text-decoration: none;
}

.qg-social-btn:hover {
    background: rgba(124, 109, 240, 0.15);
    border-color: rgba(124, 109, 240, 0.3);
    color: var(--qg-accent-light);
}

/* ── Dashboard stats ── */
.qg-stat-card {
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-lg);
    padding: 1.75rem;
    text-align: center;
    transition: all 0.35s ease;
}

.qg-stat-card:hover {
    border-color: var(--qg-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--qg-shadow), var(--qg-glow);
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.25rem;
    background: var(--qg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--qg-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── QR type cards ── */
.qr-type-card {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: 16px;
    padding: 1rem;
    transition: all 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
    text-align: left;
    text-decoration: none;
    color: inherit;
}

.qr-type-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--card-color, var(--qg-gradient));
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.qr-type-card:hover {
    border-color: var(--qg-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--qg-shadow), var(--qg-glow);
}

.qr-type-card-body {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
}

.qr-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
    transition: transform 0.35s ease;
}

.qr-type-card:hover .qr-icon-wrapper { transform: scale(1.06); }

.qr-type-title {
    font-size: 0.9375rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: var(--qg-text);
    margin: 0;
    line-height: 1.25;
}

.qr-type-desc {
    font-size: 0.8125rem;
    color: var(--qg-text-muted);
    line-height: 1.4;
    margin: 0;
}

.qr-type-tag {
    font-size: 0.6875rem;
    font-weight: 600;
    display: inline-block;
    align-self: flex-start;
    margin-top: 0.15rem;
    padding: 0.2rem 0.55rem;
    border-radius: 8px;
    background: rgba(124, 109, 240, 0.12);
    color: var(--qg-accent-light);
}

/* ── Section titles ── */
.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 900;
    letter-spacing: -0.04em;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--qg-text);
}

.section-title span,
.section-title .accent {
    background: var(--qg-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-subtitle {
    text-align: center;
    color: var(--qg-text-secondary);
    font-size: 1.05rem;
    line-height: 1.6;
    max-width: 48rem;
    margin: 0 auto 2.5rem;
}

/* ── Forms ── */
.qg-form-container {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    overflow: hidden;
    box-shadow: var(--qg-shadow-lg);
    position: relative;
}

.type-header {
    position: relative;
    padding: 1rem 1.5rem 1.75rem;
    overflow: hidden;
    background: linear-gradient(135deg, #5b4cdb 0%, #6366f1 38%, #3b82f6 68%, #06b6d4 100%);
}

.type-header--emerald {
    background: linear-gradient(135deg, #059669 0%, #10b981 45%, #06b6d4 100%);
}

.type-header--amber {
    background: linear-gradient(135deg, #d97706 0%, #f59e0b 45%, #ef4444 100%);
}

.type-header--rose {
    background: linear-gradient(135deg, #db2777 0%, #ec4899 45%, #8b5cf6 100%);
}

.type-header__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.type-header__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.45;
}

.type-header__orb--1 {
    width: 140px;
    height: 140px;
    top: -40px;
    left: -30px;
    background: rgba(255, 255, 255, 0.3);
}

.type-header__orb--2 {
    width: 120px;
    height: 120px;
    top: -20px;
    right: -20px;
    background: rgba(56, 189, 248, 0.4);
}

.type-header__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.12) 0%, transparent 50%);
}

.type-header__grid {
    position: absolute;
    inset: 0;
    opacity: 0.08;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.5) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.5) 1px, transparent 1px);
    background-size: 28px 28px;
}

.type-header__inner {
    position: relative;
    z-index: 2;
}

.type-header__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.85rem;
}

.type-header__back {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.92);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(8px);
    transition: background 0.2s;
}

.type-header__back:hover {
    background: rgba(255, 255, 255, 0.2);
}

.type-header__badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #fff;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.type-header__main {
    display: flex;
    align-items: center;
    gap: 1rem;
    text-align: left;
}

.type-header__icon-wrap {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
}

.type-header .type-icon {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.65rem;
    line-height: 1;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(8px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.type-header__text {
    min-width: 0;
    flex: 1;
}

.type-header__title {
    margin: 0 0 0.2rem;
    font-size: clamp(1.25rem, 3vw, 1.5rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    color: #fff;
}

.type-header__desc {
    margin: 0;
    font-size: 0.875rem;
    font-weight: 500;
    line-height: 1.4;
    color: rgba(255, 255, 255, 0.82);
}

.type-header__curve {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 24px;
    z-index: 3;
    pointer-events: none;
}

@media (max-width: 640px) {
    .type-header {
        padding: 0.75rem 0.75rem 1.35rem;
    }

    .type-header__top {
        margin-bottom: 0.65rem;
    }

    .type-header__back span {
        display: none;
    }

    .type-header__main {
        gap: 0.75rem;
    }

    .type-header__icon-wrap {
        width: 2.75rem;
        height: 2.75rem;
    }

    .type-header .type-icon {
        font-size: 1.4rem;
        border-radius: 12px;
    }

    .type-header__desc {
        font-size: 0.8125rem;
    }
}

.qg-input,
.ios-input {
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: 14px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    color: var(--qg-text);
    transition: all 0.3s ease;
    width: 100%;
}

.qg-input::placeholder,
.ios-input::placeholder { color: var(--qg-text-muted); }

.qg-input:focus,
.ios-input:focus {
    outline: none;
    border-color: rgba(124, 109, 240, 0.5);
    box-shadow: 0 0 0 3px rgba(124, 109, 240, 0.12);
    background: var(--qg-elevated);
}

.qg-textarea,
.ios-textarea {
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: 14px;
    padding: 0.875rem 1.25rem;
    font-size: 1rem;
    color: var(--qg-text);
    transition: all 0.3s ease;
    min-height: 120px;
    width: 100%;
    resize: vertical;
}

.qg-textarea:focus,
.ios-textarea:focus {
    outline: none;
    border-color: rgba(124, 109, 240, 0.5);
    box-shadow: 0 0 0 3px rgba(124, 109, 240, 0.12);
    background: var(--qg-elevated);
}

.qg-label,
.ios-label {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--qg-text);
    margin-bottom: 0.5rem;
    display: block;
}

/* Legacy Tailwind forms — readable inputs on dark background */
body:not(.qp-page) input:not([type="checkbox"]):not([type="radio"]):not([type="file"]):not([type="hidden"]):not([type="submit"]):not([type="button"]):not([type="reset"]):not([type="image"]):not([type="range"]):not([type="color"]),
body:not(.qp-page) textarea,
body:not(.qp-page) select {
    background-color: var(--qg-card) !important;
    border-color: var(--qg-border) !important;
    color: var(--qg-text) !important;
    -webkit-text-fill-color: var(--qg-text);
}

body:not(.qp-page) input::placeholder,
body:not(.qp-page) textarea::placeholder {
    color: var(--qg-text-muted) !important;
    opacity: 1;
}

body:not(.qp-page) select option {
    background: var(--qg-card);
    color: var(--qg-text);
}

body:not(.qp-page) input:focus,
body:not(.qp-page) textarea:focus,
body:not(.qp-page) select:focus {
    outline: none;
    border-color: rgba(124, 109, 240, 0.5) !important;
    box-shadow: 0 0 0 3px rgba(124, 109, 240, 0.12);
    background-color: var(--qg-elevated) !important;
    color: var(--qg-text) !important;
}

body:not(.qp-page) input:-webkit-autofill,
body:not(.qp-page) input:-webkit-autofill:hover,
body:not(.qp-page) input:-webkit-autofill:focus,
body:not(.qp-page) textarea:-webkit-autofill,
body:not(.qp-page) textarea:-webkit-autofill:hover,
body:not(.qp-page) textarea:-webkit-autofill:focus,
body:not(.qp-page) select:-webkit-autofill,
body:not(.qp-page) select:-webkit-autofill:hover,
body:not(.qp-page) select:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--qg-text) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--qg-card) inset !important;
    box-shadow: 0 0 0 1000px var(--qg-card) inset !important;
    caret-color: var(--qg-text);
    transition: background-color 99999s ease-in-out 0s;
}

/* ── Auth pages ── */
.qg-auth-card {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    padding: 1.5rem;
    box-shadow: var(--qg-shadow-lg);
}

.qg-auth-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding-bottom: 1rem;
    margin-bottom: 1.25rem;
    border-bottom: 1px solid var(--qg-border);
}

.qg-auth-brand {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.qg-auth-brand .qg-logo-text {
    font-size: 1.125rem;
}

.qg-auth-header .qg-lang-switcher {
    flex-shrink: 0;
}

.qg-auth-title {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--qg-text);
    letter-spacing: -0.03em;
}

.qg-auth-subtitle {
    color: var(--qg-text-secondary);
    margin-top: 0.35rem;
    font-size: 0.9375rem;
}

@media (min-width: 640px) {
    .qg-auth-card {
        padding: 2rem 2.25rem;
    }

    .qg-auth-title {
        font-size: 1.75rem;
    }
}

/* ── Checklist items ── */
.qg-check-item {
    display: flex;
    align-items: center;
    color: var(--qg-text-secondary);
}

.qg-check-icon {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 0.75rem;
    flex-shrink: 0;
}

.qg-check-icon.purple { background: rgba(124, 109, 240, 0.15); color: var(--qg-accent-light); }
.qg-check-icon.cyan { background: rgba(56, 189, 248, 0.15); color: var(--qg-accent-cyan); }
.qg-check-icon.green { background: rgba(52, 211, 153, 0.15); color: var(--qg-accent-green); }

/* ── Animations ── */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to { opacity: 1; transform: translateY(0); }
}

.card-animate {
    animation: fadeInUp 0.6s ease-out forwards;
    opacity: 0;
}

.card-animate:nth-child(1) { animation-delay: 0.05s; }
.card-animate:nth-child(2) { animation-delay: 0.1s; }
.card-animate:nth-child(3) { animation-delay: 0.15s; }
.card-animate:nth-child(4) { animation-delay: 0.2s; }
.card-animate:nth-child(5) { animation-delay: 0.25s; }
.card-animate:nth-child(6) { animation-delay: 0.3s; }
.card-animate:nth-child(7) { animation-delay: 0.35s; }
.card-animate:nth-child(8) { animation-delay: 0.4s; }
.card-animate:nth-child(9) { animation-delay: 0.45s; }
.card-animate:nth-child(10) { animation-delay: 0.5s; }
.card-animate:nth-child(11) { animation-delay: 0.55s; }
.card-animate:nth-child(12) { animation-delay: 0.6s; }

/* ── Avatar ── */
.qg-avatar {
    width: 36px;
    height: 36px;
    background: var(--qg-gradient);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 0.875rem;
    box-shadow: 0 4px 12px rgba(124, 109, 240, 0.3);
}

/* ── Badge ── */
.qg-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 600;
    background: rgba(124, 109, 240, 0.12);
    color: var(--qg-accent-light);
    border: 1px solid rgba(124, 109, 240, 0.2);
}

/* ── Legacy class aliases (backward compat) ── */
.ios-navbar {
    background: rgba(27, 29, 38, 0.85);
    backdrop-filter: blur(20px) saturate(150%);
    border-bottom: 1px solid var(--qg-border);
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}
.ios-button {
    background: var(--qg-gradient);
    color: white;
    padding: 0.75rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    box-shadow: 0 4px 20px rgba(124, 109, 240, 0.35);
    transition: all 0.3s ease;
    border: none;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.ios-button:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(124, 109, 240, 0.45); color: white; }
.ios-button-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: var(--qg-text);
    padding: 0.75rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    border: 1px solid var(--qg-border);
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.ios-button-secondary:hover { background: rgba(255, 255, 255, 0.08); border-color: var(--qg-border-hover); transform: translateY(-2px); color: var(--qg-text); }
.ios-feature-card {
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-lg);
    padding: 2rem;
    transition: all 0.35s ease;
}
.ios-feature-card:hover { border-color: var(--qg-border-hover); transform: translateY(-4px); box-shadow: var(--qg-shadow-lg), var(--qg-glow); }
.ios-stat-card {
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-lg);
    padding: 1.75rem;
    text-align: center;
    transition: all 0.35s ease;
}
.ios-stat-card:hover { border-color: var(--qg-border-hover); transform: translateY(-4px); box-shadow: var(--qg-shadow), var(--qg-glow); }
.ios-cta {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    padding: 3.5rem 2rem;
    position: relative;
    overflow: hidden;
    text-align: center;
}
.ios-footer {
    background: var(--qg-section);
    border-top: 1px solid var(--qg-border);
}
.ios-form-container {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    overflow: hidden;
    box-shadow: var(--qg-shadow-lg);
}

/* ── QR create forms (mobile) ── */
.qg-create-page {
    width: 100%;
}

@media (max-width: 639px) {
    .qg-create-page {
        padding-left: 0.375rem;
        padding-right: 0.375rem;
    }

    .qg-create-page .ios-form-container,
    .qg-create-page .qg-create-form {
        border-radius: 14px;
    }

    .qg-create-page .qg-create-form-body {
        padding: 0.875rem !important;
    }

    .qg-create-page .qg-create-info {
        padding: 1rem;
        border-radius: 14px;
    }
}

.qg-create-form .text-gray-800,
.qg-create-form label,
.qg-create-form h3,
.qg-create-form h4 {
    color: var(--qg-text) !important;
}

.qg-create-form .text-gray-700,
.qg-create-form .text-gray-600 {
    color: var(--qg-text-secondary) !important;
}

.qg-create-form .text-gray-500 {
    color: var(--qg-text-muted) !important;
}

.qg-create-form .border-gray-200,
.qg-create-form .border-gray-300 {
    border-color: var(--qg-border) !important;
}

.qg-create-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.qg-create-form textarea,
.qg-create-form select {
    background: var(--qg-card) !important;
    color: var(--qg-text) !important;
}

.qg-create-form input::placeholder,
.qg-create-form textarea::placeholder {
    color: var(--qg-text-muted);
}

.qg-create-form .bg-gray-50 {
    background: var(--qg-card) !important;
}

.qg-create-info {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    padding: 1.25rem 1.5rem;
}

.qg-create-info h3 {
    color: var(--qg-text) !important;
}

.qg-create-info,
.qg-create-info p,
.qg-create-info span {
    color: var(--qg-text-secondary);
}

.qg-create-form .qg-create-submit button,
.qg-create-form .qg-create-submit-btn,
.qg-create-form .flex.justify-end button[type="submit"],
.qg-create-form button#submit-btn[type="submit"] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.7rem 1.25rem !important;
    font-size: 0.9375rem !important;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 12px !important;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, var(--qg-accent) 0%, #5b4fd6 100%) !important;
    color: #fff !important;
    box-shadow: 0 4px 16px rgba(124, 109, 240, 0.3);
    transform: none !important;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.qg-create-form .qg-create-submit button:hover,
.qg-create-form .qg-create-submit-btn:hover,
.qg-create-form .flex.justify-end button[type="submit"]:hover,
.qg-create-form button#submit-btn[type="submit"]:hover {
    transform: translateY(-1px) !important;
    box-shadow: 0 6px 18px rgba(124, 109, 240, 0.4);
}

.qg-create-form .qg-create-submit {
    margin-top: 0.25rem;
}

@media (max-width: 639px) {
    .qg-create-form .mb-6 {
        margin-bottom: 1.25rem;
    }

    .qg-create-form label.text-lg {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .qg-create-form input.text-lg,
    .qg-create-form textarea.text-lg,
    .qg-create-form select.text-lg {
        font-size: 1rem;
        padding: 0.75rem 0.875rem;
    }

    .qg-create-form .flex.justify-end button,
    .qg-create-form .qg-create-submit button,
    .qg-create-form .qg-create-submit-btn,
    .qg-create-form .qg-edit-actions-save {
        width: 100%;
        justify-content: center;
    }

    .qg-create-form .qg-create-submit {
        justify-content: stretch;
    }
}

/* ── QR style customizer ── */
.qg-qr-style__grid {
    display: grid;
    gap: 1.25rem;
}

@media (min-width: 640px) {
    .qg-qr-style__grid {
        grid-template-columns: 200px 1fr;
        align-items: start;
    }
}

.qg-qr-style__preview-wrap {
    display: flex;
    justify-content: center;
}

.qg-qr-style__preview {
    width: 200px;
    min-height: 200px;
    max-height: 240px;
    border-radius: 16px;
    border: 1px solid var(--qg-border);
    background: var(--qg-card);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.qg-qr-style__preview img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qg-qr-style__preview-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.75rem;
    color: var(--qg-text-muted);
    padding: 1rem;
    text-align: center;
}

.qg-qr-style .text-gray-800,
.qg-qr-style label,
.qg-qr-style h3 {
    color: var(--qg-text) !important;
}

.qg-qr-style .text-gray-600,
.qg-qr-style .text-gray-700 {
    color: var(--qg-text-secondary) !important;
}

.qg-qr-style .text-gray-500 {
    color: var(--qg-text-muted) !important;
}

.qg-qr-style .border-gray-300,
.qg-qr-style .border-gray-200 {
    border-color: var(--qg-border) !important;
}

.qg-qr-style select {
    background: var(--qg-card) !important;
    color: var(--qg-text) !important;
}

.qg-qr-style__accordions {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.qg-qr-style__accordion {
    border: 1px solid var(--qg-border);
    border-radius: 14px;
    background: var(--qg-elevated);
    overflow: hidden;
}

.qg-qr-style__accordion-summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    user-select: none;
}

.qg-qr-style__accordion-summary::-webkit-details-marker {
    display: none;
}

.qg-qr-style__accordion-title {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--qg-text);
}

.qg-qr-style__accordion-chevron {
    color: var(--qg-text-muted);
    font-size: 0.75rem;
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

.qg-qr-style__accordion[open] .qg-qr-style__accordion-chevron {
    transform: rotate(180deg);
}

.qg-qr-style__accordion-body {
    padding: 0.75rem 1rem 1rem;
    border-top: 1px solid var(--qg-border);
}

.qg-qr-style__logo-size {
    border-color: var(--qg-border) !important;
}

.qg-qr-style__picker {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 0.5rem;
}

.qg-qr-style__picker--eyes {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.qg-qr-style__picker--logos {
    grid-template-columns: repeat(8, minmax(0, 1fr));
    max-height: 160px;
    overflow-y: auto;
    padding: 2px;
}

.qg-qr-style__pick {
    aspect-ratio: 1;
    border: 2px solid var(--qg-border);
    border-radius: 10px;
    background: var(--qg-card);
    padding: 4px;
    cursor: pointer;
    transition: border-color 0.15s, box-shadow 0.15s, transform 0.1s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qg-qr-style__pick:hover {
    border-color: rgba(124, 109, 240, 0.6);
}

.qg-qr-style__pick.is-active {
    border-color: #4f8cff;
    box-shadow: 0 0 0 2px rgba(79, 140, 255, 0.25);
}

.qg-qr-style__pick-icon {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    background:
        linear-gradient(90deg, currentColor 0 30%, transparent 30% 38%, currentColor 38% 68%, transparent 68% 76%, currentColor 76% 100%) 0 0 / 100% 33%,
        linear-gradient(90deg, currentColor 0 20%, transparent 20% 28%, currentColor 28% 48%, transparent 48% 56%, currentColor 56% 76%, transparent 76% 84%, currentColor 84% 100%) 0 50% / 100% 33%,
        linear-gradient(90deg, currentColor 0 40%, transparent 40% 48%, currentColor 48% 100%) 0 100% / 100% 33%;
    background-repeat: no-repeat;
    color: var(--qg-text);
    opacity: 0.85;
}

.qg-qr-style__pick--body-square .qg-qr-style__pick-icon {
    background: conic-gradient(currentColor 0 25%, transparent 0 50%, currentColor 0 75%, transparent 0) 2px 2px / 8px 8px;
    background-color: transparent;
}

.qg-qr-style__pick--body-dot_fine .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-dot .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-dot_medium .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-dot_bold .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-dot_pill .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-dot_dense .qg-qr-style__pick-icon {
    background: radial-gradient(circle, currentColor 38%, transparent 40%) 0 0 / 33% 33%;
    opacity: 0.9;
}

.qg-qr-style__pick--body-round_light .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-round .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-round_bold .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-round_max .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-round_soft .qg-qr-style__pick-icon {
    background: linear-gradient(currentColor, currentColor) 2px 2px / 8px 8px;
    border-radius: 3px;
    opacity: 0.9;
}

.qg-qr-style__pick--body-heart .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-star .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-paw .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-sun .qg-qr-style__pick-icon,
.qg-qr-style__pick--body-moon .qg-qr-style__pick-icon {
    background: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    line-height: 1;
    opacity: 1;
}

.qg-qr-style__pick--body-heart .qg-qr-style__pick-icon::before { content: '♥'; color: #e11d48; }
.qg-qr-style__pick--body-star .qg-qr-style__pick-icon::before { content: '★'; color: #f59e0b; }
.qg-qr-style__pick--body-paw .qg-qr-style__pick-icon::before { content: '🐾'; font-size: 0.95rem; }
.qg-qr-style__pick--body-sun .qg-qr-style__pick-icon::before { content: '☀'; color: #f59e0b; }
.qg-qr-style__pick--body-moon .qg-qr-style__pick-icon::before { content: '☾'; color: #94a3b8; }

.qg-qr-style__pick-icon--eye {
    position: relative;
    background: transparent !important;
    border: 2px solid currentColor;
    border-radius: 3px;
}

.qg-qr-style__pick-icon--eye::after {
    content: '';
    position: absolute;
    inset: 22%;
    border: 2px solid currentColor;
    border-radius: 2px;
}

.qg-qr-style__pick--eye-square_circle .qg-qr-style__pick-icon--eye::after,
.qg-qr-style__pick--eye-rounded_circle .qg-qr-style__pick-icon--eye::after,
.qg-qr-style__pick--eye-match_circle .qg-qr-style__pick-icon--eye::after,
.qg-qr-style__pick--eye-circle_circle .qg-qr-style__pick-icon--eye::after {
    border-radius: 50%;
}

.qg-qr-style__pick--eye-circle_circle .qg-qr-style__pick-icon--eye,
.qg-qr-style__pick--eye-circle_square .qg-qr-style__pick-icon--eye {
    border-radius: 50%;
}

.qg-qr-style__pick--eye-rounded_circle .qg-qr-style__pick-icon--eye,
.qg-qr-style__pick--eye-rounded_square .qg-qr-style__pick-icon--eye {
    border-radius: 8px;
}

.qg-qr-style__pick--logo {
    padding: 6px;
    background: #fff;
}

.qg-qr-style__pick--logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.qg-qr-style__logo-thumb {
    width: 72px;
    height: 72px;
    border: 2px dashed var(--qg-border);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: var(--qg-card);
    flex-shrink: 0;
}

.qg-qr-style__logo-thumb-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    padding: 6px;
}

.qg-qr-style__logo-thumb-empty {
    font-size: 0.65rem;
    text-align: center;
    color: var(--qg-text-muted);
    padding: 0.25rem;
    line-height: 1.2;
}

@media (max-width: 639px) {
    .qg-qr-style__picker {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }

    .qg-qr-style__picker--logos {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

.ios-button-primary {
    background: var(--qg-gradient);
    color: white;
    padding: 1rem 2.5rem;
    border-radius: 16px;
    font-weight: 600;
    box-shadow: 0 8px 24px rgba(124, 109, 240, 0.3);
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}
.ios-button-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 36px rgba(124, 109, 240, 0.4); }

.hero-title {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.045em;
    color: var(--qg-text);
}
.hero-subtitle { font-size: 1.2rem; line-height: 1.65; color: var(--qg-text-secondary); }
.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease;
}
.ios-feature-card:hover .feature-icon { transform: scale(1.08) rotate(-3deg); }

/* ── Responsive ── */
@media (max-width: 639px) {
    .qg-navbar-actions {
        gap: 0.375rem;
    }

    .qg-lang-switcher__btn {
        padding: 0.4rem 0.5rem;
        min-width: 2.25rem;
        justify-content: center;
    }

    .qg-user-menu-trigger {
        padding: 0.25rem;
    }

    .qg-hero-subtitle {
        font-size: 1.05rem;
        padding-left: 0.25rem;
        padding-right: 0.25rem;
    }
}

@media (max-width: 767px) {
    .qg-stat-card, .ios-stat-card {
        padding: 1rem 0.75rem;
        border-radius: 14px;
    }
    .stat-number { font-size: 1.625rem; }
    .stat-label { font-size: 0.7rem; }
    .qg-card, .ios-feature-card { padding: 1.5rem; }
    .qg-auth-card { padding: 1.5rem; }
}

/* type-card alias for create page */
.type-card {
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-lg);
    transition: all 0.35s ease;
    cursor: pointer;
}
.type-card:hover {
    border-color: var(--qg-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--qg-shadow-lg), var(--qg-glow);
}
.type-card .type-icon {
    width: 60px;
    height: 60px;
    background: var(--qg-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 8px 24px rgba(124, 109, 240, 0.3);
}
.form-container {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    box-shadow: var(--qg-shadow-lg);
}

/* ── QR codes list page ── */
.ios-type-header {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    position: relative;
    overflow: hidden;
}

.ios-type-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--qg-gradient-subtle);
    pointer-events: none;
}

.type-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
}

@media (max-width: 639px) {
    .ios-type-header .type-icon-wrapper {
        width: 56px;
        height: 56px;
        border-radius: 14px;
    }
}

.ios-qr-card {
    background: var(--qg-card);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-lg);
    transition: all 0.3s ease;
}

.ios-qr-card:hover {
    border-color: var(--qg-border-hover);
    box-shadow: var(--qg-shadow), var(--qg-glow);
    transform: translateY(-2px);
}

.ios-empty-state {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    padding: 3rem 2rem;
}

.ios-button-danger {
    background: rgba(239, 68, 68, 0.12);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.25);
    padding: 0.75rem 1.75rem;
    border-radius: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}

.ios-button-danger:hover {
    background: rgba(239, 68, 68, 0.2);
    border-color: rgba(239, 68, 68, 0.4);
}

.text-gray-900 { color: var(--qg-text) !important; }
.text-gray-800 { color: var(--qg-text) !important; }
.text-gray-700 { color: var(--qg-text-secondary) !important; }
.text-gray-600 { color: var(--qg-text-secondary) !important; }
.text-gray-500 { color: var(--qg-text-muted) !important; }
.text-gray-400 { color: var(--qg-text-muted) !important; }
.text-gray-300 { color: var(--qg-text-secondary) !important; }
.text-gray-200 { color: var(--qg-text-secondary) !important; }
.bg-white { background-color: var(--qg-card) !important; }
.bg-gray-50 { background-color: var(--qg-elevated) !important; }
.bg-gray-100 { background-color: var(--qg-elevated) !important; }
.border-gray-200 { border-color: var(--qg-border) !important; }
.border-gray-300 { border-color: var(--qg-border) !important; }
.border-gray-800 { border-color: var(--qg-border) !important; }
.hover\:bg-gray-50:hover { background-color: rgba(255,255,255,0.05) !important; }
.shadow-xl { box-shadow: var(--qg-shadow-lg) !important; }
.shadow-lg { box-shadow: var(--qg-shadow) !important; }

/* Светлая модалка QR — читаемый текст на белом фоне */
.qr-modal-panel {
    background: #ffffff !important;
    color: #111827 !important;
}

.qr-modal-panel .qr-modal-title {
    color: #111827 !important;
    -webkit-text-fill-color: #111827;
}

.qr-modal-panel .qr-modal-close {
    color: #6b7280 !important;
}

.qr-modal-panel .qr-modal-close:hover {
    color: #111827 !important;
}

.qr-modal-panel .qr-modal-qr-wrap {
    background: linear-gradient(135deg, #f9fafb, #f3f4f6) !important;
}

.qr-modal-panel .qr-modal-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: #f3f4f6 !important;
    color: #1f2937 !important;
    -webkit-text-fill-color: #1f2937;
    border: 1px solid #d1d5db !important;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.qr-modal-panel .qr-modal-btn-secondary:hover {
    background: #e5e7eb !important;
    border-color: #9ca3af !important;
    color: #111827 !important;
}

.qr-modal-panel .qr-modal-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, #6366f1, #7c6df0) !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
}

.qr-modal-panel .qr-modal-btn-primary:hover {
    opacity: 0.95;
    color: #ffffff !important;
}

/* ── Static pages ── */
.page-prose {
    color: var(--qg-text-secondary);
    line-height: 1.7;
    font-size: 0.9375rem;
}

.page-prose h2 {
    margin: 1.75rem 0 0.75rem;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--qg-text);
}

.page-prose h2:first-child {
    margin-top: 0;
}

.page-prose p {
    margin-bottom: 0.85rem;
}

.page-prose ul {
    margin: 0 0 1rem 1.25rem;
    list-style: disc;
}

.page-prose li {
    margin-bottom: 0.35rem;
}

.page-prose a {
    color: var(--qg-accent-light);
    text-decoration: none;
}

.page-prose a:hover {
    text-decoration: underline;
}

.page-meta {
    margin-bottom: 1.25rem;
    font-size: 0.8125rem;
    color: var(--qg-text-muted);
}

.page-features {
    display: grid;
    gap: 1rem;
    margin: 1rem 0 1.5rem;
}

.page-feature {
    display: flex;
    gap: 1rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--qg-elevated);
    border: 1px solid var(--qg-border);
}

.page-feature i {
    font-size: 1.25rem;
    margin-top: 0.15rem;
}

.page-feature strong {
    display: block;
    color: var(--qg-text);
    margin-bottom: 0.25rem;
}

.page-feature p {
    margin: 0;
    font-size: 0.875rem;
}

.page-contact-grid {
    display: grid;
    gap: 0.75rem;
}

@media (min-width: 640px) {
    .page-contact-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.page-contact-card {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    padding: 1rem;
    border-radius: 12px;
    background: var(--qg-elevated);
    border: 1px solid var(--qg-border);
}

.page-contact-card i {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(124, 109, 240, 0.15);
    color: var(--qg-accent-light);
    flex-shrink: 0;
}

.page-contact-card strong {
    display: block;
    color: var(--qg-text);
    font-size: 0.875rem;
    margin-bottom: 0.2rem;
}

.page-contact-card a {
    color: var(--qg-accent-light);
    text-decoration: none;
    font-size: 0.875rem;
}

.page-contact-card a:hover {
    text-decoration: underline;
}

/* Language switcher */
.qg-lang-switcher {
    position: relative;
    z-index: 1002;
}

.qg-lang-switcher__btn {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 0.75rem;
    border-radius: 10px;
    border: 1px solid var(--qg-border);
    background: var(--qg-elevated);
    color: var(--qg-text-secondary);
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
    position: relative;
    z-index: 1;
}

.qg-lang-switcher__btn:hover {
    background: rgba(124, 109, 240, 0.12);
    border-color: rgba(124, 109, 240, 0.35);
    color: var(--qg-text);
}

.qg-lang-switcher__dropdown {
    position: fixed;
    min-width: 10rem;
    padding: 0.35rem;
    border-radius: 12px;
    border: 1px solid var(--qg-border);
    background: var(--qg-card);
    box-shadow: var(--qg-shadow-lg);
    z-index: 10001;
}

.qg-lang-switcher__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.55rem 0.65rem;
    border-radius: 8px;
    color: var(--qg-text-secondary);
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: background 0.15s, color 0.15s;
}

.qg-lang-switcher__item:hover {
    background: rgba(124, 109, 240, 0.12);
    color: var(--qg-text);
}

.qg-lang-switcher__item.is-active {
    background: rgba(124, 109, 240, 0.18);
    color: var(--qg-accent-light);
    font-weight: 600;
}

.qg-lang-switcher__flag {
    font-size: 1rem;
    line-height: 1;
}

/* ── QR edit page ── */
.qr-info-card {
    background: var(--qg-section);
    border: 1px solid var(--qg-border);
    border-radius: var(--qg-radius-xl);
    box-shadow: var(--qg-shadow-lg);
}

.qg-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 0.625rem 1rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    text-decoration: none;
    border: 1px solid var(--qg-border);
    background: var(--qg-card);
    color: var(--qg-text-secondary);
}

.qg-action-btn:hover {
    border-color: var(--qg-border-hover);
    color: var(--qg-text);
}

.qg-action-btn.accent {
    background: rgba(124, 109, 240, 0.12);
    color: var(--qg-accent-light);
    border-color: rgba(124, 109, 240, 0.2);
}

.qg-action-btn.green {
    background: rgba(52, 211, 153, 0.12);
    color: var(--qg-accent-green);
    border-color: rgba(52, 211, 153, 0.2);
}

.qg-warning {
    background: rgba(251, 191, 36, 0.08);
    border: 1px solid rgba(251, 191, 36, 0.2);
    border-radius: 12px;
    padding: 1rem;
}

.qg-warning h4 {
    color: #fde68a;
    font-size: 0.875rem;
    font-weight: 600;
}

.qg-warning p {
    color: #fef3c7;
    font-size: 0.75rem;
    line-height: 1.5;
    margin-top: 0.25rem;
}

.qg-edit-sidebar-collapse summary {
    list-style: none;
    cursor: pointer;
}

.qg-edit-sidebar-collapse summary::-webkit-details-marker {
    display: none;
}

.qg-edit-sidebar-summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    margin-bottom: 0.5rem;
}

.qg-edit-sidebar-chevron {
    color: var(--qg-text-muted);
    transition: transform 0.2s ease;
}

.qg-edit-sidebar-collapse[open] .qg-edit-sidebar-chevron {
    transform: rotate(180deg);
}

@media (min-width: 1024px) {
    .qg-edit-sidebar-collapse {
        display: block;
    }

    .qg-edit-sidebar-collapse summary {
        display: none;
    }

    .qg-edit-sidebar-collapse .qg-edit-sidebar-body {
        display: block !important;
    }

    .qg-edit-sidebar-body {
        margin-top: 0 !important;
    }
}

@media (max-width: 1023px) {
    .qg-edit-sidebar-body {
        margin-top: 0.5rem;
    }
}

/* Dark-theme form fields inside edit container */
.qg-edit-form .text-gray-800,
.qg-edit-form label,
.qg-edit-form h3,
.qg-edit-form h4 {
    color: var(--qg-text) !important;
}

.qg-edit-form .text-gray-700,
.qg-edit-form .text-gray-600 {
    color: var(--qg-text-secondary) !important;
}

.qg-edit-form .text-gray-500 {
    color: var(--qg-text-muted) !important;
}

.qg-edit-form .border-gray-200,
.qg-edit-form .border-gray-300 {
    border-color: var(--qg-border) !important;
}

.qg-edit-form input:not([type="checkbox"]):not([type="radio"]):not([type="file"]),
.qg-edit-form textarea,
.qg-edit-form select {
    background: var(--qg-card) !important;
    color: var(--qg-text) !important;
}

.qg-edit-form input::placeholder,
.qg-edit-form textarea::placeholder {
    color: var(--qg-text-muted);
}

.qg-edit-form .bg-gray-50 {
    background: var(--qg-card) !important;
}

.qg-edit-form .qg-upload-zone {
    border: 2px dashed var(--qg-border);
    border-radius: var(--qg-radius-xl);
    padding: 1rem;
    text-align: center;
    transition: border-color 0.2s ease;
}

@media (min-width: 640px) {
    .qg-edit-form .qg-upload-zone {
        padding: 1.5rem;
    }
}

.qg-edit-form .qg-upload-zone:hover {
    border-color: var(--qg-accent-light);
}

.qg-edit-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--qg-border);
}

.qg-edit-actions--save-only {
    justify-content: flex-end;
}

.qg-edit-actions-back {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    color: var(--qg-text-secondary);
    text-decoration: none;
    font-weight: 500;
    border-radius: 12px;
    transition: color 0.2s ease, background 0.2s ease;
}

.qg-edit-actions-back:hover {
    color: var(--qg-text);
    background: rgba(255, 255, 255, 0.04);
}

.qg-edit-actions-save {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem;
    padding: 0.875rem 1.5rem;
    background: linear-gradient(135deg, var(--qg-accent) 0%, #5b4fd6 100%);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
    box-shadow: 0 4px 16px rgba(124, 109, 240, 0.35);
}

.qg-edit-actions-save:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(124, 109, 240, 0.45);
}

.qg-edit-actions-save:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(124, 109, 240, 0.35);
}

@media (max-width: 639px) {
    .qg-edit-form {
        padding-bottom: 0 !important;
    }

    .qg-edit-actions {
        flex-direction: column-reverse;
        align-items: stretch;
        position: sticky;
        bottom: 0;
        z-index: 30;
        margin-left: -1rem;
        margin-right: -1rem;
        margin-bottom: -1rem;
        padding: 0.875rem 1rem calc(0.875rem + env(safe-area-inset-bottom, 0px));
        background: var(--qg-section);
        border-top: 1px solid var(--qg-border);
        box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
    }

    .qg-edit-actions--save-only {
        flex-direction: column;
    }

    .qg-edit-actions-back,
    .qg-edit-actions-save {
        width: 100%;
        text-align: center;
    }

    .qg-edit-actions-save {
        padding: 1rem 1.5rem;
    }
}

