/* qrlogo.org — mobile-first */

:root {
    --bg: #0b1220;
    --panel: #ffffff;
    --ink: #0f172a;
    --muted: #64748b;
    --brand: #1d4ed8;
    --brand-dark: #1e3a8a;
    --brand-2: #3b82f6;
    --orange: #f97316;
    --orange-dark: #ea580c;
    --border: #e2e8f0;
    --danger: #dc2626;
    --radius: 12px;
    --tap: 44px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    color: var(--ink);
    background: #f8fafc;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
}
img, canvas, video { max-width: 100%; height: auto; display: block; }

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { line-height: 1.2; margin: 0 0 12px; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0;
    margin: -1px; overflow: hidden; clip: rect(0,0,0,0); border: 0;
}

.skip {
    position: absolute; left: -9999px; top: 0;
    background: var(--ink); color: white; padding: 10px 16px; z-index: 100;
}
.skip:focus { left: 8px; top: 8px; }

/* ---------- Blue backdrop behind nav + hero + typebar + step card (homepage only) ---------- */
body { position: relative; }
body.home::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 720px;
    background: linear-gradient(180deg, #1e40af 0%, #1d4ed8 55%, #2563eb 100%);
    z-index: 0;
    pointer-events: none;
}
body.home .nav,
body.home .hero,
body.home .typebar-wrap,
body.home .generator { position: relative; z-index: 1; }
@media (min-width: 700px) {
    body.home::before { height: 820px; }
}

/* Auth pages: light gradient backdrop, top brand bar, two-column layout */
body.auth {
    background: #f8fafc;
    background-image:
        radial-gradient(circle at top right, rgba(29, 78, 216, 0.07), transparent 50%),
        radial-gradient(circle at bottom left, rgba(34, 211, 238, 0.05), transparent 50%);
    min-height: 100vh;
}
.auth-bar {
    background: white;
    border-bottom: 1px solid var(--border);
    padding: 16px 28px;
}
.auth-bar .brand {
    font-weight: 800;
    font-size: 19px;
    color: var(--ink);
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}
.auth-bar .brand-tld { color: var(--brand); font-weight: 800; }
.auth-sub {
    color: var(--muted);
    font-size: 14px;
    margin: 4px 0 18px;
}
.auth-foot {
    text-align: center;
    color: var(--muted);
    font-size: 14px;
    margin-top: 18px;
}
.auth-tos {
    font-size: 11px;
    color: var(--muted);
    text-align: center;
    margin: 16px 0 0;
    line-height: 1.5;
}

.auth-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 32px;
    max-width: 1080px;
    margin: 0 auto;
    padding: 40px 24px 40px;
    align-items: start;
}
.auth-pitch { padding: 0; }
.auth-eyebrow {
    display: inline-block;
    font-size: 11px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--brand);
    background: #dbeafe;
    padding: 5px 12px;
    border-radius: 999px;
    margin-bottom: 14px;
}
.auth-pitch h1 {
    font-size: clamp(28px, 4.5vw, 40px);
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    line-height: 1.15;
    font-weight: 800;
    color: var(--ink);
}
.auth-lede {
    color: var(--muted);
    font-size: clamp(15px, 2vw, 17px);
    margin: 0 0 24px;
    max-width: 460px;
    line-height: 1.6;
}
.auth-lede strong { color: var(--ink); }
.auth-feats {
    list-style: none;
    padding: 0;
    margin: 0 0 28px;
    display: grid;
    gap: 10px;
}
.auth-feats li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    color: var(--ink);
    line-height: 1.5;
}
.auth-feats .ck {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #dcfce7;
    color: #16a34a;
    font-weight: 800;
    font-size: 12px;
    flex-shrink: 0;
    margin-top: 1px;
}
.auth-trust {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    padding: 18px 0 0;
    border-top: 1px solid var(--border);
}
.auth-trust > div {
    text-align: left;
}
.auth-trust strong {
    display: block;
    font-size: 18px;
    font-weight: 800;
    color: var(--brand);
    line-height: 1.1;
    margin-bottom: 4px;
}
.auth-trust span {
    font-size: 11px;
    color: var(--muted);
    line-height: 1.4;
}

.auth-footer {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding: 24px 16px 36px;
}
.auth-footer a { color: var(--muted); }

@media (min-width: 880px) {
    .auth-grid {
        grid-template-columns: 1.15fr 0.85fr;
        gap: 56px;
        padding: 64px 28px 48px;
    }
    .auth-grid-login {
        grid-template-columns: 1fr 380px;
    }
}

