/* ===== Design tokens (same colors as original) ===== */
:root {
    --font-sans: "Nunito Sans", sans-serif;
    --radius: 0.5rem;
    --radius-md: calc(var(--radius) - 2px);

    --brand-mark: oklch(0.64 0.19 35);
    --brand-mark-foreground: oklch(1 0 0);
    --category-active: oklch(0.88 0.19 96);
    --category-active-foreground: oklch(0.18 0.02 80);
    --order-bar: oklch(0.13 0.005 60);
    --order-foreground: oklch(1 0 0);
    --overlay: oklch(0.15 0.005 60);
    --card-shadow: oklch(0.2 0.005 60 / 12%);
    --bar-shadow: oklch(0.2 0.005 60 / 16%);
    --primary-shadow: oklch(0.58 0.2 150 / 32%);

    --background: oklch(1 0 0);
    --foreground: oklch(0.2 0.015 60);
    --card: oklch(1 0 0);
    --popover: oklch(1 0 0);
    --primary: oklch(0.67 0.21 151);
    --primary-foreground: oklch(1 0 0);
    --secondary: oklch(0.965 0.003 80);
    --muted-foreground: oklch(0.48 0.01 60);
    --destructive: oklch(0.577 0.245 27.325);
    --border: oklch(0.91 0.004 80);
    --ring: var(--primary);

    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    --shadow-2xl: 0 25px 50px -12px rgb(0 0 0 / 0.25);
}

/* ===== Reset ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    border-color: var(--border);
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background-color: var(--background);
    color: var(--foreground);
    font-family: var(--font-sans);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
p {
    margin: 0;
}

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

button {
    font: inherit;
    color: inherit;
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
}

button:focus-visible {
    outline: none;
    box-shadow: 0 0 0 1px var(--ring);
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.no-scrollbar {
    scrollbar-width: none;
}

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.icon {
    display: block;
    flex-shrink: 0;
    pointer-events: none;
}

/* ===== Base button (shadcn "Button" replacement) ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    white-space: nowrap;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    transition: background-color .15s, color .15s;
}

.btn-ghost:hover {
    background: var(--secondary);
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.btn-primary:hover {
    background: color-mix(in oklab, var(--primary) 90%, transparent);
}

.btn-icon {
    height: 2.25rem;
    width: 2.25rem;
}

/* ===== Layout ===== */
.app {
    min-height: 100dvh;
    padding-bottom: 8rem;
}

.container {
    margin: 0 auto;
    max-width: 48rem;
}

/* ===== Header ===== */
.header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1rem 0.75rem;
}

.brand {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
}

.brand-mark {
    display: grid;
    height: 2.25rem;
    width: 2.25rem;
    flex-shrink: 0;
    place-items: center;
    border-radius: var(--radius-md);
    background: var(--brand-mark);
    color: var(--brand-mark-foreground);
    font-size: 1.375rem;
    line-height: 1.75rem;
    font-weight: 700;
}

.brand-text {
    min-width: 0;
}

.brand-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.125rem;
    line-height: 1.5rem;
    font-weight: 700;
}

.brand-info {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.75rem;
    line-height: 1rem;
    color: var(--muted-foreground);
}

.brand-table {
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    color: var(--primary);
}

.lang {
    position: relative;
    flex-shrink: 0;
}

.lang-btn {
    height: 2.5rem;
    border-radius: 9999px;
    border: 1px solid var(--border);
    background: var(--background);
    padding: 0 0.75rem;
    font-size: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.lang-btn:hover {
    background: var(--secondary);
}

.lang-menu {
    position: absolute;
    right: 0;
    top: 3rem;
    z-index: 20;
    min-width: 8rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: var(--popover);
    padding: 0.25rem;
    box-shadow: var(--shadow-lg);
}

.lang-item {
    width: 100%;
    height: 2.25rem;
    justify-content: flex-start;
    padding: 0 1rem;
}

/* ===== Categories ===== */
.cats {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: 1rem;
    padding: 0 1rem 1.75rem;
}

.cat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    width: 4.75rem;
    flex-shrink: 0;
    scroll-snap-align: start;
}

.cat-thumb {
    display: grid;
    height: 4.25rem;
    width: 4.25rem;
    place-items: center;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--secondary);
    transition: background-color .15s;
}

.cat.active .cat-thumb {
    background: var(--category-active);
}

.cat-thumb img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.cat-icon {
    font-size: 1.875rem;
    line-height: 2.25rem;
    color: var(--category-active-foreground);
}

.cat-name {
    width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-align: center;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

.cat.active .cat-name {
    font-weight: 600;
    color: var(--foreground);
}

/* ===== Food grid & cards ===== */
.grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0 1rem 2rem;
}

.card {
    position: relative;
    min-width: 0;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
    background: var(--card);
    box-shadow: 0 3px 16px var(--card-shadow);
    transition: transform .15s;
}

.card:active {
    transform: scale(0.99);
}

.card-open {
    display: block;
    width: 100%;
    min-width: 0;
    text-align: left;
}

.card-open:hover {
    background: var(--card);
}

.card-img {
    aspect-ratio: 1 / 1;
    width: 100%;
    overflow: hidden;
    background: var(--secondary);
}

.card-img img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    transition: transform .3s;
}

.card:hover .card-img img {
    transform: scale(1.035);
}

.card-info {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: space-between;
    gap: 0.25rem;
    padding: 0.75rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
}

.card-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.card-price {
    flex-shrink: 0;
    font-variant-numeric: tabular-nums;
}

.card-fav {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
}

.fav {
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    border-radius: 9999px;
    background: color-mix(in oklab, var(--secondary) 90%, transparent);
    color: var(--muted-foreground);
}

.fav:hover {
    background: var(--secondary);
}

.fav.active {
    color: var(--destructive);
}

.fav.active svg {
    fill: currentColor;
}

/* ===== Quantity control ===== */
.qty-add {
    border-radius: 9999px;
    box-shadow: var(--shadow-md);
    height: 3.5rem;
    width: 3.5rem;
}

.qty-add.compact {
    height: 2.75rem;
    width: 2.75rem;
}

.qty {
    display: inline-flex;
    width: fit-content;
    flex-shrink: 0;
    align-items: center;
    border-radius: 9999px;
    background: var(--primary);
    color: var(--primary-foreground);
    box-shadow: var(--shadow-md);
    height: 3.5rem;
}

