:root {
    --black: #050606;
    --ink: #17201a;
    --muted: #65706a;
    --red: #d90f1f;
    --red-dark: #a90815;
    --white: #ffffff;
    --off-white: #f5f7f5;
    --soft: #edf1ee;
    --line: #dfe5e1;
    --green: #167347;
    --green-soft: #e8f6ef;
    --amber: #986318;
    --amber-soft: #fff6e7;
    --danger-soft: #fff0f1;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 18px 50px rgba(5, 6, 6, .08);
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--white);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a {
    -webkit-tap-highlight-color: transparent;
}

a {
    color: inherit;
}

img,
svg,
canvas {
    max-width: 100%;
}

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 10px;
    left: 10px;
    transform: translateY(-150%);
    padding: 9px 14px;
    border-radius: 8px;
    color: var(--white);
    background: var(--red);
    font-weight: 800;
}

.skip-link:focus {
    transform: none;
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 18px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
    content: "";
}

.eyebrow-light {
    color: #ff7b86;
}

.section-heading {
    max-width: 720px;
    margin: 0 auto 38px;
    text-align: center;
}

.section-heading h2,
.hero-copy h1,
.page-title h1,
.auth-card h1 {
    margin: 0;
    color: var(--black);
    font-weight: 950;
    letter-spacing: -.045em;
    line-height: 1.03;
}

.section-heading h2 {
    font-size: clamp(32px, 5vw, 52px);
}

.section-heading p {
    margin: 16px auto 0;
    max-width: 640px;
    color: var(--muted);
    font-size: 18px;
}

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid transparent;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 850;
    line-height: 1.1;
    text-align: center;
    text-decoration: none;
    transition: transform .16s ease, background .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
    outline: 3px solid rgba(217, 15, 31, .25);
    outline-offset: 2px;
}

.button-primary {
    color: var(--white);
    background: var(--red);
    box-shadow: 0 8px 24px rgba(217, 15, 31, .22);
}

.button-primary:hover {
    background: var(--red-dark);
}

.button-dark {
    color: var(--white);
    background: var(--black);
}

.button-dark:hover {
    background: #202422;
}

.button-secondary {
    border-color: var(--line);
    color: var(--black);
    background: var(--white);
}

.button-secondary:hover {
    border-color: #b9c4bd;
    background: var(--off-white);
}

.button-danger {
    border-color: #f0c4c8;
    color: var(--red-dark);
    background: var(--danger-soft);
}

.button-small {
    min-height: 40px;
    padding: 9px 14px;
    border-radius: 8px;
    font-size: 14px;
}

.button-full {
    width: 100%;
}

.button-link {
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font-weight: 750;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--black);
    text-decoration: none;
}

.brand-mark {
    display: flex;
    width: 42px;
    height: 44px;
    flex: 0 0 42px;
    align-items: center;
    justify-content: center;
}

.brand-mark img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    filter: brightness(0);
}

.brand-inverse .brand-mark img {
    filter: none;
}

.brand-copy {
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.brand-copy strong,
.mobile-brand {
    font-size: 18px;
    font-style: normal;
    font-weight: 950;
    letter-spacing: .075em;
}

.brand-copy em,
.mobile-brand em {
    color: var(--red);
    font-style: normal;
}

.brand-copy small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.brand-inverse {
    color: var(--white);
}

.brand-inverse .brand-copy small {
    color: #9ea9a3;
}

.public-header {
    position: sticky;
    z-index: 100;
    top: 0;
    border-bottom: 1px solid rgba(223, 229, 225, .85);
    background: rgba(255, 255, 255, .92);
    backdrop-filter: blur(14px);
}

.header-row {
    display: flex;
    min-height: 76px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.public-nav {
    display: flex;
    align-items: center;
    gap: 22px;
}

.public-nav > a:not(.button) {
    color: #354039;
    font-size: 14px;
    font-weight: 780;
    text-decoration: none;
}

.public-nav > a:not(.button):hover {
    color: var(--red);
}

.nav-toggle,
.sidebar-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    border: 1px solid var(--line);
    border-radius: 9px;
    background: var(--white);
}

.nav-toggle {
    cursor: pointer;
}

.nav-toggle span,
.sidebar-toggle span {
    width: 19px;
    height: 2px;
    border-radius: 999px;
    background: var(--black);
    transition: transform .18s ease, opacity .18s ease;
}

.nav-toggle[aria-expanded="true"] span:nth-child(1),
.sidebar-toggle[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] span:nth-child(2),
.sidebar-toggle[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3),
.sidebar-toggle[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
    display: none;
}

body.menu-open {
    overflow: hidden;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(70px, 9vw, 118px) 0 86px;
    background:
        radial-gradient(circle at 80% 20%, rgba(217, 15, 31, .12), transparent 30%),
        linear-gradient(180deg, #fff 0%, #f5f7f5 100%);
}

.hero::after {
    position: absolute;
    right: -160px;
    bottom: -220px;
    width: 500px;
    height: 500px;
    border: 1px solid rgba(5, 6, 6, .08);
    border-radius: 50%;
    content: "";
}

.hero-grid {
    position: relative;
    z-index: 1;
    display: grid;
    align-items: center;
    gap: clamp(44px, 7vw, 90px);
    grid-template-columns: minmax(0, 1.05fr) minmax(360px, .95fr);
}

.hero-copy h1 {
    max-width: 700px;
    font-size: clamp(44px, 6.5vw, 75px);
}

.hero-copy h1 span {
    color: var(--red);
}

.hero-copy > p {
    max-width: 660px;
    margin: 24px 0 0;
    color: #4d5a54;
    font-size: clamp(18px, 2vw, 21px);
}

.hero-points {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 20px;
    margin: 28px 0;
    padding: 0;
    list-style: none;
}

.hero-points li {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #354039;
    font-size: 14px;
    font-weight: 750;
}

.hero-points li::before {
    display: grid;
    width: 20px;
    height: 20px;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--green);
    content: "✓";
    font-size: 12px;
    font-weight: 900;
}

.hero-generator {
    position: relative;
    padding: 26px;
    border: 1px solid rgba(223, 229, 225, .95);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.generator-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 18px;
}

.generator-top strong {
    color: var(--black);
    font-size: 20px;
    font-weight: 900;
}

.status-dot {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--green);
    font-size: 12px;
    font-weight: 800;
}

.status-dot::before {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: currentColor;
    box-shadow: 0 0 0 4px rgba(22, 115, 71, .12);
    content: "";
}

.generator-preview {
    display: grid;
    align-items: center;
    gap: 20px;
    grid-template-columns: 150px minmax(0, 1fr);
    margin-bottom: 22px;
    padding: 16px;
    border-radius: 14px;
    background: var(--off-white);
}

.mock-qr {
    display: grid;
    width: 150px;
    height: 150px;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    gap: 3px;
    padding: 12px;
    border: 1px solid var(--line);
    background: var(--white);
}

.mock-qr i {
    border-radius: 1px;
    background: var(--black);
}

.mock-qr i.red {
    background: var(--red);
}

.mock-qr i.empty {
    background: transparent;
}

.preview-copy strong {
    display: block;
    margin-bottom: 7px;
    color: var(--black);
    font-size: 16px;
}

.preview-copy span {
    display: block;
    color: var(--muted);
    font-size: 13px;
}

.form-stack {
    display: grid;
    gap: 16px;
}

.field {
    display: grid;
    gap: 7px;
}

.field > label,
.field-label {
    color: #2d3832;
    font-size: 13px;
    font-weight: 830;
}

.field small,
.help-text {
    color: var(--muted);
    font-size: 12px;
}

.input,
input[type="email"],
input[type="password"],
input[type="url"],
input[type="text"],
input[type="date"],
input[type="tel"],
select,
textarea {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #cfd7d2;
    border-radius: 9px;
    color: var(--ink);
    background: var(--white);
    box-shadow: 0 1px 1px rgba(5, 6, 6, .02);
    transition: border-color .16s ease, box-shadow .16s ease;
}

input:hover,
select:hover,
textarea:hover {
    border-color: #aeb9b2;
}

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

.input-group {
    display: flex;
    align-items: stretch;
}

.input-group input {
    border-radius: 9px 0 0 9px;
}

.input-group .button {
    border-radius: 0 9px 9px 0;
}

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

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

.checkbox {
    display: flex;
    min-height: 44px;
    align-items: flex-start;
    gap: 9px;
    padding-block: 4px;
    color: #3d4842;
    cursor: pointer;
    font-size: 13px;
}

.checkbox input {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
    margin-top: 1px;
    accent-color: var(--red);
}

.trust-strip {
    border-block: 1px solid var(--line);
    background: var(--white);
}

.trust-items {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
}

.trust-item {
    padding: 24px;
    border-right: 1px solid var(--line);
    text-align: center;
}

