:root {
    --bg: #f8f8fc;
    --bg-soft: #f3f4fa;
    --surface: rgba(255, 255, 255, 0.7);
    --surface-strong: rgba(255, 255, 255, 0.9);
    --surface-glass: rgba(231, 233, 255, 0.58);
    --surface-glass-strong: rgba(236, 239, 255, 0.78);
    --surface-dark: #171822;
    --text: #15161d;
    --muted: #686b79;
    --line: rgba(21, 22, 29, 0.08);
    --line-strong: rgba(21, 22, 29, 0.14);
    --accent: #e7e9ff;
    --accent-strong: #d9ddff;
    --accent-ink: #2a3050;
    --accent-soft: rgba(231, 233, 255, 0.7);
    --success: #2f6a58;
    --success-soft: rgba(95, 168, 140, 0.12);
    --warning: #8c6840;
    --warning-soft: rgba(205, 170, 115, 0.14);
    --shadow: 0 20px 60px rgba(19, 20, 29, 0.06);
    --shadow-soft: 0 10px 30px rgba(19, 20, 29, 0.04);
    --glass-shadow: 0 18px 45px rgba(116, 126, 196, 0.12);
    --radius-xl: 34px;
    --radius-lg: 24px;
    --radius-md: 18px;
    --radius-sm: 14px;
    --max-width: 1120px;
    --transition: 220ms cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    box-sizing: border-box;
}

[hidden] {
    display: none !important;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    position: relative;
    overflow-x: hidden;
    background:
        radial-gradient(circle at top left, rgba(223, 227, 255, 0.6), transparent 28%),
        radial-gradient(circle at 80% 12%, rgba(245, 246, 255, 0.95), transparent 22%),
        linear-gradient(180deg, #fbfbfe 0%, #f8f8fc 100%);
    color: var(--text);
    font-family: "Instrument Sans", "Segoe UI", sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

body::before,
body::after {
    content: "";
    position: fixed;
    pointer-events: none;
    z-index: -1;
}

body::before {
    top: 32px;
    right: 20px;
    width: min(22vw, 180px);
    height: min(45vh, 360px);
    opacity: 0.4;
    background-image: radial-gradient(circle, rgba(21, 22, 29, 0.1) 0.85px, transparent 1px);
    background-size: 12px 12px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.88), rgba(0, 0, 0, 0.08));
}

body::after {
    left: -80px;
    top: -72px;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(224, 228, 255, 0.9) 0%, rgba(224, 228, 255, 0) 72%);
    opacity: 0.7;
    filter: blur(8px);
}

h1,
h2,
h3,
.eyebrow,
.section-kicker,
.pill,
.primary-button,
.bottom-nav a {
    font-family: "Sora", "Instrument Sans", sans-serif;
}

a {
    color: inherit;
    text-decoration: none;
}

.login-layout,
.app-shell {
    width: min(100%, var(--max-width));
    margin: 0 auto;
    padding: 34px 22px 124px;
}

.login-layout {
    min-height: 100dvh;
    display: grid;
    gap: 22px;
    align-content: center;
}

.app-shell {
    min-height: 100dvh;
}

.hero-card,
.login-card,
.metric-card,
.list-card,
.assistant-box,
.upload-box,
.note-box,
.detail-list > div,
#product-chat-form,
#alert-chat-form {
    background: var(--surface);
    border: 1px solid rgba(255, 255, 255, 0.72);
    box-shadow: var(--shadow);
    backdrop-filter: blur(22px);
}

.hero-card,
.login-card,
.metric-card,
.list-card,
.assistant-box,
.upload-box,
.note-box,
.detail-list > div {
    border-radius: var(--radius-lg);
}

.hero-card,
.login-card {
    padding: 32px;
}

.hero-card {
    position: relative;
    overflow: hidden;
    min-height: 460px;
}

.hero-card::after {
    content: "";
    position: absolute;
    inset: auto -14% -16% auto;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(229, 233, 255, 0.78) 0%, rgba(229, 233, 255, 0) 72%);
    filter: blur(10px);
    opacity: 0.85;
}

