:root {
    --bg-a: #fdf6e3;
    --bg-b: #dff3ea;
    --ink: #182026;
    --ink-soft: #4b5963;
    --brand: #0a7a66;
    --brand-deep: #075444;
    --accent: #e2a43d;
    --card: rgba(255, 255, 255, 0.75);
    --line: rgba(24, 32, 38, 0.14);
    --danger: #a2362b;
    --ok: #136840;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: 'Manrope', sans-serif;
    color: var(--ink);
    background: radial-gradient(circle at 8% 10%, rgba(226, 164, 61, 0.35), transparent 30%),
        radial-gradient(circle at 95% 85%, rgba(10, 122, 102, 0.28), transparent 35%),
        linear-gradient(145deg, var(--bg-a), var(--bg-b));
}

.page-shell {
    width: min(1100px, 92vw);
    margin: 2.5rem auto 3rem;
    display: grid;
    gap: 1.25rem;
}

.card {
    border: 1px solid var(--line);
    border-radius: 1.25rem;
    padding: 1.2rem;
    box-shadow: 0 12px 30px rgba(10, 20, 30, 0.1);
}

.glass-card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.6));
    backdrop-filter: blur(8px);
}

.eyebrow {
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.76rem;
    color: var(--brand-deep);
    font-weight: 700;
}

h1,
h2 {
    font-family: 'Fraunces', serif;
    line-height: 1.1;
    margin: 0.45rem 0 0.6rem;
}

h1 {
    font-size: clamp(1.7rem, 2.6vw, 2.6rem);
}

h2 {
    font-size: clamp(1.2rem, 2.1vw, 1.7rem);
}

.subline {
    margin: 0;
    color: var(--ink-soft);
}

.split {
    background: var(--card);
    display: grid;
    gap: 1.2rem;
    grid-template-columns: minmax(270px, 360px) 1fr;
}

.pane {
    background: rgba(255, 255, 255, 0.76);
    border: 1px solid rgba(24, 32, 38, 0.08);
    border-radius: 1rem;
    padding: 1rem;
}

.coffee-form {
    display: grid;
    gap: 0.6rem;
}

label {
    font-size: 0.9rem;
    color: var(--ink-soft);
    font-weight: 700;
}

input {
    border: 1px solid rgba(24, 32, 38, 0.18);
    border-radius: 0.7rem;
    padding: 0.68rem 0.8rem;
    font-size: 0.98rem;
    font-family: inherit;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: 0 0 0 4px rgba(10, 122, 102, 0.16);
}

.actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.btn {
    border: 0;
    border-radius: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
    font-weight: 700;
    font-size: 0.9rem;
    padding: 0.6rem 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn.primary {
    color: #fff;
    background: linear-gradient(140deg, var(--brand), var(--brand-deep));
}

.btn.ghost {
    color: var(--brand-deep);
    background: rgba(7, 84, 68, 0.08);
}

.btn.tiny {
    padding: 0.42rem 0.72rem;
    font-size: 0.82rem;
    background: rgba(24, 32, 38, 0.08);
    color: var(--ink);
}

.btn.danger {
    background: rgba(162, 54, 43, 0.14);
    color: var(--danger);
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    text-align: left;
    padding: 0.64rem;
    border-bottom: 1px solid rgba(24, 32, 38, 0.1);
    font-size: 0.95rem;
}

th {
    color: var(--ink-soft);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.row-actions {
    display: flex;
    gap: 0.4rem;
    align-items: center;
}

.row-actions form {
    margin: 0;
}

.stock-pill {
    display: inline-block;
    min-width: 2.2rem;
    text-align: center;
    border-radius: 999px;
    padding: 0.15rem 0.55rem;
    font-weight: 700;
    font-size: 0.83rem;
}

.stock-pill.ok {
    color: var(--ok);
    background: rgba(19, 104, 64, 0.14);
}

.stock-pill.low {
    color: #8f4b08;
    background: rgba(226, 164, 61, 0.18);
}

.empty {
    color: var(--ink-soft);
    text-align: center;
    font-style: italic;
}

.toast {
    border-radius: 0.9rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid;
    font-weight: 700;
}

.toast.success {
    color: var(--ok);
    border-color: rgba(19, 104, 64, 0.32);
    background: rgba(19, 104, 64, 0.1);
}

.toast.error {
    color: var(--danger);
    border-color: rgba(162, 54, 43, 0.32);
    background: rgba(162, 54, 43, 0.1);
}

.reveal {
    opacity: 0;
    transform: translateY(12px);
    animation: reveal-up 520ms ease forwards;
}

.reveal:nth-child(2) {
    animation-delay: 90ms;
}

.reveal:nth-child(3) {
    animation-delay: 140ms;
}

@keyframes reveal-up {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 900px) {
    .split {
        grid-template-columns: 1fr;
    }

    .page-shell {
        margin: 1rem auto 2rem;
    }

    .card {
        padding: 1rem;
    }
}