/* ---------- Nav ---------- */
.nav {
    display: flex; align-items: center; justify-content: space-between;
    padding: 16px 20px;
    background: transparent;
    flex-wrap: wrap; gap: 8px;
}
.nav .brand {
    font-weight: 800;
    font-size: 20px;
    color: white;
    display: flex; align-items: center; gap: 10px;
    letter-spacing: -0.01em;
    text-decoration: none;
}
.nav .brand:hover { text-decoration: none; }
.nav .brand-mark {
    flex-shrink: 0;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.25));
    transition: transform 0.25s ease;
}
.nav .brand:hover .brand-mark { transform: rotate(-6deg) scale(1.05); }
.nav .brand-tld {
    color: #fde68a;
    font-weight: 800;
}
.nav nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.nav nav a {
    padding: 8px 4px;
    min-height: var(--tap);
    display: inline-flex;
    align-items: center;
    color: white;
    font-weight: 600;
    font-size: 15px;
}
.nav nav a:hover { color: #fde68a; text-decoration: none; }
.btn-register {
    background: white !important;
    color: var(--brand) !important;
    border: 2px solid white !important;
    padding: 10px 22px !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em;
    border-radius: 8px !important;
}
.btn-register:hover {
    background: transparent !important;
    color: white !important;
}

/* ---------- Buttons ---------- */
.btn {
    display: inline-block;
    padding: 12px 20px;
    border-radius: 10px;
    border: 1px solid transparent;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    text-decoration: none;
    min-height: var(--tap);
    line-height: 1.2;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.btn-primary { background: var(--brand); color: white; }
.btn-primary:hover { background: var(--brand-dark); text-decoration: none; }
.btn-outline { border-color: var(--border); color: var(--ink); background: white; }
.btn-block { display: block; width: 100%; text-align: center; }

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    padding: 40px 20px 32px;
    color: white;
    max-width: 1100px;
    margin: 0 auto;
}
.hero h1 {
    font-size: clamp(28px, 5.4vw, 52px);
    margin: 0 0 18px;
    letter-spacing: -0.02em;
    font-weight: 800;
    color: white;
    line-height: 1.15;
}
.hero h1 em {
    color: #fde68a;
    font-style: normal;
    font-weight: 800;
    background: linear-gradient(180deg, transparent 60%, rgba(253, 230, 138, 0.25) 60%);
    padding: 0 4px;
    border-radius: 4px;
}
.hero p {
    color: #dbeafe;
    font-size: clamp(15px, 2vw, 19px);
    max-width: 820px;
    margin: 0 auto 28px;
    line-height: 1.55;
}
.hero p strong { color: white; font-weight: 700; }
.hero-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-hero-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 14px 28px;
    font-weight: 700;
    border-radius: 6px;
    font-size: 16px;
}
.btn-hero-outline:hover { background: white; color: var(--brand); text-decoration: none; }
.btn-hero-orange {
    background: var(--orange);
    color: white;
    border: 2px solid var(--orange);
    padding: 14px 28px;
    font-weight: 700;
    border-radius: 6px;
    font-size: 16px;
}
.btn-hero-orange:hover { background: var(--orange-dark); border-color: var(--orange-dark); text-decoration: none; }

/* ---------- Type bar ---------- */
.typebar-wrap {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 12px 8px;
}
.typebar {
    display: flex;
    gap: 6px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-radius: 14px;
    padding: 8px;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.3) transparent;
}
.typebar::-webkit-scrollbar { height: 6px; }
.typebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.3); border-radius: 3px; }
.typetab {
    flex: 0 0 auto;
    min-width: 78px;
    padding: 12px 8px 10px;
    background: transparent;
    border: 0;
    border-radius: 10px;
    color: rgba(255,255,255,0.85);
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    font-family: inherit;
    transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.typetab svg {
    width: 26px;
    height: 26px;
}
.typetab:hover {
    background: rgba(255,255,255,0.15);
    color: white;
}
.typetab.active {
    background: white;
    color: var(--brand);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.typetab .pro-badge {
    position: absolute;
    top: 2px;
    right: 4px;
    background: var(--orange);
    color: white;
    font-size: 8px;
    font-weight: 800;
    padding: 2px 5px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}
.typetab.pro { opacity: 0.85; }
.typetab.pro:hover { opacity: 1; }

/* ---------- Generator ---------- */
.generator {
    max-width: 1100px;
    margin: 0 auto 60px;
    padding: 0 12px;
    position: relative;
    z-index: 2;
}
.step-card {
    background: #f1f5f9;
    border-radius: 16px;
    padding: 24px 18px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.18);
}
.step-head {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}
.step-pill {
    background: #1e293b;
    color: white;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
}
.step-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--ink);
}