.qty.compact {
    height: 2.5rem;
}

.qty button {
    height: 3.5rem;
    width: 3.5rem;
    border-radius: 9999px;
    color: var(--primary-foreground);
}

.qty.compact button {
    height: 2.5rem;
    width: 2.5rem;
}

.qty button:hover {
    background: color-mix(in oklab, var(--primary) 80%, transparent);
}

.qty-num {
    width: 1.75rem;
    text-align: center;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

/* ===== Dish detail ===== */
.detail-hero {
    position: relative;
    aspect-ratio: 1 / 1;
    width: 100%;
    max-height: 480px;
    overflow: hidden;
    background: var(--secondary);
}

.detail-hero>img {
    height: 100%;
    width: 100%;
    object-fit: cover;
}

.detail-top {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 1rem 1rem 0;
}

/* back + home buttons ek saath, left me */
.detail-nav {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.back-btn {
    height: 3rem;
    width: 3rem;
    border-radius: 9999px;
    background: color-mix(in oklab, var(--background) 95%, transparent);
    box-shadow: var(--shadow-sm);
}

.back-btn:hover {
    background: color-mix(in oklab, var(--secondary) 80%, transparent);
}

.detail-title {
    position: relative;
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border);
    background: var(--background);
    padding: 1.25rem 1rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
}

.detail-title img {
    height: 2.25rem;
    width: 2.25rem;
    flex-shrink: 0;
    border-radius: 9999px;
    object-fit: cover;
}

.detail-title h1 {
    min-width: 0;
    flex: 1;
    font-size: 1.25rem;
    line-height: 1.25;
    font-weight: 600;
}

.detail-title span {
    flex-shrink: 0;
    font-size: 1rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
}

.detail-body {
    position: relative;
    min-height: 11rem;
    border-bottom: 1px solid var(--border);
    padding: 4rem 1rem 2rem;
}

.detail-qty {
    position: absolute;
    top: -1.75rem;
    right: 1.25rem;
}

.detail-desc {
    max-width: 36rem;
    font-size: 1rem;
    line-height: 1.75rem;
    color: var(--muted-foreground);
}

.tags {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

.tag {
    border-radius: 9999px;
    background: var(--secondary);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 500;
    color: var(--muted-foreground);
}

/* ===== Bottom order bar ===== */
.bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 30;
    margin: 0 auto;
    max-width: 48rem;
    padding-bottom: env(safe-area-inset-bottom);
}

.bar-btn {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    height: 4.5rem;
    width: 100%;
    border-radius: 20px 20px 0 0;
    background: var(--order-bar);
    padding: 0 1.25rem;
    text-align: left;
    color: var(--order-foreground);
    box-shadow: 0 -5px 25px var(--bar-shadow);
}

.bar-btn span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 600;
}

/* ===== Order review sheet ===== */
.backdrop {
    position: fixed;
    inset: 0;
    z-index: 40;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: color-mix(in oklab, var(--overlay) 50%, transparent);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
}

.sheet {
    display: flex;
    max-height: 92dvh;
    width: 100%;
    max-width: 42rem;
    flex-direction: column;
    overflow: hidden;
    border-radius: 22px 22px 0 0;
    background: var(--background);
    box-shadow: var(--shadow-xl);
    animation: review-enter 180ms ease-out both;
}

.sheet-head {
    display: grid;
    min-height: 4.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    background: var(--order-bar);
    padding: 1rem 1.25rem;
    color: var(--order-foreground);
}

.sheet-head h2 {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 600;
}

.close-btn {
    height: 2.5rem;
    width: 2.5rem;
    flex-shrink: 0;
    border-radius: 9999px;
}

.sheet-head .close-btn {
    color: var(--order-foreground);
}

.sheet-head .close-btn:hover {
    background: color-mix(in oklab, var(--order-foreground) 15%, transparent);
}

.sheet-body {
    overflow-y: auto;
    padding: 1.5rem 1.25rem max(24px, env(safe-area-inset-bottom));
}

.types {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    border-bottom: 1px dashed var(--border);
    padding-bottom: 1.25rem;
}

.type-btn {
    height: 3rem;
    min-width: 0;
    padding: 0 0.25rem;
    font-size: 0.75rem;
    line-height: 1rem;
    font-weight: 600;
    color: var(--foreground);
}

.type-btn.active {
    background: var(--secondary);
    color: var(--primary);
}

.lines>*+* {
    border-top: 1px dashed var(--border);
}

.line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.5rem;
    padding: 1.25rem 0;
}

.line-name {
    min-width: 0;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
}

.line-right {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.5rem;
}

.line-qty-wide {
    display: none;
}

.line-price {
    min-width: 4.25rem;
    text-align: right;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
}

.line-qty-mobile {
    grid-column: span 2;
}

.empty {
    padding: 2rem 0;
    text-align: center;
    color: var(--muted-foreground);
}

.total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
    padding: 1rem 0;
    font-size: 1.25rem;
    line-height: 1.75rem;
    font-weight: 600;
}

.total span:last-child {
    font-variant-numeric: tabular-nums;
}

.note {
    display: block;
    margin-top: 1.75rem;
}

.note textarea {
    display: block;
    width: 100%;
    resize: none;
    border: 0;
    border-radius: var(--radius);
    background: var(--secondary);
    padding: 1rem;
    font: inherit;
    font-size: 1rem;
    line-height: 1.5rem;
    color: var(--foreground);
}

.note textarea::placeholder {
    color: var(--muted-foreground);
}

.note textarea:focus {
    outline: none;
    box-shadow: 0 0 0 2px var(--ring);
}

.fields {
    margin-top: 1.5rem;
}

.fields>*+* {
    border-top: 1px solid var(--border);
}

.field {
    display: grid;
    min-height: 4rem;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr);
    align-items: center;
    gap: 1rem;
}

.field-label {
    display: flex;
    min-width: 0;
    align-items: center;
    gap: 0.5rem;
    font-weight: 500;
}

.field-label svg {
    color: var(--muted-foreground);
}

.req {
    color: var(--destructive);
}

.field input {
    min-width: 0;
    width: 100%;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--secondary);
    padding: 0.75rem;
    font: inherit;
    font-size: 1rem;
    line-height: 1.5rem;
    color: var(--foreground);
    outline: none;
}