.trust-item:last-child {
    border-right: 0;
}

.trust-item strong {
    display: block;
    color: var(--black);
    font-size: 17px;
}

.trust-item span {
    color: var(--muted);
    font-size: 12px;
}

.section {
    padding: clamp(70px, 9vw, 112px) 0;
}

.section-soft {
    background: var(--off-white);
}

.steps-grid,
.features-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card,
.feature-card {
    position: relative;
    padding: 28px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
}

.step-number {
    display: grid;
    width: 42px;
    height: 42px;
    place-items: center;
    margin-bottom: 26px;
    border-radius: 50%;
    color: var(--white);
    background: var(--black);
    font-size: 15px;
    font-weight: 900;
}

.step-card:nth-child(2) .step-number {
    background: var(--red);
}

.step-card h3,
.feature-card h3 {
    margin: 0 0 10px;
    color: var(--black);
    font-size: 21px;
    font-weight: 900;
    line-height: 1.2;
}

.step-card p,
.feature-card p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.feature-icon {
    display: grid;
    width: 48px;
    height: 48px;
    place-items: center;
    margin-bottom: 22px;
    border-radius: 12px;
    color: var(--red);
    background: var(--danger-soft);
    font-size: 23px;
    font-weight: 900;
}

.analytics-showcase {
    display: grid;
    align-items: center;
    gap: 70px;
    grid-template-columns: minmax(0, .8fr) minmax(520px, 1.2fr);
}

.showcase-copy h2 {
    margin: 0;
    color: var(--black);
    font-size: clamp(34px, 5vw, 54px);
    font-weight: 950;
    letter-spacing: -.045em;
    line-height: 1.04;
}

.showcase-copy p {
    margin: 20px 0;
    color: var(--muted);
    font-size: 17px;
}

.check-list {
    display: grid;
    gap: 11px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
}

.check-list li {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    font-size: 14px;
    font-weight: 700;
}

.check-list li::before {
    color: var(--green);
    content: "✓";
    font-weight: 950;
}

.dashboard-mock {
    padding: 22px;
    border: 1px solid var(--line);
    border-radius: 22px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.mock-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.mock-top strong {
    color: var(--black);
}

.mock-filter {
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 7px;
    color: var(--muted);
    font-size: 11px;
}

.mock-metrics {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, 1fr);
}

.mock-metric {
    padding: 14px;
    border-radius: 11px;
    background: var(--off-white);
}

.mock-metric span {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.mock-metric strong {
    display: block;
    margin-top: 4px;
    color: var(--black);
    font-size: 25px;
}

.mock-chart {
    display: flex;
    height: 160px;
    align-items: flex-end;
    gap: 8px;
    margin-top: 16px;
    padding: 20px 14px 0;
    border: 1px solid var(--line);
    border-radius: 12px;
    background:
        repeating-linear-gradient(to bottom, transparent 0 31px, #edf1ee 32px);
}

.mock-chart i {
    flex: 1;
    min-width: 8px;
    border-radius: 5px 5px 0 0;
    background: var(--red);
}

.mock-chart i:nth-child(2n) {
    background: #252a27;
}

.pricing-grid {
    display: grid;
    max-width: 980px;
    margin-inline: auto;
    align-items: stretch;
    gap: 22px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.price-card {
    position: relative;
    display: flex;
    flex-direction: column;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: 19px;
    background: var(--white);
}

.price-card.featured {
    border: 2px solid var(--red);
    box-shadow: 0 20px 50px rgba(217, 15, 31, .13);
}

.price-badge {
    position: absolute;
    top: -13px;
    right: 20px;
    padding: 6px 10px;
    border-radius: 999px;
    color: var(--white);
    background: var(--red);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.price-card h3 {
    margin: 0;
    color: var(--black);
    font-size: 20px;
    font-weight: 900;
}

.price {
    margin: 18px 0 2px;
    color: var(--black);
    font-size: 42px;
    font-weight: 950;
    letter-spacing: -.04em;
    line-height: 1;
}

.price small {
    color: var(--muted);
    font-size: 13px;
    font-weight: 650;
    letter-spacing: 0;
}

.price-note {
    min-height: 24px;
    margin: 7px 0 22px;
    color: var(--muted);
    font-size: 12px;
}

.price-features {
    display: grid;
    flex: 1;
    gap: 11px;
    margin: 0 0 26px;
    padding: 0;
    list-style: none;
}

.price-features li {
    display: flex;
    gap: 8px;
    font-size: 14px;
}

.price-features li::before {
    color: var(--green);
    content: "✓";
    font-weight: 950;
}

.public-footer {
    padding: 60px 0 20px;
    color: #c6cfca;
    background: var(--black);
}

.footer-grid {
    display: grid;
    gap: 50px;
    grid-template-columns: 1.5fr 1fr 1fr;
}

.brand-footer {
    color: var(--white);
}

.footer-grid p {
    max-width: 410px;
    color: #8f9a94;
    font-size: 14px;
}

.footer-grid > div:not(:first-child) {
    display: flex;
    flex-direction: column;
    gap: 9px;
}

.footer-grid > div > strong {
    margin-bottom: 7px;
    color: var(--white);
}

.footer-grid a {
    color: #aeb8b2;
    font-size: 13px;
    text-decoration: none;
}

.footer-grid a:hover {
    color: var(--white);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    margin-top: 45px;
    padding-top: 16px;
    border-top: 1px solid #272c29;
    color: #7f8984;
    font-size: 11px;
}

.footer-bottom a {
    color: inherit;
    text-decoration: none;
}

/* Authentication */
.auth-body {
    min-height: 100vh;
    background: var(--off-white);
}

.auth-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: minmax(380px, .85fr) minmax(500px, 1.15fr);
}

.auth-brand-panel {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px clamp(34px, 5vw, 72px);
    color: var(--white);
    background:
        radial-gradient(circle at 10% 90%, rgba(217, 15, 31, .35), transparent 30%),
        var(--black);
}

.auth-promise {
    max-width: 560px;
    margin-block: auto;
}

.auth-promise h1 {
    margin: 0;
    color: var(--white);
    font-size: clamp(38px, 5vw, 61px);
    font-weight: 950;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.auth-promise p {
    margin: 22px 0 0;
    color: #aeb9b2;
    font-size: 17px;
}

.auth-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.auth-trust span {
    padding: 7px 10px;
    border: 1px solid #303632;
    border-radius: 999px;
    color: #bdc7c1;
    font-size: 11px;
    font-weight: 800;
}

.auth-form-panel {
    display: flex;
    min-height: 100vh;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    padding: 42px 24px;
}

.auth-card {
    width: min(100%, 480px);
    padding: clamp(28px, 5vw, 42px);
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--white);
    box-shadow: var(--shadow);
}

.auth-card h1 {
    font-size: clamp(30px, 4vw, 40px);
}

.auth-card > p {
    margin: 12px 0 26px;
    color: var(--muted);
}

.auth-card .back-link {
    display: inline-flex;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 750;
    text-decoration: none;
}

.auth-card .back-link:hover {
    color: var(--red);
}

.auth-legal {
    width: min(100%, 480px);
    margin: 18px 0 0;
    color: var(--muted);
    font-size: 11px;
    text-align: center;
}

.auth-legal a {
    color: var(--black);
}

.auth-switch {
    margin-top: 20px;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.auth-switch a {
    color: var(--red);
    font-weight: 800;
}

.code-input {
    min-height: 64px !important;
    font-size: 29px;
    font-weight: 900;
    letter-spacing: .24em;
    text-align: center;
}

.email-chip {
    display: inline-flex;
    margin: -8px 0 23px;
    padding: 7px 10px;
    border-radius: 999px;
    color: #39443e;
    background: var(--soft);
    font-size: 12px;
    font-weight: 800;
}

/* App shell */
.app-body {
    min-height: 100vh;
    background: var(--off-white);
}

.app-shell {
    display: grid;
    min-height: 100vh;
    grid-template-columns: 270px minmax(0, 1fr);
}

.sidebar {
    position: sticky;
    z-index: 200;
    top: 0;
    display: flex;
    height: 100vh;
    flex-direction: column;
    padding: 25px 18px 18px;
    color: #c6cfca;
    background: var(--black);
}

.sidebar-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 10px 24px;
    border-bottom: 1px solid #292e2b;
}

.sidebar-brand {
    min-width: 0;
}

.sidebar-close {
    display: none;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    border: 1px solid #343a36;
    border-radius: 10px;
    color: var(--white);
    background: #1b1f1d;
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.sidebar-nav {
    display: flex;
    flex: 1;
    min-height: 0;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 24px 0;
    scrollbar-color: #3b423e transparent;
    scrollbar-width: thin;
}

.sidebar-nav a {
    display: flex;
    min-height: 44px;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 9px;
    color: #aeb8b2;
    font-size: 13px;
    font-weight: 760;
    text-decoration: none;
}

.sidebar-nav a span {
    display: grid;
    width: 24px;
    place-items: center;
    color: #7f8a84;
    font-size: 17px;
}

.sidebar-nav a:hover {
    color: var(--white);
    background: #1c201e;
}

.sidebar-nav a.active {
    color: var(--white);
    background: var(--red);
}

.sidebar-nav a.active span {
    color: var(--white);
}

.nav-divider {
    height: 1px;
    margin: 15px 10px 9px;
    background: #292e2b;
}

.nav-label {
    padding: 6px 12px;
    color: #707a75;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.client-context-label {
    padding-top: 0;
}

.client-context-button {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 40px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 10px;
    margin: 0 0 10px;
    padding: 10px;
    border: 1px dashed #4a524e;
    border-radius: 12px;
    color: #d7ded9;
    background: #151917;
    cursor: pointer;
    text-align: left;
}

.client-context-button:hover,
.client-context-button:focus-visible {
    border-color: #747f79;
    color: var(--white);
    background: #1c211e;
    outline: none;
}

.client-context-button.selected {
    border-style: solid;
    border-color: #5c252b;
    background: #211517;
}

.client-context-avatar,
.client-result-avatar,
.topbar-client-context > span {
    display: grid;
    overflow: hidden;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--red);
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .02em;
}

.client-context-avatar {
    width: 40px;
    height: 40px;
}

.client-context-avatar img,
.client-result-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.client-context-copy {
    min-width: 0;
}

.client-context-copy strong,
.client-context-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-context-copy strong {
    color: var(--white);
    font-size: 11px;
}

.client-context-copy small {
    margin-top: 2px;
    color: #8e9993;
    font-size: 9px;
}

.client-context-chevron {
    color: #7f8a84;
    font-size: 16px;
}

.sidebar-footer {
    padding: 15px 10px 3px;
    border-top: 1px solid #292e2b;
}

.account-chip {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.account-chip .avatar {
    display: grid;
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
    place-items: center;
    border-radius: 50%;
    color: var(--white);
    background: var(--red);
    font-size: 13px;
    font-weight: 900;
}

.account-chip > span:last-child {
    min-width: 0;
}

.account-chip strong,
.account-chip small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.account-chip strong {
    color: var(--white);
    font-size: 11px;
}

.account-chip small {
    margin-top: 2px;
    color: #7f8984;
    font-size: 9px;
}

.sidebar-footer .button-link {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    color: #909a95;
    font-size: 11px;
}

.app-main {
    min-width: 0;
}

.app-topbar {
    display: none;
    min-height: 66px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 18px;
    border-bottom: 1px solid var(--line);
    background: var(--white);
}

.topbar-client-context {
    display: flex;
    min-width: 0;
    max-width: min(44vw, 240px);
    min-height: 44px;
    align-items: center;
    gap: 8px;
    padding: 5px 9px 5px 5px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--ink);
    background: var(--white);
    cursor: pointer;
}

.topbar-client-context > span {
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
}

.topbar-client-context strong {
    overflow: hidden;
    color: var(--black);
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.topbar-client-context.selected {
    border-color: #e9b7bb;
    background: #fff7f8;
}

.mobile-brand {
    display: inline-flex;
    height: 44px;
    max-width: 132px;
    flex: 0 1 132px;
    align-items: center;
    gap: 7px;
    justify-content: flex-start;
    color: var(--black);
    text-decoration: none;
}

.mobile-brand .brand-mark {
    width: 30px;
    height: 32px;
    flex-basis: 30px;
}

.mobile-brand .brand-mark img {
    filter: brightness(0);
}

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

.mobile-brand .brand-copy strong {
    color: var(--black);
    font-size: 13px;
    letter-spacing: .045em;
    white-space: nowrap;
}

.mobile-brand .brand-copy small {
    display: block;
    margin-top: 3px;
    color: #626d66;
    font-size: 7px;
    letter-spacing: .06em;
    white-space: nowrap;
}

.app-content {
    width: min(100%, 1480px);
    margin-inline: auto;
    padding: 34px clamp(22px, 4vw, 52px) 70px;
}

.page-title {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 26px;
}

.page-title h1 {
    font-size: clamp(31px, 4vw, 44px);
}

.page-title p {
    max-width: 700px;
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 14px;
}

.page-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 9px;
}

.dashboard-actions {
    display: grid;
    width: 290px;
    max-width: 100%;
    flex: 0 0 auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.dashboard-actions .button {
    width: 100%;
    min-width: 0;
}

.alert {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 720;
}

.alert [data-dismiss] {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    margin: -10px -10px -10px 0;
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    cursor: pointer;
    font-size: 20px;
}

.alert-error,
.alert-danger {
    border-color: #efc8cc;
    color: #8d1b24;
    background: var(--danger-soft);
}

.alert-success {
    border-color: #bfe3d0;
    color: #135c3b;
    background: var(--green-soft);
}

.alert-warning {
    border-color: #efd8ad;
    color: #7d5419;
    background: var(--amber-soft);
}

.alert-info {
    border-color: #cbd9e5;
    color: #36566e;
    background: #eff7fc;
}

.plan-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
    padding: 17px 20px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--white);
}

.plan-banner.grace {
    border-color: #e8c987;
    background: var(--amber-soft);
}

.plan-banner.suspended {
    border-color: #efb9be;
    background: var(--danger-soft);
}

.plan-banner strong {
    display: block;
    color: var(--black);
    font-size: 14px;
}

.plan-banner span {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 12px;
}

.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 3px 16px rgba(5, 6, 6, .025);
}

.card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 22px 17px;
    border-bottom: 1px solid var(--line);
}

