:root {
    --primary: #111827;
    --accent: #A3E635;
    --accent-strong: #3F6212;
    --accent-soft: #F7FEE7;
    --surface: #FFFFFF;
    --soft: #F9FAFB;
    --line: #E5E7EB;
    --text: #111827;
    --muted: #6B7280;
}

* {
    letter-spacing: 0;
}

body {
    background: var(--soft);
    color: var(--text);
    display: flex;
    flex-direction: column;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    min-height: 100vh;
}

main {
    flex: 1 0 auto;
}

footer {
    flex-shrink: 0;
}

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

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

.text-action-link {
    color: var(--accent-strong);
    font-weight: 700;
    text-decoration-color: rgba(63, 98, 18, .35);
    text-underline-offset: .18em;
}

.text-action-link:hover,
.text-action-link:focus {
    color: var(--primary);
    text-decoration-color: var(--accent);
}

::selection {
    background: var(--accent);
    color: var(--primary);
}

.btn-dark {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-color: #fff;
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-hover-color: var(--primary);
    --bs-btn-active-bg: var(--accent);
    --bs-btn-active-border-color: var(--accent);
    --bs-btn-active-color: var(--primary);
    --bs-btn-focus-shadow-rgb: 163, 230, 53;
}

.btn-outline-dark {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--accent);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-hover-color: var(--primary);
    --bs-btn-active-bg: var(--accent);
    --bs-btn-active-border-color: var(--accent);
    --bs-btn-active-color: var(--primary);
    --bs-btn-focus-shadow-rgb: 163, 230, 53;
}

.btn-lime {
    --bs-btn-bg: var(--accent);
    --bs-btn-border-color: var(--accent);
    --bs-btn-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-hover-color: #fff;
    --bs-btn-active-bg: var(--primary);
    --bs-btn-active-border-color: var(--primary);
    --bs-btn-active-color: #fff;
    --bs-btn-focus-shadow-rgb: 163, 230, 53;
    font-weight: 800;
}

.btn-google-auth {
    --bs-btn-bg: #fff;
    --bs-btn-border-color: var(--line);
    --bs-btn-color: var(--primary);
    --bs-btn-hover-bg: var(--accent-soft);
    --bs-btn-hover-border-color: var(--accent);
    --bs-btn-hover-color: var(--primary);
    --bs-btn-active-bg: var(--accent-soft);
    --bs-btn-active-border-color: var(--accent);
    --bs-btn-active-color: var(--primary);
    --bs-btn-focus-shadow-rgb: 163, 230, 53;
    font-weight: 700;
}

.form-control:focus,
.form-select:focus,
.form-check-input:focus,
.form-range:focus::-webkit-slider-thumb {
    border-color: var(--accent);
    box-shadow: 0 0 0 .2rem rgba(163, 230, 53, .25);
}

.form-check-input:checked {
    background-color: var(--accent);
    border-color: var(--accent);
}

.form-range::-webkit-slider-thumb {
    background: var(--accent);
}

.form-range::-moz-range-thumb {
    background: var(--accent);
    border: 0;
}

.text-bg-success {
    background-color: var(--accent) !important;
    color: var(--primary) !important;
}

.text-bg-secondary {
    background-color: var(--muted) !important;
}

.text-muted {
    color: var(--muted) !important;
}

.navbar-brand {
    font-weight: 800;
}

.brand-logo {
    border-radius: 8px;
    height: 34px;
    object-fit: contain;
    width: 34px;
}

.brand-word {
    color: var(--primary);
    display: inline-flex;
    font-weight: 900;
    gap: .12rem;
}

.brand-word-accent {
    color: var(--accent);
}

.nav-account .nav-link {
    max-width: 240px;
    min-width: 0;
}

.nav-user-name {
    display: inline-block;
    max-width: 150px;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
}

.navbar .nav-link.nav-mobile-active {
    color: var(--accent-strong);
}

.brand-mark,
.avatar,
.profile-avatar {
    align-items: center;
    background: var(--primary);
    border-radius: 8px;
    color: #fff;
    display: inline-flex;
    justify-content: center;
}

.brand-mark,
.avatar {
    height: 34px;
    width: 34px;
}

.profile-avatar {
    font-size: 2rem;
    height: 72px;
    width: 72px;
}

.mobile-account-copy {
    min-width: 0;
}