.field input:focus {
    box-shadow: 0 0 0 2px var(--ring);
}

.error {
    margin-top: 1rem;
    font-size: 0.875rem;
    line-height: 1.25rem;
    font-weight: 500;
    color: var(--destructive);
}

.order-btn {
    display: flex;
    margin: 2.25rem auto 0;
    height: 3.25rem;
    min-width: 9rem;
    border-radius: 9999px;
    padding: 0 2.5rem;
    font-size: 1rem;
    line-height: 1.5rem;
    font-weight: 700;
    box-shadow: 0 5px 18px var(--primary-shadow);
}

/* ===== Confirmation dialog ===== */
.backdrop-center {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 1.25rem;
    background: color-mix(in oklab, var(--overlay) 45%, transparent);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
}

.confirm {
    position: relative;
    display: flex;
    min-height: 14rem;
    width: 100%;
    max-width: 28rem;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius);
    background: var(--background);
    padding: 2.5rem 2rem;
    text-align: center;
    box-shadow: var(--shadow-2xl);
    animation: confirm-enter 180ms ease-out both;
}

.confirm .close-btn {
    position: absolute;
    left: 1.25rem;
    top: 1.25rem;
}

.confirm h2 {
    margin-top: 1.25rem;
    font-size: 1.5rem;
    line-height: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.confirm p {
    margin-top: 1.25rem;
    font-size: 1.125rem;
    line-height: 1.75rem;
    font-weight: 500;
}

/* ===== Animations ===== */
@keyframes review-enter {
    from {
        transform: translateY(20px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes confirm-enter {
    from {
        transform: scale(.97);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===== sm breakpoint (>= 640px) ===== */
@media (min-width: 40rem) {
    .header {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .brand-name {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .lang-btn {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .cats {
        scroll-padding-left: 1.5rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .cat-name {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .grid {
        gap: 1rem;
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .card-info {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    .detail-top {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .detail-title {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .detail-title h1 {
        font-size: 1.5rem;
        line-height: 2rem;
    }

    .detail-body {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    .bar-btn {
        padding: 0 1.75rem;
    }

    .bar-btn span {
        font-size: 1.125rem;
        line-height: 1.75rem;
    }

    .sheet-body {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .type-btn {
        font-size: 0.875rem;
        line-height: 1.25rem;
    }

    .line-name,
    .line-price {
        font-size: 1rem;
        line-height: 1.5rem;
    }

    .line-qty-wide {
        display: inline-flex;
    }

    .line-qty-mobile {
        display: none;
    }
}

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

    .sheet,
    .confirm {
        animation: none;
    }

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== Supabase version additions ===== */
.ph {
    display: grid;
    height: 100%;
    width: 100%;
    place-items: center;
    font-size: 3rem;
    font-weight: 700;
    color: var(--muted-foreground);
    text-transform: uppercase;
}

.card.soldout .card-img img,
.card.soldout .ph {
    opacity: .45;
}

.card-img {
    position: relative;
}

.sold-badge {
    position: absolute;
    left: .5rem;
    bottom: .5rem;
    border-radius: 9999px;
    background: var(--order-bar);
    color: var(--order-foreground);
    padding: .125rem .625rem;
    font-size: .75rem;
    font-weight: 600;
}

.muted,
.muted-row {
    color: var(--muted-foreground);
}

.muted-row {
    display: flex;
    justify-content: space-between;
    padding: .625rem 0 0;
    font-size: .875rem;
}

.pays {
    margin-top: 1.25rem;
    border: 0;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    padding-bottom: 0;
}

.pay-info {
    margin-top: .75rem;
    border-radius: var(--radius);
    background: var(--secondary);
    padding: 1rem;
    text-align: center;
    font-size: .875rem;
}

.pay-info p+p {
    margin-top: .25rem;
}

.qr {
    margin: 0 auto .75rem;
    width: 11rem;
    max-width: 70%;
    border-radius: var(--radius-md);
    background: #fff;
}

.ord {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .875rem;
    margin-bottom: .75rem;
}

.ord-top,
.ord-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .75rem;
}

.ord-line {
    padding: .25rem 0;
    font-size: .875rem;
}

.ord-top {
    padding: .25rem 0;
}

.badge {
    border-radius: 9999px;
    background: var(--secondary);
    padding: .125rem .625rem;
    font-size: .75rem;
    font-weight: 600;
}

.badge.ready,
.badge.served {
    background: var(--primary);
    color: var(--primary-foreground);
}

.badge.cancelled {
    background: var(--destructive);
    color: #fff;
}

.badge.preparing,
.badge.accepted {
    background: var(--category-active);
    color: var(--category-active-foreground);
}

/* ===== Admin pages ===== */
.adm {
    max-width: 56rem;
    margin: 0 auto;
    padding: 1rem 1rem 4rem;
}

.adm h1 {
    font-size: 1.25rem;
    font-weight: 700;
}

.adm-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .5rem 0 1rem;
}

.adm-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}

.chip {
    display: inline-flex;
    align-items: center;
    height: 2.25rem;
    padding: 0 1rem;
    border-radius: 9999px;
    background: var(--secondary);
    font-size: .875rem;
    font-weight: 600;
    text-decoration: none;
    color: var(--foreground);
}

.chip.on {
    background: var(--order-bar);
    color: var(--order-foreground);
}

.login {
    max-width: 22rem;
    margin: 20vh auto 0;
    display: grid;
    gap: .75rem;
}

.login input,
.adm select {
    height: 3rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 .875rem;
    font: inherit;
    font-size: 1rem;
    background: var(--background);
    color: var(--foreground);
}

.login .btn {
    height: 3rem;
}

.acard {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .875rem;
    margin-bottom: .75rem;
    box-shadow: 0 2px 10px var(--card-shadow);
}

.acard .acts {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    margin-top: .75rem;
}

.abtn {
    height: 2.5rem;
    padding: 0 1rem;
    border-radius: 9999px;
    background: var(--secondary);
    font-weight: 600;
    font-size: .875rem;
}

.abtn.pri {
    background: var(--primary);
    color: var(--primary-foreground);
}

.abtn.bad {
    color: var(--destructive);
}

/* Menu tab: neeche chipki filter strip (All / Available / Sold out) */
.mstrip {
    position: fixed;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    z-index: 20;
    display: flex;
    gap: .5rem;
    width: 100%;
    max-width: 56rem;
    padding: .625rem 1rem calc(.625rem + env(safe-area-inset-bottom, 0px));
    background: var(--background);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 16px rgba(0, 0, 0, .06);
}

.mstrip button {
    flex: 1;
    min-height: 2.75rem; /* mobile par aasani se tap ho */
    padding: 0 .5rem;
    border-radius: 9999px;
    background: var(--secondary);
    color: var(--foreground);
    font-size: .875rem;
    font-weight: 700;
}

.mstrip button span {
    opacity: .7;
    font-weight: 600;
}

.mstrip button.on {
    background: var(--order-bar);
    color: var(--order-foreground);
}

.mstrip button[data-f="yes"].on {
    background: var(--primary); /* Available = green, jaise row ke button */
    color: var(--primary-foreground);
}

.mstrip button[data-f="no"].on {
    background: var(--destructive);
    color: #fff;
}

/* strip ke peeche last dish chhup na jaye */
#mlist {
    padding-bottom: 5rem;
}

.mrow {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .75rem 0;
    border-bottom: 1px solid var(--border);
}

.mrow small {
    display: block;
    color: var(--muted-foreground);
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
    margin-bottom: 1rem;
}

.stat {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .875rem;
}

.stat small {
    color: var(--muted-foreground);
}

.stat b {
    display: block;
    font-size: 1.375rem;
    margin-top: .125rem;
}

.panel {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .875rem;
    margin-bottom: 1rem;
}

.panel h2 {
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: .625rem;
}

.bars {
    display: flex;
    align-items: flex-end;
    gap: 2px;
    height: 7rem;
    overflow-x: auto;
}

.bars i {
    flex: 1 0 6px;
    min-width: 6px;
    background: var(--primary);
    border-radius: 3px 3px 0 0;
}

.hbar {
    display: grid;
    grid-template-columns: 7rem 1fr auto;
    gap: .5rem;
    align-items: center;
    padding: .25rem 0;
    font-size: .875rem;
}

.hbar span:first-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hbar i {
    display: block;
    height: .625rem;
    background: var(--category-active);
    border-radius: 9999px;
}

@media (min-width: 40rem) {
    .stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

/* ===== v3: notice, fly-to-cart, admin images/QR ===== */
.notice {
    margin: 0 1rem 1rem;
    border-radius: var(--radius);
    background: var(--category-active);
    color: var(--category-active-foreground);
    padding: .75rem 1rem;
    font-size: .875rem;
    font-weight: 600;
}

.ph {
    font-size: 3.5rem;
}

.cat-icon {
    font-size: 1.875rem;
}

.fly {
    position: fixed;
    z-index: 60;
    width: 56px;
    height: 56px;
    border-radius: 9999px;
    overflow: hidden;
    pointer-events: none;
    background: var(--secondary);
    box-shadow: var(--shadow-lg);
    display: grid;
    place-items: center;
    font-size: 1.75rem;
}

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

.tbl {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1.1;
}

.mleft {
    display: flex;
    align-items: center;
    gap: .75rem;
    min-width: 0;
}

.mthumb {
    width: 3rem;
    height: 3rem;
    flex-shrink: 0;
    border-radius: var(--radius-md);
    object-fit: cover;
    background: var(--secondary);
    display: grid;
    place-items: center;
}

.macts {
    display: flex;
    flex-direction: column;
    gap: .375rem;
    align-items: stretch;
    flex-shrink: 0;
}

.macts .abtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2.25rem;
    cursor: pointer;
}

.tin {
    height: 2.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 0 .75rem;
    font: inherit;
}

.qrgrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .75rem;
}

.qrcard {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: .875rem;
    text-align: center;
    break-inside: avoid;
}

.qrcard.off {
    opacity: .4;
}

.qrcard b {
    display: block;
    font-size: 1.25rem;
}

.qrcard svg {
    width: 100%;
    max-width: 11rem;
    height: auto;
    margin: .5rem auto;
    display: block;
}

@media (min-width: 40rem) {
    .qrgrid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media print {

    .adm-top,
    .adm-nav,
    .no-print {
        display: none !important;
    }

    .adm {
        padding: 0;
    }

    .qrgrid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ===== v4: edit form, single QR print ===== */
.fm label {
    display: block;
    margin-top: .875rem;
    font-size: .875rem;
    font-weight: 600;
}

.fm .chk {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: 0;
    font-weight: 500;
}

.fm .chks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .625rem;
    margin-top: 1rem;
}

.fm input[type=text],
.fm input[type=number],
.fm textarea,
.fm select {
    display: block;
    width: 100%;
    margin-top: .375rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    padding: .625rem .75rem;
    font: inherit;
    font-size: 1rem;
    color: var(--foreground);
}

.fm input[type=checkbox] {
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--primary);
}

.qrcard .acts {
    display: flex;
    justify-content: center;
    gap: .5rem;
    margin-top: .5rem;
}

@media print {
    body.print-one .qrcard:not(.print-me) {
        display: none !important;
    }

    body.print-one .qrgrid {
        grid-template-columns: 1fr;
    }

    body.print-one .print-me svg {
        max-width: 18rem;
    }
}

/* ===== v5: sections, wishlist tile, order tracker ===== */
.sec {
    grid-column: 1 / -1;
    margin-top: .75rem;
    font-size: 1.125rem;
    font-weight: 700;
}

.sec:first-child {
    margin-top: 0;
}

.cat-icon.heart {
    color: var(--destructive);
}

.steps {
    display: flex;
    gap: 4px;
    margin: .5rem 0 .25rem;
}

.steps i {
    flex: 1;
    height: .375rem;
    border-radius: 9999px;
    background: var(--secondary);
}

.steps i.on {
    background: var(--primary);
}

.ord-msg {
    margin-bottom: .375rem;
    font-size: .875rem;
    font-weight: 600;
    color: var(--primary);
}

.ord-msg.bad {
    color: var(--destructive);
}

/* Customer order cancel (sirf "Received" status me) */
.ord-note {
    margin: 0 0 .375rem;
    font-size: .8125rem;
    color: var(--muted-foreground);
}

.ord-cancel {
    margin: .5rem 0;
}

.ord-cancel.ask p {
    margin: 0 0 .5rem;
    font-size: .875rem;
    font-weight: 600;
}

.ord-cancel-row {
    display: flex;
    gap: .5rem;
}

.ord-cancel-btn,
.ord-keep-btn {
    min-height: 2.75rem; /* mobile par aasani se tap ho */
    padding: 0 1rem;
    border-radius: var(--radius);
    font-size: .875rem;
    font-weight: 700;
}

.ord-cancel-btn {
    border: 1px solid var(--destructive);
    color: var(--destructive);
    background: transparent;
}

.ord-cancel-btn:disabled {
    opacity: .6;
}

.ord-keep-btn {
    border: 1px solid var(--border);
    background: var(--secondary);
}

/* ===== v6: header buttons, wishlist sheet ===== */
.lang {
    display: flex;
    gap: .375rem;
}

.lang-btn {
    padding: 0 .625rem;
    gap: .25rem;
    white-space: nowrap;
}

.lang-btn.has svg {
    fill: currentColor;
    color: var(--destructive);
}

.wgrid {
    padding: 0;
}

/* ===== v7: search ===== */
.lang-btn {
    height: 2.25rem;
    font-size: .75rem;
}

.search {
    position: relative;
    margin: 0 1rem .875rem;
}

.search svg {
    position: absolute;
    left: .875rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--muted-foreground);
}

.search input {
    width: 100%;
    height: 2.75rem;
    border: 0;
    border-radius: 9999px;
    background: var(--secondary);
    padding: 0 1rem 0 2.5rem;
    font: inherit;
    font-size: 1rem;
    color: var(--foreground);
    outline: none;
}

.search input:focus {
    box-shadow: 0 0 0 2px var(--ring);
}

.results {
    display: none;
    padding: 0 1rem 2rem;
}

.searching .results {
    display: block;
}

.searching .cats,
.searching .grid {
    display: none;
}

.sr {
    display: flex;
    width: 100%;
    align-items: center;
    gap: .875rem;
    padding: .625rem 0;
    border-bottom: 1px solid var(--border);
    text-align: left;
}

.sr-img {
    width: 3.5rem;
    height: 3.5rem;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: var(--radius-md);
    background: var(--secondary);
}

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

.sr-img .ph {
    font-size: 1.75rem;
}

.sr-name {
    min-width: 0;
    flex: 1;
    font-weight: 600;
}

@media (min-width: 40rem) {
    .search {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }

    .results {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }
}

/* ===== v8: search row with wishlist, smaller QR buttons ===== */
.search-row {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: 0 1rem .875rem;
}

.search-row .search {
    flex: 1;
    min-width: 0;
    margin: 0;
}

.wish-btn {
    height: 2.75rem;
    flex-shrink: 0;
    padding: 0 .875rem;
}

.qrcard .acts {
    flex-wrap: wrap;
    gap: .375rem;
}

.qrcard .acts .abtn {
    height: 2rem;
    padding: 0 .75rem;
    font-size: .75rem;
}

@media (min-width: 40rem) {
    .search-row {
        margin-left: 1.5rem;
        margin-right: 1.5rem;
    }
}

/* ===== v9: login/reset ===== */
.linkbtn {
    color: var(--primary);
    font-weight: 600;
    font-size: .875rem;
    text-align: left;
    padding: 0;
}

.okmsg {
    color: var(--primary);
    font-size: .875rem;
    font-weight: 600;
}

.login .muted {
    margin-top: -.25rem;
}

/* ===== v10: location notice ===== */
.notice-btn {
    margin-left: .25rem;
    text-decoration: underline;
    font-weight: 700;
}

.detail-body .notice {
    margin: 0 0 1rem;
}

/* Admin: toast message + naye save hue dish ko highlight */
.adm-toast{position:fixed;left:50%;bottom:1.25rem;transform:translateX(-50%);max-width:90vw;padding:.75rem 1rem;border-radius:12px;background:#1f2937;color:#fff;font-size:.9rem;line-height:1.4;z-index:100;box-shadow:0 8px 24px rgba(0,0,0,.25);transition:opacity .4s;padding-bottom:calc(.75rem + env(safe-area-inset-bottom,0px))}
.adm-toast.out{opacity:0}
.mrow.flash{animation:adm-flash 1.8s ease-out}
@keyframes adm-flash{from{background:#fef3c7}to{background:transparent}}


/* ===== Bag bar (v2): bottom bar ek shopping bag jaisa ===== */
.bar-btn {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    height: 4.75rem;
}
.bar-btn .bag {
    position: relative;
    display: grid;
    place-items: center;
    flex: none;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: 9999px;
    background: var(--order-foreground);
    box-shadow: 0 4px 14px var(--bar-shadow);
}
.bar-btn .bag-icon {
    display: grid;
    place-items: center;
    color: var(--order-bar);
}
.bar-btn .bag-count {
    position: absolute;
    top: -0.25rem;
    right: -0.25rem;
    display: grid;
    place-items: center;
    min-width: 1.375rem;
    height: 1.375rem;
    padding: 0 0.3rem;
    border-radius: 9999px;
    background: var(--primary);
    color: var(--primary-foreground);
    border: 2px solid var(--order-bar);
    font-size: 0.75rem;
    font-weight: 800;
    line-height: 1;
}
.bar-btn .bar-text {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.bar-btn .bar-text b {
    max-width: 100%;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.bar-btn .bar-text small {
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1.2;
    opacity: 0.75;
    white-space: nowrap;
}
.bar-btn .bar-total {
    flex: none;
    font-size: 1.0625rem;
    font-weight: 800;
    white-space: nowrap;
}


/* ===== Fly-to-bag circle (bada aur saaf dikhe) ===== */
.fly {
    width: 76px;
    height: 76px;
    border: 3px solid #fff;
    font-size: 2.25rem;
    z-index: 80;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .35);
    will-change: transform, opacity;
}

/* ===== Order sheet: har dish ke saath photo ===== */
.line-name {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.line-thumb {
    flex: none;
    display: grid;
    place-items: center;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 0.75rem;
    overflow: hidden;
    background: var(--secondary);
}
.line-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.line-thumb .ph {
    font-size: 1.5rem;
}
.line-title {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.line-title small {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--muted-foreground);
}


/* Admin: location verify na hone wale orders ka tag */
.geo-flag {
    margin: 0.375rem 0;
    padding: 0.375rem 0.625rem;
    border-radius: 0.5rem;
    background: #fef3c7;
    color: #92400e;
    font-size: 0.8125rem;
    font-weight: 600;
    line-height: 1.35;
}


/* ===== You might also like (detail page) ===== */
.related {
    padding: 1.5rem 0 7rem; /* neeche fixed bag bar ke liye jagah */
}
.related h2 {
    margin: 0 0 0.75rem;
    padding: 0 1rem;
    font-size: 1.25rem;
    font-weight: 700;
}
.rel-row {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 0.25rem 1rem 1rem;
}
.rel-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem;
    overflow: hidden;
    border-radius: var(--radius);
    border: 1px solid color-mix(in oklab, var(--border) 60%, transparent);
    background: var(--card);
    box-shadow: 0 3px 16px var(--card-shadow);
}
.rel-media {
    position: relative;
    flex: none;
    width: 5.5rem;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: calc(var(--radius) - 4px);
    background: var(--secondary);
}
.rel-open {
    display: block;
    width: 100%;
    height: 100%;
    padding: 0;
    border: 0;
    background: none;
    cursor: pointer;
}
.rel-open img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.rel-open .ph {
    font-size: 2.5rem;
}
.rel-ctl {
    flex: none;
}
.rel-add {
    display: grid;
    place-items: center;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    border-radius: 9999px;
    box-shadow: var(--shadow-md);
}
.rel-text {
    display: flex;
    flex: 1;
    min-width: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.125rem;
    padding: 0;
    border: 0;
    background: none;
    text-align: left;
    cursor: pointer;
}
.rel-name {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: 0.9375rem;
    font-weight: 600;
    line-height: 1.3;
}
.rel-price {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--muted-foreground);
}

/* ===== Order accept celebration popup ===== */
.confirm.celebrate {
    overflow: visible;
}
.cel-emoji {
    font-size: 3.75rem;
    line-height: 1;
    animation: cel-pop 0.7s cubic-bezier(0.2, 1.4, 0.4, 1) both;
}
@keyframes cel-pop {
    from {
        transform: scale(0) rotate(-25deg);
    }
    to {
        transform: scale(1) rotate(0);
    }
}
.confirm.celebrate h2 {
    margin-top: 0.75rem;
    font-size: 1.5rem;
    font-weight: 800;
}
.confirm.celebrate p {
    margin-top: 0.5rem;
    line-height: 1.5;
    color: var(--muted-foreground);
}
.cel-link {
    margin-top: 0.5rem;
    font-weight: 600;
}


/* ===== Bag sheet (simple): naam + price, tap par detail. Total + ORDER hamesha neeche dikhte hain ===== */
.sheet-head {
    min-height: 3.5rem;
    padding: 0.5rem 1.25rem;
}
.sheet-body {
    flex: 1 1 auto;
    min-height: 0;
    padding: 0.25rem 1.25rem 1rem;
}
.line {
    display: block;
    padding: 0;
    border-bottom: 1px solid var(--border);
}
.line-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    min-height: 3.5rem;
    padding: 0.5rem 0;
    border: 0;
    background: none;
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}
.line-head .line-title {
    display: block;
    flex: 1;
    min-width: 0;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    overflow-wrap: anywhere;
}
.line-head .line-price {
    flex: none;
    min-width: 0;
    font-size: 1rem;
    font-weight: 700;
}
.chev {
    flex: none;
    display: grid;
    place-items: center;
    width: 2rem;
    height: 2rem;
    border-radius: 9999px;
    background: var(--secondary);
    color: var(--muted-foreground);
    transition: transform 0.2s;
}
.chev.up {
    transform: rotate(180deg);
}
.line-more {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.125rem 0 0.875rem;
}
.line-more[hidden] {
    display: none;
}
.line-more .line-thumb {
    width: 3rem;
    height: 3rem;
}
.line-each {
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}
.note {
    margin-top: 0.75rem;
}
.note-add {
    margin-top: 0.75rem;
    padding: 0.5rem 0;
    border: 0;
    background: none;
    color: var(--muted-foreground);
    font: inherit;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
}
.sheet-meta {
    margin: 0.5rem 0 0;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}
.sheet-foot {
    flex: none;
    padding: 0.75rem 1.25rem max(0.75rem, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: var(--background);
    box-shadow: 0 -6px 18px rgba(0, 0, 0, 0.06);
}
.sheet-err {
    margin: 0 0 0.5rem;
    max-height: 5.5rem;
    overflow: auto;
    font-size: 0.8125rem;
}
.foot-row {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.foot-total {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.2;
}
.foot-total span {
    font-size: 0.75rem;
    color: var(--muted-foreground);
}
.foot-total strong {
    font-size: 1.375rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
}
.foot-total small {
    font-size: 0.6875rem;
    color: var(--muted-foreground);
    white-space: nowrap;
}
.sheet-foot .order-btn {
    flex: 1;
    min-width: 0;
    margin: 0;
    padding: 0 1rem;
}

/* ===== Admin: Order range (map) ===== */
.geo-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.geo-help {
    margin: 0.375rem 0 0.75rem;
    font-size: 0.8125rem;
}
.geo-find {
    display: flex;
    gap: 0.5rem;
}
.geo-find input {
    flex: 1;
    min-width: 0;
}
.geo-map {
    height: 17rem;
    margin-top: 0.75rem;
    border-radius: var(--radius-md, 12px);
    overflow: hidden;
    background: var(--secondary);
    border: 1px solid var(--border);
    z-index: 0;
}
.geo-maploading {
    padding: 1rem;
    text-align: center;
}
.geo-me {
    margin-top: 0.625rem;
}
.geo-st {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
}
.geo-rad {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-top: 1rem;
}
.geo-rad output {
    font-size: 1.125rem;
    font-weight: 800;
}
.geo-card input[type="range"] {
    width: 100%;
    height: 2rem;
    padding: 0;
    border: 0;
    accent-color: var(--primary);
}
.geo-opts {
    margin: 1rem 0 0;
    padding: 0;
    border: 0;
}
.geo-opts legend {
    padding: 0;
    margin-bottom: 0.375rem;
    font-weight: 600;
}
.geo-opt {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 0.5rem;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-md, 12px);
    cursor: pointer;
}
.geo-opt input {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.125rem 0 0;
    padding: 0;
    accent-color: var(--primary);
}
.geo-opt small {
    display: block;
    margin-top: 0.125rem;
    font-size: 0.8125rem;
    font-weight: 400;
    color: var(--muted-foreground);
}
.geo-pin {
    background: none;
    border: 0;
    font-size: 2rem;
    line-height: 1;
    filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.35));
}

/* Admin range card: global input styles se radio/slider na bigdein */
.geo-card .geo-opt input[type="radio"] {
    appearance: auto;
    -webkit-appearance: radio;
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
    margin: 0.125rem 0 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    accent-color: var(--primary);
}
.geo-card .geo-opt > span {
    flex: 1;
    min-width: 0;
}
.geo-card input[type="range"] {
    appearance: auto;
    -webkit-appearance: auto;
    width: 100%;
    height: 1.75rem;
    padding: 0;
    border: 0;
    background: none;
    box-shadow: none;
    accent-color: var(--primary);
}

/* .fm label / .fm input rules ko override (specificity) */
.geo-card .geo-opt {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 400;
}
.geo-card .geo-opt b {
    font-weight: 700;
}
.geo-card input[type="search"] {
    display: block;
    width: 100%;
    margin: 0;
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    background: var(--background);
    padding: 0.625rem 0.75rem;
    font: inherit;
    font-size: 1rem;
    color: var(--foreground);
}
.geo-card .geo-find input[type="search"] {
    flex: 1;
}
.geo-card .geo-rad label {
    margin-top: 0;
}


/* ===== Bag bar: yellow + thoda upar (floating) ===== */
.bar {
    bottom: 0.75rem; /* screen ke kinare se thoda upar */
    padding: 0 0.75rem env(safe-area-inset-bottom);
}
.bar-btn {
    border-radius: 20px;
    background: var(--category-active); /* site wala yellow */
    color: var(--category-active-foreground);
    box-shadow: 0 6px 22px var(--bar-shadow);
}
.bar-btn .bag {
    background: var(--category-active-foreground); /* yellow par dark circle */
}
.bar-btn .bag-icon {
    color: var(--category-active);
}
.bar-btn .bag-count {
    border-color: var(--category-active);
}
.bar-btn .bar-text small {
    opacity: 0.85;
    font-weight: 600;
}
.bar-btn .bar-text b {
    font-size: 1.25rem; /* bada likha dikhe */
    font-weight: 800;
    line-height: 1.2;
}

/* ===== Kitchen alerts ===== */
.adm-top-r {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}
.acard .ord-line em {
    display: block; /* special request / add-on saaf dikhe, kitchen se chhute nahi */
    margin-top: 0.125rem;
    padding: 0.125rem 0.5rem;
    border-radius: 0.5rem;
    background: #fff3bf;
    color: #4a3b00;
    font-style: normal;
    font-weight: 700;
}
.acard .ord-line em::before {
    content: "📝 ";
}
.late {
    color: var(--destructive);
    font-weight: 700;
}

/* Daily sales chart ke neeche pehli aur aakhri date */
.bar-dates {
    display: flex;
    justify-content: space-between;
    margin-top: 0.375rem;
    font-size: 0.75rem;
    color: var(--muted-foreground);
}

/* Categories manager */
.crow {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0.5rem 0;
}
.crow .tin {
    flex: 1;
    min-width: 0;
}
.crow small {
    white-space: nowrap;
}

/* ===== Batch 6 ===== */
/* Bada text (A+): poori site ka text ~18% bada */
.notice.paused {
    background: #ffe3e0;
    color: #7a1b12;
    font-weight: 700;
}
.ord-policy {
    margin: 0 0 0.5rem;
    padding: 0 1rem;
    font-size: 0.8125rem;
    color: var(--muted-foreground);
}
/* Admin: Orders band/chalu bar */
.pausebar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--radius);
    background: var(--secondary);
    font-weight: 700;
}
.pausebar.on {
    background: #ffe3e0;
    color: #7a1b12;
}

/* ===== Bill / receipt print ===== */
#bill-print {
    display: none;
}
.tag.low {
    background: #ffe3e0;
    color: #7a1b12;
    font-weight: 700;
}
@media print {
    html.printing-bill body > *:not(#bill-print) {
        display: none !important;
    }
    html.printing-bill #bill-print {
        display: block !important;
    }
    #bill-print {
        font: 13px/1.35 "Courier New", monospace;
        color: #000;
        background: #fff;
    }
    #bill-print .bill {
        width: 76mm;
        margin: 0 auto;
    }
    #bill-print h1 {
        margin: 0 0 4px;
        text-align: center;
        font-size: 18px;
    }
    #bill-print p {
        margin: 2px 0;
    }
    #bill-print .c {
        text-align: center;
    }
    #bill-print .row {
        display: flex;
        justify-content: space-between;
    }
    #bill-print .tot {
        font-size: 16px;
        font-weight: 700;
    }
    #bill-print hr {
        border: 0;
        border-top: 1px dashed #000;
        margin: 6px 0;
    }
    #bill-print table {
        width: 100%;
        border-collapse: collapse;
    }
    #bill-print th,
    #bill-print td {
        padding: 2px 0;
        text-align: left;
        vertical-align: top;
    }
    #bill-print .r {
        text-align: right;
    }
    #bill-print small {
        font-size: 11px;
    }
}