.card-header h2,
.card-header h3 {
    margin: 0;
    color: var(--black);
    font-size: 18px;
    font-weight: 900;
    line-height: 1.25;
}

.card-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.card-body {
    padding: 22px;
}

.filter-card {
    margin-bottom: 20px;
    padding: 16px;
}

.filters {
    display: grid;
    align-items: end;
    gap: 12px;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
}

.filters .field {
    gap: 4px;
}

.filters input,
.filters select {
    min-height: 42px;
    padding: 8px 10px;
    font-size: 13px;
}

.filter-drawer-backdrop {
    position: fixed;
    z-index: 300;
    inset: 0;
    background: rgba(5, 6, 6, .5);
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease, visibility .2s ease;
    visibility: hidden;
}

.filter-drawer-backdrop.show {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.filter-drawer {
    position: fixed;
    z-index: 310;
    top: 0;
    right: 0;
    display: flex;
    width: min(440px, 100vw);
    height: 100dvh;
    min-height: 0;
    flex-direction: column;
    background: var(--white);
    box-shadow: -18px 0 45px rgba(5, 6, 6, .2);
    opacity: 0;
    pointer-events: none;
    transform: translateX(102%);
    transition: opacity .2s ease, transform .24s ease, visibility .24s ease;
    visibility: hidden;
}

.filter-drawer.open {
    opacity: 1;
    pointer-events: auto;
    transform: none;
    visibility: visible;
}

.filter-drawer-header {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 26px 24px 20px;
    border-bottom: 1px solid var(--line);
}

.filter-drawer-header h2 {
    margin: 4px 0 0;
    color: var(--black);
    font-size: 25px;
    font-weight: 920;
    letter-spacing: -.025em;
}

.filter-drawer-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.filter-drawer-close {
    display: grid;
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--black);
    background: var(--soft);
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.filter-drawer-close:hover {
    color: var(--white);
    border-color: var(--black);
    background: var(--black);
}

.filter-drawer-form {
    display: flex;
    min-height: 0;
    flex: 1;
    flex-direction: column;
}

.filter-drawer-body {
    display: grid;
    flex: 1;
    align-content: start;
    gap: 17px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 22px 24px 28px;
    -webkit-overflow-scrolling: touch;
}

.filter-drawer-date-grid {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.filter-drawer .field {
    gap: 6px;
}

.filter-drawer input,
.filter-drawer select {
    min-height: 46px;
    padding: 10px 11px;
    font-size: 14px;
}

.filter-drawer-actions {
    display: grid;
    flex: 0 0 auto;
    gap: 10px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 16px 24px max(16px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: var(--white);
    box-shadow: 0 -8px 24px rgba(5, 6, 6, .04);
}

.filter-drawer-actions .button {
    width: 100%;
}

.export-dialog {
    position: fixed;
    z-index: 520;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
    visibility: hidden;
}

.export-dialog.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.export-dialog-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 6, .66);
    backdrop-filter: blur(3px);
}

.export-dialog-panel {
    position: relative;
    width: min(650px, 100%);
    max-height: calc(100dvh - 48px);
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 28px 80px rgba(5, 6, 6, .27);
    transform: translateY(10px) scale(.985);
    transition: transform .18s ease;
}

.export-dialog.open .export-dialog-panel {
    transform: none;
}

.export-dialog-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 22px;
    padding: 24px 24px 19px;
    border-bottom: 1px solid var(--line);
}