/* Static / Dynamic toggle */
.sd-toggle {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
.sd-opt {
    flex: 1 1 180px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background: white;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.15s ease;
    flex-wrap: wrap;
    font-weight: 600;
    font-size: 14px;
}
.sd-opt:hover { border-color: #cbd5e1; }
.sd-opt input { display: none; }
.sd-dot {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid #cbd5e1;
    position: relative;
    flex-shrink: 0;
}
.sd-opt.active {
    border-color: #16a34a;
    background: #f0fdf4;
}
.sd-opt.active .sd-dot {
    border-color: #16a34a;
}
.sd-opt.active .sd-dot::after {
    content: "";
    position: absolute;
    inset: 2px;
    border-radius: 50%;
    background: #16a34a;
}
.sd-meta {
    flex-basis: 100%;
    font-size: 11px;
    font-weight: 500;
    color: var(--muted);
    margin-left: 28px;
}
.sd-meta a { color: var(--brand); font-weight: 700; }

.gen-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    background: white;
    border-radius: 14px;
    padding: 22px;
}
.gen-form, .gen-preview { min-width: 0; }
.gen-form label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}
.gen-form input[type="text"],
.gen-form input[type="url"],
.gen-form input[type="email"],
.gen-form input[type="tel"],
.gen-form input[type="datetime-local"],
.gen-form select,
.gen-form textarea {
    display: block; width: 100%; margin-top: 6px;
    padding: 13px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    min-height: var(--tap);
    background: white;
    color: var(--ink);
}
.gen-form textarea { min-height: 80px; resize: vertical; line-height: 1.4; }
.gen-form select { appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2364748b' d='M6 8L0 0h12z'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; padding-right: 36px; }
.gen-form input:focus,
.gen-form select:focus,
.gen-form textarea:focus {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
    border-color: var(--brand);
}
.customize {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px dashed var(--border);
}
.customize-h {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    margin: 0 0 12px;
    font-weight: 700;
}
.gen-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}
.gen-form .row label:nth-child(3) { grid-column: 1 / -1; }
.gen-form .row label { margin-bottom: 0; }
.gen-form input[type="color"] {
    width: 100%; height: 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
    cursor: pointer;
}
.gen-form input[type="file"] {
    width: 100%;
    margin-top: 6px;
    font-size: 14px;
    font-family: inherit;
    color: var(--muted);
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0;
    height: 48px;
    line-height: 48px;
    cursor: pointer;
    overflow: hidden;
}
.gen-form input[type="file"]::file-selector-button {
    height: 48px;
    padding: 0 16px;
    margin-right: 12px;
    border: 0;
    border-right: 1px solid var(--border);
    background: #f1f5f9;
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
.gen-form input[type="file"]::-webkit-file-upload-button {
    height: 48px;
    padding: 0 16px;
    margin-right: 12px;
    border: 0;
    border-right: 1px solid var(--border);
    background: #f1f5f9;
    color: var(--ink);
    font-weight: 600;
    font-size: 14px;
    font-family: inherit;
    cursor: pointer;
}
.gen-preview {
    display: block;
    text-align: center;
    min-width: 0;
}
.gen-preview-box {
    position: relative;
    width: 100%;
    max-width: 512px;
    margin: 0 auto;
    /* Default: square (no caption) */
    padding-top: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
    transition: padding-top 0.2s ease;
}
/* Toggled by JS when "Show URL under QR" is checked: 584/512 = 114.0625% */
.gen-preview-box.with-caption { padding-top: 114.0625%; }
.gen-preview-box canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.hint { font-size: 13px; color: var(--muted); margin: 12px 0 0; }

/* Custom checkbox row */
.gen-form .check {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 8px 0 14px;
    cursor: pointer;
    user-select: none;
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
}
.gen-form .check input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    width: 22px;
    height: 22px;
    border: 2px solid var(--border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: all 0.15s ease;
}
.gen-form .check input[type="checkbox"]:hover { border-color: var(--brand); }
.gen-form .check input[type="checkbox"]:checked {
    background: var(--brand);
    border-color: var(--brand);
}
.gen-form .check input[type="checkbox"]:checked::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.gen-form .check input[type="checkbox"]:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

/* ---------- How it works ---------- */
.how { max-width: 1000px; margin: 56px auto; padding: 0 16px; text-align: center; }
.how h2 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 28px; }
.steps {
    list-style: none; padding: 0; margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: left;
}
.steps li {
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 22px;
}
.step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--brand); color: white; font-weight: 700;
    margin-bottom: 10px;
}
.steps h3 { font-size: 17px; margin: 0 0 6px; }
.steps p { color: var(--muted); margin: 0; font-size: 14px; }

/* ---------- Use cases ---------- */
.usecases { max-width: 1000px; margin: 56px auto; padding: 0 16px; text-align: center; }
.usecases h2 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 28px; }
.cards {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    text-align: left;
}
.card {
    background: white; border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
}
.card h3 { font-size: 16px; margin: 0 0 6px; }
.card p { color: var(--muted); margin: 0; font-size: 14px; }

