:root {
    --bg: #f7f1ea;
    --surface: #fffdf9;
    --surface-soft: #fff6ee;
    --text: #2f241d;
    --muted: #75675e;
    --border: #ead7c8;
    --brand: #bc2f24;
    --brand-dark: #8f1f16;
    --gold: #b7791f;
    --green: #0f7a4a;
    --shadow: 0 18px 40px rgba(98, 67, 45, 0.12);
    --radius-lg: 24px;
    --radius-md: 16px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    min-height: 100vh;
    background:
        radial-gradient(circle at top left, rgba(255, 214, 179, 0.65), transparent 32%),
        linear-gradient(180deg, #fff7f1 0%, #f7f1ea 100%);
    color: var(--text);
    font-family: "Segoe UI", Tahoma, sans-serif;
    line-height: 1.5;
}

button {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

.customer-shell {
    width: min(100%, 960px);
    margin: 0 auto;
    padding: 20px 16px 40px;
    display: grid;
    gap: 18px;
}

.hero-card,
.scanner-card,
.result-panel,
.info-card,
.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.hero-card {
    border-radius: 30px;
    padding: 22px;
    display: grid;
    grid-template-columns: 88px minmax(0, 1fr);
    gap: 16px;
    align-items: center;
}

.hero-logo {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: #fff;
    object-fit: cover;
}

.eyebrow {
    color: var(--brand);
    font-size: 0.9rem;
    font-weight: 700;
    letter-spacing: 0.04em;
}

h1,
h2,
h3 {
    line-height: 1.2;
}

h1 {
    margin-top: 4px;
    font-size: clamp(1.8rem, 5vw, 2.6rem);
}

.hero-text,
.muted,
.stat-card small {
    color: var(--muted);
}

.hero-text {
    margin-top: 8px;
}

.scanner-card,
.result-panel {
    border-radius: var(--radius-lg);
    padding: 18px;
}

.scanner-header,
.result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

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

.btn {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

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

.btn-primary {
    background: var(--brand);
    color: #fff;
}

.btn-primary:hover {
    background: var(--brand-dark);
}

.btn-outline {
    background: transparent;
    color: var(--brand);
    border-color: rgba(188, 47, 36, 0.35);
}

.camera-panel {
    position: relative;
    margin-top: 18px;
    border-radius: 28px;
    overflow: hidden;
    background: #1e1b18;
    aspect-ratio: 4 / 5;
}

.camera-preview {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.camera-frame {
    position: absolute;
    inset: 50% auto auto 50%;
    width: min(74vw, 280px);
    height: min(74vw, 280px);
    transform: translate(-50%, -50%);
    border: 3px solid rgba(255, 255, 255, 0.9);
    border-radius: 28px;
    box-shadow: 0 0 0 999px rgba(0, 0, 0, 0.22);
}

.result-panel {
    display: grid;
    gap: 18px;
}

.stats-grid,
.content-grid {
    display: grid;
    gap: 14px;
}

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

.stat-card {
    border-radius: var(--radius-md);
    padding: 16px;
    display: grid;
    gap: 8px;
}

.stat-card span {
    font-weight: 700;
}

.stat-card strong {
    font-size: clamp(2rem, 6vw, 2.7rem);
}

.accent-red {
    background: linear-gradient(180deg, #fff4f2 0%, #fffdf9 100%);
}

.accent-gold {
    background: linear-gradient(180deg, #fff8eb 0%, #fffdf9 100%);
}

.accent-green {
    background: linear-gradient(180deg, #eefbf4 0%, #fffdf9 100%);
}

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

.info-card {
    border-radius: var(--radius-md);
    padding: 16px;
}

.info-card h3 {
    margin-bottom: 12px;
}

.list-stack {
    display: grid;
    gap: 10px;
}

.list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-soft);
}

.list-item strong {
    min-width: 0;
    overflow-wrap: anywhere;
}

.list-item span {
    color: var(--muted);
    white-space: nowrap;
}

.empty-note {
    padding: 14px;
    border-radius: 14px;
    background: var(--surface-soft);
    color: var(--muted);
}

@media (max-width: 760px) {
    .hero-card {
        grid-template-columns: 1fr;
        justify-items: start;
    }

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

    .scanner-card,
    .result-panel {
        padding: 16px;
    }
}

@media (max-width: 420px) {
    .customer-shell {
        padding-inline: 12px;
    }

    .btn {
        width: 100%;
    }

    .scanner-actions {
        width: 100%;
    }
}