.export-dialog-header .eyebrow {
    margin-bottom: 5px;
    font-size: 10px;
}

.export-dialog-header h2 {
    margin: 0;
    color: var(--black);
    font-size: 27px;
    font-weight: 920;
    letter-spacing: -.03em;
}

.export-dialog-header p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.export-dialog-close {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--black);
    background: var(--off-white);
    cursor: pointer;
    font-size: 24px;
    line-height: 1;
}

.export-dialog-close:hover {
    color: var(--white);
    border-color: var(--black);
    background: var(--black);
}

.export-dialog-options {
    display: grid;
    gap: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding: 20px 24px 24px;
}

.export-option {
    display: grid;
    min-width: 0;
    align-items: center;
    gap: 12px;
    grid-template-columns: 54px minmax(0, 1fr) auto;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 13px;
    color: var(--ink);
    background: var(--white);
    text-decoration: none;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.export-option:hover,
.export-option:focus-visible {
    border-color: #dfa5aa;
    box-shadow: 0 10px 26px rgba(5, 6, 6, .08);
    transform: translateY(-1px);
}

.export-option-format {
    display: grid;
    width: 54px;
    height: 54px;
    place-items: center;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 950;
    letter-spacing: .04em;
}

.export-option-format.csv {
    color: #11603a;
    background: var(--green-soft);
}

.export-option-format.pdf {
    color: var(--red-dark);
    background: var(--danger-soft);
}

.export-option-copy {
    min-width: 0;
}

.export-option-copy strong,
.export-option-copy small {
    display: block;
}

.export-option-copy strong {
    color: var(--black);
    font-size: 14px;
    font-weight: 900;
}

.export-option-copy small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.export-option-arrow {
    color: var(--red);
    font-size: 20px;
    font-weight: 900;
}

.metrics-grid {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    margin-bottom: 20px;
}

.metric-card {
    min-width: 0;
    padding: 19px;
}

.metric-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 780;
}

.metric-value {
    display: block;
    margin-top: 9px;
    overflow: hidden;
    color: var(--black);
    font-size: clamp(25px, 3vw, 35px);
    font-weight: 950;
    letter-spacing: -.035em;
    line-height: 1.05;
    text-overflow: ellipsis;
}

.metric-note {
    display: flex;
    min-height: 19px;
    align-items: center;
    gap: 5px;
    margin-top: 8px;
    color: var(--muted);
    font-size: 10px;
}

.delta {
    padding: 3px 6px;
    border-radius: 999px;
    font-weight: 850;
}

.delta.up {
    color: var(--green);
    background: var(--green-soft);
}

.delta.down {
    color: var(--red-dark);
    background: var(--danger-soft);
}

.analytics-grid {
    display: grid;
    gap: 20px;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
    margin-bottom: 20px;
}

.chart-card canvas {
    display: block;
    width: 100%;
    height: 310px;
}

.chart-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    color: var(--muted);
    font-size: 10px;
}

.chart-legend span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.chart-legend i {
    width: 16px;
    height: 3px;
    border-radius: 999px;
    background: var(--red);
}

.chart-legend i.request {
    background: #97a39d;
}

.bars {
    display: grid;
    gap: 13px;
}

.bar-row {
    display: grid;
    gap: 6px;
}

.bar-meta {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    font-size: 11px;
}

.bar-meta span {
    overflow: hidden;
    color: #39443e;
    font-weight: 740;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.bar-meta strong {
    color: var(--black);
    font-weight: 900;
}

.bar-track {
    height: 7px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--soft);
}

.bar-fill {
    height: 100%;
    min-width: 2px;
    border-radius: inherit;
    background: var(--red);
}

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