.mobile-account-copy strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-card-grid {
    display: grid;
    gap: 1rem;
}

.profile-hero {
    background:
        linear-gradient(135deg, rgba(163, 230, 53, .16), transparent 42%),
        var(--surface);
}

.profile-hero-copy {
    flex: 1 1 0;
    min-width: 0;
}

.profile-display-name,
.profile-email {
    display: block;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.profile-name-input {
    text-overflow: ellipsis;
}

.verified-pill,
.verified-input-pill {
    align-items: center;
    background: #DCFCE7;
    border: 1px solid #BBF7D0;
    border-radius: 999px;
    color: #166534;
    display: inline-flex;
    font-size: .78rem;
    font-weight: 800;
    gap: .3rem;
    padding: .18rem .55rem;
}

.verified-input-pill {
    border-radius: 0 6px 6px 0;
    font-size: .85rem;
}

.alert-slot {
    min-height: 0;
}

.tool-hero {
    align-items: center;
    display: flex;
    min-height: calc(100vh - 60px);
    padding: 1.5rem 0 3.5rem;
}

.hero-layout {
    align-items: center;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 7fr 3fr;
}

.tool-hero h1 {
    font-size: clamp(2.4rem, 4vw, 4.8rem);
    font-weight: 900;
    line-height: 1;
    max-width: 760px;
}

.hero-cues {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: 1rem;
}

.hero-cue {
    align-items: center;
    background: var(--accent-soft);
    border: 1px solid rgba(163, 230, 53, .72);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    font-size: .85rem;
    font-weight: 700;
    gap: .35rem;
    padding: .36rem .68rem;
}

.hero-cue i {
    color: var(--accent-strong);
}

.eyebrow {
    color: var(--accent-strong);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.panel,
.auth-card,
.metric,
.hero-preview {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 16px 40px rgba(17, 24, 39, .06);
}

.panel {
    padding: 1.4rem;
}

.hero-generator {
    scroll-margin-top: 96px;
    padding: 1.1rem;
}

.format-badge {
    background: var(--accent-soft);
    border-color: rgba(163, 230, 53, .78) !important;
    color: var(--primary);
}

.hero-generator-preview {
    border-top: 1px solid var(--line);
    margin-top: 1rem;
    padding-top: 1rem;
}

.hero-generator-preview .preview-box {
    min-height: 240px;
}

.hero-generator-preview .preview-box img,
.hero-generator-preview .preview-box svg {
    height: auto;
    max-height: none;
    width: min(100%, 240px);
}

.hero-preview {
    align-items: center;
    display: flex;
    gap: 1rem;
    padding: 1rem;
}

.hero-preview span {
    color: var(--muted);
    display: block;
    font-size: .95rem;
}

.qr-sample {
    align-items: center;
    background: var(--accent-soft);
    border-radius: 8px;
    color: var(--primary);
    display: flex;
    flex: 0 0 144px;
    font-size: 6rem;
    height: 144px;
    justify-content: center;
}

.preview-panel {
    position: sticky;
    top: 96px;
}

.preview-box,
.empty-preview {
    align-items: center;
    background: transparent;
    border: 0;
    border-radius: 8px;
    display: flex;
    justify-content: center;
    overflow: hidden;
    padding: 0;
    text-align: center;
}

.preview-box img,
.preview-box svg {
    display: block;
    height: 100%;
    max-height: 360px;
    max-width: 100%;
    width: auto;
}

.preview-panel .preview-box {
    aspect-ratio: 1 / 1;
    min-height: 240px;
    width: 100%;
}

.preview-panel .preview-box img,
.preview-panel .preview-box svg {
    height: auto;
    max-height: 100%;
    width: min(100%, 360px);
}

.empty-preview {
    color: var(--muted);
    flex-direction: column;
    gap: .75rem;
}

.empty-preview i {
    font-size: 4rem;
}

.seo-content-section {
    padding: 4rem 0;
}

.seo-content {
    border-top: 1px solid var(--line);
    padding-top: 2rem;
}

.seo-content h2 {
    font-size: clamp(1.6rem, 2vw, 2.4rem);
    font-weight: 850;
    margin-bottom: 1rem;
    max-width: 780px;
}

.seo-content p:not(.eyebrow) {
    color: var(--muted);
    margin-bottom: 0;
}

.faq-block {
    border-top: 1px solid var(--line);
    margin-top: 2rem;
    padding-top: 2rem;
}

.faq-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
}

.faq-item {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
}

.faq-item h3 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: .5rem;
}