.hero-card-landing {
    display: grid;
    align-content: space-between;
    gap: 28px;
}

.hero-card h1,
.topbar h1 {
    margin: 0;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.hero-card h1 {
    max-width: 8ch;
    font-size: clamp(2.4rem, 7vw, 4.9rem);
}

.login-card h2,
.list-card h3,
.panel h3 {
    margin: 0;
    letter-spacing: -0.04em;
}

.list-card h3,
.panel h3 {
    font-size: 1.08rem;
}

.eyebrow,
.section-kicker,
.topbar-user-label {
    margin: 0 0 12px;
    font-size: 0.74rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(21, 22, 29, 0.42);
}

.lede,
.muted,
.status-copy {
    color: var(--muted);
}

.lede {
    max-width: 34ch;
    font-size: 1.04rem;
    line-height: 1.7;
}

.hero-points,
.chip-group,
.tag-row,
.row-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.pill,
.tag,
.filter-chip,
.ghost-link {
    transition:
        background var(--transition),
        border-color var(--transition),
        color var(--transition),
        transform var(--transition),
        box-shadow var(--transition);
}

.pill {
    padding: 11px 15px;
    border-radius: 999px;
    border: 1px solid rgba(21, 22, 29, 0.06);
    background: rgba(255, 255, 255, 0.56);
    color: rgba(21, 22, 29, 0.66);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
    font-size: 0.8rem;
}

.hero-helper {
    display: grid;
    gap: 6px;
}

.hero-helper .muted {
    margin: 0;
    max-width: 34ch;
    line-height: 1.7;
    font-size: 0.95rem;
}

.hero-note {
    width: min(100%, 420px);
    padding: 18px 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(21, 22, 29, 0.06);
    background: rgba(255, 255, 255, 0.48);
    box-shadow: var(--shadow-soft);
}

.signin-slot {
    min-height: 58px;
}

.topbar {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 34px;
}

.topbar h1 {
    font-size: clamp(2.1rem, 4vw, 3.6rem);
}

.topbar-user {
    min-width: 180px;
    padding: 14px 16px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.72);
    background: rgba(255, 255, 255, 0.56);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.topbar-user strong {
    display: block;
    font-size: 0.95rem;
    line-height: 1.35;
}

.ghost-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    padding: 11px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.72);
    color: rgba(21, 22, 29, 0.86);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.76);
}

.ghost-link:hover,
.filter-chip:hover,
.action-card:hover,
.secondary-button:hover {
    transform: translateY(-1px);
}

.content-panel,
.stack-gap,
.toolbar,
.action-grid,
.detail-list,
.scanner-choice,
.field-label,
.review-row {
    display: grid;
    gap: 16px;
}

.content-panel {
    gap: 24px;
}

.editorial-hero {
    grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.68fr);
    align-items: end;
    gap: 20px;
    padding: 28px;
}

.editorial-hero-compact {
    align-items: start;
}

.editorial-hero-product {
    align-items: end;
}

.editorial-copy {
    display: grid;
    gap: 14px;
}

.editorial-copy h2 {
    margin: 0;
    font-family: "Sora", "Instrument Sans", sans-serif;
    font-size: clamp(1.9rem, 4vw, 3.4rem);
    line-height: 1;
    letter-spacing: -0.045em;
}

.editorial-side {
    display: grid;
    justify-items: end;
    gap: 12px;
}

.editorial-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 6px;
}

.editorial-actions-compact .primary-button,
.editorial-actions-compact .secondary-button {
    min-width: 0;
}