.data-table-wrap {
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: #aeb9b2 var(--soft);
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.data-table-wrap.is-scrollable:focus-visible {
    border-radius: 8px;
    outline: 3px solid rgba(217, 15, 31, .2);
    outline-offset: -3px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
}

.data-table th,
.data-table td {
    padding: 11px 12px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    text-align: left;
}

.data-table th {
    color: var(--muted);
    background: #fafbfa;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
    white-space: nowrap;
}

.data-table tbody tr:hover {
    background: #fafbfa;
}

.data-table td strong {
    color: var(--black);
}

.data-table .muted {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 8px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .035em;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-success {
    color: var(--green);
    background: var(--green-soft);
}

.badge-warning {
    color: var(--amber);
    background: var(--amber-soft);
}

.badge-danger {
    color: var(--red-dark);
    background: var(--danger-soft);
}

.badge-neutral {
    color: #58635d;
    background: var(--soft);
}

.qr-list {
    display: grid;
    gap: 14px;
}

.qr-row {
    display: grid;
    align-items: center;
    gap: 18px;
    grid-template-columns: 80px minmax(0, 1.3fr) minmax(140px, .6fr) minmax(140px, .6fr) auto;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: var(--white);
}

.qr-thumb {
    width: 80px;
    height: 80px;
    padding: 5px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--white);
    object-fit: contain;
}

.qr-info {
    min-width: 0;
}

.qr-info strong {
    display: block;
    overflow: hidden;
    color: var(--black);
    font-size: 15px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qr-info a.target {
    display: block;
    overflow: hidden;
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qr-client-owner {
    display: flex;
    min-width: 0;
    align-items: baseline;
    gap: 6px;
    margin-top: 7px;
}

.qr-client-owner span {
    flex: 0 0 auto;
    color: var(--muted);
    font-size: 9px;
    font-weight: 850;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.qr-client-owner b,
.qr-client-owner small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qr-client-owner b {
    color: var(--black);
    font-size: 12px;
}

.qr-client-owner small {
    min-width: 0;
    color: var(--muted);
    font-size: 11px;
}

.qr-stat span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
}

.qr-stat strong {
    display: block;
    margin-top: 3px;
    color: var(--black);
    font-size: 16px;
}

.qr-row-action {
    justify-self: end;
}

.qr-row-action form {
    margin: 0;
}

.qr-row-action .button {
    white-space: nowrap;
}

.qr-load-more {
    display: grid;
    justify-items: center;
    gap: 9px;
    padding: 24px 0 2px;
}

.qr-load-more p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.qr-load-more .button[aria-disabled="true"] {
    cursor: wait;
    opacity: .65;
    pointer-events: none;
}

.empty-state {
    padding: 50px 24px;
    text-align: center;
}

.empty-icon {
    display: grid;
    width: 68px;
    height: 68px;
    place-items: center;
    margin: 0 auto 18px;
    border-radius: 17px;
    color: var(--red);
    background: var(--danger-soft);
    font-size: 31px;
    font-weight: 900;
}

.empty-state h3 {
    margin: 0;
    color: var(--black);
    font-size: 21px;
    font-weight: 900;
}

.empty-state p {
    max-width: 500px;
    margin: 8px auto 20px;
    color: var(--muted);
    font-size: 13px;
}

.sidebar-backdrop {
    display: none;
}

/* QR forms and detail */
.form-layout {
    display: grid;
    align-items: start;
    gap: 22px;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
}

.form-section {
    padding: 22px;
    border-bottom: 1px solid var(--line);
}

.form-section:last-child {
    border-bottom: 0;
}

.form-section h2 {
    margin: 0 0 4px;
    color: var(--black);
    font-size: 17px;
    font-weight: 900;
}

.form-section > p {
    margin: 0 0 18px;
    color: var(--muted);
    font-size: 12px;
}

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

.style-option {
    position: relative;
}

.style-option input {
    position: absolute;
    opacity: 0;
}

.style-option label {
    display: flex;
    min-height: 94px;
    align-items: center;
    gap: 13px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    background: var(--white);
}

.style-option input:checked + label {
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(217, 15, 31, .12);
}

.shape-demo {
    display: grid;
    width: 54px;
    height: 54px;
    flex: 0 0 54px;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    padding: 6px;
    background: var(--off-white);
}

.shape-demo i {
    background: var(--black);
}

.shape-demo.soft i {
    border-radius: 3px;
}

.style-option strong,
.style-option small {
    display: block;
}

.style-option strong {
    color: var(--black);
    font-size: 13px;
}

.style-option small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
}

.color-palette {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
}

.color-choice {
    position: relative;
}

.color-choice input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}

.color-choice label {
    display: flex;
    min-height: 62px;
    align-items: center;
    gap: 10px;
    padding: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    background: var(--white);
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.color-choice label:hover {
    border-color: #aeb9b2;
    transform: translateY(-1px);
}

.color-choice input:checked + label {
    border-color: var(--red);
    box-shadow: 0 0 0 2px rgba(217, 15, 31, .12);
}

.color-choice input:focus-visible + label {
    outline: 3px solid rgba(217, 15, 31, .24);
    outline-offset: 2px;
}

.color-swatch {
    width: 31px;
    height: 31px;
    flex: 0 0 31px;
    border: 2px solid var(--white);
    border-radius: 50%;
    background: var(--swatch);
    box-shadow: 0 0 0 1px rgba(5, 6, 6, .18);
}

.color-choice strong,
.color-choice small {
    display: block;
}

.color-choice strong {
    color: var(--ink);
    font-size: 12px;
}

.color-choice small {
    margin-top: 2px;
    color: var(--muted);
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 9px;
}

.logo-upload-feedback {
    display: flex;
    min-height: 24px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.logo-upload-status {
    color: var(--muted);
    font-size: 12px;
}

.logo-upload-status.is-valid {
    color: #135c3b;
    font-weight: 750;
}

.logo-upload-status.is-error {
    color: #9d111d;
    font-weight: 750;
}

.logo-clear {
    padding: 3px 0;
    border: 0;
    color: #7d1019;
    cursor: pointer;
    background: transparent;
    font: inherit;
    font-size: 11px;
    font-weight: 800;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.logo-clear[hidden],
.logo-file-preview[hidden],
.qr-info-badge[hidden] {
    display: none;
}

.logo-file-preview {
    display: grid;
    width: min(100%, 180px);
    justify-items: center;
    gap: 8px;
    padding: 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--off-white);
}

.logo-file-preview img {
    display: block;
    width: 112px;
    height: 112px;
    object-fit: contain;
    border: 8px solid var(--white);
    border-radius: 10px;
    background: var(--white);
}

.logo-file-preview span {
    color: var(--muted);
    font-size: 10px;
    text-align: center;
}

.safety-box {
    padding: 16px;
    border: 1px solid #c5e3d3;
    border-radius: 11px;
    background: var(--green-soft);
}

.safety-box strong {
    display: block;
    color: #135c3b;
    font-size: 13px;
}

.safety-box ul {
    display: grid;
    gap: 5px;
    margin: 9px 0 0;
    padding-left: 18px;
    color: #38604b;
    font-size: 11px;
}

.preview-card {
    position: sticky;
    top: 28px;
    padding: 24px;
    text-align: center;
}

.qr-label-section-inline {
    display: grid;
    gap: 13px;
    padding-top: 4px;
}

.qr-label-section-inline h3 {
    margin: 0;
    color: var(--black);
    font-size: 16px;
    font-weight: 900;
}

.qr-label-section-inline > p {
    margin: -7px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.qr-label-editors {
    display: grid;
    align-items: start;
    gap: 13px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qr-label-editor {
    min-width: 0;
    margin: 0;
    padding: 15px;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #fafbfa;
}

.qr-label-editor legend {
    padding: 0 6px;
    color: var(--black);
    font-size: 13px;
    font-weight: 900;
}

.qr-label-text {
    min-height: 76px;
    resize: vertical;
}

.qr-label-help {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
}

.qr-label-help strong {
    flex: 0 0 auto;
    color: var(--ink);
}

.qr-label-help strong.is-error {
    color: #9d111d;
}

.qr-label-control-grid {
    display: grid;
    align-items: end;
    gap: 10px;
    margin-top: 12px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.qr-label-italic {
    min-height: 44px;
    align-self: end;
    margin: 0;
    padding: 0 2px;
}

.qr-artwork-preview {
    display: grid;
    width: min(100%, 400px);
    justify-items: center;
    gap: 10px;
    margin: 18px auto 10px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: var(--qr-preview-background, var(--white));
    transition: background-color .16s ease;
}

.qr-preview-square {
    position: relative;
    width: 100%;
    aspect-ratio: 1;
    overflow: hidden;
    background: var(--qr-preview-background, var(--white));
}

.qr-preview-square img {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    background: var(--qr-preview-background, var(--white));
    object-fit: contain;
}

.qr-preview-loader {
    position: absolute;
    right: 11px;
    bottom: 11px;
    display: none;
    width: 22px;
    height: 22px;
    border: 3px solid rgba(5, 6, 6, .16);
    border-top-color: var(--red);
    border-radius: 50%;
    animation: qr-preview-spin .75s linear infinite;
}

.qr-artwork-preview.is-loading .qr-preview-loader {
    display: block;
}

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

.qr-info-badge {
    box-sizing: border-box;
    width: fit-content;
    max-width: 100%;
    padding: 8px 13px;
    border: 1px solid transparent;
    border-radius: 10px;
    line-height: 1.26;
    overflow-wrap: anywhere;
}

.qr-info-badge [data-label-content] {
    display: block;
    white-space: pre-wrap;
}

.qr-info-badge.font-sans { font-family: "DejaVu Sans", Arial, sans-serif; }
.qr-info-badge.font-serif { font-family: Georgia, "Times New Roman", serif; }
.qr-info-badge.font-mono { font-family: "DejaVu Sans Mono", Consolas, monospace; }
.qr-info-badge.size-small { font-size: 11px; }
.qr-info-badge.size-medium { font-size: 13px; }
.qr-info-badge.size-large { font-size: 15px; }
.qr-info-badge.weight-normal { font-weight: 400; }
.qr-info-badge.weight-bold { font-weight: 800; }
.qr-info-badge.is-italic { font-style: italic; }
.qr-info-badge.align-left { justify-self: start; text-align: left; }
.qr-info-badge.align-center { justify-self: center; text-align: center; }
.qr-info-badge.align-right { justify-self: end; text-align: right; }
.qr-info-badge.theme-light { border-color: #d8e0db; color: #050606; background: #fff; }
.qr-info-badge.theme-soft { border-color: #d8e0db; color: #17201a; background: #f1f4f2; }
.qr-info-badge.theme-dark { border-color: #050606; color: #fff; background: #050606; }
.qr-info-badge.theme-red { border-color: #d90f1f; color: #fff; background: #d90f1f; }
.qr-info-badge.theme-green { border-color: #164a32; color: #fff; background: #164a32; }
.qr-info-badge.theme-none { padding-right: 4px; padding-left: 4px; color: #050606; background: transparent; }

.qr-preview-status {
    min-height: 17px;
    margin: 0 0 17px;
    color: var(--muted);
    font-size: 11px;
}

.qr-preview-status.is-valid {
    color: #135c3b;
    font-weight: 750;
}

.qr-preview-status.is-error {
    color: #9d111d;
    font-weight: 750;
}

.preview-card h3 {
    margin: 0;
    color: var(--black);
    font-size: 17px;
    font-weight: 900;
}

.preview-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.quota {
    margin-top: 18px;
    padding: 12px;
    border-radius: 9px;
    color: #39443e;
    background: var(--off-white);
    font-size: 11px;
}

.qr-detail-grid {
    display: grid;
    align-items: start;
    gap: 22px;
    grid-template-columns: minmax(300px, .75fr) minmax(0, 1.25fr);
}

.qr-display {
    padding: 25px;
    text-align: center;
}

.qr-display .qr-artwork-preview {
    margin-top: 12px;
}

.tracking-address {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding: 9px;
    border-radius: 9px;
    background: var(--off-white);
}

.tracking-address code {
    min-width: 0;
    flex: 1;
    overflow: hidden;
    color: #354039;
    font-size: 10px;
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.download-grid {
    display: grid;
    gap: 9px;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    margin-top: 14px;
}

.stack {
    display: grid;
    gap: 20px;
}

.destination-current {
    padding: 15px;
    border-radius: 10px;
    background: var(--off-white);
}

.destination-current span {
    display: block;
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .07em;
    text-transform: uppercase;
}

.destination-current a {
    display: block;
    overflow: hidden;
    margin-top: 5px;
    color: var(--black);
    font-size: 13px;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.version-list {
    display: grid;
    gap: 0;
}

.version-row {
    display: grid;
    gap: 12px;
    grid-template-columns: 86px minmax(0, 1fr) auto;
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
    font-size: 11px;
}

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

.version-row a {
    overflow: hidden;
    color: #39443e;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.version-row time {
    color: var(--muted);
    white-space: nowrap;
}

/* Billing and settings */
.subscription-hero {
    display: grid;
    align-items: center;
    gap: 24px;
    grid-template-columns: minmax(0, 1fr) auto;
    margin-bottom: 22px;
    padding: 24px;
    color: var(--white);
    background:
        radial-gradient(circle at 80% 50%, rgba(217, 15, 31, .34), transparent 32%),
        var(--black);
}

.subscription-hero .eyebrow {
    margin-bottom: 8px;
}

.subscription-hero h2 {
    margin: 0;
    color: var(--white);
    font-size: 28px;
    font-weight: 950;
}

.subscription-hero p {
    margin: 6px 0 0;
    color: #adb7b1;
    font-size: 13px;
}

.subscription-date {
    padding: 12px 16px;
    border: 1px solid #393f3c;
    border-radius: 11px;
    background: rgba(255, 255, 255, .04);
    text-align: right;
}

.subscription-date span,
.subscription-date strong {
    display: block;
}

.subscription-date span {
    color: #8e9993;
    font-size: 9px;
    text-transform: uppercase;
}

.subscription-date strong {
    margin-top: 3px;
    color: var(--white);
    font-size: 15px;
}

.account-plans {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 22px;
}

.account-plan {
    position: relative;
    display: grid;
    align-items: center;
    gap: 18px;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 22px;
}

.account-plan.featured {
    border-color: #efb2b8;
}

.account-plan h3 {
    margin: 0;
    color: var(--black);
    font-size: 18px;
    font-weight: 900;
}

.account-plan p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.account-plan .amount {
    display: block;
    margin-top: 13px;
    color: var(--black);
    font-size: 27px;
    font-weight: 950;
}

.account-plan .amount small {
    color: var(--muted);
    font-size: 11px;
}

.settings-grid {
    display: grid;
    align-items: start;
    gap: 22px;
    grid-template-columns: minmax(0, 1.25fr) minmax(310px, .75fr);
}

.settings-card .card-body {
    display: grid;
    gap: 17px;
}

.security-choice {
    align-items: flex-start;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--off-white);
}

.security-choice input {
    margin-top: 2px;
}

.security-choice span,
.security-choice strong,
.security-choice small {
    display: block;
}

.security-choice strong {
    color: var(--black);
    font-size: 13px;
}

.security-choice small {
    margin-top: 4px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

.security-card .button {
    width: 100%;
}

/* Client email reports */
.report-page-title {
    align-items: center;
}

.report-status {
    display: inline-flex;
    min-height: 38px;
    flex: 0 0 auto;
    align-items: center;
    gap: 8px;
    padding: 9px 13px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: #65706a;
    background: var(--white);
    font-size: 11px;
    font-weight: 900;
}

.report-status i {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #a9b2ad;
}

.report-status.enabled {
    border-color: #b9dbc7;
    color: #175c35;
    background: #f0fbf4;
}

.report-status.enabled i {
    background: #1d8b4b;
    box-shadow: 0 0 0 4px rgba(29, 139, 75, .11);
}

.report-overview {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 22px;
}

.report-overview-card {
    min-width: 0;
    padding: 18px;
}

.report-overview-card > span,
.report-overview-card > strong,
.report-overview-card > small {
    display: block;
}

.report-overview-card > span {
    color: var(--muted);
    font-size: 9px;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.report-overview-card > strong {
    overflow: hidden;
    margin-top: 7px;
    color: var(--black);
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.report-overview-card > small {
    margin-top: 6px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.report-layout {
    display: grid;
    align-items: start;
    gap: 22px;
    grid-template-columns: minmax(0, 1.2fr) minmax(320px, .8fr);
    margin-bottom: 22px;
}

.report-settings-card .card-body,
.report-content-card .card-body {
    display: grid;
    gap: 19px;
}

.report-frequency-fieldset {
    min-width: 0;
    margin: 0;
    padding: 0;
    border: 0;
}

.report-frequency-fieldset legend {
    margin-bottom: 9px;
    color: #2f3934;
    font-size: 11px;
    font-weight: 800;
}

.report-frequency-options {
    display: grid;
    gap: 10px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.report-frequency-option {
    position: relative;
    display: block;
    min-width: 0;
    cursor: pointer;
}

.report-frequency-option input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.report-frequency-option > span {
    display: block;
    height: 100%;
    min-height: 92px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--off-white);
    transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.report-frequency-option strong,
.report-frequency-option small {
    display: block;
}

.report-frequency-option strong {
    color: var(--black);
    font-size: 13px;
}

.report-frequency-option small {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.45;
}

.report-frequency-option input:checked + span {
    border-color: #df6f78;
    background: #fff7f8;
    box-shadow: inset 0 0 0 1px #df6f78;
}

.report-frequency-option input:focus-visible + span {
    outline: 3px solid rgba(217, 15, 31, .2);
    outline-offset: 2px;
}

.report-settings-actions {
    display: flex;
    justify-content: flex-end;
}

.report-content-list {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.report-content-list li {
    display: grid;
    align-items: start;
    gap: 11px;
    grid-template-columns: 25px minmax(0, 1fr);
}

.report-content-list li > span {
    display: grid;
    width: 25px;
    height: 25px;
    place-items: center;
    border-radius: 50%;
    color: #fff;
    background: #17683a;
    font-size: 11px;
    font-weight: 900;
}

.report-content-list strong,
.report-content-list small {
    display: block;
}

.report-content-list strong {
    color: var(--black);
    font-size: 12px;
}

.report-content-list small {
    margin-top: 3px;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
}

.report-content-card .button:disabled {
    cursor: not-allowed;
    opacity: .45;
}

.report-send-hint {
    margin: -8px 0 0;
    color: var(--muted);
    font-size: 10px;
    line-height: 1.5;
    text-align: center;
}

.report-history-card {
    overflow: hidden;
}

.report-history-table small {
    display: block;
    max-width: 520px;
    margin-top: 4px;
    white-space: normal;
}

.report-history-empty {
    padding-block: 42px;
}

.danger-zone {
    border-color: #efc3c7;
}

.danger-zone .card-header {
    background: var(--danger-soft);
}

.impersonation-banner {
    position: sticky;
    z-index: 85;
    top: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 20px;
    padding: 13px 15px;
    border: 1px solid #e7bd63;
    border-radius: 12px;
    color: #4c3510;
    background: #fff4d6;
    box-shadow: 0 8px 24px rgba(78, 54, 12, .1);
}

.impersonation-banner strong,
.impersonation-banner span {
    display: block;
}

.impersonation-banner strong {
    color: #2d1d05;
    font-size: 13px;
}

.impersonation-banner span {
    margin-top: 2px;
    font-size: 12px;
}

.impersonation-banner form {
    flex: 0 0 auto;
}

.client-required-card .empty-state {
    max-width: 620px;
    margin-inline: auto;
}

.client-required-card .page-actions {
    justify-content: center;
    margin-top: 20px;
}

.owner-access-layout {
    margin-bottom: 20px;
}

.client-selector-modal {
    position: fixed;
    z-index: 500;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 24px;
    opacity: 0;
    pointer-events: none;
    transition: opacity .18s ease, visibility .18s ease;
    visibility: hidden;
}

.client-selector-modal.open {
    opacity: 1;
    pointer-events: auto;
    visibility: visible;
}

.client-selector-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(5, 6, 6, .65);
    backdrop-filter: blur(3px);
}

.client-selector-panel {
    position: relative;
    display: flex;
    width: min(640px, 100%);
    max-height: min(760px, calc(100dvh - 48px));
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 18px;
    background: var(--white);
    box-shadow: 0 28px 80px rgba(5, 6, 6, .25);
    transform: translateY(10px) scale(.985);
    transition: transform .18s ease;
}

.client-selector-modal.open .client-selector-panel {
    transform: none;
}

.client-selector-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 24px 18px;
    border-bottom: 1px solid var(--line);
}

.client-selector-header h2 {
    margin: 2px 0 0;
    color: var(--black);
    font-size: 27px;
    letter-spacing: -.03em;
}

.client-selector-header p {
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.client-selector-close {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 42px;
    place-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    color: var(--ink);
    background: var(--off-white);
    cursor: pointer;
    font-size: 24px;
}

.client-selector-search {
    padding: 18px 24px 13px;
}

.client-selector-search label {
    display: block;
    margin-bottom: 7px;
    color: var(--ink);
    font-size: 11px;
    font-weight: 850;
}

.client-selector-input {
    display: grid;
    grid-template-columns: 25px minmax(0, 1fr);
    align-items: center;
    padding: 0 12px;
    border: 1px solid #cfd7d2;
    border-radius: 11px;
    background: var(--white);
}

.client-selector-input:focus-within {
    border-color: var(--red);
    box-shadow: 0 0 0 3px rgba(217, 15, 31, .1);
}

.client-selector-input span {
    color: var(--muted);
    font-size: 20px;
}

.client-selector-input input {
    width: 100%;
    min-width: 0;
    height: 48px;
    border: 0;
    outline: 0;
    color: var(--black);
    background: transparent;
    font-size: 14px;
}

.client-selector-search p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 10px;
}

.client-selector-results {
    display: grid;
    min-height: 180px;
    align-content: start;
    gap: 8px;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 5px 24px 20px;
}

.client-result {
    display: grid;
    width: 100%;
    min-width: 0;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 12px;
    color: var(--ink);
    background: var(--white);
    cursor: pointer;
    text-align: left;
}

.client-result:hover,
.client-result:focus-visible {
    border-color: #e5a9ae;
    background: #fff8f8;
    outline: none;
}

.client-result.selected {
    border-color: var(--red);
    background: #fff4f5;
}

.client-result-avatar {
    width: 44px;
    height: 44px;
}

.client-result-copy {
    min-width: 0;
}

.client-result-copy strong,
.client-result-copy small {
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.client-result-copy strong {
    color: var(--black);
    font-size: 13px;
}

.client-result-copy small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 10px;
}

.client-result-meta {
    display: grid;
    justify-items: end;
    gap: 4px;
    color: var(--muted);
    font-size: 9px;
}

.client-result-status {
    padding: 3px 7px;
    border-radius: 999px;
    color: #31533f;
    background: var(--green-soft);
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .05em;
}

.client-result-status.pending {
    color: #745017;
    background: var(--amber-soft);
}

.client-result-status.suspended {
    color: #8c2430;
    background: var(--danger-soft);
}

.client-selector-message {
    display: grid;
    min-height: 155px;
    place-items: center;
    padding: 28px;
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

.client-selector-footer {
    display: flex;
    min-height: 68px;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 24px;
    border-top: 1px solid var(--line);
    background: var(--off-white);
}

.client-selector-footer span {
    color: var(--muted);
    font-size: 10px;
}

.client-selector-footer form {
    width: 100%;
}

.client-selector-footer .button {
    width: 100%;
}

[data-client-select-form] {
    display: none;
}

.admin-user-filters {
    display: grid;
    align-items: end;
    gap: 12px;
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 220px) auto auto;
}

.admin-user-create {
    max-width: 900px;
}

.admin-user-create-section {
    display: grid;
    gap: 15px;
    padding-top: 22px;
    border-top: 1px solid var(--line);
}

.admin-user-create-section h3 {
    margin: 0;
    color: var(--black);
    font-size: 18px;
}

.admin-user-create-section p {
    max-width: 700px;
    margin: 5px 0 0;
    color: var(--muted);
    font-size: 12px;
}

.admin-user-create-note {
    display: grid;
    gap: 4px;
    padding: 14px 15px;
    border: 1px solid #d8e5dd;
    border-radius: 10px;
    color: #385044;
    background: #f5faf7;
    font-size: 12px;
}

.admin-user-create-note strong {
    color: var(--black);
}

.admin-user-create-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding-top: 4px;
}

.admin-pagination {
    display: grid;
    align-items: center;
    gap: 16px;
    grid-template-columns: 1fr auto 1fr;
    margin-top: 18px;
}

.admin-pagination > :last-child {
    justify-self: end;
}

.admin-pagination > span {
    color: var(--muted);
    font-size: 12px;
    font-weight: 800;
}

.admin-user-summary {
    display: grid;
    gap: 15px;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-bottom: 20px;
}

.admin-summary-card {
    min-width: 0;
    padding: 21px;
}

.admin-summary-card > strong {
    display: block;
    margin-top: 8px;
    overflow-wrap: anywhere;
    color: var(--black);
    font-size: 21px;
    font-weight: 920;
}

.admin-summary-card p {
    margin: 7px 0 13px;
    color: var(--muted);
    font-size: 12px;
}

.admin-user-layout {
    display: grid;
    align-items: start;
    gap: 20px;
    grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
}

.admin-premium-form {
    display: grid;
    gap: 17px;
}

.admin-account-actions {
    display: grid;
    gap: 10px;
}

.admin-account-actions .button,
.admin-account-actions form {
    width: 100%;
}

.admin-detail-list {
    display: grid;
    gap: 0;
    margin: 0;
}

.admin-detail-list > div {
    display: grid;
    gap: 14px;
    grid-template-columns: minmax(90px, .7fr) minmax(0, 1.3fr);
    padding: 10px 0;
    border-bottom: 1px solid var(--line);
}

.admin-detail-list > div:last-child {
    border-bottom: 0;
}

.admin-detail-list dt {
    color: var(--muted);
    font-size: 11px;
    font-weight: 800;
}

.admin-detail-list dd {
    min-width: 0;
    margin: 0;
    overflow-wrap: anywhere;
    color: var(--black);
    font-size: 12px;
    font-weight: 700;
}

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

.legal-page {
    max-width: 850px;
    margin: 0 auto;
    padding: 70px 0 100px;
}

.legal-page h1 {
    margin: 0;
    color: var(--black);
    font-size: clamp(38px, 6vw, 58px);
    font-weight: 950;
    letter-spacing: -.045em;
}

.legal-page .lead {
    margin: 14px 0 35px;
    color: var(--muted);
    font-size: 17px;
}

.legal-page h2 {
    margin: 34px 0 10px;
    color: var(--black);
    font-size: 22px;
}

.legal-page p,
.legal-page li {
    color: #4f5b55;
    font-size: 14px;
}

@media (max-width: 1180px) {
    .metrics-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

    .qr-row {
        grid-template-columns: 72px minmax(0, 1fr) repeat(2, 120px) auto;
    }

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

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

    .public-nav {
        position: absolute;
        top: calc(100% + 1px);
        right: 20px;
        left: 20px;
        display: flex;
        max-height: calc(100dvh - 96px);
        align-items: stretch;
        flex-direction: column;
        gap: 4px;
        overflow-y: auto;
        padding: 14px;
        border: 1px solid var(--line);
        border-radius: 13px;
        background: var(--white);
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transform: translateY(-8px);
        transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
        visibility: hidden;
    }

    .public-nav.open {
        opacity: 1;
        pointer-events: auto;
        transform: none;
        visibility: visible;
    }

    .public-nav a {
        display: flex;
        min-height: 48px;
        align-items: center;
        padding: 10px;
    }

    .public-nav .button {
        width: 100%;
    }

    .nav-backdrop {
        position: fixed;
        z-index: 80;
        inset: 0;
        background: rgba(5, 6, 6, .42);
    }

    .nav-backdrop.show {
        display: block;
    }

    .hero-grid,
    .analytics-showcase {
        grid-template-columns: 1fr;
    }

    .hero-copy {
        text-align: center;
    }

    .hero-copy h1,
    .hero-copy > p {
        margin-inline: auto;
    }

    .hero-points {
        justify-content: center;
    }

    .hero-generator {
        max-width: 620px;
        margin-inline: auto;
    }

    .analytics-showcase {
        gap: 40px;
    }

    .showcase-copy {
        max-width: 700px;
    }

    .steps-grid,
    .features-grid,
    .pricing-grid {
        grid-template-columns: 1fr;
    }

    .pricing-grid {
        max-width: 600px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
    }

    .auth-brand-panel {
        min-height: auto;
        padding: 28px 24px;
    }

    .auth-promise {
        display: none;
    }

    .auth-trust {
        margin-top: 25px;
    }

    .auth-form-panel {
        min-height: auto;
        padding: 40px 20px 60px;
    }

    .app-shell {
        display: block;
    }

    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-105%);
        width: min(86vw, 290px);
        height: 100dvh;
        padding-bottom: max(18px, env(safe-area-inset-bottom));
        transition: transform .2s ease;
    }

    .sidebar.open {
        transform: none;
    }

    .app-topbar {
        position: sticky;
        z-index: 90;
        top: 0;
        display: flex;
        padding-top: max(10px, env(safe-area-inset-top));
        box-shadow: 0 4px 18px rgba(5, 6, 6, .04);
    }

    .sidebar-toggle {
        display: flex;
        flex: 0 0 44px;
        cursor: pointer;
    }

    .sidebar-close {
        display: grid;
        place-items: center;
    }

    .sidebar-head {
        padding-inline: 0;
    }

    .sidebar-head .brand-mark {
        width: 38px;
        height: 40px;
        flex-basis: 38px;
    }

    .sidebar-head .brand-copy strong {
        font-size: 16px;
    }

    .sidebar-backdrop {
        position: fixed;
        z-index: 150;
        inset: 0;
        background: rgba(5, 6, 6, .52);
    }

    .sidebar-backdrop.show {
        display: block;
    }

    .filter-drawer {
        width: 100%;
    }

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

    .impersonation-banner {
        top: 76px;
    }

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

    .form-layout,
    .qr-detail-grid,
    .settings-grid,
    .report-layout {
        grid-template-columns: 1fr;
    }

    .preview-card {
        position: static;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(calc(100% - 28px), var(--container));
    }

    .hero {
        padding-top: 56px;
    }

    .hero-copy h1 {
        font-size: clamp(40px, 13vw, 59px);
    }

    .generator-preview {
        grid-template-columns: 110px minmax(0, 1fr);
    }

    .qr-label-editors {
        grid-template-columns: 1fr;
    }

    .mock-qr {
        width: 110px;
        height: 110px;
        gap: 2px;
        padding: 9px;
    }

    .trust-items {
        grid-template-columns: repeat(2, 1fr);
    }

    .trust-item:nth-child(2) {
        border-right: 0;
    }

    .trust-item:nth-child(-n+2) {
        border-bottom: 1px solid var(--line);
    }

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

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

    .app-content {
        padding: 25px 14px max(60px, env(safe-area-inset-bottom));
    }

    .page-title {
        align-items: stretch;
        flex-direction: column;
    }

    .page-actions {
        justify-content: flex-start;
    }

    .dashboard-actions {
        width: 100%;
    }

    .report-page-title {
        align-items: stretch;
    }

    .report-status {
        align-self: flex-start;
    }

    .report-frequency-options {
        grid-template-columns: 1fr;
    }

    .report-frequency-option > span {
        min-height: 0;
    }

    .client-selector-modal {
        place-items: stretch;
        padding: 0;
    }

    .client-selector-panel {
        width: 100%;
        max-height: 100dvh;
        height: 100dvh;
        border: 0;
        border-radius: 0;
    }

    .client-selector-header {
        padding: max(18px, env(safe-area-inset-top)) 18px 15px;
    }

    .client-selector-search {
        padding: 16px 18px 11px;
    }

    .client-selector-results {
        flex: 1;
        min-height: 0;
        padding: 5px 18px 18px;
    }

    .client-selector-footer {
        padding: 12px 18px max(12px, env(safe-area-inset-bottom));
    }

    .admin-user-filters,
    .admin-user-summary {
        grid-template-columns: 1fr;
    }

    .admin-user-filters .button {
        width: 100%;
    }

    .admin-user-create-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .admin-user-create-actions .button {
        width: 100%;
    }

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

    .admin-users-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .admin-users-table tbody {
        display: grid;
        gap: 13px;
        padding: 13px;
    }

    .admin-users-table tr {
        overflow: hidden;
        border: 1px solid var(--line);
        border-radius: 12px;
        background: var(--white);
    }

    .admin-users-table td {
        display: grid;
        align-items: start;
        gap: 12px;
        grid-template-columns: 105px minmax(0, 1fr);
        padding: 10px 12px;
        border-bottom: 1px solid var(--line);
        white-space: normal;
    }

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

    .admin-users-table td::before {
        content: attr(data-label);
        color: var(--muted);
        font-size: 10px;
        font-weight: 850;
        letter-spacing: .05em;
        text-transform: uppercase;
    }

    .admin-users-table .button {
        width: 100%;
    }

    .plan-banner {
        align-items: stretch;
        flex-direction: column;
    }

    .alert {
        flex-wrap: wrap;
    }

    .plan-banner .button,
    .alert .button {
        width: 100%;
    }

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

    .filters .button {
        width: 100%;
    }

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

    .metric-card:last-child {
        grid-column: 1 / -1;
    }

    .qr-row {
        grid-template-columns: 64px minmax(0, 1fr) auto;
    }

    .qr-thumb {
        width: 64px;
        height: 64px;
    }

    .qr-stat {
        display: none;
    }

    .field-grid,
    .field-grid-3,
    .account-plans {
        grid-template-columns: 1fr;
    }

    .account-plan {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .account-plan .button {
        width: 100%;
    }

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

    .subscription-hero {
        align-items: stretch;
        grid-template-columns: 1fr;
    }

    .subscription-date {
        text-align: left;
    }
}

@media (max-width: 480px) {
    .public-header .header-row {
        min-height: 66px;
    }

    .public-header .brand-mark {
        width: 38px;
        height: 40px;
        flex-basis: 38px;
    }

    .public-nav {
        right: 14px;
        left: 14px;
    }

    .brand-copy small {
        display: none;
    }

    .hero {
        padding: 46px 0 62px;
    }

    .hero-grid {
        gap: 34px;
    }

    .hero-copy > .button {
        width: 100%;
        margin-top: 8px;
    }

    .hero-generator {
        padding: 18px;
    }

    .generator-top {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .generator-preview {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .mock-qr {
        margin-inline: auto;
    }

    .metrics-grid,
    .breakdown-grid {
        grid-template-columns: 1fr;
    }

    .metric-card:last-child {
        grid-column: auto;
    }

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

    .app-topbar {
        padding-inline: 12px;
    }

    .topbar-client-context {
        max-width: 42vw;
    }

    .client-selector-header h2 {
        font-size: 24px;
    }

    .client-result {
        grid-template-columns: 40px minmax(0, 1fr);
    }

    .client-result-avatar {
        width: 40px;
        height: 40px;
    }

    .client-result-meta {
        grid-column: 1 / -1;
        grid-template-columns: auto 1fr;
        justify-items: start;
        padding-left: 52px;
    }

    .topbar-action {
        width: 44px;
        min-width: 44px;
        padding-inline: 0;
    }

    .topbar-action-label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0 0 0 0);
        clip-path: inset(50%);
        white-space: nowrap;
    }

    .app-content {
        padding-inline: 12px;
    }

    .impersonation-banner {
        align-items: stretch;
        flex-direction: column;
        top: 72px;
    }

    .impersonation-banner .button {
        width: 100%;
    }

    .admin-pagination {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .admin-pagination > * {
        width: 100%;
        justify-self: stretch;
    }

    .admin-detail-list > div {
        gap: 4px;
        grid-template-columns: 1fr;
    }

    .page-title {
        gap: 16px;
        margin-bottom: 20px;
    }

    .page-title h1 {
        font-size: 32px;
    }

    .export-dialog {
        padding: 12px;
    }

    .export-dialog-panel {
        max-height: calc(100dvh - 24px);
        border-radius: 15px;
    }

    .export-dialog-header {
        gap: 15px;
        padding: 20px 18px 16px;
    }

    .export-dialog-header h2 {
        font-size: 24px;
    }

    .export-dialog-options {
        grid-template-columns: 1fr;
        padding: 16px 18px 20px;
    }

    .report-overview {
        grid-template-columns: 1fr;
    }

    .report-settings-actions .button {
        width: 100%;
    }

    .report-history-table td {
        align-items: flex-start;
        grid-template-columns: 88px minmax(0, 1fr);
        text-align: left;
    }

    .filter-drawer-header {
        padding: max(18px, env(safe-area-inset-top)) 18px 16px;
    }

    .filter-drawer-body {
        padding: 18px;
    }

    .filter-drawer-date-grid {
        grid-template-columns: 1fr;
    }

    .filter-drawer-actions {
        padding-inline: 18px;
    }

    .page-title > .button,
    .page-actions .button {
        width: 100%;
    }

    .card-header {
        align-items: stretch;
        flex-direction: column;
        padding: 18px;
    }

    .card-header > .button {
        width: 100%;
    }

    .card-body,
    .form-section,
    .qr-display,
    .preview-card {
        padding: 18px;
    }

    .qr-row {
        gap: 12px;
        grid-template-columns: 64px minmax(0, 1fr);
        padding: 13px;
    }

    .qr-row-action {
        width: 100%;
        grid-column: 1 / -1;
        justify-self: stretch;
    }

    .qr-row-action form,
    .qr-row-action .button,
    .qr-load-more .button {
        width: 100%;
    }

    .version-row {
        grid-template-columns: 72px minmax(0, 1fr);
    }

    .version-row time {
        grid-column: 1 / -1;
    }

    .style-options {
        grid-template-columns: 1fr;
    }

    .qr-label-control-grid {
        grid-template-columns: 1fr;
    }

    .qr-artwork-preview {
        padding: 12px;
    }

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

    .color-choice label {
        min-height: 58px;
        padding: 8px;
    }

    .color-swatch {
        width: 27px;
        height: 27px;
        flex-basis: 27px;
    }

    .logo-upload-feedback {
        align-items: flex-start;
        flex-direction: column;
    }

    .auth-brand-panel {
        padding: 20px 16px;
    }

    .auth-trust {
        gap: 6px;
        margin-top: 16px;
    }

    .auth-form-panel {
        padding: 28px 14px 44px;
    }

    .auth-card {
        padding: 25px 20px;
        border-radius: 16px;
    }

    .footer-grid > div:not(:first-child) {
        gap: 0;
    }

    .footer-grid a {
        display: flex;
        min-height: 44px;
        align-items: center;
    }
}

@media (max-width: 380px) {
    .app-topbar {
        gap: 8px;
    }

    .topbar-client-context {
        width: 44px;
        max-width: 44px;
        flex: 0 0 44px;
        justify-content: center;
        padding: 5px;
    }

    .topbar-client-context strong {
        display: none;
    }
}

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