/* ===== Kitchen safety: item-wise tick ===== */
.ord-line .tick {
    display: flex;
    align-items: flex-start;
    gap: 0.625rem;
    width: 100%;
    cursor: pointer;
}
.ord-line .tick input {
    flex: none;
    width: 1.375rem;
    height: 1.375rem;
    margin-top: 0.125rem;
    accent-color: var(--primary);
}
.ord-line.done span {
    text-decoration: line-through;
    opacity: 0.55;
}

/* ===== Coupon ===== */
.coupon-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}
.coupon-row input {
    flex: 1;
    min-width: 0;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
    text-transform: uppercase;
}
.coupon-row.ok {
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius);
    background: #e6f6ea;
    color: #14532d;
    font-weight: 700;
}

/* ===== Admin v5: simple Tables page + Settings accordion ===== */
.tbl-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
    flex-wrap: wrap;
}

.tbl-add {
    display: flex;
    gap: .5rem;
    flex: 1;
    min-width: 14rem;
}

.tbl-add .tin {
    flex: 1;
    min-width: 0;
}

.tbl-help {
    margin: .5rem 0 1rem;
    font-size: .8125rem;
}

.trlist {
    display: grid;
    gap: .5rem;
}

.trow {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
}

.trow>summary,
.acc>summary {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .875rem 1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
}