/* ---------- Pricing ---------- */
.pricing {
    text-align: center;
    padding: 72px 16px 80px;
    background: linear-gradient(180deg, #ffffff 0%, #f1f5f9 100%);
}
.pricing-head { max-width: 760px; margin: 0 auto 40px; }
.pricing h2 {
    font-size: clamp(28px, 5vw, 42px);
    margin-bottom: 12px;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.pricing-sub {
    color: var(--muted);
    font-size: clamp(15px, 2vw, 17px);
    margin: 0 0 28px;
}

/* Monthly / Yearly toggle */
.billing-toggle {
    display: inline-flex;
    background: white;
    border: 2px solid var(--border);
    border-radius: 999px;
    padding: 4px;
    gap: 4px;
}
.bt-opt {
    background: transparent;
    border: 0;
    padding: 10px 22px;
    border-radius: 999px;
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    color: var(--muted);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.15s ease;
}
.bt-opt.active {
    background: var(--brand);
    color: white;
    box-shadow: 0 4px 12px rgba(29,78,216,0.3);
}
.save-tag {
    background: #16a34a;
    color: white;
    font-size: 10px;
    font-weight: 800;
    padding: 3px 7px;
    border-radius: 999px;
    letter-spacing: 0.02em;
}
.bt-opt.active .save-tag { background: #15803d; }

/* Plan cards */
.plans {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
    max-width: 1100px;
    margin: 0 auto;
}
.plans-3 { max-width: 1180px; }
.plans-4 { max-width: 1200px; }

.plan {
    position: relative;
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px 26px;
    text-align: left;
    display: flex;
    flex-direction: column;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.plan:hover { transform: translateY(-3px); box-shadow: 0 12px 32px rgba(15,23,42,0.08); }
.plan.featured {
    border: 2px solid var(--brand);
    box-shadow: 0 18px 40px rgba(29,78,216,0.18);
    transform: scale(1.02);
}
.plan.featured:hover { transform: scale(1.02) translateY(-3px); }
.ribbon {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--orange);
    color: white;
    padding: 6px 18px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.08em;
    box-shadow: 0 4px 12px rgba(249,115,22,0.4);
}
.plan-head { margin-bottom: 16px; }
.plan h3 { margin: 0 0 4px; font-size: 22px; font-weight: 800; color: var(--ink); }
.plan-tag { color: var(--muted); font-size: 13px; margin: 0; }

.plan-price {
    display: flex;
    align-items: baseline;
    gap: 2px;
    margin: 8px 0 4px;
    font-weight: 800;
    color: var(--ink);
}
.plan-price .currency { font-size: 22px; }
.plan-price .amount { font-size: 48px; line-height: 1; letter-spacing: -0.03em; }
.plan-price .per { font-size: 15px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.plan-billed {
    color: var(--muted);
    font-size: 13px;
    margin: 0 0 18px;
    min-height: 18px;
}

.btn-plan {
    display: block;
    text-align: center;
    background: white;
    color: var(--brand);
    border: 2px solid var(--brand);
    padding: 13px 18px;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
    transition: all 0.15s ease;
    min-height: var(--tap);
}
.btn-plan:hover { background: #eff6ff; text-decoration: none; }
.btn-plan-primary {
    background: var(--brand);
    color: white;
}
.btn-plan-primary:hover { background: var(--brand-dark); color: white; }

.plan-note {
    text-align: center;
    color: var(--muted);
    font-size: 12px;
    margin: 8px 0 18px;
}

.plan-feats {
    list-style: none;
    padding: 0;
    margin: 8px 0 0;
    border-top: 1px solid var(--border);
    padding-top: 18px;
}
.plan-feats li {
    padding: 7px 0 7px 26px;
    font-size: 14px;
    color: var(--ink);
    position: relative;
    line-height: 1.45;
}
.plan-feats li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 11px;
    width: 16px;
    height: 16px;
    background: #dcfce7;
    border-radius: 50%;
}
.plan-feats li::after {
    content: "";
    position: absolute;
    left: 5px;
    top: 14px;
    width: 6px;
    height: 10px;
    border: solid #16a34a;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.plan-feats strong { color: var(--ink); font-weight: 700; }

.pricing-trust {
    margin: 40px auto 0;
    color: var(--muted);
    font-size: 14px;
    max-width: 600px;
}
.pricing-trust a { color: var(--brand); font-weight: 600; }

/* ---------- FAQ ---------- */
.faq { max-width: 760px; margin: 0 auto 56px; padding: 0 16px; }
.faq h2 { font-size: clamp(22px, 4vw, 30px); margin-bottom: 24px; text-align: center; }
.faq details {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 16px 18px;
    margin-bottom: 12px;
}
.faq summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    list-style: none;
    padding-right: 20px;
    position: relative;
    min-height: 28px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
    content: "+";
    position: absolute; right: 0; top: 0;
    font-size: 22px; line-height: 1; color: var(--muted);
}
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

/* ---------- Footer ---------- */
footer { text-align: center; padding: 28px 16px; color: var(--muted); font-size: 13px; }
footer a { color: var(--muted); }

/* ---------- Auth ---------- */
.auth-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}
.auth-card h1, .auth-card h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.01em;
}
.auth-card label { display: block; margin: 12px 0; font-size: 13px; color: var(--muted); font-weight: 600; }
.auth-card input {
    display: block; width: 100%; margin-top: 6px;
    padding: 13px 14px; border: 1px solid var(--border);
    border-radius: 10px; font-size: 16px; min-height: var(--tap);
}
.auth-card input:focus {
    outline: 2px solid var(--brand);
    outline-offset: 1px;
    border-color: var(--brand);
}
.auth-card .btn { width: 100%; margin-top: 14px; padding: 14px 20px; font-size: 15px; }
.error { background: #fef2f2; color: var(--danger); padding: 10px; border-radius: 8px; font-size: 14px; margin-bottom: 8px; }

/* ---------- Dashboard ---------- */
.dashboard { max-width: 1100px; margin: 24px auto; padding: 0 16px; }
.dashboard h1 { font-size: 24px; margin-bottom: 20px; }
.plan-badge { padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; }
.plan-free { background: #f1f5f9; color: var(--muted); }
.plan-pro { background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: white; }

.new-qr { display: grid; grid-template-columns: 1fr; gap: 10px; margin-bottom: 24px; }
.new-qr input {
    padding: 12px 14px; border: 1px solid var(--border);
    border-radius: 10px; font-size: 16px; font-family: inherit; min-height: var(--tap);
}

.qr-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.qr-table {
    width: 100%; border-collapse: collapse;
    background: white; border-radius: 12px; overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    min-width: 560px;
}
.qr-table th, .qr-table td {
    padding: 14px 16px; text-align: left;
    border-bottom: 1px solid var(--border); font-size: 14px;
}
.qr-table th {
    background: #f8fafc; font-size: 12px;
    text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
}
.qr-table tr:last-child td { border-bottom: 0; }
.qr-table .truncate { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qr-table .empty { text-align: center; color: var(--muted); padding: 32px; }

/* ---------- Tablet & up ---------- */
@media (min-width: 640px) {
    .nav { padding: 16px 28px; }
    .gen-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); padding: 28px; gap: 28px; }
    .gen-form .row { grid-template-columns: 1fr 1fr 1fr; }
    .gen-form .row label:nth-child(3) { grid-column: auto; }
    .steps { grid-template-columns: repeat(3, 1fr); }
    .cards { grid-template-columns: repeat(2, 1fr); }
    .plans { grid-template-columns: 1fr 1fr; }
    .new-qr { grid-template-columns: 1fr 2fr auto auto; }
}

@media (min-width: 960px) {
    .nav { padding: 16px 32px; }
    .cards { grid-template-columns: repeat(3, 1fr); }
    .hero { padding: 80px 24px 40px; }
    .plans-4 { grid-template-columns: repeat(4, 1fr); gap: 18px; }
    .plans-4 .plan { padding: 28px 22px; }
    .plans-4 .plan-feats li { font-size: 13px; }
}

/* =========================================================
   Sticky main header with dropdowns + mobile drawer
   ========================================================= */
.header.sticky {
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: saturate(140%) blur(8px);
    -webkit-backdrop-filter: saturate(140%) blur(8px);
    background: rgba(29, 78, 216, 0.92);
}
body.home .header.sticky { background: rgba(29, 78, 216, 0.85); }
.header .container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
}
.cover-header {
    display: flex;
    align-items: center;
    gap: 16px;
    min-height: 64px;
}
.menu-mobile {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 40px;
    height: 40px;
    border: 0;
    background: transparent;
    cursor: pointer;
    padding: 0;
}
.menu-mobile span {
    display: block;
    width: 22px;
    height: 2px;
    background: white;
    margin: 0 auto;
    transition: transform 0.2s ease, opacity 0.2s ease;
    border-radius: 2px;
}
.main-logo.brand {
    color: white;
    font-weight: 800;
    font-size: 19px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}
.main-logo .brand-tld { color: #fde68a; }

.menu-flex { flex: 1; display: none; }
.menu-flex .menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 6px;
    align-items: center;
    justify-content: center;
}
.menu-flex .menu li { position: relative; }
.main-menu-link {
    background: transparent;
    border: 0;
    color: white;
    font-weight: 600;
    font-size: 15px;
    padding: 10px 14px;
    cursor: pointer;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: inherit;
    text-decoration: none;
    transition: background 0.15s ease;
}
.main-menu-link:hover { background: rgba(255,255,255,0.12); text-decoration: none; }
.qr-angle-down {
    width: 8px;
    height: 8px;
    border-right: 2px solid white;
    border-bottom: 2px solid white;
    transform: rotate(45deg);
    transition: transform 0.2s ease;
    margin-top: -3px;
}
.has-dropdown:hover .qr-angle-down,
.has-dropdown:focus-within .qr-angle-down { transform: rotate(225deg); margin-top: 3px; }

.dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.18);
    padding: 10px;
    min-width: 240px;
    opacity: 0;
    pointer-events: none;
    transition: all 0.18s ease;
    border: 1px solid var(--border);
}
.has-dropdown:hover .dropdown,
.has-dropdown:focus-within .dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}
.dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    color: var(--ink);
    font-size: 14px;
    font-weight: 500;
    border-radius: 8px;
    text-decoration: none;
}
.dropdown a:hover { background: #f1f5f9; text-decoration: none; }
.pill-pro {
    background: var(--orange);
    color: white;
    font-size: 9px;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}

.login-menu {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-left: auto;
}
.login-menu .btn-login {
    color: white;
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
}
.login-menu .btn-login .underline { border-bottom: 1px solid rgba(255,255,255,0.5); padding-bottom: 1px; }
.login-menu .btn-register {
    background: white;
    color: var(--brand);
    border: 2px solid white;
    padding: 8px 18px;
    border-radius: 8px;
    font-weight: 800;
    font-size: 13px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    text-decoration: none;
    transition: all 0.15s ease;
}
.login-menu .btn-register:hover { background: transparent; color: white; text-decoration: none; }

.language-section { display: none; }
.language-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 0;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    padding: 6px 8px;
    border-radius: 8px;
    font-family: inherit;
}
.language-toggle:hover { background: rgba(255,255,255,0.12); }