.faq-item p {
    color: var(--muted);
    margin-bottom: 0;
}

.form-status {
    min-height: 28px;
}

.api-docs h2 {
    border-top: 1px solid var(--line);
    font-size: 1.15rem;
    font-weight: 850;
    margin-top: 2rem;
    padding-top: 1.25rem;
}

.api-docs h2:first-of-type {
    border-top: 0;
    margin-top: 0;
    padding-top: 0;
}

.api-docs pre {
    background: #0B1220;
    border-radius: 8px;
    color: #E5E7EB;
    overflow-x: auto;
    padding: 1rem;
}

.api-docs code {
    font-size: .9rem;
}

.color-control {
    display: grid;
    gap: .45rem;
    grid-template-columns: 54px minmax(0, 1fr) 38px;
}

.color-control .form-control-color {
    min-height: 38px;
    padding: .2rem;
    width: 100%;
}

.color-hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
    text-transform: uppercase;
}

.color-icon-btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    padding: 0;
}

.value-badge {
    background: var(--accent-soft);
    border: 1px solid rgba(163, 230, 53, .78);
    border-radius: 999px;
    color: var(--primary);
    font-size: .82rem;
    font-weight: 800;
    padding: .18rem .55rem;
}

.auth-wrap {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 220px);
    padding: 3rem 1rem;
}

.auth-card {
    max-width: 430px;
    padding: 1.5rem;
    width: 100%;
}

.auth-card h1 {
    font-size: 1.8rem;
    font-weight: 850;
}

.narrow {
    max-width: 760px;
}

.metric {
    padding: 1.2rem;
}

.metric span {
    color: var(--muted);
    display: block;
    font-size: .9rem;
}

.metric strong {
    display: block;
    font-size: 2rem;
    line-height: 1.1;
}

.analytics-summary-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    min-width: 0;
}

.analytics-page .panel,
.analytics-page .row > *,
.analytics-page .table-responsive {
    min-width: 0;
}

.analytics-metric .metric-text {
    font-size: 1.1rem;
    line-height: 1.25;
}

.destination-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    min-width: 0;
}

.destination-label {
    color: var(--muted);
    display: block;
    font-size: .82rem;
    font-weight: 750;
    margin-bottom: .25rem;
    text-transform: uppercase;
}

