/* =====================================================================
   dashboard.css  (REPLACES your old dashboard.css completely)

   1. Tokens + base
   2. Shared pieces other pages still use (kept from the old file)
   3. Shell: sidebar  (same HTML, new look, works on every page)
   4. Shell: top bar  (same HTML, new look, works on every page)
   5. Dashboard page
   6. Responsive (mobile-first for the page, drawer at 950px)
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. TOKENS + BASE
   --------------------------------------------------------------------- */

:root {
    --bg: #f6f8f6;
    --surface: #ffffff;
    --ink: #10261a;
    --muted: #6a7c71;
    --line: #e3eae5;
    --brand: #0b8a45;
    --brand-dark: #076b36;
    --brand-soft: #e6f6ec;
    --orange: #ea6b00;
    --orange-soft: #fff2e3;
    --blue: #0d7cd9;
    --blue-soft: #e8f3fd;
    --radius: 18px;
    --shadow: 0 1px 2px rgba(16, 38, 26, .05), 0 12px 28px -16px rgba(16, 38, 26, .22);
}

* {
    margin: 0;
    padding: 0;
    font-family: "Signika", sans-serif;
    color: #0D4945;
}

body {
    background-color: #F7F8F6;
    min-height: 100vh;
}

a {
    text-decoration: none;
}

.container {
    height: 100%;
}

.main-container {
    min-width: 0;
    background-color: var(--bg);
}


/* ---------------------------------------------------------------------
   2. SHARED PIECES STILL USED BY OTHER PAGES
   (welcome page logo, sales/settings title row, sales summary boxes,
    orders-table status pill + button)
   --------------------------------------------------------------------- */

