:root {
    --primary:#6f3d2f;
    --primary-dark:#4a271f;
    --secondary:#c87938;
    --accent:#f4b41a;
    --cream:#fff7e8;
    --bg:#fffaf3;
    --white:#fff;
    --text:#3b2923;
    --muted:#8b756b;
    --success:#3f8f61;
    --danger:#c94b4b;
    --warning:#e5a321;
    --line:#eadfd6;
    --shadow:0 10px 30px rgba(74,39,31,.10);
    --radius:18px;
}

* {
    box-sizing:border-box;
}

html {
    scroll-behavior:smooth;
}

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

a {
    text-decoration:none;
    color:inherit;
}

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

button {
    cursor:pointer;
}

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

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

.topbar {
    height:68px;
    background:var(--primary-dark);
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 18px;
    position:sticky;
    top:0;
    z-index:30;
}

.brand-mini img {
    width:96px;
    height:48px;
    object-fit:contain;
    border-radius:10px;
}

.top-actions {
    display:flex;
    gap:8px;
}

.icon-btn {
    width:42px;
    height:42px;
    border-radius:13px;
    display:grid;
    place-items:center;
    background:rgba(255,255,255,.12);
    color:#fff;
    position:relative;
}

.badge {
    min-width:20px;
    height:20px;
    padding:0 5px;
    border-radius:999px;
    background:var(--accent);
    color:#3a241b;
    font-size:11px;
    font-weight:800;
    display:inline-grid;
    place-items:center;
}

.cart-badge {
    position:absolute;
    right:-3px;
    top:-4px;
}

.page-wrap {
    padding-bottom:88px;
}

.hero-mobile {
    padding:20px 16px 8px;
}

.hero-card {
    min-height:205px;
    border-radius:24px;
    overflow:hidden;
    position:relative;
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    box-shadow:var(--shadow);
    color:#fff;
    padding:25px;
}

.hero-card:after {
    content:"";
    position:absolute;
    inset:auto -40px -80px auto;
    width:190px;
    height:190px;
    background:rgba(244,180,26,.25);
    border-radius:50%;
}

.hero-card h1 {
    font-size:24px;
    line-height:1.2;
    margin:8px 0;
}

.hero-card p {
    font-size:13px;
    max-width:245px;
    color:#fff8f2;
}

.hero-kicker {
    font-size:11px;
    font-weight:800;
    letter-spacing:1.4px;
    text-transform:uppercase;
    color:#ffe7a4;
}

.btn {
    border:0;
    border-radius:13px;
    padding:12px 17px;
    font-weight:700;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    gap:8px;
    transition:.2s;
}

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

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

.btn-accent {
    background:var(--accent);
    color:#43291d;
}

.btn-outline {
    background:#fff;
    border:1.5px solid var(--primary);
    color:var(--primary);
}

.btn-danger {
    background:#ffe8e8;
    color:#a52e2e;
}

.btn-success {
    background:#e5f5eb;
    color:#24653f;
}

.section {
    padding:18px 16px;
}

.section-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
    margin-bottom:12px;
}

.section-head h2 {
    font-size:18px;
    margin:0;
}

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

.searchbox {
    background:#fff;
    border:1px solid var(--line);
    border-radius:15px;
    display:flex;
    align-items:center;
    padding:0 14px;
    gap:8px;
    box-shadow:0 5px 20px rgba(74,39,31,.05);
}

.searchbox input {
    width:100%;
    border:0;
    outline:0;
    padding:13px 0;
    background:transparent;
    font-size:13px;
}

.category-scroll {
    display:flex;
    gap:10px;
    overflow-x:auto;
    padding:2px 0 8px;
    scrollbar-width:none;
}

.category-scroll::-webkit-scrollbar {
    display:none;
}

.cat-pill {
    flex:0 0 auto;
    background:#fff;
    border:1.5px solid #d9c9bf;
    color:var(--primary);
    padding:10px 15px;
    border-radius:999px;
    font-size:12px;
    font-weight:700;
}

.cat-pill.active {
    background:var(--primary);
    color:#fff;
    border-color:var(--primary);
}

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

.product-card {
    background:#fff;
    border-radius:18px;
    overflow:hidden;
    box-shadow:0 7px 22px rgba(74,39,31,.07);
    border:1px solid #f0e8e2;
}

