:root {
    --ink: #0f172a;
    --muted: #64748b;
    --line: #e2e8f0;
    --soft: #f8fafc;
    --brand: #059669;
    --brand-dark: #047857;
    --brand-light: #ecfdf5;
    --accent: #2563eb;
    --danger: #dc2626;
    --shadow: 0 10px 40px rgba(15, 23, 42, 0.08);
    --shadow-sm: 0 4px 18px rgba(15, 23, 42, 0.05);
    --radius: 14px;
    --radius-sm: 10px;
    --font: "DM Sans", system-ui, -apple-system, Segoe UI, sans-serif;
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 0.9375rem;
    --text-lg: 1.0625rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.625rem;
    --text-3xl: 2.125rem;
    --container: 1240px;
    --container-dashboard: min(100%, 1680px);
    --sidebar-width: 248px;
    --container-narrow: 760px;
    --container-scan: 920px;
}

* {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    color: var(--ink);
    background: #f1f5f9;
    font-family: var(--font);
    font-size: var(--text-base);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

.site-shell {
    display: flex;
    flex-direction: column;
    max-width: 100%;
    min-height: 100vh;
    overflow-x: clip;
}

h1, h2, h3, h4 {
    color: var(--ink);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
    margin: 0 0 0.65em;
}

h1 { font-size: clamp(1.5rem, 2.5vw, 1.875rem); }
h2 { font-size: clamp(1.125rem, 2vw, 1.25rem); }
h3 { font-size: var(--text-base); font-weight: 700; }

p {
    margin: 0 0 1em;
}

a {
    color: var(--brand-dark);
    text-decoration: none;
    transition: color 0.15s ease;
}

a:hover {
    color: var(--accent);
}

.topbar {
    backdrop-filter: blur(14px);
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--line);
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.topbar-inner {
    align-items: center;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin: 0 auto;
    max-width: var(--container);
    min-height: 96px;
    padding: 16px 24px;
    width: 100%;
}

.topnav {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.nav-link {
    border-radius: 999px;
    color: var(--ink);
    font-size: var(--text-sm);
    font-weight: 600;
    padding: 8px 14px;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav-link:hover {
    background: var(--soft);
    color: var(--brand-dark);
}

.nav-link.is-active {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.nav-link-muted {
    color: var(--muted);
}

.btn-nav {
    font-size: var(--text-sm);
    padding: 10px 16px;
}

.nav-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    display: none;
    flex-direction: column;
    flex-shrink: 0;
    gap: 5px;
    height: 44px;
    justify-content: center;
    margin-left: auto;
    padding: 0;
    width: 44px;
}

.nav-toggle-bar {
    background: var(--ink);
    border-radius: 2px;
    display: block;
    height: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
    width: 20px;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(2) {
    opacity: 0;
}

.nav-toggle.is-active .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.topbar--scan {
    box-shadow: 0 1px 0 rgba(15, 23, 42, 0.06);
}

.topbar-inner--scan {
    gap: 12px;
    min-height: 64px;
    padding-bottom: 12px;
    padding-top: calc(12px + env(safe-area-inset-top, 0px));
}

.scan-trust-badge {
    background: var(--brand-light);
    border: 1px solid #a7f3d0;
    border-radius: 999px;
    color: var(--brand-dark);
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.04em;
    padding: 8px 12px;
    text-transform: uppercase;
    white-space: nowrap;
}

.dash-nav-toggle {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    cursor: pointer;
    display: none;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 700;
    gap: 10px;
    margin-bottom: 12px;
    min-height: 44px;
    padding: 10px 16px;
    text-align: left;
    width: 100%;
}

.dash-nav-toggle .dash-nav-icon {
    background: currentColor;
    border-radius: 1px;
    box-shadow: 0 -6px 0 currentColor, 0 6px 0 currentColor;
    display: inline-block;
    flex-shrink: 0;
    height: 2px;
    width: 18px;
}

.dash-nav-toggle::after {
    content: none;
}

.dashboard-backdrop {
    background: rgba(15, 23, 42, 0.45);
    display: none;
    inset: 0;
    position: fixed;
    z-index: 35;
}

.dashboard.is-sidebar-open .dashboard-backdrop {
    display: block;
}

.layout-scan .scan-page,
.layout-scan .multilang-leaflet,
.layout-scan .leaflet-lang-panel {
    font-family: "DM Sans", "Noto Sans", "Noto Sans Devanagari", "Noto Sans Bengali", "Noto Sans Gujarati",
        "Noto Sans Gurmukhi", "Noto Sans Tamil", "Noto Sans Telugu", "Noto Sans Kannada", "Noto Sans Malayalam",
        "Noto Sans Oriya", "Noto Nastaliq Urdu", system-ui, sans-serif;
}

.layout-scan .page--scan {
    padding-bottom: calc(24px + env(safe-area-inset-bottom, 0px));
    padding-left: max(12px, env(safe-area-inset-left, 0px));
    padding-right: max(12px, env(safe-area-inset-right, 0px));
    padding-top: 12px;
}

.layout-scan .scan-page {
    max-width: 100%;
}

.layout-scan .scan-hero {
    padding: 20px 18px;
}

.layout-scan .scan-card .data-table dl {
    grid-template-columns: minmax(120px, 38%) 1fr;
}

.layout-scan .scan-meta span {
    flex: 1 1 auto;
    min-width: 0;
    text-align: center;
}

.layout-scan .scan-footnote {
    font-size: var(--text-xs);
    line-height: 1.55;
    padding: 0 8px;
}

body.nav-open {
    overflow: hidden;
}

.btn,
button,
.nav-link,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

.btn,
button {
    min-height: 44px;
}

.brand {
    align-items: center;
    color: var(--ink);
    display: inline-flex;
    flex-shrink: 0;
    font-weight: 700;
    letter-spacing: -0.02em;
    min-width: 0;
}

.brand-logo {
    display: block;
    flex-shrink: 0;
    object-fit: contain;
}

.brand-logo-header {
    display: block;
    height: 84px;
    max-height: 84px;
    max-width: min(560px, 82vw);
    object-fit: contain;
    width: auto;
}

.brand-text {
    font-size: var(--text-lg);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    white-space: nowrap;
}

.brand-logo-footer-icon {
    height: 56px;
    object-fit: contain;
    width: 56px;
}

.footer-brand {
    align-items: center;
    color: #fff;
    display: inline-flex;
    gap: 12px;
    margin-bottom: 16px;
    text-decoration: none;
}

.footer-brand strong {
    display: block;
    font-size: 20px;
    line-height: 1.2;
}

.footer-brand small {
    color: rgba(226, 232, 240, 0.65);
    display: block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.06em;
    margin-top: 2px;
    text-transform: uppercase;
}

.footer-brand .brand-logo-footer-icon {
    filter: brightness(1.05);
}

.brand-mark {
    align-items: center;
    background: linear-gradient(135deg, var(--brand), #34d399);
    border-radius: var(--radius-sm);
    color: #fff;
    display: inline-flex;
    flex-shrink: 0;
    font-size: 11px;
    font-weight: 800;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.title-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
    justify-content: space-between;
    margin-bottom: 20px;
    padding-bottom: 14px;
    width: 100%;
}

.title-row h1 {
    margin: 0;
}

.actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.page {
    flex: 1;
    margin: 0 auto;
    max-width: var(--container);
    padding: 28px 24px 40px;
    width: 100%;
}

.layout-app .page {
    max-width: var(--container-dashboard);
    padding: 24px clamp(16px, 2.5vw, 32px) 40px;
}

.page--marketing {
    max-width: var(--container);
}

.page--auth,
.page--scan {
    max-width: var(--container-scan);
}

.page--scan {
    padding-top: 20px;
}

.page-head {
    align-items: flex-end;
    border-bottom: 1px solid var(--line);
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 18px;
}

.page-head h1 {
    margin-bottom: 6px;
}

.page-head-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.flash-banner {
    margin-bottom: 18px;
}

.empty-state {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius);
    margin: 24px auto;
    max-width: 560px;
    padding: 48px 32px;
    text-align: center;
}

.empty-state-icon {
    color: var(--brand);
    font-size: 2rem;
    margin-bottom: 12px;
}

.empty-state h1 {
    font-size: var(--text-2xl);
}

.empty-state p {
    color: var(--muted);
    margin: 0 auto;
    max-width: 420px;
}

.qr-hero {
    align-items: center;
    background:
        radial-gradient(circle at 90% 10%, rgba(37, 99, 235, 0.12) 0, transparent 35%),
        radial-gradient(circle at 10% 90%, rgba(5, 150, 105, 0.14) 0, transparent 30%),
        linear-gradient(135deg, #ffffff, #f0fdf4 48%, #eff6ff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
    min-height: 0;
    overflow: hidden;
    padding: clamp(20px, 3vw, 32px);
}

.qr-hero-copy {
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.qr-hero .eyebrow {
    margin: 0 0 6px;
}

.qr-hero h1 {
    font-size: clamp(1.875rem, 4.2vw, 2.375rem);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.12;
    margin: 0 0 10px;
    max-width: min(100%, 28ch);
    text-wrap: balance;
}

.qr-hero p {
    color: var(--muted);
    font-size: clamp(0.9375rem, 1.2vw, 1.0625rem);
    line-height: 1.55;
    margin: 0 0 14px;
    max-width: 36em;
}

.qr-hero .actions {
    flex-wrap: wrap;
    gap: 10px;
    margin: 0;
}

@media (min-width: 768px) {
    .qr-hero h1 {
        font-size: clamp(2.5rem, 2.4vw, 3rem);
        line-height: 1.1;
        max-width: min(100%, 26ch);
    }
}

@media (min-width: 1024px) {
    .qr-hero {
        gap: 22px;
        padding: 28px 32px;
    }

    .qr-hero h1 {
        font-size: clamp(3rem, 1vw + 1.5rem, 3.5rem);
        line-height: 1.08;
        max-width: 22ch;
    }

    .qr-hero p {
        font-size: 1.0625rem;
        line-height: 1.55;
        margin-bottom: 14px;
    }
}

.qr-demo-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    min-width: 0;
    padding: 24px;
}

.mini-tabs {
    background: var(--soft);
    border-radius: 10px;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 18px;
    padding: 6px;
}

.mini-tabs {
    background: var(--soft);
    border-radius: 10px;
    display: grid;
    gap: 8px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 18px;
    padding: 6px;
}

.mini-tab {
    background: transparent;
    border: 0;
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    font-family: inherit;
    font-size: var(--text-sm);
    font-weight: 700;
    padding: 10px;
    text-align: center;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.mini-tab.active {
    background: #fff;
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.08);
    color: var(--brand-dark);
}

.demo-panel[hidden] {
    display: none !important;
}

.plans-section {
    margin-top: 12px;
}

.home-marketing {
    display: grid;
    gap: 20px;
    margin-top: 20px;
}

.home-marketing-intro h2,
.home-marketing-solutions h2,
.home-marketing-platform h2 {
    margin-bottom: 12px;
}

.home-marketing-intro .lead {
    color: var(--ink);
    font-size: var(--text-lg);
    margin-bottom: 12px;
}

.home-marketing-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.home-marketing-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    padding: 18px 16px;
}

.home-marketing-card h3 {
    font-size: var(--text-base);
    margin-bottom: 8px;
}

.home-marketing-card p {
    color: var(--muted);
    font-size: var(--text-sm);
    margin: 0;
}

.home-solution-links h3 {
    font-size: var(--text-base);
    margin: 14px 0 6px;
}

.home-solution-links h3:first-child {
    margin-top: 0;
}

.home-solution-links p {
    margin: 0 0 4px;
}

.home-check-list {
    margin: 0;
    padding-left: 1.2rem;
}

.home-check-list li {
    margin-bottom: 6px;
}

.home-cta-inner .actions,
.home-cta-inner .btn + .btn {
    margin-top: 0;
}

.home-cta-inner .btn.secondary {
    margin-left: 10px;
}

.home-cta {
    margin-top: 8px;
}

.home-cta-inner {
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 55%, #eff6ff 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: clamp(28px, 4vw, 42px);
    text-align: center;
}

.home-cta-inner h2 {
    margin: 8px auto 12px;
    max-width: 640px;
}

.home-cta-inner .lead {
    margin: 0 auto 22px;
    max-width: 680px;
}

.plans-grid {
    margin-top: 8px;
}

.plan-card-public {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.plan-card-public .price-period {
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 600;
}

.plan-features {
    color: var(--muted);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin: 8px 0 16px;
    padding-left: 18px;
}

.plan-features li {
    margin-bottom: 6px;
}

.plan-lock-note {
    background: var(--soft);
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 600;
    margin-top: auto;
    padding: 12px;
    text-align: center;
}

.register-layout {
    align-items: start;
    display: grid;
    gap: 24px;
    grid-template-columns: minmax(280px, 0.9fr) minmax(340px, 1.1fr);
    margin: 0 auto;
    max-width: 1080px;
}

.register-intro h1 {
    margin-top: 4px;
}

.register-benefits {
    color: var(--muted);
    line-height: 1.7;
    margin: 18px 0;
    padding-left: 18px;
}

.register-note {
    background: var(--brand-light);
    border-radius: var(--radius-sm);
    color: var(--brand-dark);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin: 0;
    padding: 12px 14px;
}

.register-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.register-steps span {
    background: var(--soft);
    border-radius: 999px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
    padding: 7px 12px;
}

.register-steps span.active {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.welcome-success {
    margin: 0 auto;
    max-width: var(--container);
}

.welcome-hero {
    margin-bottom: 28px;
}

.welcome-steps {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 24px 0;
}

.welcome-step {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    padding: 14px;
    text-align: center;
}

.welcome-step strong {
    align-items: center;
    background: #fff;
    border-radius: 999px;
    display: inline-flex;
    height: 28px;
    justify-content: center;
    margin-bottom: 8px;
    width: 28px;
}

.welcome-step span {
    color: var(--muted);
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
}

.welcome-step.done {
    background: var(--brand-light);
    border-color: #a7f3d0;
}

.welcome-step.done strong {
    background: var(--brand);
    color: #fff;
}

.welcome-step.current {
    border-color: #86efac;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.12);
}

.welcome-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
}

.success-email {
    color: var(--muted);
    margin: 0 0 8px;
}

.qr-preview {
    align-items: center;
    display: grid;
    gap: 18px;
    grid-template-columns: 140px 1fr;
}

.qr-preview img {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    height: 140px;
    padding: 8px;
    width: 140px;
}

.fake-field {
    align-items: center;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
    min-width: 0;
    padding: 12px 14px;
}

.fake-field b {
    color: var(--ink);
    overflow-wrap: anywhere;
    text-align: right;
}

.feature-strip {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, 1fr);
    margin: 28px 0 36px;
}

.feature-strip div {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    display: flex;
    gap: 12px;
    padding: 18px;
}

.feature-strip strong {
    align-items: center;
    background: var(--brand-light);
    border-radius: 10px;
    color: var(--brand-dark);
    display: inline-flex;
    font-size: 14px;
    height: 36px;
    justify-content: center;
    width: 36px;
}

.section-head {
    margin-bottom: -6px;
}

.section-head h2 {
    font-size: clamp(1.25rem, 2.5vw, 1.5rem);
    letter-spacing: -0.02em;
    margin: 0;
}

.eyebrow {
    color: var(--brand-dark);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.btn,
button {
    background: linear-gradient(135deg, var(--brand), var(--brand-dark));
    border: 0;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.22);
    color: #fff;
    cursor: pointer;
    display: inline-block;
    font-family: inherit;
    font-size: 14px;
    font-weight: 700;
    padding: 12px 18px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn:hover,
button:hover {
    box-shadow: 0 10px 24px rgba(5, 150, 105, 0.28);
    transform: translateY(-1px);
}

.btn.secondary {
    background: #fff;
    border: 1px solid var(--line);
    box-shadow: none;
    color: var(--brand-dark);
}

.btn.secondary:hover {
    background: var(--brand-light);
    border-color: #a7f3d0;
}

.btn-sm {
    font-size: 12px;
    padding: 8px 12px;
}

.btn-block {
    display: block;
    text-align: center;
    width: 100%;
}

.grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    margin-top: 24px;
}

.card,
.panel,
.trace {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 24px;
}

.panel {
    margin: 0;
    max-width: none;
}

.panel.narrow,
.auth-panel {
    margin-left: auto;
    margin-right: auto;
    max-width: var(--container-narrow);
}

.panel.wide,
.dashboard .panel {
    max-width: none;
    width: 100%;
}

.plan-card {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-card {
    padding: 22px 20px;
}

.stat-card strong {
    color: var(--brand-dark);
    display: block;
    font-size: 2rem;
    letter-spacing: -0.03em;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-card span {
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 600;
}

.plan-note {
    color: var(--muted);
    font-size: var(--text-sm);
    line-height: 1.5;
}

.price {
    color: var(--brand-dark);
    font-size: 1.75rem;
    font-weight: 700;
    margin: 10px 0;
}

.auth-wrap {
    margin: 0 auto;
    max-width: var(--container-narrow);
    padding: 12px 0 24px;
}

.register-panel,
.auth-panel {
    max-width: var(--container-narrow);
    width: 100%;
}

.success-panel {
    text-align: left;
}

.success-panel h1 {
    font-size: clamp(28px, 4vw, 36px);
    line-height: 1.2;
    margin: 8px 0 14px;
}

.form-section {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 18px;
    padding: 18px;
}

.form-section h2 {
    font-size: 16px;
    margin: 0 0 14px;
}

.form-grid-2 {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid-2 > label,
.form-grid-2 > .otp-field-group {
    margin-bottom: 0;
}

.field-label {
    color: var(--muted);
    display: block;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.otp-field-group {
    display: flex;
    flex-direction: column;
}

.otp-input-row {
    align-items: center;
    display: grid;
    gap: 10px;
    grid-template-columns: minmax(0, 1fr) auto;
}

.otp-input-row input {
    margin: 0;
    min-width: 0;
}

.otp-input-row .btn {
    height: 46px;
    margin: 0;
    padding-inline: 16px;
    white-space: nowrap;
}

.form-grid-2 .full {
    grid-column: 1 / -1;
}

.security-grid {
    display: grid;
    gap: 1.25rem;
}

.security-summary-grid {
    display: grid;
    gap: 14px 20px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin-top: 12px;
}

.security-summary-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.twofa-steps {
    color: var(--muted);
    display: grid;
    gap: 8px;
    margin: 0 0 18px;
    padding-left: 20px;
}

.twofa-status-card {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    margin-top: 12px;
    padding: 18px;
}

.twofa-status-list {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    margin: 14px 0 18px;
}

.twofa-status-list > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.twofa-status-list dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.twofa-status-list dd {
    font-weight: 600;
    margin: 0;
}

.twofa-method-options {
    border: 0;
    display: grid;
    gap: 12px;
    margin: 0 0 18px;
    padding: 0;
}

.twofa-method-option {
    cursor: pointer;
    display: block;
}

.twofa-method-option input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.twofa-method-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.twofa-method-option.is-selected .twofa-method-card,
.twofa-method-option input:checked + .twofa-method-card {
    border-color: var(--brand);
    box-shadow: 0 0 0 1px var(--brand);
}

.twofa-method-meta,
.twofa-method-status {
    color: var(--muted);
    font-size: 13px;
}

.notice.ok {
    background: var(--brand-light);
    border-color: #bbf7d0;
    color: var(--brand-dark);
}

.optional-tag {
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
}

.admin-user-list {
    display: grid;
    gap: 18px;
    margin-top: 18px;
}

.backup-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-top: 18px;
}

.backup-grid .panel h2 {
    margin-top: 0;
}

.backup-grid .panel p {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin: 0 0 16px;
}

.admin-user-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 4px 18px rgba(15, 23, 42, 0.04);
    padding: 20px;
}

.admin-user-head {
    align-items: start;
    display: flex;
    gap: 16px;
    justify-content: space-between;
    margin-bottom: 14px;
}

.admin-user-head strong {
    display: block;
    font-size: 18px;
}

.admin-user-head span {
    color: var(--muted);
    display: block;
    margin-top: 4px;
}

.admin-user-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.badge {
    border-radius: 999px;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.2;
    padding: 4px 10px;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-pending {
    background: #fff7ed;
    color: #c2410c;
}

.badge-approved,
.badge-active {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.badge-rejected,
.badge-blocked {
    background: #fef2f2;
    color: #b91c1c;
}

.admin-user-meta {
    display: grid;
    gap: 14px 24px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 16px;
}

.admin-meta-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.admin-meta-label {
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    line-height: 1.3;
    text-transform: uppercase;
}

.admin-meta-value {
    color: var(--ink);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.45;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.admin-user-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 14px;
}

.admin-filter-panel {
    margin: 18px 0;
}

.admin-filter-panel .form-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.admin-filter-actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 14px;
}

.admin-result-count {
    color: var(--muted);
    font-size: 13px;
    margin-left: auto;
}

.admin-users-table-scroll {
    margin-top: 16px;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.admin-users-table-scroll .admin-users-table {
    margin-top: 0;
}

.admin-users-table {
    background: #fff;
    border: 1px solid var(--line);
    border-collapse: separate;
    border-radius: var(--radius-sm);
    border-spacing: 0;
    font-size: 13px;
    min-width: 1120px;
    table-layout: fixed;
    width: 100%;
}

.admin-users-table thead th {
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.3;
    padding: 12px 14px;
    text-align: left;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-users-table tbody td {
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.45;
    padding: 12px 14px;
    vertical-align: middle;
}

.admin-users-table tbody tr:hover {
    background: #fafbfc;
}

.admin-users-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-users-table .col-company {
    width: 15%;
}

.admin-users-table .col-contact {
    width: 12%;
}

.admin-users-table .col-email {
    width: 17%;
}

.admin-users-table .col-mobile {
    width: 10%;
    white-space: nowrap;
}

.admin-users-table .col-date {
    width: 9%;
    white-space: nowrap;
}

.admin-users-table .col-status {
    width: 8%;
    white-space: nowrap;
}

.admin-users-table .col-actions {
    overflow: visible;
    width: 56px;
}

.cell-ellipsis {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-actions-cell {
    min-width: 56px;
    text-align: right;
    white-space: nowrap;
}

.admin-actions-menu {
    display: inline-block;
    position: relative;
}

.admin-actions-menu .admin-actions-panel {
    display: none !important;
}

.admin-actions-floating {
    position: fixed;
    z-index: 10050;
}

.admin-actions-floating .admin-actions-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    display: grid !important;
    gap: 2px;
    max-height: min(70vh, 420px);
    min-width: 196px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 6px;
    position: static;
}

.admin-actions-trigger {
    align-items: center;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    cursor: pointer;
    display: inline-flex;
    height: 34px;
    justify-content: center;
    min-width: 34px;
    padding: 0;
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    width: 34px;
}

.admin-actions-trigger:hover,
.admin-actions-trigger.is-active {
    background: var(--soft);
    border-color: #cbd5e1;
    color: var(--ink);
}

.admin-actions-trigger .admin-actions-icon {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.08em;
    line-height: 1;
}

.admin-actions-floating .admin-actions-panel form {
    display: block;
    margin: 0;
}

.admin-actions-panel a,
.admin-actions-floating .admin-actions-panel a {
    border-radius: 6px;
    color: inherit;
    font-size: 13px;
    padding: 8px 10px;
    text-decoration: none;
}

.admin-actions-panel a:hover,
.admin-actions-floating .admin-actions-panel a:hover {
    background: #f8fafc;
}

.admin-actions-panel .link-btn,
.admin-actions-floating .admin-actions-panel .link-btn {
    background: none;
    border: 0;
    color: inherit;
    cursor: pointer;
    font: inherit;
    padding: 8px 10px;
    text-align: left;
    width: 100%;
}

.admin-actions-panel .link-btn:hover,
.admin-actions-floating .admin-actions-panel .link-btn:hover {
    background: #f8fafc;
}

.admin-pagination-wrap {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    justify-content: space-between;
    margin: 20px 0 8px;
}

.admin-log-section {
    margin-top: 32px;
}

.admin-log-section h2 {
    margin-bottom: 12px;
}

.admin-log-table-scroll {
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}

.admin-log-table {
    background: #fff;
    border: 1px solid var(--line);
    border-collapse: separate;
    border-radius: var(--radius-sm);
    border-spacing: 0;
    font-size: 13px;
    min-width: 720px;
    table-layout: fixed;
    width: 100%;
}

.admin-log-table--notifications {
    min-width: 960px;
}

.admin-log-table thead th {
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    line-height: 1.3;
    padding: 12px 14px;
    text-align: left;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap;
}

.admin-log-table tbody td {
    border-bottom: 1px solid #f1f5f9;
    line-height: 1.45;
    padding: 12px 14px;
    vertical-align: middle;
}

.admin-log-table tbody tr:hover {
    background: #fafbfc;
}

.admin-log-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-log-table .col-date {
    width: 130px;
    white-space: nowrap;
}

.admin-log-table .col-recipient {
    width: 18%;
}

.admin-log-table .col-subject {
    width: 22%;
}

.admin-log-table .col-type {
    width: 14%;
}

.admin-log-table .col-user {
    width: 16%;
}

.admin-log-table .col-channel {
    width: 72px;
    white-space: nowrap;
}

.admin-log-table .col-status {
    width: 88px;
    white-space: nowrap;
}

.admin-log-table .col-message {
    width: auto;
}

.admin-pagination-meta {
    color: var(--muted);
    font-size: 13px;
    margin: 0;
}

.admin-pagination {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    justify-content: flex-end;
}

.admin-page-link,
.admin-page-current {
    align-items: center;
    border-radius: 8px;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    justify-content: center;
    min-height: 36px;
    min-width: 36px;
    padding: 0 10px;
    text-decoration: none;
}

.admin-page-link {
    background: #fff;
    border: 1px solid var(--line);
    color: var(--ink);
}

.admin-page-link:hover {
    background: var(--soft);
    color: var(--brand-dark);
}

.admin-page-current {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.admin-page-ellipsis {
    color: var(--muted);
    padding: 0 4px;
}

.is-loading {
    opacity: 0.72;
    pointer-events: none;
    position: relative;
}

.is-loading::after {
    animation: dashboard-spin 0.75s linear infinite;
    border: 2px solid rgba(5, 150, 105, 0.18);
    border-radius: 50%;
    border-top-color: var(--brand);
    content: "";
    height: 28px;
    left: 50%;
    margin: -14px 0 0 -14px;
    position: absolute;
    top: 50%;
    width: 28px;
    z-index: 5;
}

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

.loading-indicator {
    align-items: center;
    color: var(--muted);
    display: none;
    font-size: 13px;
    gap: 8px;
}

.loading-indicator.is-visible {
    display: inline-flex;
}

.loading-indicator::before {
    animation: dashboard-spin 0.75s linear infinite;
    border: 2px solid rgba(5, 150, 105, 0.18);
    border-radius: 50%;
    border-top-color: var(--brand);
    content: "";
    height: 16px;
    width: 16px;
}

.admin-filter-panel .admin-filter-actions {
    align-items: center;
}

.admin-filter-panel .loading-indicator {
    margin-left: auto;
}

.link-btn {
    background: none;
    border: 0;
    color: var(--brand);
    cursor: pointer;
    font: inherit;
    padding: 0;
    text-decoration: underline;
}

.admin-edit-form {
    border-top: 1px solid var(--line);
    margin-top: 8px;
    padding-top: 16px;
}

.auth-panel h1 {
    margin-top: 0;
}

.auth-foot {
    color: var(--muted);
    margin: 18px 0 0;
    text-align: center;
}

.otp-box {
    align-items: stretch;
    background: var(--soft);
    border: 1px dashed #cbd5e1;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin: 18px 0;
    padding: 16px;
}

.otp-box .otp-input-row {
    width: 100%;
}

.field-hint {
    color: var(--muted);
    display: block;
    font-size: 13px;
    margin-top: 6px;
}

.field-hint.ok {
    color: var(--brand-dark);
}

.field-hint.err {
    color: var(--danger);
}

label {
    color: var(--muted);
    display: grid;
    font-size: 14px;
    font-weight: 600;
    gap: 8px;
    margin-bottom: 14px;
}

.hp-field {
    display: none !important;
}

input,
select,
textarea {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    font: inherit;
    padding: 12px 14px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    border-color: #86efac;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.12);
    outline: none;
}

textarea {
    min-height: 110px;
    resize: vertical;
}

.form-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.dashboard {
    align-items: stretch;
    display: grid;
    gap: 20px;
    grid-template-areas: "sidebar main";
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    max-width: 100%;
    min-height: calc(100vh - 180px);
    position: relative;
    width: 100%;
}

.dashboard > aside {
    grid-area: sidebar;
}

.dashboard > section {
    grid-area: main;
}

.dashboard > .dashboard-backdrop {
    grid-column: 1 / -1;
    grid-row: 1;
}

.layout-app .page:has(.dashboard) {
    margin: 0;
    max-width: 100%;
    overflow-x: clip;
    padding: 0;
    width: 100%;
}

.layout-app .page:has(.dashboard) .dashboard {
    gap: 0;
    grid-template-areas: "sidebar main";
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    min-height: calc(100vh - 96px);
    width: 100%;
}

.layout-app .page:has(.dashboard) .dashboard > aside {
    align-self: stretch;
    background: #fff;
    border-right: 1px solid var(--line);
    border-radius: 0;
    box-shadow: none;
    display: flex;
    flex-direction: column;
    grid-area: sidebar;
    height: calc(100vh - 96px);
    max-height: none;
    max-width: var(--sidebar-width);
    min-width: 0;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 16px 0;
    position: sticky;
    top: 96px;
    z-index: 2;
}

.layout-app .page:has(.dashboard) .dashboard > aside .side {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    min-height: 0;
    overflow: visible;
    padding: 0 10px 24px;
}

.layout-app .page:has(.dashboard) .dashboard > section {
    grid-area: main;
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    overflow-y: visible;
    padding: 24px clamp(20px, 2.5vw, 36px) 48px;
    width: 100%;
}

.layout-app .page:has(.dashboard) .dash-nav-toggle {
    margin-bottom: 12px;
}

.dashboard > section {
    min-width: 0;
    max-width: 100%;
    overflow-x: clip;
    overflow-y: visible;
    width: 100%;
}

.dashboard > aside {
    display: flex;
    flex-direction: column;
    min-width: 0;
    max-width: var(--sidebar-width);
    position: sticky;
    top: 96px;
    width: 100%;
    z-index: 2;
}

.side {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: 4px;
    max-height: calc(100vh - 112px);
    min-height: 320px;
    overflow-x: hidden;
    overflow-y: auto;
    padding: 12px;
    position: static;
    top: auto;
    width: 100%;
}

.layout-app .page:has(.dashboard) .side {
    background: transparent;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    max-height: none;
    min-height: 0;
    padding: 0 10px 24px;
}

.dashboard > section > h1:first-child,
.dashboard > section > h2:first-child {
    border-bottom: 1px solid var(--line);
    margin-bottom: 20px;
    padding-bottom: 14px;
}

.dashboard > section > h2:not(:first-child),
.dashboard .panel h2 {
    border-bottom: 0;
    font-size: var(--text-lg);
    margin: 24px 0 12px;
    padding-bottom: 0;
}

.dashboard-subsection + .dashboard-subsection {
    margin-top: 28px;
}

.dashboard-subsection-title {
    color: var(--ink);
    font-size: var(--text-base);
    font-weight: 700;
    letter-spacing: -0.01em;
    margin: 0 0 10px;
}

.dashboard-subsection .qr-results-panel {
    margin-top: 0;
}

.dashboard > section > .lead:first-of-type,
.dashboard > section > h1 + .lead {
    margin-top: -8px;
}

.side-group {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    width: 100%;
}

.side-group + .side-group {
    border-top: 1px solid var(--line);
    margin-top: 6px;
    padding-top: 10px;
}

.side-label {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 8px 12px 6px;
    text-transform: uppercase;
}

.side a {
    border-radius: var(--radius-sm);
    color: var(--ink);
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.35;
    padding: 10px 12px;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: normal;
    width: 100%;
    word-break: break-word;
}

.side a:hover {
    background: var(--soft);
    color: var(--brand-dark);
}

.side a.is-active {
    background: var(--brand-light);
    color: var(--brand-dark);
}

.side a:focus-visible,
.admin-actions-trigger:focus-visible,
.admin-page-link:focus-visible,
.dash-nav-toggle:focus-visible,
.nav-toggle:focus-visible {
    outline: 2px solid var(--brand);
    outline-offset: 2px;
}

body.dashboard-nav-open,
body.nav-open {
    overflow: hidden;
}

.stats {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.stats strong {
    display: block;
    font-size: 1.5rem;
    letter-spacing: -0.03em;
}

.stats span,
.warning,
.notice {
    color: var(--muted);
}

.warning,
.notice {
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 10px;
    margin: 18px 0;
    padding: 14px 16px;
}

.usage-banner {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin: 0 0 20px;
    padding: 18px 20px;
}

.usage-head {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
}

.usage-bar {
    background: #e2e8f0;
    border-radius: 999px;
    height: 10px;
    overflow: hidden;
}

.usage-bar span {
    background: linear-gradient(90deg, var(--brand), #34d399);
    border-radius: 999px;
    display: block;
    height: 100%;
    min-width: 4px;
}

.usage-help {
    color: var(--muted);
    font-size: 13px;
    margin: 10px 0 0;
}

.upgrade-note {
    margin: 12px 0 0;
}

.check-row {
    align-items: center;
    display: flex;
    gap: 10px;
    margin: 12px 0;
}

.check-row input {
    margin: 0;
    width: auto;
}

.branding-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin: 20px 0;
}

.branding-card {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 20px;
}

.branding-card h2 {
    margin-top: 0;
}

.branding-card .lead {
    font-size: var(--text-sm);
    margin-bottom: 14px;
}

.brand-preview-wrap {
    align-items: center;
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: center;
    margin: 12px 0;
    min-height: 88px;
    padding: 16px;
}

.brand-preview-header {
    max-height: 96px;
    max-width: 100%;
    object-fit: contain;
}

.brand-preview-icon {
    height: 64px;
    object-fit: contain;
    width: 64px;
}

.hint-box {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1d4ed8;
    justify-content: center;
    padding: 10px;
}

table {
    background: #fff;
    border: 1px solid var(--line);
    border-collapse: separate;
    border-radius: var(--radius);
    border-spacing: 0;
    margin-top: 16px;
    max-width: 100%;
    overflow: hidden;
    table-layout: auto;
    width: 100%;
}

.table-wrap {
    margin-top: 16px;
    overflow-x: auto;
    width: 100%;
}

.table-wrap table {
    margin-top: 0;
    min-width: 640px;
}

.record-list {
    display: grid;
    gap: 14px;
    margin-top: 18px;
}

.record-card {
    align-items: start;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.04);
    display: grid;
    gap: 14px;
    grid-template-columns: 96px repeat(5, minmax(0, 1fr)) minmax(240px, 1.2fr);
    padding: 16px;
}

.record-card span {
    color: var(--muted);
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.record-card strong,
.record-card a {
    overflow-wrap: anywhere;
}

.url-cell {
    min-width: 0;
}

.download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.qr-filter-panel {
    margin-bottom: 18px;
    padding: 0;
    overflow: hidden;
}

.qr-filter-head {
    background: linear-gradient(135deg, #5c3d2e, #7a5238);
    color: #fff;
    padding: 16px 18px;
}

.qr-filter-head h2 {
    color: #fff;
    font-size: var(--text-base);
    margin: 0 0 6px;
}

.qr-filter-head .lead {
    color: rgba(255, 255, 255, 0.88);
    margin: 0;
}

.qr-filter-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
    padding: 18px;
}

.qr-filter-grid label {
    margin-bottom: 0;
}

.qr-filter-actions {
    align-self: end;
}

.qr-filter-empty {
    color: var(--muted);
    margin-top: 0;
}

.qr-results-panel {
    margin-top: 0;
    padding: 0;
    overflow: hidden;
}

.qr-results-panel .table-wrap {
    margin-top: 0;
    overflow-x: auto;
    width: 100%;
}

.qr-results-panel .table-wrap table {
    min-width: 0;
}

.qr-results-table.seed-label-results {
    width: 100%;
    table-layout: auto;
}

.qr-results-table.seed-label-results th,
.qr-results-table.seed-label-results td {
    font-size: 13px;
    line-height: 1.35;
    padding: 9px 11px;
    vertical-align: middle;
    white-space: nowrap;
    word-break: keep-all;
}

.qr-results-table.seed-label-results thead th {
    font-size: 11px;
    letter-spacing: 0.04em;
    padding: 10px 11px;
}

.qr-results-table.seed-label-results th:nth-child(1),
.qr-results-table.seed-label-results td:nth-child(1) {
    width: 42px;
    text-align: center;
}

.qr-results-table.seed-label-results th:nth-child(2),
.qr-results-table.seed-label-results td:nth-child(2) {
    width: 52px;
}

.qr-results-table.seed-label-results th:nth-child(3),
.qr-results-table.seed-label-results td:nth-child(3) {
    min-width: 58px;
}

.qr-results-table.seed-label-results th:nth-child(4),
.qr-results-table.seed-label-results td:nth-child(4),
.qr-results-table.seed-label-results th:nth-child(5),
.qr-results-table.seed-label-results td:nth-child(5) {
    max-width: 110px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.qr-results-table.seed-label-results th:nth-child(7),
.qr-results-table.seed-label-results td:nth-child(7) {
    min-width: 92px;
}

.qr-results-table.seed-label-results th:nth-child(8),
.qr-results-table.seed-label-results td:nth-child(8) {
    width: 64px;
    text-align: right;
}

.qr-results-table.seed-label-results .qr-download-cell {
    min-width: 168px;
    width: 1%;
    white-space: nowrap;
}

.qr-results-table.seed-label-results td strong {
    font-size: inherit;
    font-weight: 600;
}

.download-actions.is-stacked {
    align-items: center;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 6px;
    margin-top: 0;
}

.qr-results-table .download-actions.is-stacked .btn-download {
    display: inline-flex;
    flex: 0 0 auto;
    justify-content: center;
    min-width: 0;
    padding: 7px 10px;
    white-space: nowrap;
    width: auto;
}

.qr-results-head {
    align-items: center;
    background: var(--soft);
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 12px;
    justify-content: space-between;
    padding: 12px 16px;
}

.qr-results-head.is-compact {
    justify-content: flex-end;
    padding: 8px 14px;
}

.qr-results-head h2,
.qr-results-head .qr-results-title {
    font-size: var(--text-base);
    font-weight: 700;
    margin: 0;
}

.qr-results-panel.is-compact .qr-results-table tbody td {
    font-size: var(--text-sm);
}

.qr-results-panel.is-compact .qr-results-table td strong {
    font-size: inherit;
    font-weight: 600;
}

.qr-filter-empty.is-compact {
    padding: 14px 16px;
}

.qr-results-table td,
.qr-results-table th {
    text-align: left;
    vertical-align: middle;
}

.qr-results-table:not(.seed-label-results) td,
.qr-results-table:not(.seed-label-results) th {
    white-space: nowrap;
}

.qr-results-table:not(.seed-label-results) td:nth-child(3),
.qr-results-table:not(.seed-label-results) td:nth-child(4),
.qr-results-table:not(.seed-label-results) td:nth-child(5),
.qr-results-table:not(.seed-label-results) td:nth-child(6) {
    min-width: 120px;
    white-space: normal;
}

.qr-results-table .download-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.qr-results-table .btn-download {
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    gap: 6px;
    padding: 8px 12px;
    white-space: nowrap;
}

.qr-results-table .btn-download::before {
    content: "⬇";
    font-size: 11px;
}

.qr-results-table thead th {
    background: #5c3d2e;
    border-color: #4a3125;
    color: #fff;
    font-size: 12px;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.qr-results-table tbody tr:nth-child(even) {
    background: #faf8f6;
}

.qr-results-table tbody td {
    border-bottom: 1px solid var(--line);
    font-size: var(--text-sm);
    padding: 10px 12px;
}

.checkout-grid,
.contact-wrap,
.contact-hero {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 0.85fr) minmax(320px, 1.15fr);
}

.contact-hero {
    background: linear-gradient(135deg, #ecfdf5, #ffffff 55%, #eff6ff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 34px;
}

.contact-info h1 {
    font-size: 44px;
    line-height: 1.08;
    margin: 0 0 14px;
}

.contact-methods {
    display: grid;
    gap: 14px;
    margin-top: 24px;
}

.contact-methods div,
.contact-form {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.contact-methods span {
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.contact-methods strong {
    display: block;
    font-size: 20px;
    margin-top: 4px;
    overflow-wrap: anywhere;
}

.contact-form h2 {
    margin-top: 0;
}

.contact-page {
    margin: 0 auto;
    max-width: 1180px;
}

.contact-banner {
    background: linear-gradient(135deg, #f0fdf4, #ffffff 55%, #eef2ff);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin-bottom: 22px;
    padding: 38px;
}

.contact-banner h1 {
    font-size: clamp(34px, 5vw, 56px);
    letter-spacing: -0.03em;
    line-height: 1.04;
    margin: 8px 0 14px;
    max-width: 780px;
}

.contact-main {
    align-items: start;
    display: grid;
    gap: 22px;
    grid-template-columns: minmax(0, 0.95fr) minmax(340px, 1.05fr);
}

.contact-methods.pro {
    margin-top: 0;
}

.contact-methods.pro div {
    border-left: 4px solid var(--brand);
    padding: 20px;
}

.contact-methods small {
    color: var(--muted);
    display: block;
    line-height: 1.5;
    margin-top: 8px;
}

.contact-service-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(3, 1fr);
    margin-top: 18px;
}

.contact-service-grid article,
.contact-panel {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 18px;
}

.contact-service-grid strong,
.contact-service-grid span {
    display: block;
}

.contact-service-grid span {
    color: var(--muted);
    font-size: 14px;
    line-height: 1.5;
    margin-top: 6px;
}

.contact-panel {
    box-shadow: var(--shadow);
    padding: 28px;
}

.payment-box {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 18px;
    padding: 14px;
}

.payment-qr {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    display: block;
    height: 180px;
    margin-bottom: 14px;
    object-fit: contain;
    padding: 8px;
    width: 180px;
}

.payment-list {
    display: grid;
    grid-template-columns: 140px minmax(0, 1fr);
}

.checkout-payment-panel {
    display: grid;
    gap: 16px;
}

.payment-method-list {
    display: grid;
    gap: 10px;
    margin-bottom: 8px;
}

.payment-method-option {
    align-items: flex-start;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    cursor: pointer;
    display: flex;
    gap: 12px;
    padding: 12px 14px;
}

.payment-method-option input {
    margin-top: 4px;
}

.payment-method-option span {
    display: grid;
    gap: 4px;
}

.payment-method-option small {
    color: var(--muted);
    font-size: var(--text-sm);
    font-weight: 400;
    line-height: 1.45;
}

.payment-method-panel[hidden] {
    display: none !important;
}

.manual-payment-form {
    display: grid;
    gap: 12px;
    margin-top: 12px;
}

.subscription-pending-card {
    border-left: 4px solid #f59e0b;
    margin-bottom: 18px;
}

.payment-settings-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-bottom: 22px;
}

.payment-setting-card h3 {
    margin-top: 0;
}

.admin-subscriptions-table .col-gst {
    max-width: 140px;
}

.admin-subscriptions-table .col-plan {
    max-width: 180px;
}

.admin-subscriptions-table .col-method {
    max-width: 150px;
}

.admin-subscription-history {
    margin-top: 20px;
}

.admin-history-list {
    margin: 0;
    padding-left: 1.2rem;
}

.admin-history-list li {
    margin-bottom: 6px;
}

.subscription-detail-card {
    margin-bottom: 18px;
}

@media (max-width: 768px) {
    .admin-subscriptions-table-scroll {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.approval-btn-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.payment-approval-list {
    display: grid;
    gap: 16px;
}

.resubmit-payment-form {
    margin-top: 14px;
    max-width: 520px;
}

@media (max-width: 768px) {
    .payment-method-option {
        padding: 10px 12px;
    }

    .approval-btn-row .btn {
        flex: 1 1 100%;
    }

    .payment-list {
        grid-template-columns: 1fr;
        gap: 4px;
    }

    .manual-payment-form label,
    .resubmit-payment-form label {
        min-width: 0;
    }
}

@media (max-width: 425px) {
    .checkout-payment-panel {
        gap: 12px;
    }

    .payment-settings-grid {
        grid-template-columns: 1fr;
    }
}

.btn.danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.tax-note {
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.total-box {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin: 16px 0;
    overflow: hidden;
}

.total-box div {
    align-items: center;
    display: flex;
    justify-content: space-between;
    padding: 12px 14px;
}

.total-box div + div {
    border-top: 1px solid var(--line);
}

.grand-total {
    background: var(--brand-light);
    color: var(--brand-dark);
    font-size: 18px;
}

.contact-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 4px;
    margin-top: 18px;
    padding: 18px;
}

th,
td {
    border-bottom: 1px solid var(--line);
    overflow-wrap: anywhere;
    padding: 12px;
    text-align: left;
    vertical-align: top;
    word-break: break-word;
}

th {
    background: var(--soft);
    font-size: 13px;
    text-transform: uppercase;
}

.qr {
    border-radius: 8px;
    height: 90px;
    max-width: none;
    width: 90px;
}

.inline-form {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    min-width: 0;
    width: 100%;
}

.admin-request-reason {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--muted);
    line-height: 1.6;
    margin: 0 0 16px;
    padding: 12px 14px;
}

.admin-edit-form label {
    min-width: 0;
}

.admin-edit-form .btn,
.admin-edit-form button {
    margin-top: 4px;
}

.trace {
    margin: 0 auto;
    max-width: var(--container-scan);
}

.scan-page {
    margin: 0 auto;
    max-width: var(--container-scan);
}

.scan-hero {
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 50%, #eff6ff 100%);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    margin-bottom: 18px;
    padding: 28px 30px;
}

.scan-badge {
    background: var(--brand-light);
    border-radius: 999px;
    color: var(--brand-dark);
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
    padding: 6px 12px;
    text-transform: uppercase;
}

.scan-hero h1 {
    font-size: clamp(1.5rem, 3.5vw, 2.125rem);
    line-height: 1.15;
    margin: 0 0 16px;
}

.scan-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.scan-meta span {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: var(--text-sm);
    padding: 8px 14px;
}

.scan-meta strong {
    color: var(--ink);
}

.scan-card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.scan-footnote {
    color: var(--muted);
    font-size: var(--text-sm);
    margin: 16px 4px 0;
    text-align: center;
}

.data-table dl,
.data-list {
    display: grid;
    grid-template-columns: minmax(160px, 34%) 1fr;
    margin: 0;
}

.data-table dt,
.data-table dd,
.data-list dt,
.data-list dd {
    border-bottom: 1px solid var(--line);
    margin: 0;
    padding: 14px 16px;
}

.data-table dt,
.data-list dt {
    background: var(--soft);
    font-size: var(--text-sm);
    font-weight: 700;
}

.data-table dd,
.data-list dd {
    font-size: var(--text-base);
    line-height: 1.65;
    overflow-wrap: anywhere;
}

.scan-section-list {
    border-top: 1px solid var(--line);
}

.label-en {
    display: block;
}

.label-langs {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    margin-top: 4px;
}

.heading-langs {
    display: inline;
    font-size: 14px;
    margin-left: 4px;
}

.multilang-leaflet .scan-hero-compact {
    margin-bottom: 16px;
    padding: 20px 22px;
}

.multilang-leaflet .leaflet-intro {
    color: var(--muted);
    font-size: var(--text-sm);
    line-height: 1.6;
    margin: 10px 0 0;
    max-width: 640px;
}

.leaflet-lang-toolbar {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
    margin-bottom: 18px;
    padding: 16px 18px;
}

.leaflet-lang-toolbar label {
    display: block;
    font-weight: 700;
    margin: 0;
}

.leaflet-lang-note {
    color: var(--muted);
    display: block;
    font-size: 12px;
    font-weight: 500;
    line-height: 1.5;
    margin: 4px 0 10px;
}

.leaflet-lang-toolbar select {
    max-width: 420px;
    width: 100%;
}

.leaflet-lang-slot {
    margin-top: 0;
}

.leaflet-lang-panel {
    background: transparent;
}

.leaflet-lang-head {
    background: linear-gradient(135deg, #e8f5ec, #f4faf6);
    border: 1px solid #d4e8da;
    border-bottom: 0;
    border-radius: 12px 12px 0 0;
    padding: 16px 18px;
}

.leaflet-lang-badge {
    background: var(--brand);
    border-radius: 999px;
    color: #fff;
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.03em;
    margin-bottom: 8px;
    padding: 4px 10px;
    text-transform: uppercase;
}

.leaflet-lang-head h2 {
    font-size: var(--text-lg);
    line-height: 1.35;
    margin: 0;
}

.leaflet-lang-panel .scan-card {
    border-radius: 0 0 12px 12px;
    border-top: 0;
    margin-top: 0;
}

.leaflet-meta {
    margin-top: 10px;
}

.leaflet-loading {
    color: var(--muted);
    font-size: 14px;
    margin: 0;
}

.leaflet-lang-panel .data-list dt {
    font-size: 13px;
    line-height: 1.45;
    word-break: break-word;
}

.leaflet-lang-panel .label-langs,
.leaflet-lang-panel .heading-langs {
    display: none;
}

.trace h1 .heading-langs {
    display: block;
    font-size: 13px;
    margin-left: 0;
    margin-top: 6px;
}

.practice-text {
    font-size: var(--text-base);
    line-height: 1.75;
    white-space: normal;
}

.scan-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.scan-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 22px;
}

.scan-box.full {
    grid-column: 1 / -1;
}

.scan-box h2 {
    font-size: 18px;
    margin: 0 0 12px;
}

.scan-box p {
    line-height: 1.7;
    margin: 0;
    overflow-wrap: anywhere;
}

.request-form {
    margin-top: 16px;
}

.lead {
    color: var(--muted);
    font-size: var(--text-lg);
    line-height: 1.65;
    max-width: 760px;
}

.content-page {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 0 auto;
    max-width: 900px;
    padding: clamp(24px, 4vw, 42px);
}

.content-page h1 {
    margin-top: 0;
}

.site-footer {
    background: linear-gradient(165deg, #0b1220 0%, #111827 45%, #0f172a 100%);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    color: #e2e8f0;
    margin-top: 56px;
    padding: 0;
}

.footer-wrap {
    margin: 0 auto;
    max-width: 1200px;
    padding: 48px 28px 24px;
}

.footer-main {
    display: grid;
    gap: 36px;
    grid-template-columns: 1.35fr repeat(3, 1fr);
    padding-bottom: 36px;
}

.footer-col h3 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.02em;
    margin: 0 0 18px;
    text-transform: uppercase;
}

.footer-col a {
    color: rgba(226, 232, 240, 0.88);
    display: block;
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 12px;
    text-decoration: none;
    transition: color 0.15s ease;
}

.footer-col a:hover {
    color: #6ee7b7;
}

.footer-col-brand {
    padding-right: 12px;
}

.footer-tagline {
    color: rgba(226, 232, 240, 0.82);
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 20px;
    max-width: 340px;
}

.footer-contact {
    list-style: none;
    margin: 0 0 20px;
    padding: 0;
}

.footer-contact li {
    align-items: flex-start;
    display: flex;
    font-size: 14px;
    gap: 10px;
    line-height: 1.5;
    margin-bottom: 10px;
}

.footer-contact a {
    color: #a7f3d0;
    text-decoration: none;
}

.footer-contact a:hover {
    color: #fff;
}

.footer-icon {
    color: #6ee7b7;
    flex-shrink: 0;
    font-size: 14px;
    margin-top: 2px;
    width: 18px;
}

.footer-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.footer-trust span {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: rgba(226, 232, 240, 0.85);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.02em;
    padding: 6px 10px;
}

.footer-legal-bar {
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    padding: 16px 0;
}

.footer-legal-bar span:first-child {
    color: rgba(226, 232, 240, 0.6);
    font-size: 13px;
    margin-right: 4px;
}

.footer-legal-bar a {
    color: rgba(226, 232, 240, 0.88);
    font-size: 13px;
    text-decoration: none;
}

.footer-legal-bar a:hover {
    color: #6ee7b7;
}

.footer-bottom {
    align-items: center;
    color: rgba(226, 232, 240, 0.62);
    display: flex;
    flex-wrap: wrap;
    font-size: 13px;
    gap: 12px 24px;
    justify-content: space-between;
    padding-top: 20px;
}

.footer-bottom-note {
    text-align: right;
}

.content-body h2 {
    font-size: 1.15rem;
    margin: 28px 0 10px;
}

.content-body p,
.content-body li {
    line-height: 1.7;
}

.content-body ul {
    margin: 0 0 16px;
    padding-left: 22px;
}

.content-body a {
    color: var(--brand);
}

.edit-box {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    margin-bottom: 16px;
    padding: 16px;
}

.edit-box summary {
    cursor: pointer;
    font-weight: 700;
    margin-bottom: 14px;
}

.plan-editor {
    display: grid;
    gap: 16px;
}

.plan-row {
    align-items: end;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(260px, 1.4fr) repeat(3, minmax(130px, 0.7fr)) minmax(110px, 0.45fr);
    padding: 16px;
}

.new-plan {
    background: #f8fafc;
}

.qr-preview-admin {
    align-items: center;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    display: flex;
    gap: 18px;
    margin: 18px 0;
    padding: 14px;
}

.qr-preview-admin img {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 10px;
    height: 180px;
    object-fit: contain;
    padding: 8px;
    width: 180px;
}

@media (max-width: 1024px) {
    .dash-nav-toggle {
        display: flex;
    }

    .layout-app .page:has(.dashboard) .dashboard,
    .dashboard {
        gap: 0;
        grid-template-areas: "main";
        grid-template-columns: minmax(0, 1fr);
        min-height: auto;
    }

    .layout-app .page:has(.dashboard) .dashboard > section,
    .dashboard > section {
        grid-area: main;
        max-width: 100%;
        padding: 20px 16px 40px;
        width: 100%;
    }

    .layout-app .page:has(.dashboard) .dashboard > aside,
    .dashboard > aside {
        align-self: auto;
        border-radius: 0;
        border-right: 1px solid var(--line);
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.14);
        grid-area: sidebar;
        height: 100dvh;
        max-height: none;
        max-width: min(300px, 88vw);
        overflow-y: auto;
        padding: calc(12px + env(safe-area-inset-top, 0px)) 0 calc(12px + env(safe-area-inset-bottom, 0px));
        position: fixed;
        left: 0;
        top: 0;
        transform: translateX(-110%);
        transition: transform 0.24s ease;
        width: min(300px, 88vw);
        z-index: 40;
    }

    .layout-app .page:has(.dashboard) .dashboard.is-sidebar-open > aside,
    .dashboard.is-sidebar-open > aside {
        transform: translateX(0);
    }

    .layout-app .page:has(.dashboard) .dashboard > aside .side,
    .dashboard > aside .side {
        border-radius: 0;
        max-height: none;
        min-height: 100%;
    }
}

@media (max-width: 900px) {
    .nav-toggle {
        display: inline-flex;
    }

    .topbar-inner {
        align-items: center;
        flex-wrap: wrap;
        gap: 12px;
        min-height: 72px;
        padding: calc(10px + env(safe-area-inset-top, 0px)) 16px 10px;
    }

    .brand-logo-header {
        height: 56px;
        max-height: 56px;
        max-width: min(320px, 68vw);
    }

    .topnav {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius);
        box-shadow: var(--shadow);
        display: none;
        flex-direction: column;
        gap: 4px;
        margin-top: 4px;
        max-height: calc(100vh - 96px);
        overflow-y: auto;
        padding: 10px;
        width: 100%;
    }

    .topnav.is-open {
        display: flex;
    }

    .topnav .nav-link,
    .topnav .btn-nav {
        border-radius: 10px;
        display: block;
        min-height: 44px;
        padding: 12px 14px;
        text-align: left;
        width: 100%;
    }

    .topnav .btn-nav {
        margin-top: 4px;
    }

    .dash-nav-toggle {
        display: flex;
    }

    .dashboard > aside {
        display: flex;
    }

    .dashboard.is-sidebar-open > aside {
        display: flex;
    }

    .dashboard > aside .side {
        max-height: 100vh;
        position: static;
        top: auto;
    }
}

@media (max-width: 760px) {
    .topbar-inner--scan {
        flex-wrap: wrap;
        justify-content: space-between;
        min-height: auto;
    }

    .scan-trust-badge {
        font-size: 10px;
        padding: 6px 10px;
    }

    .page {
        padding: 14px max(14px, env(safe-area-inset-left, 0px)) 24px max(14px, env(safe-area-inset-right, 0px));
    }

    .page--auth,
    .page--scan {
        padding-top: 12px;
    }

    .title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .title-row .actions,
    .page-head-actions {
        width: 100%;
    }

    .title-row .actions .btn,
    .page-head-actions .btn {
        flex: 1 1 auto;
        text-align: center;
    }

    .qr-hero {
        gap: 20px;
        grid-template-columns: 1fr;
        padding: 22px 18px;
    }

    .qr-hero h1 {
        font-size: clamp(1.875rem, 5.5vw, 2.375rem);
        line-height: 1.12;
        max-width: 100%;
    }

    .qr-hero p {
        font-size: var(--text-base);
        line-height: 1.5;
        margin-bottom: 12px;
    }

    .feature-strip {
        grid-template-columns: 1fr;
        margin: 20px 0 28px;
    }

    .footer-main {
        gap: 28px;
        grid-template-columns: 1fr;
    }

    .footer-col-brand {
        grid-column: auto;
        padding-right: 0;
    }

    .footer-wrap {
        padding: 36px 18px 20px;
    }

    .footer-legal-bar {
        flex-wrap: wrap;
        gap: 8px 12px;
    }

    .footer-bottom {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .footer-bottom-note {
        text-align: left;
    }

    .qr-preview {
        grid-template-columns: 1fr;
        justify-items: center;
        text-align: center;
    }

    .form-grid-2,
    .form-grid {
        grid-template-columns: 1fr;
    }

    .admin-user-meta {
        grid-template-columns: 1fr;
    }

    @media (min-width: 480px) {
        .admin-user-meta {
            grid-template-columns: repeat(2, minmax(0, 1fr));
        }
    }

    .otp-input-row {
        grid-template-columns: 1fr;
    }

    .otp-input-row .btn {
        width: 100%;
    }

    .admin-user-head {
        display: block;
    }

    .admin-user-badges {
        margin-top: 10px;
    }

    .record-card,
    .checkout-grid,
    .contact-wrap,
    .contact-hero,
    .contact-main,
    .contact-service-grid,
    .plan-row,
    .scan-grid,
    .otp-box,
    .qr-filter-grid {
        grid-template-columns: 1fr;
    }

    .record-card {
        grid-template-columns: 1fr;
    }

    .qr-filter-actions .btn {
        width: 100%;
    }

    .scan-header {
        padding: 18px;
    }

    .scan-meta {
        flex-direction: column;
    }

    .scan-meta span {
        border-radius: 10px;
        justify-content: center;
        width: 100%;
    }

    .layout-scan .scan-card .data-table dl,
    .data-table dl,
    .data-list {
        display: block;
    }

    .data-table dt,
    .data-list dt {
        border-bottom: 0;
        border-top: 1px solid var(--line);
        padding: 14px 16px 4px;
    }

    .data-table dt:first-child,
    .data-list dt:first-child {
        border-top: 0;
    }

    .data-table dd,
    .data-list dd {
        background: #fff;
        font-size: var(--text-base);
        padding: 0 16px 14px;
    }

    .leaflet-lang-toolbar {
        padding: 14px;
    }

    .leaflet-lang-head {
        padding: 14px;
    }

    .multilang-leaflet .scan-hero-compact {
        padding: 16px;
    }

    .contact-hero,
    .contact-banner,
    .contact-panel {
        padding: 20px 18px;
    }

    .contact-info h1 {
        font-size: clamp(1.75rem, 8vw, 2.25rem);
    }

    .layout-app .page:has(.dashboard) .dashboard,
    .dashboard {
        display: grid;
        grid-template-areas: "main";
        grid-template-columns: minmax(0, 1fr);
    }

    .side {
        max-height: none;
        position: static;
    }

    .dashboard-table-scroll {
        -webkit-overflow-scrolling: touch;
        margin-left: -4px;
        margin-right: -4px;
        max-width: calc(100% + 8px);
        overflow-x: auto;
        overflow-y: visible;
        padding-bottom: 4px;
        scroll-padding: 16px;
        width: 100%;
    }

    .dashboard-table-scroll table {
        margin-top: 0;
    }

    .form-grid,
    .form-grid-2 {
        grid-template-columns: 1fr;
    }

    .panel.wide,
    .panel {
        max-width: 100%;
    }

    input,
    select,
    textarea,
    .btn {
        max-width: 100%;
    }

    .page-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .register-layout,
    .welcome-steps,
    .branding-grid {
        grid-template-columns: 1fr;
    }

    .welcome-steps {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .payment-list {
        grid-template-columns: 1fr;
    }

    aside {
        margin-bottom: 0;
        max-width: 100%;
    }

    .panel,
    .card,
    .trace {
        padding: 18px 16px;
    }

    .content-page {
        padding: 22px 18px;
    }

    .empty-state {
        margin: 16px 0;
        padding: 32px 20px;
    }

    .stat-card strong {
        font-size: 1.625rem;
    }

    .admin-users-table-scroll {
        -webkit-overflow-scrolling: touch;
        margin-left: -4px;
        margin-right: -4px;
        padding-bottom: 4px;
        scroll-padding: 16px;
    }

    .admin-users-table {
        min-width: 0;
    }

    .admin-log-table,
    .admin-log-table--notifications {
        min-width: 0;
    }

    .admin-log-table-scroll {
        -webkit-overflow-scrolling: touch;
        margin-left: -4px;
        margin-right: -4px;
        padding-bottom: 4px;
        scroll-padding: 16px;
    }

    .table-wrap {
        -webkit-overflow-scrolling: touch;
        margin-left: -4px;
        margin-right: -4px;
        padding-bottom: 4px;
        scroll-padding: 16px;
    }

    table.is-responsive thead {
        display: none;
    }

    table.is-responsive {
        border: 0;
        margin-top: 0;
    }

    table.is-responsive tbody tr {
        background: #fff;
        border: 1px solid var(--line);
        border-radius: var(--radius-sm);
        display: block;
        margin-bottom: 12px;
        padding: 4px 14px 10px;
    }

    table.is-responsive tbody tr:nth-child(even) {
        background: #fff;
    }

    table.is-responsive tbody td {
        align-items: flex-start;
        border: 0;
        border-bottom: 1px solid #f1f5f9;
        display: flex;
        gap: 12px;
        justify-content: space-between;
        padding: 10px 0;
        text-align: right;
        white-space: normal;
        word-break: break-word;
    }

    table.is-responsive tbody td:last-child {
        border-bottom: 0;
    }

    table.is-responsive tbody td::before {
        color: var(--muted);
        content: attr(data-label);
        flex: 0 0 42%;
        font-size: 11px;
        font-weight: 700;
        letter-spacing: 0.04em;
        line-height: 1.4;
        text-align: left;
        text-transform: uppercase;
    }

    table.is-responsive tbody td[data-label=""]::before,
    table.is-responsive tbody td:not([data-label])::before {
        content: none;
    }

    .qr-results-table.seed-label-results tbody td {
        white-space: normal;
        word-break: break-word;
    }

    .qr-results-table .download-actions,
    .qr-results-table .download-actions.is-stacked {
        flex-direction: column;
        margin-left: auto;
        max-width: 160px;
        width: 100%;
    }

    .qr-results-table .btn-download {
        justify-content: center;
        width: 100%;
    }

    .qr-results-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
        padding: 14px 16px;
    }

    .qr-results-panel .table-wrap {
        padding: 0 12px 12px;
    }

    .qr-preview-admin {
        flex-direction: column;
        text-align: center;
    }

    .usage-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .download-actions {
        width: 100%;
    }

    .download-actions .btn {
        flex: 1 1 auto;
        min-width: 0;
    }
}

@media (max-width: 480px) {
    .brand-logo-header {
        height: 48px;
        max-height: 48px;
        max-width: min(260px, 72vw);
    }

    .welcome-steps {
        grid-template-columns: 1fr;
    }

    .mini-tabs {
        grid-template-columns: 1fr;
    }

    .stats {
        grid-template-columns: 1fr 1fr;
    }

    .scan-hero h1 {
        font-size: 1.375rem;
    }

    .scan-badge {
        font-size: 10px;
    }

    .footer-trust {
        flex-wrap: wrap;
    }

    .btn-sm {
        font-size: 11px;
        min-height: 40px;
        padding: 8px 10px;
    }
}

@media (min-width: 761px) and (max-width: 1024px) {
    .qr-hero {
        grid-template-columns: 1fr;
        padding: 28px 24px;
    }

    .qr-hero h1 {
        font-size: clamp(2.5rem, 3vw, 3rem);
        line-height: 1.1;
        max-width: min(100%, 26ch);
    }

    .qr-hero p {
        margin-bottom: 12px;
    }

    .footer-main {
        grid-template-columns: 1fr 1fr;
    }

    .footer-col-brand {
        grid-column: 1 / -1;
    }
}

/* Subscription alerts & renewal */
.subscription-alert {
    border-radius: var(--radius);
    margin: 0 0 16px;
    padding: 14px 16px;
}

.subscription-alert--warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    color: #92400e;
}

.subscription-alert--expired {
    background: #fef2f2;
    border: 1px solid #fca5a5;
    color: #991b1b;
}

.admin-expiry-stats {
    margin-top: 12px;
}

.subscription-alert .btn {
    margin-top: 10px;
}

.subscription-title-row {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: space-between;
}

.subscription-active-card {
    margin-bottom: 20px;
}

.subscription-active-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.usage-expiry {
    color: var(--muted);
    display: block;
    font-size: 13px;
    font-weight: 400;
    margin-top: 4px;
}

.usage-banner .renew-btn {
    margin-top: 12px;
}

.plan-grid {
    margin-bottom: 24px;
}

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

.checkout-preview-list {
    display: grid;
    gap: 12px;
    margin: 0;
}

.checkout-preview-list div {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    border-bottom: 1px solid var(--border, #e5e7eb);
    padding-bottom: 8px;
}

.checkout-preview-list dt {
    color: var(--muted);
    font-weight: 500;
    margin: 0;
}

.checkout-preview-list dd {
    font-weight: 600;
    margin: 0;
    text-align: right;
}

.upgrade-preview-grid,
.addon-form {
    margin-bottom: 24px;
}

.addon-qty-row {
    align-items: flex-end;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.addon-qty-row label {
    flex: 1;
    min-width: 120px;
}

.upgrade-card .btn {
    margin-top: 12px;
    width: 100%;
}

.subscription-history-table {
    min-width: 640px;
}

.payment-history-table {
    min-width: 920px;
}

.invoice-history-cell .invoice-cell-actions {
    margin-top: 6px;
}

.invoice-history-cell .invoice-download-btn {
    white-space: normal;
}

.subscription-page .invoice-download-btn,
.admin-subscription-history .invoice-download-btn {
    margin-top: 4px;
}

.invoice-cell-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.invoice-html-body {
    background: #f4f6f8;
    margin: 0;
    padding: 16px;
    font-family: "DM Sans", system-ui, sans-serif;
    color: #1a1a1a;
}

.invoice-html-wrap {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.06);
    margin: 0 auto;
    max-width: 900px;
    padding: 28px 32px 36px;
}

.invoice-html-header {
    border-bottom: 2px solid #166534;
    margin-bottom: 20px;
    padding-bottom: 16px;
}

.invoice-header-row {
    display: grid;
    gap: 20px;
    grid-template-columns: 180px 1fr;
    align-items: start;
}

.invoice-logo-col {
    align-items: center;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    min-height: 88px;
    padding: 12px;
}

.invoice-company-col h1 {
    font-size: 1.2rem;
    line-height: 1.3;
    margin: 0 0 6px;
}

.invoice-html-brand {
    display: flex;
    flex-wrap: wrap;
    gap: 16px 24px;
    align-items: flex-start;
}

.invoice-branding-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    margin-bottom: 16px;
}

.invoice-logo-preview {
    background: #fff;
    border: 1px dashed #cbd5e1;
    border-radius: 8px;
    margin: 10px 0 14px;
    padding: 12px;
    text-align: center;
}

.invoice-logo-preview img {
    max-height: 80px;
    max-width: 280px;
    object-fit: contain;
    width: auto;
}

.invoice-signature-preview {
    max-height: 60px;
}

.invoice-settings-form .panel h3 {
    font-size: var(--text-base);
    margin: 0 0 10px;
}

.invoice-html-logo {
    max-height: 56px;
    max-width: 180px;
    object-fit: contain;
}

.invoice-html-brand h1 {
    font-size: 1.25rem;
    margin: 0 0 4px;
}

.invoice-brand-tag {
    color: #64748b;
    font-size: 0.9rem;
    margin: 0 0 8px;
}

.invoice-html-title {
    color: #166534;
    font-size: 1.35rem;
    letter-spacing: 0.06em;
    margin: 12px 0 0;
    text-align: center;
}

.invoice-html-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: 1fr 1fr;
    margin-bottom: 20px;
}

.invoice-html-panel {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
}

.invoice-html-panel h3 {
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    margin: 0 0 10px;
    text-transform: uppercase;
}

.invoice-meta-table {
    border-collapse: collapse;
    font-size: 0.88rem;
    width: 100%;
}

.invoice-meta-table td {
    padding: 4px 0;
    vertical-align: top;
}

.invoice-meta-table td:first-child {
    color: #64748b;
    padding-right: 12px;
    width: 42%;
}

.invoice-lines-table {
    border-collapse: collapse;
    font-size: 0.82rem;
    margin-bottom: 16px;
    width: 100%;
}

.invoice-lines-table th,
.invoice-lines-table td {
    border: 1px solid #cbd5e1;
    padding: 8px 6px;
    text-align: left;
}

.invoice-lines-table th {
    background: #ecfdf5;
    font-weight: 600;
}

.invoice-lines-table .num {
    text-align: right;
    white-space: nowrap;
}

.invoice-html-bottom {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.invoice-tax-summary {
    border-collapse: collapse;
    min-width: 280px;
}

.invoice-tax-summary td {
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
}

.invoice-tax-summary .num {
    text-align: right;
}

.invoice-tax-summary .grand-total td {
    background: #ecfdf5;
}

.invoice-html-footer {
    border-top: 1px solid #e2e8f0;
    color: #64748b;
    font-size: 0.85rem;
    margin-top: 12px;
    padding-top: 12px;
}

.invoice-tax-note {
    font-size: 0.8rem;
}

@media print {
    .invoice-html-body {
        background: #fff;
        padding: 0;
    }

    .invoice-html-wrap {
        border: 0;
        box-shadow: none;
        max-width: none;
        padding: 0;
    }

    .no-print {
        display: none !important;
    }
}

@media (max-width: 768px) {
    .invoice-html-wrap {
        padding: 16px;
    }

    .invoice-header-row {
        grid-template-columns: 1fr;
    }

    .invoice-html-grid {
        grid-template-columns: 1fr;
    }

    .invoice-branding-grid {
        grid-template-columns: 1fr;
    }

    .invoice-lines-table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

.subscription-page .table-scroll,
.sms-templates-table,
.sms-workflow-table {
    margin-bottom: 20px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.sms-template-form textarea {
    min-height: 100px;
    resize: vertical;
}

.sms-templates-table .actions-cell,
.sms-workflow-table code {
    white-space: nowrap;
}

.sms-row-inactive {
    opacity: 0.65;
}

.sms-row-inactive td {
    color: var(--muted);
}

.inline-form {
    display: inline;
}

@media (max-width: 768px) {
    .subscription-active-grid {
        grid-template-columns: 1fr;
    }

    .subscription-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .subscription-actions {
        width: 100%;
    }

    .subscription-actions .btn {
        flex: 1;
        min-width: 140px;
        text-align: center;
    }

    .checkout-preview-list div {
        flex-direction: column;
        text-align: left;
    }

    .checkout-preview-list dd {
        text-align: left;
    }

    .usage-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 6px;
    }

    .plan-grid {
        grid-template-columns: 1fr !important;
    }

    .checkout-grid {
        grid-template-columns: 1fr !important;
    }

    .payment-settings-grid {
        grid-template-columns: 1fr;
    }

    .approval-btn-row .btn {
        flex: 1 1 100%;
    }

    .payment-list {
        grid-template-columns: 1fr;
    }

    .sms-template-form .form-grid-2 {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 425px) {
    .subscription-alert {
        font-size: 14px;
        padding: 12px;
    }

    .plan-card .price {
        font-size: 1.25rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