.microcopy,
.section-copy {
    margin: 0;
    max-width: 34ch;
    color: var(--muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.lede-compact {
    max-width: 42ch;
}

.panel {
    padding: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
}

.bottom-nav {
    position: fixed;
    left: 50%;
    bottom: 18px;
    transform: translateX(-50%);
    z-index: 10;
    width: min(calc(100% - 20px), 760px);
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    padding: 10px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.76);
    background: rgba(255, 255, 255, 0.72);
    box-shadow: 0 18px 50px rgba(19, 20, 29, 0.08);
    backdrop-filter: blur(24px);
}

.bottom-nav a {
    display: block;
    padding: 12px 10px;
    border-radius: 999px;
    color: rgba(21, 22, 29, 0.54);
    text-align: center;
    font-size: 0.76rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.bottom-nav a.is-active {
    color: var(--accent-ink);
    background: linear-gradient(180deg, rgba(242, 244, 255, 0.92), rgba(228, 232, 255, 0.78));
    border: 1px solid rgba(255, 255, 255, 0.76);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.86),
        0 8px 24px rgba(116, 126, 196, 0.16);
}

.primary-button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    min-height: 48px;
    border-radius: 999px;
    padding: 0 18px;
    border: 1px solid transparent;
    cursor: pointer;
    font: inherit;
    font-weight: 600;
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        background var(--transition),
        border-color var(--transition),
        color var(--transition);
}

.primary-button {
    color: var(--accent-ink);
    background: linear-gradient(180deg, rgba(243, 244, 255, 0.92), rgba(227, 232, 255, 0.82));
    border-color: rgba(255, 255, 255, 0.82);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.92),
        var(--glass-shadow);
    backdrop-filter: blur(20px);
}

.secondary-button {
    color: rgba(21, 22, 29, 0.86);
    background: rgba(255, 255, 255, 0.76);
    border-color: var(--line);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.primary-button:hover,
.secondary-button:hover,
.ghost-link:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        0 14px 30px rgba(19, 20, 29, 0.08);
}

.primary-button:active,
.secondary-button:active,
.ghost-link:active {
    transform: translateY(1px) scale(0.99);
}

.primary-button:disabled,
.secondary-button:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.metric-grid,
.card-grid {
    display: grid;
    gap: 14px;
}

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

.metric-grid-tight .metric-card {
    min-height: 120px;
}

.metric-card,
.list-card,
.assistant-box,
.upload-box,
.note-box,
.detail-list > div {
    padding: 20px;
}

.metric-card strong {
    display: block;
    margin-top: 10px;
    font-size: clamp(1.7rem, 4vw, 2.3rem);
    letter-spacing: -0.05em;
}

.list-card,
.assistant-box,
.note-box,
.detail-list > div {
    display: grid;
}

.list-card {
    gap: 12px;
}

.section-frame {
    gap: 18px;
}

.section-frame-airy {
    padding-block: 24px;
}

.section-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: start;
}

.action-grid-editorial {
    gap: 14px;
}

.action-card-feature {
    min-height: 148px;
    align-content: space-between;
}

.hero-surface {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.92)),
        linear-gradient(145deg, rgba(232, 235, 255, 0.82), rgba(255, 255, 255, 0.72));
}

.hero-surface.tone-success {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.92)),
        linear-gradient(145deg, rgba(231, 245, 240, 0.92), rgba(255, 255, 255, 0.72));
}

.hero-surface.tone-warning {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.92)),
        linear-gradient(145deg, rgba(248, 241, 230, 0.92), rgba(255, 255, 255, 0.72));
}

.hero-surface.tone-warm,
.hero-surface.tone-info {
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.94)),
        linear-gradient(145deg, rgba(234, 237, 255, 0.92), rgba(255, 255, 255, 0.78));
}

.list-head,
.preview-row {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
}

.preview-side {
    display: grid;
    gap: 8px;
    justify-items: end;
}

.tag {
    display: inline-flex;
    align-items: center;
    width: fit-content;
    padding: 7px 11px;
    border-radius: 999px;
    border: 1px solid rgba(21, 22, 29, 0.06);
    background: rgba(255, 255, 255, 0.82);
    color: rgba(21, 22, 29, 0.72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.88);
    font-size: 0.78rem;
}

.tag.tone-success {
    background: var(--success-soft);
    color: var(--success);
    border-color: rgba(47, 106, 88, 0.12);
}