/* Mobile drawer */
.mobile-drawer {
    position: fixed;
    top: 0; left: -100%;
    width: 86%;
    max-width: 320px;
    height: 100vh;
    background: white;
    box-shadow: 0 0 60px rgba(0,0,0,0.25);
    padding: 20px 18px;
    overflow-y: auto;
    z-index: 200;
    transition: left 0.28s ease;
}
.mobile-drawer.open { left: 0; }
.drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.45);
    z-index: 150;
}
.drawer-backdrop.open { display: block; }
.drawer-close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 36px;
    height: 36px;
    border: 0;
    background: transparent;
    font-size: 28px;
    color: var(--muted);
    cursor: pointer;
}
.drawer-brand {
    font-weight: 800;
    font-size: 22px;
    color: var(--ink);
    text-decoration: none;
    display: block;
    margin: 8px 0 24px;
}
.mobile-drawer details {
    border-bottom: 1px solid var(--border);
    padding: 12px 0;
}
.mobile-drawer details summary {
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    color: var(--ink);
    padding: 4px 0;
}
.mobile-drawer details summary::-webkit-details-marker { display: none; }
.mobile-drawer details a {
    display: block;
    padding: 10px 12px;
    color: var(--muted);
    font-size: 14px;
    text-decoration: none;
    border-radius: 6px;
}
.mobile-drawer details a:hover { background: #f1f5f9; color: var(--ink); }
.drawer-link {
    display: block;
    padding: 14px 4px;
    border-bottom: 1px solid var(--border);
    color: var(--ink);
    font-weight: 700;
    font-size: 15px;
    text-decoration: none;
}
.drawer-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

/* Auth bar nav (used on info pages too) */
.auth-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
}
.auth-bar-nav { display: flex; gap: 16px; align-items: center; }
.auth-bar-nav a { color: var(--ink); font-weight: 600; font-size: 14px; text-decoration: none; }
.auth-bar-nav a:hover { color: var(--brand); }
.auth-bar-nav .btn-register {
    background: var(--brand); color: white; border: 0;
    padding: 8px 16px; border-radius: 8px;
    text-transform: uppercase; font-size: 12px; letter-spacing: 0.04em;
}