/* welcome page logo */
.logo-container,
.logo {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo-container {
    margin: 0.8rem 0;
}

.logo img {
    width: 85%;
}

/* sales + settings title row */
.top2 {
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top2 .box1 {
    width: max-content;
}

.box1 span {
    color: #7e8d9d;
    font-weight: 500;
    font-size: 0.90rem;
}

/* sales page keeps this vertical alignment */
.middle-content {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* sales page summary boxes */
.box-pannel {
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.box-pannel .box {
    width: 28%;
    padding: 1.5rem 1rem;
    display: flex;
    gap: 8px;
    border-radius: 12px;
}

.box .icon-box {
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.box-pannel .box .icon-box {
    height: 3.3rem;
    width: 3.3rem;
}

.box .icon-box i {
    font-size: 1.5rem;
    color: #fff;
}

.box .text-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0.70rem 0.4rem;
}

.text-box .text {
    display: flex;
    flex-direction: column;
}

.text span {
    font-size: 0.92rem;
    font-weight: 400;
}

.text .number,
.text .amt {
    font-size: 1.5rem;
    font-weight: 700;
}

.text>:first-child {
    font-weight: 700;
    font-size: 1rem;
}

.text-box-1 {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.box-pannel .box .textbx {
    display: flex;
    flex-direction: column;
    align-items: start;
    gap: 5px;
    padding-bottom: 0.9rem;
}

.box-pannel .active-orders-box {
    background-color: #F0F8F2;
    border: 1px solid #EAD5A6;
}

.box-pannel .active-orders-box .icon-box {
    background-color: #fc9621;
}

@media (width <=950px) {
    .box-pannel {
        padding: 0 0.85rem;
    }
}

@media (width <=850px) {
    .box-pannel .box {
        width: 26%;
    }
}

@media (width <=740px) {
    .box-pannel .box .text-box {
        padding-bottom: 1.2rem;
    }

    .box-pannel .box .textbx {
        padding-bottom: 0;
    }
}

@media (width <=645px) {
    .box-pannel .box .icon-box {
        height: 3rem;
        width: 3rem;
    }

    .box-pannel .box .textbx {
        width: 70%;
    }
}

@media (width <=604px) {
    .box-pannel {
        flex-wrap: wrap;
        gap: 10px;
        padding: 0 1rem;
    }

    .box-pannel .box {
        width: 42%;
    }
}

@media (width <=520px) {
    .box-pannel .box {
        width: 38%;
    }
}

@media (width <=400px) {
    .box-pannel .box .icon-box {
        height: 2.6rem;
        width: 2.8rem;
    }
}

@media (width >=350px) and (width <=368px) {
    .box-pannel .box .icon-box {
        height: 2.5rem;
        width: 3rem;
    }
}

@media (width >=350px) and (width <=356px) {
    .box-pannel .box {
        width: 37%;
    }
}

@media (width <=350px) {
    .text>:first-child {
        font-size: 1.2rem;
    }

    .text .number,
    .text .amt {
        font-size: 2rem;
    }
}

@media (width <=320px) {
    .text>:first-child {
        font-size: 1.3rem;
    }
}

/* orders table status pill + action button (orders.css builds on these) */
.order-status,
.owner-action {
    border-radius: 12px;
    text-align: center;
    width: max-content;
}

.order-status,
.owner-action button {
    padding: 0.5rem 1rem;
}

.order-status {
    background-color: #0d7cd9;
    color: #ffffff;
}

.each-order .hide-action {
    display: none;
}

.each-order .light-orange {
    background-color: #d47222;
}

.each-order .light-green {
    background-color: #21ad50;
}

.order-status span,
.owner-action button {
    font-weight: 600;
    color: #fff;
}

.owner-action {
    background-color: #00a035;
}

.owner-action button {
    width: 100%;
    font-size: 1.03rem;
    border: none;
    outline: none;
    border-radius: 12px;
    background-color: transparent;
}


/* ---------------------------------------------------------------------
   3. SHELL: SIDEBAR  (same HTML as before)
   --------------------------------------------------------------------- */

.sidebar,
.sidebar *,
.sidebar *::before,
.sidebar *::after {
    box-sizing: border-box;
}

.sidebar {
    position: relative;
    grid-column: 1/2;
    min-height: 100vh;
    min-height: 100dvh;
}

.sidebar-container {
    position: sticky;
    top: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    background: linear-gradient(180deg, #05361a 0%, #031f0f 100%);
}

.sidebar .crossMark {
    display: none;
}

.sidebar .logo-container {
    margin: 0;
    padding: 0.5rem 0.5rem 1.1rem;
    justify-content: flex-start;
    border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.sidebar .logo {
    justify-content: flex-start;
}

.sidebar .logo img {
    width: 70%;
    max-width: 9rem;
    height: auto;
}

.sidebar .sections {
    width: 100%;
    margin: 1rem 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.25rem;
}

.sidebar .section {
    position: relative;
    width: 100%;
    padding: 0.7rem 0.85rem;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 0.75rem;
    border-radius: 12px;
    transition: background-color .15s ease;
}

.sidebar .section:hover {
    background-color: rgba(255, 255, 255, .07);
}

.sidebar .section-icon {
    width: 1.4rem;
    height: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar .section-icon i {
    font-size: 1.05rem;
    color: #7ee2a8;
}

.sidebar .section-name {
    flex: 1;
    width: auto;
    height: auto;
}

.sidebar .section-name a,
.sidebar .section-name a:visited {
    color: #e7f3ec;
    font-size: 0.98rem;
    font-weight: 500;
}

/* the whole row is clickable, not just the word */
.sidebar .section-name a::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 12px;
}

/* current page (added by responsive.js) */
.sidebar .section.active {
    background-color: rgba(52, 211, 120, .16);
}

.sidebar .section.active::before {
    content: "";
    position: absolute;
    left: -0.75rem;
    top: 20%;
    width: 4px;
    height: 60%;
    border-radius: 0 4px 4px 0;
    background-color: #34d378;
}

.sidebar .section.active .section-name a {
    color: #ffffff;
    font-weight: 600;
}

.sidebar .section.active .section-icon i {
    color: #ffffff;
}

.sidebar .owner-session-container {
    position: static;
    width: 100%;
    margin: auto 0 0;
    padding: 0.75rem 0 0;
    display: block;
    border-top: 1px solid rgba(255, 255, 255, .08);
}

.sidebar .logout-section:hover {
    background-color: rgba(248, 113, 113, .16);
}

.sidebar .logout-section .section-icon i {
    color: #fca5a5;
}

@media (min-width: 951px) and (max-width: 1100px) {
    .sidebar .section {
        padding: 0.7rem 0.6rem;
        gap: 0.55rem;
    }

    .sidebar .section-name a {
        font-size: 0.92rem;
    }
}


/* ---------------------------------------------------------------------
   4. SHELL: TOP BAR  (same HTML as before)
   --------------------------------------------------------------------- */

/* lets the bar stick to the top of the whole page while you scroll */
.top-pannel {
    width: 100%;
    display: contents;
}

.top-pannel .top1,
.top-pannel .top1 * {
    box-sizing: border-box;
}

.top-pannel .top1 {
    position: sticky;
    top: 0;
    z-index: 30;
    padding: 0.7rem 1rem;
    display: flex;
    background-color: rgba(246, 248, 246, .86);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}

.top1 .shop-info {
    width: 100%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.shop-info .head-left {
    display: none;
}

.head-left .bar-icon {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    cursor: pointer;
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: 12px;
}

.head-left .bar-icon i {
    font-size: 1.1rem;
    color: var(--ink);
}

.shop-info .head-right {
    width: auto;
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.head-right>.icon {
    width: 2.5rem;
    height: 2.5rem;
    display: grid;
    place-items: center;
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.head-right>.icon i {
    font-size: 1.05rem;
    color: var(--ink);
}

.shop-info .info {
    width: auto;
    padding: 0.25rem 0.85rem 0.25rem 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    background-color: #fff;
    border: 1px solid var(--line);
    border-radius: 999px;
}

.info .shop-icon {
    width: auto;
    padding: 0;
    display: flex;
}

.shop-icon .icon {
    width: 2rem;
    height: 2rem;
    display: grid;
    place-items: center;
    background: linear-gradient(135deg, #17b35a, #0b8a45);
    border-radius: 50%;
}

.shop-icon .icon i {
    font-size: 0.9rem;
    color: #fff;
}

.info .shop-name {
    display: block;
    width: auto;
    min-width: 0;
    max-width: 11rem;
}

.shop-name span {
    display: block;
    overflow: hidden;
    font-size: 0.95rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--ink);
}


/* ---------------------------------------------------------------------
   5. DASHBOARD PAGE
   --------------------------------------------------------------------- */

.dashboard-container {
    --page-pad: 1rem;
    display: grid;
    grid-template-columns: 1fr 5fr;
    min-height: 100vh;
}

.dashboard-container .main-container {
    padding-bottom: 2rem;
}

/* ----- greeting ----- */

.dashboard-container .top2 {
    display: block;
    padding: 1.1rem var(--page-pad) 0.25rem;
}

.dashboard-container .top2 .box1 {
    width: auto;
}

.dashboard-container .top2 .box1 h1 {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--ink);
}

.dashboard-container .top2 .box1 span {
    display: block;
    margin-top: 0.3rem;
    font-size: 0.95rem;
    font-weight: 400;
    color: var(--muted);
}

/* ----- stat cards ----- */

.dashboard-container .stats {
    padding: 0.75rem var(--page-pad) 1rem;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
}

.dashboard-container .stat-card {
    --accent: var(--brand);
    --accent-soft: var(--brand-soft);
    position: relative;
    overflow: hidden;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.dashboard-container .stat-card::after {
    content: "";
    position: absolute;
    top: -2.2rem;
    right: -2.2rem;
    width: 6.5rem;
    height: 6.5rem;
    border-radius: 50%;
    background-color: var(--accent-soft);
    opacity: .75;
}

.dashboard-container .active-orders-box {
    --accent: var(--orange);
    --accent-soft: var(--orange-soft);
}

.dashboard-container .completed-today-box {
    --accent: var(--blue);
    --accent-soft: var(--blue-soft);
}

.dashboard-container .todays-sales-box {
    grid-column: 1 / -1;
}

.dashboard-container .stat-icon {
    position: relative;
    z-index: 1;
    width: 2.6rem;
    height: 2.6rem;
    display: grid;
    place-items: center;
    background-color: var(--accent);
    border-radius: 14px;
    box-shadow: 0 10px 18px -10px var(--accent);
}

.dashboard-container .stat-icon i {
    font-size: 1.1rem;
    color: #fff;
}

.dashboard-container .stat-body {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.dashboard-container .stat-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--muted);
}

.dashboard-container .stat-value {
    font-size: clamp(1.55rem, 6vw, 2rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* ----- orders list ----- */

.dashboard-container .middle-content {
    display: block;
    padding: 0.75rem var(--page-pad) 0;
}

.dashboard-container .orders-container {
    width: auto;
    margin: 0;
    padding: 0;
    background: none;
    border: 0;
}

.dashboard-container .orders-heading {
    width: auto;
    padding: 0.25rem 0 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dashboard-container .orders-heading .head-left {
    padding: 0;
}

.dashboard-container .orders-heading .head-text h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--ink);
}

.dashboard-container .orders-heading .head-right {
    padding: 0;
    border: 0;
    display: block;
}

.dashboard-container .orders-heading .head-right span {
    padding: 0.3rem 0.8rem;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--brand-dark);
    background-color: var(--brand-soft);
    border-radius: 999px;
}

.dashboard-container .orders-heading .head-right span::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 50%;
    background-color: #16a34a;
    animation: live-dot 2s ease-out infinite;
}

@keyframes live-dot {
    0% {
        box-shadow: 0 0 0 0 rgba(22, 163, 74, .5);
    }

    80%,
    100% {
        box-shadow: 0 0 0 7px rgba(22, 163, 74, 0);
    }
}

.dashboard-container .orders-container .orders-content {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 24rem), 1fr));
    align-items: start;
    gap: 0.9rem;
}

/* shown automatically when there are no order cards */
.dashboard-container .orders-content:not(:has(.each-order))::before {
    content: "No active orders right now. New orders will appear here.";
    grid-column: 1 / -1;
    padding: 2.5rem 1rem;
    text-align: center;
    color: var(--muted);
    background-color: var(--surface);
    border: 1.5px dashed var(--line);
    border-radius: var(--radius);
}

/* ----- one order card (same markup as before, new layout) ----- */

.dashboard-container .orders-content .each-order {
    width: auto;
    margin: 0;
    padding: 1rem;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "token meta status"
        "items items items"
        "total total action";
    align-items: center;
    gap: 0.8rem 0.9rem;
    background-color: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    animation: card-in .35s ease both;
}

@keyframes card-in {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
}

.dashboard-container .each-order .token-box {
    grid-area: token;
    width: auto;
    min-width: 3.6rem;
    padding: 0.45rem 0.6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #1fbf5f, #0b8a45);
    border-radius: 14px;
}

.dashboard-container .each-order .token-box.orange {
    background: linear-gradient(135deg, #ff9d42, #ea6b00);
}

.dashboard-container .token-box> :first-child {
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, .88);
}

.dashboard-container .token-box .token-number {
    font-size: 1.7rem;
    font-weight: 700;
    line-height: 1.05;
    color: #fff;
}

.dashboard-container .each-order .customer-name {
    grid-area: meta;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.dashboard-container .order-info .customer-name .name,
.dashboard-container .each-order .customer-name .name {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ink);
}

.dashboard-container .customer-name .timeago {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.dashboard-container .timeago .icon {
    display: flex;
}

.dashboard-container .timeago .icon i {
    font-size: 0.8rem;
    color: var(--muted);
}

.dashboard-container .timeago span {
    overflow: hidden;
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    text-overflow: ellipsis;
    color: var(--muted);
}

/* status pill: colours follow data-order-status, and the old
   light-orange / light-green classes still work too */

.dashboard-container .each-order .order-status {
    grid-area: status;
    justify-self: end;
    padding: 0.3rem 0.8rem;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: capitalize;
    color: #0b66b4;
    background-color: var(--blue-soft);
    border-radius: 999px;
}

.dashboard-container .each-order .order-status[data-order-status="preparing"],
.dashboard-container .each-order .order-status.light-orange {
    color: #b45309;
    background-color: var(--orange-soft);
}

.dashboard-container .each-order .order-status[data-order-status="ready"],
.dashboard-container .each-order .order-status.light-green {
    color: var(--brand-dark);
    background-color: var(--brand-soft);
}

.dashboard-container .each-order .order-status[data-order-status="completed"] {
    color: #4b5d53;
    background-color: #eceff1;
}

/* items */

.dashboard-container .each-order .order-info {
    grid-area: items;
    width: auto;
    min-width: 0;
    display: block;
}

.dashboard-container .order-items {
    width: auto;
    padding: 0.5rem 0.85rem;
    display: flex;
    flex-direction: column;
    gap: 0;
    background-color: #f5f8f6;
    border-radius: 12px;
}

.dashboard-container .order-items .order-head,
.dashboard-container .order-content {
    width: auto;
    padding: 0.4rem 0;
    display: grid;
    grid-template-columns: 2.9rem minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.6rem;
}

.dashboard-container .order-head {
    border-bottom: 1px solid var(--line);
}

.dashboard-container .order-head span {
    font-size: 0.68rem;
    font-weight: 600;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
}

.dashboard-container .order-content+.order-content {
    border-top: 1px dashed var(--line);
}

.dashboard-container .order-content span {
    font-size: 0.95rem;
    font-weight: 600;
    text-align: left;
    color: var(--ink);
}

.dashboard-container .order-content .item {
    min-width: 0;
    overflow-wrap: anywhere;
}

.dashboard-container .order-content .qty {
    width: max-content;
    padding: 0.1rem 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--brand-dark);
    background-color: var(--brand-soft);
    border-radius: 8px;
}

.dashboard-container .order-content .qty::after {
    content: "×";
    margin-left: 0.1rem;
    opacity: .7;
}

.dashboard-container .order-head .price,
.dashboard-container .order-content .price {
    text-align: right;
    white-space: nowrap;
}

/* footer: total + action */

.dashboard-container .each-order .total {
    grid-area: total;
    padding: 0;
}

.dashboard-container .each-order .total span {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--ink);
}

.dashboard-container .each-order .owner-action {
    grid-area: action;
    justify-self: end;
    width: auto;
    background-color: transparent;
}

.dashboard-container .each-order .owner-action:has(.ownerActionBtn:empty) {
    display: none;
}

.dashboard-container .each-order .owner-action button {
    width: auto;
    padding: 0.6rem 1.1rem;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    color: #fff;
    background: linear-gradient(135deg, #14a653, #0b8a45);
    border-radius: 12px;
    box-shadow: 0 10px 18px -12px #0b8a45;
    transition: transform .12s ease, filter .15s ease;
}

.dashboard-container .each-order .owner-action button:hover {
    filter: brightness(1.07);
}

.dashboard-container .each-order .owner-action button:active {
    transform: scale(.97);
}


/* ---------------------------------------------------------------------
   6. RESPONSIVE
   --------------------------------------------------------------------- */

/* ----- tablets and up ----- */
@media (min-width: 640px) {

    .dashboard-container {
        --page-pad: 1.5rem;
    }

    .top-pannel .top1 {
        padding: 0.75rem 1.5rem;
    }

    .dashboard-container .top2 {
        padding-top: 1.5rem;
    }

    .dashboard-container .top2 .box1 h1 {
        font-size: 1.9rem;
    }

    .dashboard-container .stats {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 1rem;
    }

    .dashboard-container .todays-sales-box {
        grid-column: auto;
    }

    .dashboard-container .stat-card {
        padding: 1.2rem;
    }

    .dashboard-container .stat-icon {
        width: 2.9rem;
        height: 2.9rem;
    }

    .dashboard-container .orders-container .orders-content {
        gap: 1.1rem;
    }
}

/* ----- desktop ----- */
@media (min-width: 951px) {

    .dashboard-container {
        --page-pad: 2rem;
    }

    .top-pannel .top1 {
        padding: 0.8rem 2rem;
    }
}

@media (hover: hover) {

    .dashboard-container .stat-card,
    .dashboard-container .orders-content .each-order {
        transition: transform .2s ease, box-shadow .2s ease;
    }

    .dashboard-container .stat-card:hover,
    .dashboard-container .orders-content .each-order:hover {
        transform: translateY(-2px);
        box-shadow: 0 1px 2px rgba(16, 38, 26, .05), 0 18px 34px -16px rgba(16, 38, 26, .3);
    }
}

/* ----- sidebar becomes a slide-in drawer (matches responsive.js: < 950px) ----- */
@media (max-width: 950px) {

    .dashboard-container {
        grid-template-columns: 0fr minmax(0, 5fr);
    }

    .sidebar-container {
        position: fixed;
        top: 0;
        left: 0;
        z-index: 60;
        width: min(17.5rem, 86vw);
        height: 100vh;
        height: 100dvh;
        transform: translateX(-105%);
        transition: transform .3s cubic-bezier(.4, 0, .2, 1), box-shadow .3s ease;
    }

    .sidebar.open .sidebar-container {
        transform: none;
        box-shadow: 0 0 40px rgba(0, 0, 0, .35);
    }

    /* dark backdrop behind the open drawer (tap it to close) */
    .sidebar::before {
        content: "";
        position: fixed;
        inset: 0;
        z-index: 55;
        visibility: hidden;
        opacity: 0;
        background-color: rgba(3, 20, 10, .5);
        transition: opacity .3s ease, visibility .3s ease;
    }

    .sidebar.open::before {
        visibility: visible;
        opacity: 1;
    }

    .sidebar .crossMark {
        margin: -0.25rem -0.25rem 0.25rem;
        display: flex;
        justify-content: flex-end;
    }

    .crossMark .icon {
        width: 2.25rem;
        height: 2.25rem;
        display: grid;
        place-items: center;
        cursor: pointer;
        background-color: rgba(255, 255, 255, .08);
        border-radius: 50%;
    }

    .crossMark .icon i {
        font-size: 1.05rem;
        color: #fff;
    }

    .top1 .shop-info {
        justify-content: space-between;
    }

    .shop-info .head-left {
        display: flex;
    }
}

/* ----- small phones ----- */
@media (max-width: 480px) {

    .info .shop-name {
        max-width: 7rem;
    }
}

/* narrow phones: the status pill moves under the customer so nothing gets cut off */
@media (max-width: 420px) {

    .dashboard-container .orders-content .each-order {
        grid-template-areas:
            "token meta   meta"
            "token status status"
            "items items  items"
            "total total  action";
        row-gap: 0.7rem;
    }

    .dashboard-container .each-order .order-status {
        justify-self: start;
        align-self: start;
    }
}

@media (max-width: 360px) {

    .shop-info .info {
        padding-right: 0.25rem;
    }

    .info .shop-name {
        display: none;
    }

    .dashboard-container .each-order .token-box {
        min-width: 3.2rem;
    }
}

@media (prefers-reduced-motion: reduce) {

    .dashboard-container *,
    .sidebar-container,
    .sidebar::before {
        animation: none !important;
        transition: none !important;
    }
}