.destination-value {
    display: block;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.analytics-range {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    justify-content: flex-end;
}

.analytics-range .btn {
    align-items: center;
    display: inline-flex;
    justify-content: center;
    line-height: 1;
    min-height: 32px;
    padding: .45rem .75rem;
}

.analytics-error {
    background: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    color: #B91C1C;
    font-weight: 700;
    margin-bottom: 1rem;
    padding: .7rem .85rem;
}

.analytics-page[data-analytics-loading] .scan-chart-shell,
.analytics-page[data-analytics-loading] [data-analytics-breakdown],
.analytics-page[data-analytics-loading] [data-analytics-recent] {
    opacity: .55;
}

.analytics-chart-head {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.scan-chart-shell {
    max-width: 100%;
    min-width: 0;
    overflow-x: auto;
    padding: 1.2rem 0 .25rem;
    scrollbar-width: thin;
}

.scan-chart {
    align-items: end;
    display: flex;
    gap: .28rem;
    min-height: 190px;
    padding: 0 .15rem .25rem;
    position: relative;
    width: max-content;
}

.scan-chart.is-wide {
    gap: 1rem;
    width: 100%;
}

.scan-chart::before {
    background: #D1D5DB;
    bottom: calc(.25rem + 1rem + .42rem);
    content: "";
    height: 1px;
    left: 0;
    position: absolute;
    right: 0;
}

.scan-chart-item {
    align-items: center;
    display: grid;
    flex: 0 0 34px;
    gap: .42rem;
    grid-template-rows: .8rem 130px 1rem;
    position: relative;
    text-align: center;
    width: 34px;
}

.scan-chart.is-wide .scan-chart-item {
    flex: 1 1 0;
    min-width: 0;
    width: auto;
}

.scan-chart-value {
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    height: .8rem;
    line-height: .8rem;
}

.scan-chart-track {
    align-items: end;
    display: flex;
    height: 130px;
    justify-content: center;
    width: 100%;
}

.scan-chart-track span {
    background: linear-gradient(180deg, var(--accent), #84CC16);
    border-radius: 4px 4px 0 0;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .5);
    display: block;
    min-height: 7px;
    width: 28px;
}

.scan-chart.is-wide .scan-chart-track span {
    width: min(58px, 58%);
}

.scan-chart-track span.is-empty {
    background: #D1D5DB;
    border-radius: 0;
    box-shadow: none;
    height: 1px !important;
    min-height: 1px;
    opacity: 1;
    width: 22px;
}

.scan-chart.is-wide .scan-chart-track span.is-empty {
    width: min(42px, 46%);
}

.scan-chart-label {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 750;
    height: 1rem;
    line-height: 1rem;
    overflow: visible;
    white-space: nowrap;
}

.breakdown-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: .7rem 0;
}

.breakdown-row:last-child {
    border-bottom: 0;
}

.breakdown-row span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breakdown-row strong {
    align-items: baseline;
    display: flex;
    flex: 0 0 auto;
    gap: .35rem;
}

.breakdown-row small {
    color: var(--muted);
    font-weight: 750;
}

.source-pill {
    background: var(--accent-soft);
    border: 1px solid rgba(163, 230, 53, .78);
    border-radius: 999px;
    color: var(--primary);
    display: inline-flex;
    font-size: .82rem;
    font-weight: 750;
    padding: .18rem .55rem;
}

.stat-row {
    align-items: center;
    border-bottom: 1px solid var(--line);
    display: flex;
    justify-content: space-between;
    padding: .65rem 0;
}

.stat-row:last-child {
    border-bottom: 0;
}

.table-target {
    color: #4B5563;
    display: flex;
    font-size: .92rem;
    gap: .35rem;
    min-width: 0;
    max-width: 210px;
}

.table-target span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.target-link {
    color: var(--accent-strong);
    flex: 0 0 auto;
    font-size: .82rem;
    line-height: 1;
}

.target-link:hover,
.target-link:focus {
    color: var(--primary);
}

.qr-title-preview {
    align-items: center;
    display: flex;
    gap: .75rem;
    min-width: 0;
}

.qr-title-preview-img {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 6px;
    flex: 0 0 auto;
    height: 64px;
    object-fit: contain;
    padding: .25rem;
    width: 64px;
}

.qr-title-preview-text {
    max-width: 260px;
    min-width: 0;
}

.qr-title-preview-text strong {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.action-cell {
    white-space: nowrap;
}

.action-toolbar {
    align-items: center;
    display: inline-grid;
    gap: .3rem;
    grid-template-columns: repeat(4, 32px);
    justify-content: end;
}

.action-toolbar > form {
    display: contents;
    margin: 0;
}

.action-label,
.dashboard-action-more {
    display: none;
}

.dashboard-filter-bar {
    background: var(--surface);
    margin-bottom: 1rem;
    padding-bottom: .1rem;
    position: sticky;
    top: 57px;
    z-index: 10;
}

.dashboard-filter-bar::before {
    background: var(--surface);
    content: "";
    height: 28px;
    left: -1.4rem;
    pointer-events: none;
    position: absolute;
    right: -1.4rem;
    top: -28px;
}

.dashboard-filter-bar .table-search {
    margin-bottom: 0;
}

.dashboard-panel [data-dashboard-list] {
    transition: opacity .16s ease;
}

.dashboard-panel.is-loading [data-dashboard-list] {
    opacity: .52;
    pointer-events: none;
}

.action-toolbar .btn,
.action-spacer {
    align-items: center;
    display: inline-flex;
    height: 32px;
    justify-content: center;
    padding: 0;
    width: 32px;
}

.action-spacer {
    flex: 0 0 32px;
    pointer-events: none;
    visibility: hidden;
}

.dashboard-table {
    table-layout: fixed;
}

.dashboard-table .col-title {
    width: 42%;
}

.dashboard-table .col-type {
    width: 8%;
}

.dashboard-table .col-mode {
    width: 11%;
}

.dashboard-table .col-scans {
    width: 11%;
}

.dashboard-table .col-status {
    width: 10%;
}

.dashboard-table .col-actions {
    width: 18%;
}

.dashboard-table tbody tr {
    transition: background-color .16s ease;
}

.dashboard-table tbody tr[data-row-href] {
    cursor: pointer;
}

.dashboard-table tbody tr:hover {
    background: var(--accent-soft);
}

.dashboard-table tbody tr[data-row-href]:focus-visible {
    outline: 3px solid rgba(163, 230, 53, .55);
    outline-offset: 2px;
}

.dashboard-empty-row,
.dashboard-empty-row:hover {
    background: transparent !important;
}

.empty-state {
    padding: 2.5rem 1rem;
    text-align: center;
}

.empty-state-icon {
    align-items: center;
    background: var(--accent-soft);
    border: 1px solid rgba(163, 230, 53, .78);
    border-radius: 8px;
    color: var(--primary);
    display: inline-flex;
    font-size: 1.6rem;
    height: 56px;
    justify-content: center;
    margin-bottom: .85rem;
    width: 56px;
}

.mode-badge {
    border: 1px solid transparent;
}

.mode-badge-editable {
    background: var(--accent-soft);
    border-color: rgba(163, 230, 53, .78);
    color: var(--primary);
}

.mode-badge-fixed {
    background: #F3F4F6;
    border-color: var(--line);
    color: #4B5563;
}

.status-badge {
    border: 1px solid transparent;
}

.status-badge-active {
    background: #DCFCE7;
    border-color: #BBF7D0;
    color: #166534;
}

.status-badge-disabled {
    background: #F3F4F6;
    border-color: var(--line);
    color: #4B5563;
}

.status-badge-archived {
    background: var(--soft);
    border-color: var(--line);
    color: #4B5563;
}

.dashboard-card-meta,
.dashboard-card-scan {
    display: none;
}

.scan-copy {
    color: var(--primary);
    font-weight: 650;
}

.action-toolbar .btn:hover,
.action-toolbar .btn:focus {
    background: var(--accent);
    border-color: var(--accent);
    color: var(--primary);
}

.dashboard-tabs {
    margin-bottom: 1rem;
}

.dashboard-tabs .nav-link {
    color: var(--muted);
    font-weight: 750;
}

.dashboard-tabs .nav-link.active {
    border-top-color: var(--accent);
    box-shadow: inset 0 3px 0 var(--accent);
    color: var(--primary);
}

.qr-edit-title {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    margin-bottom: 1.5rem;
}

.qr-mode-badge {
    background: var(--accent-soft);
    border: 1px solid rgba(163, 230, 53, .78);
    border-radius: 999px;
    color: var(--primary);
    font-size: .78rem;
    font-weight: 800;
    padding: .22rem .62rem;
}

.style-box {
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 1rem;
}

.edit-tabs {
    margin-bottom: 1.25rem;
}

.edit-tabs .nav-link {
    color: var(--muted);
    font-weight: 700;
}

.edit-tabs .nav-link.active {
    color: var(--primary);
}

.edit-tab-content {
    min-height: 420px;
}

.edit-actions {
    border-top: 1px solid var(--line);
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: .75rem;
    margin-top: 1.5rem;
    padding-top: 1.25rem;
}

.autosave-status {
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}

.autosave-status[data-state="saving"],
.autosave-status[data-state="pending"] {
    color: var(--accent-strong);
}

.autosave-status[data-state="saved"] {
    color: #166534;
}

.autosave-status[data-state="error"] {
    color: #B91C1C;
}

.customize-locked {
    align-items: flex-start;
    background: var(--soft);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: .85rem;
    padding: 1rem;
}

.customize-locked i {
    align-items: center;
    background: var(--accent-soft);
    border-radius: 8px;
    color: var(--accent);
    display: flex;
    flex: 0 0 42px;
    font-size: 1.25rem;
    height: 42px;
    justify-content: center;
    width: 42px;
}

.customize-stack {
    display: grid;
    gap: 1.15rem;
}

.customize-section {
    border-top: 1px solid var(--line);
    padding-top: 1.15rem;
}

.customize-section:first-child {
    border-top: 0;
    padding-top: 0;
}

.customize-section-head {
    align-items: center;
    display: flex;
    gap: .75rem;
    justify-content: space-between;
    margin-bottom: .85rem;
}

.customize-section-head h3 {
    font-size: 1rem;
    font-weight: 800;
    margin: 0;
}

.customize-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.logo-manager {
    align-items: stretch;
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

.logo-manager .current-logo {
    min-height: 100%;
}

.logo-grid {
    align-items: start;
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.logo-grid-spacer {
    min-height: 1px;
}

.logo-size-control {
    max-width: none;
}

.logo-border-toggle,
.option-check {
    align-items: center;
    display: flex;
    gap: .5rem;
    min-height: auto;
    padding: 0;
}

.logo-border-toggle.form-check,
.option-check.form-check {
    padding-left: 0;
}

.logo-border-toggle .form-check-input,
.option-check .form-check-input {
    flex: 0 0 auto;
    float: none;
    margin-left: 0;
    margin-top: 0;
}

.logo-border-toggle .form-check-label,
.option-check .form-check-label {
    font-weight: 600;
    line-height: 1.25;
}

.option-check {
    padding-top: 2.2rem;
}

.current-logo {
    align-items: center;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: .85rem;
    padding: .75rem;
}

.current-logo img {
    border: 1px solid var(--line);
    border-radius: 8px;
    height: 64px;
    object-fit: contain;
    width: 64px;
}

.current-logo-copy {
    align-items: flex-start;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    min-width: 0;
    width: 100%;
}

.current-logo-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
}

.logo-actions {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}

@media (max-width: 991.98px) {
    .nav-drawer {
        --bs-offcanvas-width: min(86vw, 360px);
    }

    .nav-drawer .offcanvas-header {
        border-bottom: 1px solid var(--line);
        padding: 1rem 1.1rem;
    }

    .nav-drawer .offcanvas-body {
        display: flex;
        flex-direction: column;
        min-height: calc(100dvh - 67px);
        padding: 1rem 1.1rem 1.15rem;
    }

    #mainNav {
        background: var(--surface);
    }

    #mainNav .navbar-nav {
        gap: .2rem;
        margin-left: 0 !important;
    }

    #mainNav .nav-item {
        width: 100%;
    }

    #mainNav .nav-link {
        align-items: center;
        border-left: 4px solid transparent;
        border-radius: 0 8px 8px 0;
        display: flex;
        gap: .65rem;
        padding: .72rem .85rem;
    }

    #mainNav .nav-link i {
        color: var(--muted);
        flex: 0 0 1.15rem;
        text-align: center;
    }

    #mainNav .nav-link.nav-mobile-active {
        background: var(--accent-soft);
        border-left-color: var(--accent);
        color: var(--primary);
        font-weight: 800;
    }

    #mainNav .nav-link.nav-mobile-active i {
        color: var(--accent-strong);
    }

    .mobile-account-panel {
        border-top: 1px solid var(--line);
        margin-top: auto;
        padding-top: 1rem;
    }

    .mobile-account-summary {
        align-items: center;
        border-radius: 8px;
        color: var(--primary);
        display: flex;
        gap: .7rem;
        min-width: 0;
        padding: .35rem 0;
        text-decoration: none;
    }

    .mobile-account-summary:hover,
    .mobile-account-summary:focus {
        color: var(--primary);
    }

    .mobile-account-summary .bi-chevron-right {
        color: var(--muted);
        font-size: .9rem;
    }

    .mobile-account-copy {
        max-width: calc(100vw - 7rem);
    }

    .mobile-account-copy span {
        color: var(--muted);
        display: block;
        font-size: .86rem;
        font-weight: 650;
        margin-top: .05rem;
    }

    .mobile-account-actions {
        border-top: 1px solid var(--line);
        margin-top: .85rem;
        padding-top: .55rem;
    }

    .mobile-account-link {
        align-items: center;
        border-radius: 6px;
        color: var(--primary);
        display: inline-flex;
        gap: .45rem;
        font-weight: 750;
        padding: .45rem 0;
        text-decoration: none;
    }

    .mobile-account-link:hover,
    .mobile-account-link:focus {
        color: var(--primary);
    }

    .mobile-account-signout:hover,
    .mobile-account-signout:focus {
        color: #B91C1C;
    }
}