/* =========================================================
   Info pages (/info.php)
   ========================================================= */
.info-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 24px 18px 60px;
}
.breadcrumb {
    font-size: 13px;
    color: var(--muted);
    margin-bottom: 24px;
}
.breadcrumb a { color: var(--brand); }
.breadcrumb span { margin: 0 4px; }

.info-hero {
    text-align: center;
    padding: 32px 0 36px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 36px;
}
.info-eyebrow {
    text-transform: uppercase;
    font-size: 12px;
    letter-spacing: 0.1em;
    color: var(--brand);
    font-weight: 800;
    margin: 0 0 12px;
}
.info-hero h1 {
    font-size: clamp(28px, 5vw, 44px);
    margin: 0 0 14px;
    letter-spacing: -0.02em;
    font-weight: 800;
}
.info-tagline {
    color: var(--muted);
    font-size: clamp(15px, 2vw, 18px);
    max-width: 620px;
    margin: 0 auto 20px;
}
.info-cta-top { display: inline-block; }

.info-body { font-size: 16px; line-height: 1.7; color: var(--ink); }
.info-body .lede {
    font-size: 18px;
    line-height: 1.65;
    color: var(--ink);
    margin: 0 0 32px;
}
.info-block { margin: 36px 0; }
.info-block h2 {
    font-size: clamp(20px, 3.5vw, 26px);
    font-weight: 800;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}