.tag.tone-warning {
    background: var(--warning-soft);
    color: var(--warning);
    border-color: rgba(140, 104, 64, 0.12);
}

.tag.tone-info {
    background: rgba(231, 233, 255, 0.72);
    color: var(--accent-ink);
    border-color: rgba(116, 126, 196, 0.12);
}

.tag.tone-muted {
    background: rgba(104, 107, 121, 0.08);
    color: var(--muted);
    border-color: rgba(21, 22, 29, 0.06);
}

.divider {
    height: 1px;
    background: linear-gradient(90deg, rgba(21, 22, 29, 0), rgba(21, 22, 29, 0.08), rgba(21, 22, 29, 0));
}

.top-gap {
    margin-top: 12px;
}

.toolbar-input,
input,
textarea,
select {
    width: 100%;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(21, 22, 29, 0.08);
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
    transition:
        border-color var(--transition),
        box-shadow var(--transition),
        background var(--transition);
}

.toolbar-input,
input,
textarea,
select {
    padding: 14px 15px;
}

.toolbar-input:focus,
input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: rgba(140, 150, 224, 0.28);
    box-shadow:
        0 0 0 4px rgba(231, 233, 255, 0.8),
        inset 0 1px 0 rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.96);
}

.filter-chip {
    border: 1px solid rgba(21, 22, 29, 0.08);
    background: rgba(255, 255, 255, 0.72);
    color: rgba(21, 22, 29, 0.66);
    border-radius: 999px;
    padding: 10px 14px;
    cursor: pointer;
    font: inherit;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.filter-chip.is-active {
    color: var(--accent-ink);
    background: linear-gradient(180deg, rgba(242, 244, 255, 0.92), rgba(228, 232, 255, 0.78));
    border-color: rgba(255, 255, 255, 0.78);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        0 8px 24px rgba(116, 126, 196, 0.14);
}

.action-card {
    display: grid;
    gap: 6px;
    padding: 20px;
    border-radius: var(--radius-lg);
    border: 1px solid rgba(21, 22, 29, 0.08);
    background: rgba(255, 255, 255, 0.62);
    box-shadow: var(--shadow-soft);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition),
        background var(--transition);
}

.action-card strong {
    letter-spacing: -0.02em;
}

.action-card.is-primary {
    border-color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(180deg, rgba(244, 246, 255, 0.88), rgba(230, 234, 255, 0.72));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        var(--glass-shadow);
}

.detail-list > div,
.note-box {
    gap: 4px;
}

.detail-list-inline {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

.status-hero {
    border-color: rgba(255, 255, 255, 0.82);
    background:
        linear-gradient(180deg, rgba(245, 246, 255, 0.92), rgba(234, 238, 255, 0.82)),
        rgba(255, 255, 255, 0.72);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.9),
        var(--glass-shadow);
}

.alert-card {
    gap: 14px;
}

.media-row {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    min-width: 0;
}