.product-media {
    height:150px;
    background:#f3e7db;
    position:relative;
}

.product-media img {
    width:100%;
    height:100%;
    object-fit:cover;
}

.tag {
    position:absolute;
    top:9px;
    left:9px;
    background:var(--accent);
    padding:5px 8px;
    border-radius:7px;
    font-size:9px;
    font-weight:800;
}

.product-info {
    padding:12px;
}

.product-info h3 {
    font-size:13px;
    margin:0 0 4px;
    line-height:1.3;
}

.product-info p {
    font-size:10px;
    color:var(--muted);
    height:30px;
    overflow:hidden;
    margin:0 0 8px;
}

.price {
    font-size:14px;
    font-weight:800;
    color:var(--primary);
    margin-bottom:9px;
}

.product-actions {
    display:flex;
    gap:7px;
}

.product-actions .btn {
    flex:1;
    padding:9px;
    font-size:11px;
}

.plus-btn {
    width:36px;
    padding:0!important;
}

.empty {
    padding:35px 18px;
    text-align:center;
    color:var(--muted);
    background:#fff;
    border-radius:18px;
    border:1px dashed #d9c9bf;
}

.bottom-nav {
    position:fixed;
    z-index:40;
    bottom:0;
    left:0;
    right:0;
    height:68px;
    background:#fff;
    border-top:1px solid var(--line);
    display:grid;
    grid-template-columns:repeat(4,1fr);
    box-shadow:0 -6px 20px rgba(74,39,31,.08);
}

.bottom-nav a {
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    font-size:9px;
    color:#9a887f;
    position:relative;
}

.bottom-nav i {
    font-size:17px;
}

.bottom-nav a.active {
    color:var(--primary);
    font-weight:800;
}

.bottom-nav .badge {
    position:absolute;
    top:9px;
    right:25%;
}

.form-card {
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    padding:17px;
    box-shadow:var(--shadow);
}

.form-group {
    margin-bottom:13px;
}

.form-group label {
    font-size:11px;
    font-weight:700;
    display:block;
    margin-bottom:6px;
}

.form-control {
    width:100%;
    border:1.5px solid #dfd2ca;
    border-radius:12px;
    padding:11px 12px;
    outline:0;
    background:#fff;
    color:var(--text);
}

.form-control:focus {
    border-color:var(--secondary);
    box-shadow:0 0 0 3px rgba(200,121,56,.12);
}

textarea.form-control {
    min-height:90px;
    resize:vertical;
}

.row {
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:10px;
}

.notice {
    padding:12px 13px;
    border-radius:13px;
    background:#fff4da;
    color:#72511b;
    font-size:11px;
}

.success {
    background:#eaf7ee;
    color:#27643d;
}

.danger {
    background:#ffeded;
    color:#9d3434;
}

.status {
    display:inline-flex;
    align-items:center;
    padding:6px 9px;
    border-radius:999px;
    font-size:10px;
    font-weight:800;
    background:#f4eee9;
    color:var(--primary);
}

.status.success {
    background:#e7f5eb;
    color:#2f7048;
}

.status.warning {
    background:#fff2d5;
    color:#8a641d;
}

.status.danger {
    background:#ffe9e9;
    color:#a03434;
}

.status.info {
    background:#e9f0ff;
    color:#3e5d98;
}

.order-card {
    background:#fff;
    border:1px solid var(--line);
    border-radius:17px;
    padding:15px;
    margin-bottom:10px;
    box-shadow:0 6px 20px rgba(74,39,31,.05);
}

.order-top {
    display:flex;
    justify-content:space-between;
    gap:8px;
}

.order-top strong {
    font-size:13px;
}

.order-card .total {
    font-size:15px;
    font-weight:800;
    color:var(--primary);
    margin:8px 0;
}

.order-items {
    font-size:11px;
    color:var(--muted);
    line-height:1.7;
}

.timeline {
    margin:17px 0;
}

.timeline-step {
    display:flex;
    gap:12px;
    position:relative;
    padding-bottom:19px;
}

.timeline-step:not(:last-child):after {
    content:"";
    position:absolute;
    left:8px;
    top:18px;
    height:calc(100% - 10px);
    border-left:2px dashed #dccbc0;
}