.trow>summary::-webkit-details-marker,
.acc>summary::-webkit-details-marker {
    display: none;
}

.trow>summary::after,
.acc>summary::after {
    content: "▾";
    margin-left: auto;
    color: var(--muted-foreground, #777);
    transition: transform .15s;
}

.trow[open]>summary::after,
.acc[open]>summary::after {
    transform: rotate(180deg);
}

.trow.off b {
    opacity: .5;
}

.tbadge {
    font-size: .6875rem;
    font-weight: 700;
    padding: .125rem .5rem;
    border-radius: 9999px;
    background: var(--secondary);
}

.trow .qrcard {
    border: 0;
    border-top: 1px solid var(--border);
    border-radius: 0;
}

.trow .qrcard b {
    display: none;
}

.acc {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: .75rem;
    box-shadow: 0 2px 10px var(--card-shadow);
}

.acc>summary {
    font-size: 1rem;
}

.acc>.acard {
    border: 0;
    box-shadow: none;
    margin: 0;
    padding: 0 1rem 1rem;
}

.acc .fm label:first-child {
    margin-top: 0;
}

.newc {
    margin-top: 1rem;
}

.newc>summary {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    list-style: none;
}

.newc>summary::-webkit-details-marker {
    display: none;
}

@media print {
    .trlist {
        grid-template-columns: repeat(2, 1fr);
        gap: .75rem;
    }

    .trow {
        break-inside: avoid;
    }

    .trow>summary b {
        display: block;
        text-align: center;
        font-size: 1.25rem;
        padding-top: .5rem;
    }

    .trow>summary::after {
        display: none;
    }

    body.print-one .trow:not(.print-me) {
        display: none !important;
    }

    body.print-one .trlist {
        grid-template-columns: 1fr;
    }
}

/* ===== Admin v5: Orders tab (simple cards) ===== */
.seg {
    display: flex;
    gap: 2px;
    padding: 3px;
    margin-bottom: .75rem;
    border-radius: var(--radius-md);
    background: var(--secondary);
}

.seg button {
    flex: 1;
    height: 2.125rem;
    border-radius: calc(var(--radius-md) - 2px);
    font-size: .8125rem;
    font-weight: 600;
    color: var(--muted-foreground);
}

.seg button.on {
    background: var(--background);
    color: var(--foreground);
    box-shadow: 0 1px 4px var(--card-shadow);
}

.pausebar {
    padding: .375rem .375rem .375rem .875rem;
    font-size: .875rem;
}

.pausebar .abtn {
    height: 2rem;
    font-size: .75rem;
}

.ocard {
    padding: 1rem;
}

.ocard.s-new {
    border-left: 4px solid var(--primary);
}

.ocard.s-cancelled {
    opacity: .6;
}

.ocard .tbl {
    font-size: 1.25rem;
    font-weight: 800;
}

.ocard .ometa {
    font-size: .8125rem;
    margin-top: .125rem;
}

.ocard .oitems {
    margin: .625rem 0;
    padding: .5rem 0;
    border-top: 1px dashed var(--border);
    border-bottom: 1px dashed var(--border);
}

.ocard .ofoot {
    padding: 0;
}

.omain {
    margin-top: .75rem;
}

.abtn.big {
    width: 100%;
    height: 3rem;
    font-size: 1rem;
}

.omore {
    margin-top: .5rem;
}

.omore>summary {
    display: inline-block;
    padding: .375rem .25rem;
    cursor: pointer;
    list-style: none;
    font-size: .8125rem;
    font-weight: 600;
    color: var(--muted-foreground);
}

.omore>summary::-webkit-details-marker {
    display: none;
}

.omore .acts {
    margin-top: .25rem;
}

/* ===== Utility classes (inline style="" ki jagah) ===== */
[hidden] { display: none !important; }
.grow { flex: 1 !important; min-width: 0 !important; }
.my-sm { margin: .5rem 0 !important; }
.m0 { margin: 0 !important; }
.mt-sm { margin-top: .5rem !important; }
.mt-md { margin-top: .75rem !important; }
.mt-lg { margin-top: 1rem !important; }
.mt-xl { margin-top: 1.5rem !important; }
.py-lg { padding-top: 1rem !important; padding-bottom: 1rem !important; }
.fs-sm { font-size: .8125rem !important; }
.w-5 { width: 5rem !important; }
.no-ul { text-decoration: none !important; }
.span-all { grid-column: 1 / -1 !important; }
.pt-center { padding-top: 30vh !important; }
.err-center { padding: 30vh 1rem 0 !important; text-align: center !important; }
.btn-retry { margin-top: 1rem !important; padding: .75rem 1.5rem !important; }
.mthumb-lg { width: 6rem !important; height: 6rem !important; }
.wrap-any { min-width: 0 !important; overflow-wrap: anywhere !important; }

/* ===== Admin: Table payments (checkbox se orders chuno) ===== */
.tpay {
    margin-bottom: .75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--background);
    box-shadow: 0 2px 10px var(--card-shadow);
}
.tpay>summary {
    display: flex;
    align-items: center;
    padding: .875rem 1rem;
    cursor: pointer;
    list-style: none;
    font-weight: 700;
    font-size: .9375rem;
}
.tpay>summary::-webkit-details-marker { display: none; }
.tpay>summary::after {
    content: "▾";
    margin-left: auto;
    color: var(--muted-foreground);
    transition: transform .15s;
}
.tpay[open]>summary::after { transform: rotate(180deg); }
.tgrp {
    padding: .875rem 1rem;
    border-top: 1px solid var(--border);
}
.tline {
    display: flex;
    align-items: center;
    gap: .625rem;
    padding: .5rem 0;
    font-size: .875rem;
}
.tline input[type="checkbox"] {
    flex: none;
    width: 1.25rem;
    height: 1.25rem;
}
.tline span { flex: 1; min-width: 0; }
.tline b { flex: none; }
.tsum {
    margin: .25rem 0 .625rem;
    font-size: .8125rem;
}
.tact {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
}
.tact .tin {
    flex: 1 1 100%;
    min-width: 0;
}
.tact .abtn {
    flex: 1 1 auto;
    white-space: nowrap;
    padding-inline: .625rem;
}