.list-head-stack {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.list-head-stack strong,
.list-head-stack p {
    margin: 0;
}

.product-thumb {
    width: 64px;
    height: 64px;
    border-radius: 22px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(234, 237, 255, 0.96), rgba(246, 247, 252, 0.9));
    display: grid;
    place-items: center;
    color: rgba(21, 22, 29, 0.52);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    flex-shrink: 0;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.alert-card-feature {
    border-color: rgba(255, 255, 255, 0.82);
    background:
        linear-gradient(180deg, rgba(244, 246, 255, 0.88), rgba(233, 237, 255, 0.72)),
        rgba(255, 255, 255, 0.7);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        var(--glass-shadow);
}

.review-card {
    gap: 16px;
}

.review-controls {
    display: grid;
    gap: 14px;
}

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

.scanner-actions > .primary-button,
.scanner-actions > .secondary-button {
    flex: 1 1 180px;
}

.receipt-stage {
    min-height: 420px;
}

.camera-placeholder {
    position: absolute;
    inset: 0;
    display: grid;
    place-content: center;
    gap: 10px;
    padding: 24px;
    text-align: center;
    color: rgba(255, 255, 255, 0.92);
    background: linear-gradient(180deg, rgba(12, 14, 20, 0.24), rgba(12, 14, 20, 0.52));
}

.camera-placeholder strong,
.camera-placeholder p {
    margin: 0;
}

.camera-placeholder p {
    max-width: 28ch;
    color: rgba(255, 255, 255, 0.72);
    line-height: 1.6;
}

.camera-placeholder.is-hidden {
    display: none;
}

.receipt-preview-image {
    width: 100%;
    min-height: 420px;
    height: 100%;
    object-fit: contain;
    display: block;
    background: rgba(255, 255, 255, 0.94);
}

.review-summary {
    display: grid;
    gap: 6px;
}

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

.review-card-summary {
    display: grid;
    gap: 10px;
}

.candidate-list {
    display: grid;
    gap: 12px;
}

.candidate-option {
    display: grid;
    grid-template-columns: auto 56px minmax(0, 1fr);
    gap: 14px;
    align-items: center;
    padding: 14px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(21, 22, 29, 0.08);
    background: rgba(255, 255, 255, 0.74);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
    cursor: pointer;
}

.candidate-option.is-selected {
    border-color: rgba(255, 255, 255, 0.82);
    background: linear-gradient(180deg, rgba(244, 246, 255, 0.88), rgba(232, 236, 255, 0.76));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.88),
        var(--glass-shadow);
}

.candidate-radio {
    width: 18px;
    height: 18px;
    margin: 0;
}