.dot {
    width:18px;
    height:18px;
    border-radius:50%;
    background:#e3d8d0;
    z-index:1;
}

.timeline-step.done .dot {
    background:var(--secondary);
    box-shadow:0 0 0 4px #f8e9dd;
}

.timeline-step strong {
    font-size:12px;
}

.timeline-step small {
    display:block;
    color:var(--muted);
    font-size:10px;
}

.auth-page {
    min-height:100vh;
    background:radial-gradient(circle at top,#ffe6a8 0,#fff7e8 30%,#fffaf3 70%);
    display:grid;
    place-items:center;
    padding:20px;
}

.auth-card {
    width:min(420px,100%);
    background:#fff;
    border-radius:28px;
    padding:25px;
    box-shadow:0 20px 60px rgba(74,39,31,.14);
}

.auth-logo {
    width:130px;
    height:100px;
    object-fit:contain;
    margin:0 auto 10px;
    border-radius:18px;
}

.auth-card h1 {
    text-align:center;
    font-size:23px;
    margin:4px 0;
}

.auth-card .subtitle {
    text-align:center;
    color:var(--muted);
    font-size:12px;
    margin-bottom:20px;
}

.auth-foot {
    text-align:center;
    font-size:11px;
    color:var(--muted);
    margin-top:15px;
}

.auth-foot a {
    color:var(--primary);
    font-weight:800;
}

.password-wrap {
    position:relative;
}

.password-wrap .form-control {
    padding-right:42px;
}

.password-toggle {
    position:absolute;
    right:11px;
    top:50%;
    transform:translateY(-50%);
    border:0;
    background:transparent;
    color:var(--muted);
}

.splash {
    min-height:100vh;
    display:grid;
    place-items:center;
    background:linear-gradient(145deg,#fff4cf,#ffdca5 50%,#f4b8a5);
    text-align:center;
}

.splash-box img {
    width:190px;
    height:170px;
    object-fit:contain;
    margin:auto;
    border-radius:30px;
}

.splash-box h1 {
    font-size:25px;
    color:var(--primary);
    margin:4px 0;
}

.loader {
    width:35px;
    height:35px;
    border:3px solid rgba(111,61,47,.15);
    border-top-color:var(--primary);
    border-radius:50%;
    animation:spin 1s linear infinite;
    margin:20px auto;
}

@keyframes spin {
    to {
        transform:rotate(360deg);
    }
}

.admin-body {
    background:#f8f1ea;
}

.admin-topbar {
    height:64px;
    background:var(--primary-dark);
    color:#fff;
    display:flex;
    align-items:center;
    justify-content:space-between;
    padding:0 15px;
    position:fixed;
    top:0;
    left:0;
    right:0;
    z-index:60;
}

.admin-brand {
    display:flex;
    align-items:center;
    gap:8px;
    font-weight:800;
    font-size:14px;
}

.admin-brand img {
    width:43px;
    height:43px;
    object-fit:contain;
    border-radius:9px;
}

.menu-toggle {
    background:transparent;
    color:#fff;
    border:0;
    font-size:20px;
}

.admin-sidebar {
    position:fixed;
    z-index:55;
    left:0;
    top:64px;
    bottom:0;
    width:245px;
    background:#fff;
    border-right:1px solid var(--line);
    padding:14px;
    overflow:auto;
    transform:translateX(-100%);
    transition:.25s;
}

.sidebar-open .admin-sidebar {
    transform:none;
}

.sidebar-profile {
    background:linear-gradient(135deg,var(--primary),var(--secondary));
    color:#fff;
    border-radius:18px;
    padding:16px;
    text-align:center;
    margin-bottom:12px;
}

.sidebar-profile img {
    width:72px;
    height:62px;
    object-fit:contain;
    margin:0 auto 7px;
    border-radius:13px;
}

.sidebar-profile strong,
.sidebar-profile small {
    display:block;
}

.sidebar-profile small {
    font-size:9px;
    opacity:.85;
}

.admin-sidebar>a {
    display:flex;
    gap:12px;
    align-items:center;
    padding:12px;
    border-radius:11px;
    color:#725f56;
    font-size:12px;
    font-weight:600;
    margin:2px 0;
}

.admin-sidebar>a:hover,
.admin-sidebar>a.active {
    background:#f8eee6;
    color:var(--primary);
}

.admin-sidebar a.danger {
    color:#a33d3d;
}

.admin-main {
    padding:84px 15px 25px;
    min-height:100vh;
}

.admin-title {
    display:flex;
    justify-content:space-between;
    align-items:flex-start;
    gap:12px;
    margin-bottom:16px;
}

.admin-title h1 {
    font-size:21px;
    margin:0;
}

.admin-title p {
    font-size:11px;
    color:var(--muted);
    margin:3px 0;
}

.stats-grid {
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:10px;
    margin-bottom:15px;
}

.stat-card {
    background:#fff;
    border:1px solid var(--line);
    border-radius:16px;
    padding:14px;
    box-shadow:0 5px 18px rgba(74,39,31,.05);
}

.stat-card .ico {
    width:34px;
    height:34px;
    border-radius:11px;
    display:grid;
    place-items:center;
    background:#f8e9dd;
    color:var(--primary);
    margin-bottom:8px;
}

.stat-card small {
    font-size:10px;
    color:var(--muted);
}

.stat-card strong {
    font-size:18px;
    display:block;
    margin-top:2px;
}

.admin-table {
    width:100%;
    border-collapse:collapse;
    background:#fff;
    border-radius:16px;
    overflow:hidden;
    font-size:11px;
}

.admin-table th,
.admin-table td {
    padding:10px;
    border-bottom:1px solid #eee4dd;
    text-align:left;
}

.admin-table th {
    background:#faf4ef;
    color:var(--primary);
    font-size:10px;
}

.table-wrap {
    overflow:auto;
    border-radius:16px;
}

.admin-card {
    background:#fff;
    border:1px solid var(--line);
    border-radius:18px;
    padding:15px;
    box-shadow:0 6px 22px rgba(74,39,31,.05);
    margin-bottom:14px;
}

.toolbar {
    display:flex;
    gap:8px;
    flex-wrap:wrap;
    margin-bottom:12px;
}

.toolbar .form-control {
    flex:1;
    min-width:160px;
}

.two-col {
    display:grid;
    grid-template-columns:1fr;
    gap:14px;
}

.chart {
    height:240px;
    display:flex;
    align-items:flex-end;
    gap:8px;
    padding:15px 5px;
    border-bottom:1px solid var(--line);
}

.bar {
    flex:1;
    background:linear-gradient(to top,var(--primary),var(--secondary));
    border-radius:8px 8px 0 0;
    min-height:8px;
    position:relative;
}

.bar span {
    position:absolute;
    bottom:-21px;
    left:50%;
    transform:translateX(-50%);
    font-size:8px;
    color:var(--muted);
    white-space:nowrap;
}

.modal {
    position:fixed;
    inset:0;
    background:rgba(50,30,20,.5);
    display:none;
    align-items:flex-end;
    justify-content:center;
    z-index:100;
    padding:15px;
}

.modal.open {
    display:flex;
}

.modal-box {
    background:#fff;
    border-radius:22px;
    padding:18px;
    width:min(520px,100%);
    max-height:90vh;
    overflow:auto;
}

.modal-head {
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.close {
    border:0;
    background:#f5eee9;
    border-radius:10px;
    width:35px;
    height:35px;
}

.file-preview {
    width:100%;
    max-height:260px;
    object-fit:contain;
    background:#f6eee8;
    border-radius:14px;
    margin-top:8px;
}

@media(min-width:769px) {
    .customer-body {
        background:var(--bg);
    }

    .topbar {
        padding:0 calc((100% - 1180px)/2);
    }

    .page-wrap {
        width:min(1180px,100%);
        margin:auto;
    }

    .hero-mobile {
        padding:30px 0 10px;
    }

    .section {
        padding-left:0;
        padding-right:0;
    }

    .product-grid {
        grid-template-columns:repeat(4,1fr);
    }

    .product-media {
        height:190px;
    }

    .bottom-nav {
        display:none;
    }

    .admin-sidebar {
        transform:none;
    }

    .admin-main {
        margin-left:245px;
        padding-left:25px;
        padding-right:25px;
    }

    .menu-toggle {
        display:none;
    }

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

    .two-col {
        grid-template-columns:1.5fr 1fr;
    }
}