﻿:root {
    --bg: #f6f4ef;
    --panel: #fff;
    --ink: #1b1b1b;
    --muted: #6f6f6f;
    --line: #e8e2d9;
    --brand: #c8a128;
    --radius: 14px;
    --shadow: 0 10px 26px rgba(0,0,0,.08);
}

* {
    box-sizing: border-box
}

body {
    margin: 0;
    font-family: Montserrat,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;
    color: var(--ink);
    background: var(--bg)
}

.topbar {
    display: flex;
    align-items: center;
    gap: 12px;
    background: #101010;
    color: #fff;
    padding: 12px 16px;
    position: sticky;
    top: 0;
    z-index: 10
}

.brand {
    display: flex;
    gap: 8px;
    align-items: center;
    font-weight: 800
}

    .brand i {
        color: var(--brand)
    }

.spacer {
    flex: 1
}

.nav .btn {
    margin-left: 8px
}

.center-wrap {
    min-height: calc(100dvh - 56px);
    display: grid;
    place-items: center;
    padding: 20px
}

.card {
    width: min(420px,94vw);
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 18px
}

    .card h2 {
        margin: 0 0 6px
    }

.muted {
    color: var(--muted);
    font-size: 14px
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin: 10px 0
}

    .field label {
        color: var(--muted);
        font-size: 14px;
        display: flex;
        align-items: center;
        gap: 8px
    }

    .field input {
        border: 1px solid var(--line);
        border-radius: 10px;
        padding: 10px 12px
    }

.actions {
    display: flex;
    gap: 8px;
    margin-top: 10px
}

.dash-wrap {
    max-width: 1100px;
    margin: 20px auto;
    padding: 0 16px;
    display: grid;
    gap: 16px
}

.welcome {
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px
}

    .welcome h2 {
        margin: 0 0 8px
    }

    .welcome .meta {
        display: flex;
        flex-wrap: wrap;
        gap: 12px;
        color: var(--muted);
        font-size: 14px
    }

.orders {
    background: var(--panel);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 16px
}

.orders-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px
}

.search {
    border: 1px solid var(--line);
    border-radius: 999px;
    padding: 10px 12px;
    min-width: 220px
}

.orders-list {
    display: grid;
    grid-template-columns: repeat(auto-fill,minmax(280px,1fr));
    gap: 12px
}

.order-card {
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 12px;
    background: #fff;
    display: grid;
    gap: 8px
}

    .order-card .line {
        display: flex;
        justify-content: space-between;
        gap: 8px
    }

.badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    border: 1px solid #dfeee5;
    background: #eafaf0;
    color: #1f7a4c
}

.order-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end
}

.btn {
    border: 1px solid var(--line);
    background: #f4f1ed;
    border-radius: 10px;
    padding: 10px 14px;
    cursor: pointer
}

.btn-ghost {
    background: #f4f1ed
}

.btn-primary {
    background: var(--brand);
    border: 0;
    color: #000;
    font-weight: 800
}

.btn.sm {
    padding: 6px 10px
}

.empty {
    display: grid;
    place-items: center;
    text-align: center;
    color: var(--muted);
    gap: 6px;
    padding: 40px 0
}

    .empty i {
        font-size: 48px;
        color: #bbb
    }

/* Alert modal */
.alert-modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(0,0,0,.55);
    z-index: 20000;
    padding: 16px
}

.am-card {
    width: min(420px,94vw);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 20px 60px rgba(0,0,0,.3);
    padding: 18px
}

.am-head {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-bottom: 8px
}

    .am-head i {
        color: #c0392b
    }

.am-title {
    margin: 0
}

.am-body {
    font-size: 14px;
    color: #333
}

.am-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 10px
}

/* Detail modal */
.detail-modal {
    position: fixed;
    inset: 0;
    display: none;
    place-items: center;
    background: rgba(0,0,0,.55);
    z-index: 12000;
    padding: 16px
}

.dm-card {
    width: min(760px,96vw);
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0,0,0,.25);
    overflow: hidden
}

.dm-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #101010;
    color: #fff;
    padding: 10px 12px
}

.dm-body {
    padding: 14px
}

.dm-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px
}

@media(max-width:680px) {
    .dm-grid {
        grid-template-columns: 1fr
    }
}

.items {
    border-top: 1px dashed var(--line);
    margin-top: 10px;
    padding-top: 10px
}

.item {
    display: grid;
    grid-template-columns: 56px 1fr auto;
    gap: 10px;
    align-items: center;
    margin: 8px 0
}

    .item img {
        width: 56px;
        height: 56px;
        border-radius: 10px;
        object-fit: cover;
        border: 1px solid #eee
    }

.right {
    text-align: right
}

.totals {
    margin-top: 10px;
    border-top: 1px solid var(--line);
    padding-top: 10px
}

.qr {
    display: grid;
    justify-items: center;
    gap: 8px
}

    .qr canvas {
        width: 220px;
        height: 220px;
        display: block
    }