.candidate-thumb {
    width: 56px;
    height: 56px;
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(145deg, rgba(234, 237, 255, 0.96), rgba(246, 247, 252, 0.9));
    display: grid;
    place-items: center;
    color: rgba(21, 22, 29, 0.52);
    font-size: 0.76rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.candidate-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.candidate-meta {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.candidate-meta strong,
.candidate-meta p {
    margin: 0;
}

.review-skip {
    display: flex;
    align-items: center;
    gap: 10px;
}

.review-skip input {
    width: auto;
}

.field-label-inline {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.field-label-inline input {
    justify-self: end;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.checkbox-row input {
    width: auto;
}

.upload-box {
    display: grid;
    gap: 10px;
    cursor: pointer;
}

.assistant-box:empty {
    display: none;
}

.assistant-box,
#product-chat-form,
#alert-chat-form {
    padding: 20px;
    border-radius: var(--radius-lg);
}

#receipt-apply-button {
    width: 100%;
}

.empty-state {
    padding: 24px;
    border-radius: var(--radius-lg);
    border: 1px dashed rgba(21, 22, 29, 0.12);
    background: rgba(255, 255, 255, 0.42);
    color: var(--muted);
}

.status-copy {
    min-height: 1.4em;
    margin: 0;
}

.status-copy.is-error {
    color: #9a4d4d;
}

.status-copy.is-success {
    color: var(--success);
}

.scanner-page {
    padding-bottom: 132px;
}

.scanner-panel {
    overflow: hidden;
}

.barcode-stage {
    position: relative;
    min-height: 380px;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: linear-gradient(165deg, #11121a, #1e2130);
    box-shadow: 0 25px 70px rgba(19, 20, 29, 0.2);
}

.barcode-video {
    width: 100%;
    min-height: 380px;
    height: 100%;
    object-fit: cover;
    display: block;
}

.barcode-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    pointer-events: none;
}

.barcode-target {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 16px;
}

.barcode-frame {
    width: min(82%, 360px);
    height: min(34%, 180px);
    border-radius: 28px;
    border: 1.5px solid rgba(255, 255, 255, 0.85);
    box-shadow:
        inset 0 0 0 1px rgba(231, 233, 255, 0.48),
        0 0 0 9999px rgba(10, 12, 18, 0.18);
}

.barcode-overlay-label,
.barcode-live-readout {
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(248, 249, 255, 0.12);
    color: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(18px);
}

.barcode-overlay-label {
    margin: 0;
    padding: 8px 16px;
    border-radius: 999px;
    font-size: 0.84rem;
}

.barcode-live-readout {
    margin: 0 14px 14px;
    padding: 12px 14px;
    border-radius: var(--radius-md);
    pointer-events: auto;
}

.barcode-live-readout strong {
    display: block;
    font-size: 0.95rem;
}

.barcode-live-readout p {
    margin: 4px 0 0;
    color: rgba(255, 255, 255, 0.74);
    font-size: 0.84rem;
}

@media (min-width: 760px) {
    .login-layout {
        grid-template-columns: minmax(0, 1.28fr) minmax(360px, 0.72fr);
        gap: 28px;
    }

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

    .action-grid {
        grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    }
}

@media (max-width: 759px) {
    .login-layout,
    .app-shell {
        padding-top: 22px;
    }

    .hero-card,
    .login-card {
        padding: 24px;
    }

    .hero-card {
        min-height: auto;
    }

    .topbar {
        margin-bottom: 24px;
    }

    .topbar-user {
        min-width: 0;
        max-width: 46vw;
    }

    .content-panel {
        gap: 20px;
    }

    .editorial-hero,
    .section-head {
        grid-template-columns: 1fr;
        flex-direction: column;
    }

    .editorial-side {
        justify-items: start;
    }

    .list-head,
    .preview-row {
        flex-direction: column;
    }

    .preview-side {
        justify-items: start;
    }
}

@media (max-width: 639px) {
    body::before {
        right: 8px;
        width: 88px;
        height: 240px;
        opacity: 0.28;
    }

    .app-shell {
        padding-inline: 16px;
        padding-bottom: 40px;
    }

    .topbar {
        gap: 14px;
        margin-bottom: 18px;
    }

    .topbar-user {
        padding: 12px 14px;
        max-width: 42vw;
        border-radius: 18px;
    }

    .topbar-user strong {
        font-size: 0.92rem;
    }

    .topbar h1 {
        font-size: clamp(2rem, 11vw, 3rem);
        line-height: 0.94;
    }

    .metric-card,
    .list-card,
    .assistant-box,
    .upload-box,
    .note-box,
    .detail-list > div {
        padding: 18px;
    }

    .bottom-nav {
        position: static;
        left: auto;
        bottom: auto;
        transform: none;
        width: 100%;
        grid-template-columns: repeat(4, minmax(0, 1fr));
        gap: 6px;
        margin: 0 0 18px;
        padding: 6px;
        border-radius: 24px;
        box-shadow: var(--shadow-soft);
    }

    .bottom-nav a {
        padding: 11px 2px;
        font-size: 0.72rem;
    }

    .editorial-hero {
        padding: 20px;
        gap: 14px;
    }

    .editorial-copy h2 {
        font-size: clamp(1.7rem, 9vw, 2.4rem);
    }

    .lede,
    .microcopy,
    .section-copy {
        font-size: 0.92rem;
        line-height: 1.6;
    }

    .section-frame-airy {
        padding-block: 18px;
    }

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

    .hero-card h1,
    .topbar h1 {
        max-width: none;
    }

    .action-card {
        padding: 18px;
    }

    .action-card-feature {
        min-height: 120px;
    }

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

    .media-row {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 12px;
    }

    .product-thumb {
        width: 56px;
        height: 56px;
        border-radius: 18px;
    }

    .scanner-page {
        padding-bottom: 28px;
    }

    .receipt-stage {
        min-height: 360px;
    }

    .barcode-stage,
    .barcode-video,
    .receipt-preview-image {
        min-height: 320px;
    }

    .scanner-actions {
        flex-direction: column;
    }

    .scanner-actions > .primary-button,
    .scanner-actions > .secondary-button,
    #receipt-apply-button {
        width: 100%;
    }

    .review-list {
        gap: 12px;
    }

    .candidate-option {
        grid-template-columns: auto 46px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }

    .candidate-thumb {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }
}
