:root {
    --bg: #f4efe2;
    --surface: rgba(255, 251, 244, 0.88);
    --surface-strong: #fff8eb;
    --text: #2d2118;
    --muted: #6e5a47;
    --line: rgba(73, 51, 31, 0.12);
    --accent: #d97c2b;
    --accent-strong: #b45a14;
    --success: #2f8f58;
    --danger: #b33c2f;
    --shadow: 0 18px 40px rgba(88, 57, 29, 0.14);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Trebuchet MS", "Segoe UI", sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top, rgba(253, 210, 126, 0.65), transparent 35%),
        linear-gradient(180deg, #f7f0dc 0%, #f0e1c4 48%, #e4c89f 100%);
    min-height: 100vh;
}

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

.app-shell {
    max-width: 430px;
    margin: 0 auto;
    min-height: 100vh;
    padding: 16px;
}

.hero,
.card,
.modal__body {
    backdrop-filter: blur(16px);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}

.hero {
    border-radius: 28px;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

.hero::after {
    content: "";
    position: absolute;
    inset: auto -18% -25% auto;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(217, 124, 43, 0.28), transparent 70%);
}

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 10px;
}

.hero h1 {
    margin: 0;
    font-size: 28px;
    line-height: 1.05;
}

.hero p {
    margin: 12px 0 0;
    color: var(--muted);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 16px;
}

.stat {
    background: var(--surface-strong);
    border-radius: 18px;
    padding: 14px;
    border: 1px solid rgba(73, 51, 31, 0.08);
}

.stat__label {
    color: var(--muted);
    font-size: 13px;
}

.stat__value {
    font-size: 24px;
    font-weight: 700;
    margin-top: 8px;
}

.toolbar {
    display: flex;
    gap: 10px;
    margin: 16px 0;
}

.toolbar button,
.primary-btn,
.secondary-btn,
.danger-btn {
    border: 0;
    border-radius: 999px;
    padding: 12px 16px;
    cursor: pointer;
    transition: transform 0.15s ease, opacity 0.15s ease;
}

.toolbar button:hover,
.primary-btn:hover,
.secondary-btn:hover,
.danger-btn:hover {
    transform: translateY(-1px);
}

.primary-btn {
    background: linear-gradient(135deg, var(--accent), #efb047);
    color: white;
}

.secondary-btn {
    background: white;
    color: var(--text);
    border: 1px solid var(--line);
}

.danger-btn {
    background: rgba(179, 60, 47, 0.1);
    color: var(--danger);
    border: 1px solid rgba(179, 60, 47, 0.2);
}

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

.card {
    border-radius: 22px;
    padding: 16px;
}

.card h2,
.card h3 {
    margin-top: 0;
}

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

.product-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 14px;
}

.product-row__meta {
    min-width: 0;
}

.product-row__meta strong,
.history-item strong {
    display: block;
    margin-bottom: 4px;
}

.muted {
    color: var(--muted);
}

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

.history-item {
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 12px;
    background: rgba(255, 255, 255, 0.62);
}

.badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 4px 10px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.badge--pending {
    background: rgba(217, 124, 43, 0.16);
    color: var(--accent-strong);
}

.badge--approved {
    background: rgba(47, 143, 88, 0.14);
    color: var(--success);
}

.badge--rejected {
    background: rgba(179, 60, 47, 0.14);
    color: var(--danger);
}

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

.field input,
.field textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 16px;
    border: 1px solid var(--line);
    background: white;
}

.field textarea {
    min-height: 110px;
    resize: vertical;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(36, 25, 16, 0.5);
    display: none;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}

.modal.is-open {
    display: flex;
}

.modal__body {
    width: 100%;
    max-width: 430px;
    border-radius: 28px 28px 16px 16px;
    padding: 18px;
}

.modal__actions {
    display: flex;
    gap: 10px;
    margin-top: 16px;
}

.empty {
    text-align: center;
    padding: 22px;
    color: var(--muted);
}

.notice {
    border-radius: 16px;
    padding: 12px 14px;
    margin-bottom: 12px;
}

.notice--error {
    background: rgba(179, 60, 47, 0.1);
    color: var(--danger);
}

.notice--success {
    background: rgba(47, 143, 88, 0.12);
    color: var(--success);
}

@media (max-width: 360px) {
    .stats {
        grid-template-columns: 1fr;
    }

    .toolbar {
        flex-direction: column;
    }

    .modal__actions {
        flex-direction: column;
    }
}