@media (max-width: 767.98px) {
    body {
        scrollbar-width: none;
    }

    body::-webkit-scrollbar {
        display: none;
    }

    .tool-hero {
        min-height: auto;
        padding-top: 2rem;
    }

    .hero-layout {
        grid-template-columns: 1fr;
    }

    .hero-generator-preview .preview-box {
        min-height: 260px;
    }

    .hero-generator-preview .preview-box img,
    .hero-generator-preview .preview-box svg {
        width: min(100%, 260px);
    }

    .nav-account .nav-link {
        max-width: 100%;
    }

    .nav-user-name {
        max-width: min(68vw, 280px);
    }

    .scan-chart {
        gap: .25rem;
    }

    .scan-chart.is-wide {
        gap: .45rem;
    }

    .analytics-chart-head {
        flex-direction: column;
    }

    .analytics-range {
        justify-content: flex-start;
    }

    .scan-chart.is-compact .scan-chart-item {
        flex-basis: 30px;
        width: 30px;
    }

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

    .preview-panel {
        position: static;
    }

    .customize-section-head {
        align-items: stretch;
        flex-direction: column;
    }

    .customize-section-head .btn {
        width: 100%;
    }

    .customize-grid,
    .logo-grid,
    .logo-manager {
        grid-template-columns: 1fr;
    }

    .logo-grid-spacer {
        display: none;
    }

    .option-check {
        padding-top: 0;
    }

    .hero-preview {
        align-items: flex-start;
    }

    .qr-sample {
        flex-basis: 96px;
        font-size: 4rem;
        height: 96px;
    }

    .dashboard-table,
    .dashboard-table tbody,
    .dashboard-table tr,
    .dashboard-table td {
        display: block;
        width: 100%;
    }

    .dashboard-table colgroup,
    .dashboard-table thead {
        display: none;
    }

    .dashboard-table tbody tr {
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: 8px;
        margin-bottom: 1rem;
        overflow: visible;
        padding: .85rem .85rem 0;
    }

    .dashboard-table tbody tr:hover {
        background: var(--surface);
    }

    .dashboard-table td {
        border: 0;
        padding: .35rem 0;
    }

    .dashboard-table .dashboard-meta-cell {
        display: none;
    }

    .dashboard-title-cell {
        padding-top: 0;
    }

    .dashboard-title-cell .qr-title-preview {
        min-width: 0;
    }

    .dashboard-title-cell .table-target {
        max-width: 100%;
    }

    .dashboard-card-meta {
        display: flex;
        flex-wrap: wrap;
        gap: .35rem;
        margin-top: .55rem;
    }

    .dashboard-card-badge,
    .dashboard-card-meta .mode-badge,
    .dashboard-card-meta .status-badge {
        align-items: center;
        border-radius: 999px;
        display: inline-flex;
        font-size: .76rem;
        font-weight: 800;
        line-height: 1;
        min-height: 1.45rem;
        padding: .28rem .55rem;
    }

    .dashboard-card-badge {
        background: var(--surface);
        border: 1px solid var(--line);
        color: var(--primary);
    }

    .dashboard-card-scan {
        display: block;
        font-size: .92rem;
        font-weight: 750;
        margin-top: .45rem;
    }

    .action-cell {
        border-top: 1px solid var(--line);
        margin: .85rem 0 0;
        padding: .85rem .15rem 0;
        text-align: left !important;
        white-space: normal;
    }

    .action-toolbar {
        display: grid;
        gap: .55rem;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
    }

    .action-toolbar-static > .dashboard-action-more {
        grid-column: 1 / -1;
        justify-self: center;
        width: calc(50% - .275rem);
    }

    .action-toolbar .btn {
        border-radius: 6px;
        font-size: .9rem;
        font-weight: 750;
        gap: .35rem;
        height: 38px;
        padding: 0 .55rem;
        width: 100%;
    }

    .action-toolbar .btn[data-bs-toggle="tooltip"] {
        pointer-events: auto;
    }

    .action-label {
        display: inline;
    }

    .action-spacer {
        display: none;
    }

    .archive-form-desktop {
        display: none !important;
    }

    .dashboard-action-more {
        display: block;
    }

    .dashboard-action-more .dropdown-menu {
        min-width: 11rem;
    }

    .dashboard-action-more form {
        margin: 0;
    }

    .dashboard-filter-bar {
        border-bottom: 1px solid var(--line);
        margin: -.2rem 0 1rem;
        padding: .2rem 0 .85rem;
        top: 68px;
    }

    .dashboard-filter-bar::before {
        height: 36px;
        top: -36px;
    }

    .alert-slot {
        left: 0;
        min-height: 0;
        pointer-events: none;
        position: fixed;
        right: 0;
        top: 76px;
        z-index: 1090;
    }

    .alert-slot .alert {
        box-shadow: 0 12px 30px rgba(17, 24, 39, .18);
        margin-inline: .75rem;
        pointer-events: auto;
    }
}
