:root {
    color-scheme: light;
    --bg: #fffaf6;
    --panel: rgba(255, 255, 255, 0.96);
    --panel-border: rgba(242, 107, 53, 0.14);
    --text: #1f1a17;
    --muted: #6c6159;
    --accent: #f26b35;
    --accent-strong: #d95521;
    --accent-soft: #fff0e8;
    --shadow: rgba(50, 31, 22, 0.12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Barlow', sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(242, 107, 53, 0.18), transparent 32%),
        linear-gradient(180deg, #fffdfc 0%, #fff6f1 52%, #fff2eb 100%);
}

html,
body,
input,
button,
select,
textarea {
    color-scheme: light;
}

.app-shell {
    width: min(100%, 560px);
    margin: 0 auto;
    padding: 24px 16px 40px;
}

body.modal-open {
    overflow: hidden;
}

.brand-panel,
.card-panel {
    background: var(--panel);
    border: 1px solid var(--panel-border);
    border-radius: 28px;
    backdrop-filter: blur(14px);
    box-shadow: 0 20px 52px var(--shadow);
}

.brand-panel {
    padding: 28px 24px;
    margin-bottom: 18px;
}

.card-panel {
    padding: 22px;
    margin-bottom: 18px;
}

.hero-brand,
.inline-brand,
.receipt-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.login-brand {
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-module-title {
    margin: 14px 0 0;
    text-align: center;
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--accent-strong);
}

.brand-logo {
    width: 88px;
    max-width: 100%;
    height: auto;
    display: block;
}

.login-logo {
    width: 170px;
}

.brand-logo.small {
    width: 52px;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent-strong);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.brand-panel h1,
.receipt-card h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 7vw, 3rem);
    line-height: 0.94;
    font-weight: 800;
}

.lead-copy {
    margin: 14px 0 0;
    color: var(--muted);
    font-size: 1rem;
}

.panel-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    color: var(--accent-strong);
    font-weight: 700;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: linear-gradient(180deg, #ffb08d, var(--accent));
    box-shadow: 0 0 16px rgba(242, 107, 53, 0.35);
}

.inline-brand {
    margin: 0 0 18px;
    padding: 12px 14px;
    border-radius: 20px;
    background: linear-gradient(135deg, #fff8f4, #ffffff);
    border: 1px solid rgba(242, 107, 53, 0.12);
}

.inline-brand-name {
    font-weight: 700;
    color: var(--accent-strong);
}

.stack-gap > * + * {
    margin-top: 16px;
}

.install-box {
    margin-top: 18px;
    padding-top: 18px;
    border-top: 1px solid rgba(242, 107, 53, 0.12);
}

.install-help {
    margin: 12px 0 0;
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.45;
}

.form-control {
    border-radius: 18px;
    border: 1px solid rgba(31, 26, 23, 0.1);
    background: rgba(255, 255, 255, 0.98);
    color: var(--text);
    -webkit-text-fill-color: var(--text);
}

.form-control:focus {
    color: var(--text);
    background: #fff;
    border-color: rgba(242, 107, 53, 0.55);
    box-shadow: 0 0 0 0.2rem rgba(242, 107, 53, 0.16);
}

.form-control::placeholder {
    color: #8f837b;
    opacity: 1;
}

.password-field {
    position: relative;
}

.password-input {
    padding-right: 56px;
}

.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--muted);
    background: transparent;
}

.password-toggle:hover,
.password-toggle:focus {
    color: var(--accent-strong);
    background: rgba(242, 107, 53, 0.08);
    outline: none;
}

.password-eye {
    width: 20px;
    height: 20px;
    fill: currentColor;
}

.form-label,
.meta-label {
    color: var(--muted);
    margin-bottom: 8px;
}

.btn {
    border-radius: 18px;
    font-weight: 700;
}

.btn-fuel {
    border: none;
    color: #fff;
    background: linear-gradient(135deg, #f26b35, #d95521);
}

.btn-fuel:hover,
.btn-fuel:focus {
    color: #fff;
    background: linear-gradient(135deg, #f57d4d, #df5b27);
}

.btn-ghost {
    color: var(--text);
    border: 1px solid rgba(31, 26, 23, 0.08);
    background: rgba(31, 26, 23, 0.03);
}

.btn-outline-brand {
    border-width: 1px;
    border-color: rgba(242, 107, 53, 0.3);
    color: var(--accent-strong);
    background: rgba(242, 107, 53, 0.05);
}

.btn-outline-brand:hover,
.btn-outline-brand:focus {
    color: var(--accent-strong);
    border-color: rgba(242, 107, 53, 0.45);
    background: rgba(242, 107, 53, 0.11);
}

.home-meta,
.details-grid,
.receipt-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 20px;
}

.action-grid {
    display: grid;
    gap: 12px;
}

.scanner-panel,
.value-box,
.receipt-grid > div {
    margin-top: 18px;
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(180deg, #fffefd, #fff7f3);
    border: 1px solid rgba(242, 107, 53, 0.12);
}

.scanner-modal {
    position: fixed;
    inset: 0;
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.scanner-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(31, 26, 23, 0.62);
    backdrop-filter: blur(4px);
}

.scanner-modal-panel {
    position: relative;
    width: min(100%, 460px);
    margin: 0;
    box-shadow: 0 24px 60px rgba(31, 26, 23, 0.28);
}

.scanner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

#reader {
    overflow: hidden;
    border-radius: 18px;
    background: #000;
}

#reader video {
    border-radius: 18px;
}

.scanner-help,
.predicted-line {
    margin: 12px 0 0;
    color: var(--muted);
}

.value-actions {
    margin-top: 14px;
}

.predicted-line {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.receipt-body {
    background:
        radial-gradient(circle at top, rgba(242, 107, 53, 0.2), transparent 34%),
        linear-gradient(180deg, #fffdfb 0%, #fff3ed 100%);
}

.receipt-shell {
    padding-top: 40px;
}

.receipt-card {
    background: rgba(255, 255, 255, 0.97);
    border-radius: 30px;
    border: 1px solid rgba(242, 107, 53, 0.14);
    padding: 24px;
    box-shadow: 0 24px 58px rgba(60, 31, 15, 0.14);
}

.receipt-highlight {
    margin: 20px 0;
    padding: 16px 18px;
    border-radius: 22px;
    background: linear-gradient(135deg, #f26b35, #ff9b6e);
    color: #fff;
}

.receipt-highlight span {
    display: block;
    font-size: 0.85rem;
    opacity: 0.9;
}

.receipt-highlight strong {
    font-size: 1.3rem;
}

.receipt-full {
    grid-column: 1 / -1;
}

.receipt-actions {
    margin-top: 20px;
}

@media (max-width: 480px) {
    .hero-brand,
    .receipt-brand {
        align-items: flex-start;
        flex-direction: column;
    }

    .brand-panel h1,
    .receipt-card h1 {
        font-size: 2.1rem;
    }

    .home-meta,
    .details-grid,
    .receipt-grid {
        grid-template-columns: 1fr;
    }

    .scanner-modal {
        align-items: flex-end;
        padding: 12px;
    }

    .scanner-modal-panel {
        width: 100%;
        border-radius: 24px;
    }
}