.info-uc {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 12px;
}
.info-uc li {
    background: white;
    border: 1px solid var(--border);
    border-left: 3px solid var(--brand);
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 15px;
}
.info-howto {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}
.info-howto li {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 16px 20px;
    font-size: 15px;
}
.step-circle {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--brand);
    color: white;
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}
.info-cta-block {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: white;
    padding: 32px 28px;
    border-radius: 16px;
    text-align: center;
}
.info-cta-block h2 { color: white; }
.info-cta-block p { color: #dbeafe; margin-bottom: 20px; }
.info-cta-block .btn-primary {
    background: white;
    color: var(--brand);
    border: 0;
    padding: 14px 28px;
    font-weight: 800;
    border-radius: 8px;
    display: inline-block;
}
.info-cta-block .btn-primary:hover { background: #fde68a; color: var(--brand-dark); }
.btn-block-mw { max-width: 320px; margin: 0 auto; display: block; }

.info-faq {
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 18px;
    margin-bottom: 10px;
}
.info-faq summary {
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    list-style: none;
    position: relative;
    padding-right: 24px;
}
.info-faq summary::-webkit-details-marker { display: none; }
.info-faq summary::after {
    content: "+";
    position: absolute;
    right: 0;
    top: 0;
    font-size: 22px;
    color: var(--muted);
}
.info-faq[open] summary::after { content: "−"; }
.info-faq p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.info-related {
    margin-top: 60px;
    padding-top: 32px;
    border-top: 1px solid var(--border);
}
.info-related h3 { font-size: 18px; margin-bottom: 16px; }
.info-related ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
}
.info-related a {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--brand);
    background: #f1f5f9;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
}
.info-related a:hover { background: #e2e8f0; }

@media (min-width: 700px) {
    .info-related ul { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 992px) {
    .menu-mobile { display: none; }
    .menu-flex { display: flex; }
    .language-section { display: block; }
    .header .container { padding: 0 24px; }
}

/* =========================================================
   Dashboard — plan summary, gauges, type picker, builders
   ========================================================= */
body.dash { background: #f8fafc; }
body.dash .dashboard { max-width: 1200px; }

.flash {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
    font-weight: 600;
}
.flash-ok { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }

.dash-header {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.plan-summary {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    margin-bottom: 20px;
}
.plan-summary h1 { font-size: 24px; margin: 0 0 6px; }
.current-plan {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}
.plan-chip {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: white;
}
.plan-chip-free { background: #64748b; }
.plan-chip-regular { background: #0ea5e9; }
.plan-chip-advanced { background: linear-gradient(135deg, #1d4ed8, #22d3ee); }
.plan-chip-premium { background: linear-gradient(135deg, #f97316, #dc2626); }

.trial-badge {
    background: #fef3c7;
    color: #92400e;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}

.plan-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.usage-gauges {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
    padding-top: 20px;
    border-top: 1px solid var(--border);
}
.gauge {}
.gauge-head {
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    color: var(--ink);
    margin-bottom: 6px;
}
.gauge-head span { font-variant-numeric: tabular-nums; color: var(--muted); }
.gauge-bar {
    background: #e2e8f0;
    height: 8px;
    border-radius: 4px;
    overflow: hidden;
}
.gauge-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    transition: width 0.3s ease;
}
.gauge-note {
    font-size: 12px;
    color: var(--muted);
    margin: 4px 0 0;
}

@media (min-width: 700px) {
    .usage-gauges { grid-template-columns: 1fr 1fr; gap: 32px; }
}

/* ---------- Create panel ---------- */
.create-panel {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.create-panel h2 { font-size: 18px; margin: 0 0 16px; }

.type-picker {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 6px;
    background: #f1f5f9;
    border-radius: 12px;
}
.tp-tab {
    background: transparent;
    border: 0;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: var(--muted);
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.tp-tab:hover:not(:disabled) { color: var(--ink); background: rgba(255,255,255,0.6); }
.tp-tab.active { background: white; color: var(--brand); box-shadow: 0 2px 6px rgba(0,0,0,0.08); }
.tp-tab.pro { opacity: 0.85; }
.tp-tab.pro.locked,
.tp-tab:disabled { opacity: 0.5; cursor: not-allowed; }

.create-form label {
    display: block;
    margin-bottom: 14px;
    font-size: 13px;
    color: var(--muted);
    font-weight: 600;
}
.create-form input[type="text"],
.create-form input[type="url"],
.create-form input[type="email"],
.create-form input[type="tel"],
.create-form input[type="password"],
.create-form input[type="datetime-local"],
.create-form textarea {
    display: block;
    width: 100%;
    margin-top: 6px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
}
.create-form textarea { resize: vertical; }
.create-form .row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
}
.create-form .row label { margin-bottom: 0; }
.create-form input[type="color"] {
    width: 100%;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 4px;
}
.create-form input[type="file"] {
    display: block;
    width: 100%;
    margin-top: 6px;
    font-size: 13px;
    color: var(--muted);
    background: white;
    border: 1px solid var(--border);
    border-radius: 10px;
    height: 42px;
    line-height: 42px;
}
.form-hint {
    font-size: 12px;
    color: var(--muted);
    margin: -6px 0 12px;
}
.create-advanced {
    margin-top: 14px;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid var(--border);
}
.create-advanced summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 14px;
    list-style: none;
    color: var(--ink);
}
.create-advanced summary::-webkit-details-marker { display: none; }
.create-advanced[open] summary { margin-bottom: 14px; }

.create-form .check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: var(--ink);
    font-weight: 500;
    margin: 10px 0 0;
    cursor: pointer;
}

/* ---------- Create form + live preview side-by-side ---------- */
.create-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
}
.create-grid .create-form, .create-grid .create-preview { min-width: 0; }
.create-preview {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.create-preview-box {
    position: relative;
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
    padding-top: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
    overflow: hidden;
}
.create-preview-box canvas {
    position: absolute;
    inset: 0;
    width: 100% !important;
    height: 100% !important;
    display: block;
}
.preview-hint {
    margin: 12px 0 0;
    font-size: 12px;
    color: var(--muted);
    text-align: center;
    max-width: 320px;
    line-height: 1.5;
}
@media (min-width: 880px) {
    .create-grid { grid-template-columns: 1fr 360px; gap: 32px; align-items: start; }
    .create-preview { position: sticky; top: 80px; }
}

/* ---------- Menu builder ---------- */
.menu-sec {
    background: #f8fafc;
    padding: 14px;
    border-radius: 10px;
    margin-bottom: 12px;
    border: 1px solid var(--border);
}
.menu-sec-head {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
}
.menu-sec-head input { flex: 1; margin-top: 0; }
.menu-item-row {
    display: grid;
    grid-template-columns: 1fr 100px auto;
    gap: 8px;
    margin-bottom: 8px;
    align-items: center;
}
.menu-item-row input { margin-top: 0; font-size: 14px; padding: 10px 12px; }
.menu-item-row input:nth-child(3),
.menu-item-row input:nth-child(4) { grid-column: 1 / -2; }

@media (min-width: 700px) {
    .menu-item-row {
        grid-template-columns: 2fr 100px 2fr 2fr auto;
    }
    .menu-item-row input:nth-child(3),
    .menu-item-row input:nth-child(4) { grid-column: auto; }
}

.btn-ghost {
    background: transparent;
    border: 1px dashed var(--border);
    color: var(--muted);
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }

/* ---------- API key + bulk CSV panels ---------- */
.api-panel,
.bulk-csv {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 18px 24px;
    margin-bottom: 18px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.api-panel summary,
.bulk-csv summary {
    cursor: pointer;
    list-style: none;
    font-size: 15px;
    padding: 6px 0;
}
.api-panel summary::-webkit-details-marker,
.bulk-csv summary::-webkit-details-marker { display: none; }
.api-panel details[open] summary,
.bulk-csv details[open] summary { margin-bottom: 14px; }
.api-key-reveal {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 14px;
}
.api-key-reveal p { margin: 0 0 8px; font-size: 13px; color: #92400e; }
.api-key-value {
    display: block;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 13px;
    background: #1e293b;
    color: #fde68a;
    padding: 12px 14px;
    border-radius: 8px;
    word-break: break-all;
    -webkit-user-select: all;
    user-select: all;
}
.bulk-form { display: grid; gap: 10px; }
.bulk-form code {
    background: #f1f5f9;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 12px;
}

/* ---------- Existing QR list ---------- */
.qr-list {
    background: white;
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.qr-list h2 { font-size: 18px; margin: 0 0 16px; }
.type-chip {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    background: #e0e7ff;
    color: var(--brand);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* =========================================================
   API docs page (/api-docs.php)
   ========================================================= */
body.docs { background: #f8fafc; }
.docs-page {
    max-width: 880px;
    margin: 0 auto;
    padding: 32px 22px 60px;
}
.docs-hero {
    background: linear-gradient(135deg, #1e40af, #2563eb);
    color: white;
    border-radius: 18px;
    padding: 36px 32px;
    margin-bottom: 28px;
}
.docs-hero h1 {
    color: white;
    font-size: clamp(28px, 5vw, 38px);
    margin: 8px 0 12px;
    letter-spacing: -0.02em;
}
.docs-hero .info-eyebrow {
    background: rgba(255,255,255,0.18);
    color: white;
    margin: 0 0 8px;
    display: inline-block;
}
.docs-hero .info-tagline {
    color: #dbeafe;
    margin: 0 0 22px;
    font-size: clamp(15px, 2vw, 17px);
}
.docs-hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 18px;
    font-size: 13px;
    color: #dbeafe;
}
.docs-hero-meta strong { color: white; font-weight: 700; }
.docs-hero-meta code {
    background: rgba(0,0,0,0.25);
    padding: 2px 8px;
    border-radius: 4px;
    color: #fde68a;
    font-size: 12px;
}

.docs-toc {
    background: white;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 28px;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-size: 13px;
}
.docs-toc a {
    color: var(--brand);
    font-weight: 600;
    text-decoration: none;
}
.docs-toc a:hover { text-decoration: underline; }

.docs-body section {
    background: white;
    border: 1px solid var(--border);
    border-radius: 14px;
    padding: 28px 30px;
    margin-bottom: 22px;
    scroll-margin-top: 80px;
}
.docs-body h2 {
    font-size: 22px;
    font-weight: 800;
    margin: 0 0 14px;
    letter-spacing: -0.01em;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.docs-body h3 {
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted);
    margin: 22px 0 10px;
}
.docs-body p {
    line-height: 1.65;
    color: var(--ink);
    margin: 0 0 14px;
}
.docs-body code {
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    background: #f1f5f9;
    color: #1e293b;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
}
.docs-body pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 18px 20px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.55;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.docs-body pre code {
    background: transparent;
    color: inherit;
    padding: 0;
    font-size: inherit;
}
.docs-method {
    display: inline-block;
    font-family: ui-monospace, "SF Mono", Menlo, monospace;
    font-size: 11px;
    font-weight: 800;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.06em;
}
.docs-method-post { background: #dcfce7; color: #166534; }
.docs-method-get  { background: #dbeafe; color: #1d4ed8; }

.docs-table {
    width: 100%;
    border-collapse: collapse;
    margin: 0 0 14px;
    font-size: 14px;
}
.docs-table th, .docs-table td {
    text-align: left;
    padding: 10px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.docs-table th {
    background: #f8fafc;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
}

.docs-callout {
    background: #fef3c7;
    border-left: 4px solid #f59e0b;
    padding: 14px 18px;
    border-radius: 8px;
    font-size: 14px;
    color: #92400e;
    margin: 16px 0;
}
.docs-callout strong { color: #78350f; }

.docs-cta-block {
    background: linear-gradient(135deg, #1e40af, #2563eb) !important;
    color: white !important;
    text-align: center;
    border: 0 !important;
}
.docs-cta-block h2 { color: white; justify-content: center; }
.docs-cta-block p { color: #dbeafe; margin-bottom: 18px; }
.docs-cta-block .btn { margin: 4px; }
.docs-cta-block .btn-outline {
    background: transparent;
    color: white;
    border: 2px solid white;
}
.docs-cta-block .btn-outline:hover { background: white; color: var(--brand); }

/* =========================================================
   Generic styled error page (used by billing_portal.php etc)
   ========================================================= */
.error-page {
    max-width: 560px;
    margin: 0 auto;
    padding: 48px 22px 60px;
    text-align: center;
}
.error-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 44px 32px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, 0.08);
}
.error-icon {
    font-size: 48px;
    margin-bottom: 14px;
    line-height: 1;
}
.error-card h1 {
    font-size: clamp(22px, 4vw, 28px);
    margin: 0 0 14px;
    letter-spacing: -0.01em;
    font-weight: 800;
}
.error-card p {
    color: var(--ink);
    line-height: 1.65;
    margin: 0 0 12px;
}
.error-card .error-sub {
    color: var(--muted);
    font-size: 14px;
    margin-bottom: 24px;
}
.error-cta {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 24px;
}
.error-debug {
    margin-top: 28px;
    text-align: left;
    background: #f8fafc;
    padding: 14px 18px;
    border-radius: 8px;
}
.error-debug summary {
    cursor: pointer;
    font-size: 12px;
    color: var(--muted);
    font-weight: 600;
}
.error-debug pre {
    margin: 10px 0 0;
    font-size: 12px;
    color: var(--ink);
    white-space: pre-wrap;
    word-break: break-word;
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    * { transition: none !important; animation: none !important; }
}
