:root {
    color-scheme: dark;
    --bg: #0b1120;
    --panel: #111c30;
    --border: #26364d;
    --text: #e5edf7;
    --muted: #91a0b5;
    --green: #28d17c;
    --green-dark: #123e32;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: system-ui, sans-serif;
}

.topbar {
    min-height: 72px;
    padding: 12px 5%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid var(--border);
    background: #0e1728;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand-mark {
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    background: var(--green-dark);
    color: var(--green);
    font-size: 24px;
    font-weight: 800;
}

.brand strong,
.brand small {
    display: block;
}

.brand small {
    color: var(--muted);
    font-size: 12px;
}

.status {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.status-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background: var(--green);
}

.container {
    width: min(1200px, 92%);
    margin: 32px auto;
}

.welcome,
.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.eyebrow {
    color: var(--green);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 2px;
}

h1 {
    margin: 4px 0;
    font-size: 32px;
}

h2 {
    margin: 0;
    font-size: 19px;
}

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

.workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, 1fr);
    gap: 20px;
    margin-top: 28px;
}

.products-panel,
.cart-panel,
.history-panel {
    padding: 22px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: var(--panel);
    min-width: 0;
}

.section-heading {
    margin-bottom: 20px;
}

.section-heading p {
    margin: 5px 0 0;
}

.count {
    padding: 6px 10px;
    border-radius: 20px;
    background: #1d2b40;
    color: var(--muted);
    font-size: 11px;
}

input {
    width: 100%;
    padding: 13px;
    border: 1px solid var(--border);
    border-radius: 9px;
    outline: none;
    background: #0b1526;
    color: var(--text);
    font: inherit;
}

input:focus {
    border-color: var(--green);
}

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

.product-card {
    padding: 16px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #152238;
}

.product-card h3 {
    margin: 0 0 10px;
    font-size: 14px;
}

.product-card p {
    margin: 0 0 14px;
    color: var(--green);
    font-weight: 700;
}

.product-card button,
.checkout-btn {
    width: 100%;
    padding: 11px;
    border: 0;
    border-radius: 8px;
    background: var(--green);
    color: #062417;
    font-weight: 700;
    cursor: pointer;
}

.cart-list {
    min-height: 100px;
}

.empty {
    padding: 28px 0;
    color: var(--muted);
    text-align: center;
    font-size: 13px;
}

.cart-item,
.summary > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border);
    font-size: 13px;
}

.cart-item button {
    border: 0;
    background: transparent;
    color: #ff8c8c;
    cursor: pointer;
}

.summary {
    margin-top: 18px;
}

.summary label {
    display: block;
    margin: 18px 0 8px;
    font-size: 13px;
}

.total {
    color: var(--green);
    font-size: 17px !important;
    font-weight: 800;
}

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

.checkout-btn {
    margin-top: 18px;
}

.checkout-btn:disabled {
    opacity: .4;
    cursor: not-allowed;
}

.history-panel {
    margin-top: 22px;
}

#transaction-list {
    margin-top: 15px;
}

footer {
    padding: 25px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    text-align: center;
    font-size: 12px;
}

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

    .welcome {
        align-items: flex-start;
    }

    .date {
        text-align: right;
    }
}

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

    .products-panel,
    .cart-panel,
    .history-panel {
        padding: 15px;
    }
}
