:root {
    --primary: #651413;
    --primary-dark: #430909;
    --secondary: #f2cb29;
    --accent: #eba526;
    --cream: #fff8df;
    --ink: #33211f;
    --muted: #78645d;
    --line: #ead9ad;
    --white: #fff;
    --sidebar: 270px;
    --shadow: 0 12px 35px rgba(78, 43, 29, .08);
}

* { box-sizing: border-box; }
html { min-height: 100%; scroll-behavior: smooth; }
body { margin: 0; min-height: 100%; font-family: "Tajawal", Arial, sans-serif; background: #f8f2df; color: var(--ink); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.loading, .public-loading { min-height: 100vh; display: grid; place-items: center; color: var(--primary); font-weight: 800; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 0 0 auto; width: var(--sidebar); padding: 22px 16px; display: flex; flex-direction: column; z-index: 30; color: #fff; background: linear-gradient(165deg, #3f0709, #651413 52%, #811d1c); box-shadow: -12px 0 32px rgba(61, 27, 18, .18); }
.brand { display: flex; align-items: center; gap: 12px; padding: 5px 5px 24px; border-bottom: 1px solid rgba(255,255,255,.18); }
.brand-official { display: grid; justify-items: center; text-align: center; gap: 10px; }
.brand img { width: 54px; height: 54px; object-fit: contain; padding: 5px; border-radius: 15px; background: #fff; }
.brand-official img { width: min(100%, 210px); height: auto; padding: 0; border-radius: 0; background: transparent; }
.brand-official small { color: #ffe8a1; font-size: 13px; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 18px; }
.brand small { margin-top: 3px; color: #f5d86a; }
.sidebar nav { display: grid; gap: 7px; margin-top: 22px; }
.sidebar nav a { display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 12px; color: #fff3c0; text-decoration: none; font-weight: 700; transition: .18s ease; }
.sidebar nav a span { width: 25px; text-align: center; font-size: 19px; }
.sidebar nav a.active, .sidebar nav a:hover { background: #fff; color: var(--primary); box-shadow: 0 8px 20px rgba(59, 19, 13, .22); transform: translateX(-2px); }
.sidebar-foot { margin-top: auto; padding: 16px 8px 5px; border-top: 1px solid rgba(255,255,255,.18); color: #ffeaa0; font-size: 14px; }
.status-dot { display: inline-block; width: 9px; height: 9px; margin-left: 7px; border-radius: 50%; background: #68d391; box-shadow: 0 0 0 4px rgba(123, 228, 149, .14); }
.content { min-height: 100vh; margin-right: var(--sidebar); }
.content > header { position: sticky; top: 0; z-index: 20; height: 74px; padding: 0 28px; display: flex; align-items: center; gap: 14px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); backdrop-filter: blur(10px); }
.content > header b, .content > header small { display: block; }
.content > header small { margin-top: 2px; color: var(--muted); }
.avatar { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 50%; background: var(--secondary); color: #54100f; font-weight: 800; }
.header-preview { margin-right: auto; padding: 9px 14px; border-radius: 10px; background: var(--cream); color: var(--primary); text-decoration: none; font-weight: 800; }
.menu-btn { display: none; border: 0; padding: 8px 11px; border-radius: 9px; background: var(--cream); color: var(--primary); font-size: 19px; cursor: pointer; }
.page-body { padding: 28px; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 24px; }
.page-title h1 { margin: 0; font-size: 29px; }
.page-title p, .muted { margin: 5px 0 0; color: var(--muted); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 43px; padding: 10px 17px; border: 0; border-radius: 11px; text-decoration: none; cursor: pointer; font-weight: 800; transition: .18s ease; }
.btn:hover { transform: translateY(-1px); }
.btn:disabled { opacity: .58; cursor: not-allowed; transform: none; }
.primary { background: var(--primary); color: #fff; box-shadow: 0 8px 20px rgba(101, 20, 19, .2); }
.ghost { background: #f7f1ed; color: var(--ink); }
.whatsapp { background: #1e9d5a; color: #fff; }
.full { width: 100%; }
.panel, .stats article, .cards-list article, .product-card { background: #fff; border: 1px solid var(--line); border-radius: 17px; box-shadow: var(--shadow); }
.panel { padding: 21px; }
.panel h2 { margin: 0; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.stats article { min-height: 92px; padding: 18px; display: flex; align-items: center; gap: 13px; }
.stats small, .stats strong { display: block; }
.stats small { color: var(--muted); }
.stats strong { margin-top: 4px; font-size: 26px; }
.stat-icon { flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--cream); color: var(--primary); font-size: 21px; font-weight: 900; }
.grid-2 { display: grid; grid-template-columns: 1.25fr .9fr; gap: 18px; margin-top: 20px; }
.setup-steps { display: grid; gap: 10px; }
.setup-steps a { display: flex; align-items: center; gap: 12px; padding: 13px; border: 1px solid #f0e5dd; border-radius: 13px; background: #fffbed; text-decoration: none; transition: .18s ease; }
.setup-steps a:hover { border-color: #e3c84f; transform: translateX(-3px); }
.setup-steps a > span { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 900; }
.setup-steps b, .setup-steps small { display: block; }
.setup-steps small { margin-top: 3px; color: var(--muted); }
.service-card { position: relative; overflow: hidden; background: linear-gradient(145deg, #fff, #fff8df); }
.service-card::after { content: ""; position: absolute; width: 180px; height: 180px; left: -70px; bottom: -90px; border-radius: 50%; background: rgba(242, 203, 41, .18); }
.service-icon { width: 55px; height: 55px; display: grid; place-items: center; border-radius: 17px; background: var(--secondary); font-size: 26px; }
.service-card h2 { margin-top: 16px; }
.service-card p { color: var(--muted); line-height: 1.8; }
.service-features { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 15px; color: var(--accent); font-weight: 700; }
.subscription-note { display: inline-block; margin-top: 18px; padding: 7px 10px; border-radius: 9px; background: #fff; color: var(--muted); border: 1px solid var(--line); }
.alert { margin-bottom: 16px; padding: 13px 15px; border-radius: 11px; border: 1px solid transparent; font-weight: 600; }
.alert-success { color: #17653f; background: #e6f6ed; border-color: #bce6ce; }
.alert-error { color: #922f25; background: #fff0ed; border-color: #f1cbc4; }
.alert-info { color: #70531d; background: #fff8df; border-color: #efdea1; }
.alert a { font-weight: 800; }
.editor-panel { margin-bottom: 18px; border-top: 4px solid var(--secondary); }
.form-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.form-grid label, .color-grid label { display: grid; gap: 7px; color: #4a3c36; font-weight: 700; }
.form-grid input, .form-grid select, .form-grid textarea, .filter-bar input, .filter-bar select, .copy-box input, .color-grid input[type="text"], .slug-input input { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 10px; outline: none; background: #fff; color: var(--ink); }
.form-grid textarea { resize: vertical; }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus, .filter-bar input:focus, .filter-bar select:focus { border-color: #d6b71d; box-shadow: 0 0 0 3px rgba(101,20,19,.08); }
.category-form { grid-template-columns: 1.5fr .7fr .7fr 1fr; align-items: end; }
.item-form, .settings-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.span-two { grid-column: span 2; }
.switch-field { display: flex !important; align-items: center; gap: 10px !important; min-height: 43px; align-self: end; padding: 10px 12px; border-radius: 10px; background: #fffbed; border: 1px solid #ead9ad; }
.switch-field input { width: 18px !important; height: 18px; accent-color: var(--primary); }
.form-actions { display: flex; gap: 10px; margin-top: 18px; }
.cards-list { display: grid; gap: 10px; }
.cards-list article { display: flex; align-items: center; gap: 14px; padding: 14px; }
.grow { flex: 1; }
.cards-list h3 { margin: 0 0 4px; }
.cards-list small { color: var(--muted); }
.category-icon { width: 49px; height: 49px; display: grid; place-items: center; border-radius: 14px; background: var(--cream); font-size: 23px; }
.badge { display: inline-flex; align-items: center; padding: 6px 10px; border-radius: 999px; font-size: 12px; font-weight: 800; }
.success { background: #e1f4e9; color: #18724a; }
.neutral { background: #f0ece9; color: #796961; }
.icon-btn { border: 0; padding: 8px 11px; border-radius: 9px; background: #f5ece7; color: var(--primary); cursor: pointer; font-weight: 800; }
.danger-icon { background: #fff0ed; color: #a23429; }
.empty-state { grid-column: 1 / -1; min-height: 160px; padding: 30px; display: grid; place-items: center; text-align: center; color: var(--muted); border: 1px dashed #ddcfc6; border-radius: 15px; background: rgba(255,255,255,.65); }
.empty-state > span { font-size: 38px; }
.empty-state h3 { margin: 7px 0 0; color: var(--ink); }
.empty-state p { margin: 3px 0; }
.filter-bar { display: grid; grid-template-columns: 1fr 240px; gap: 12px; margin-bottom: 18px; }
.product-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.product-card { overflow: hidden; }
.food-image { position: relative; height: 180px; display: grid; place-items: center; overflow: hidden; background: linear-gradient(145deg, #fff1df, #f5c699); font-size: 62px; }
.food-image img { width: 100%; height: 100%; object-fit: cover; }
.featured-ribbon { position: absolute; top: 12px; right: 12px; padding: 6px 10px; border-radius: 999px; background: var(--secondary); color: #4c2b16; font-size: 12px; }
.product-content { padding: 16px; }
.product-meta, .price-line, .card-actions { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.product-meta small { color: var(--muted); }
.product-content h3 { margin: 13px 0 5px; }
.product-content p { min-height: 45px; margin: 0 0 13px; color: var(--muted); line-height: 1.6; }
.price-line strong { color: var(--primary); font-size: 18px; }
.price-line del { color: #a28f85; }
.card-actions { justify-content: flex-start; margin-top: 15px; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.slug-input { display: flex; direction: ltr; align-items: stretch; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #f5f0ec; }
.slug-input span { padding: 11px; color: var(--muted); }
.slug-input input { border: 0; border-radius: 0; direction: ltr; }
.color-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.color-grid label > div { display: grid; grid-template-columns: 48px 1fr; gap: 8px; }
.color-grid input[type="color"] { width: 48px; height: 43px; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.color-grid input:not([type="color"]) { width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 9px; direction: ltr; }
.theme-preview { margin-top: 18px; border-radius: 15px; overflow: hidden; border: 1px solid var(--line); background: var(--preview-bg); }
.theme-cover { height: 85px; display: grid; place-items: center; background: linear-gradient(145deg, var(--preview-primary), color-mix(in srgb, var(--preview-primary), #000 25%)); color: #fff; }
.theme-cover span { padding: 8px 13px; border-radius: 50px; background: rgba(255,255,255,.16); }
.theme-body { padding: 15px; }
.theme-body b, .theme-body small { display: block; }
.theme-body small { color: #76685f; }
.theme-body button { margin-top: 11px; padding: 8px 12px; border: 0; border-radius: 9px; background: var(--preview-accent); color: #fff; }
.share-grid { display: grid; grid-template-columns: 380px 1fr; gap: 20px; align-items: start; }
.qr-card { text-align: center; }
.qr-frame { width: 300px; height: 300px; margin: 0 auto 16px; display: grid; place-items: center; border-radius: 22px; background: #fff; border: 12px solid var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
#menu-qr img, #menu-qr canvas { display: block; max-width: 260px; max-height: 260px; }
.qr-card h2 { margin-bottom: 5px; }
.qr-card p { color: var(--muted); }
.eyebrow { color: var(--primary); font-weight: 800; }
.share-details > h2 { margin: 7px 0; font-size: 27px; }
.copy-box { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin: 22px 0 10px; direction: ltr; }
.copy-box input { direction: ltr; background: #faf8f6; }
.copy-box button { border: 0; padding: 0 18px; border-radius: 10px; background: var(--primary); color: #fff; font-weight: 800; cursor: pointer; }
.inline-message { color: var(--accent); font-weight: 700; }
.share-actions { display: flex; gap: 10px; margin-top: 18px; }
.share-details hr { margin: 25px 0; border: 0; border-top: 1px solid var(--line); }
.use-cases { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.use-cases span { padding: 12px; border-radius: 11px; background: var(--cream); font-weight: 700; }
.backdrop { display: none; }

/* Public menu */
.public-layout { min-height: 100vh; background: #eee4c9; }
.public-menu { --menu-primary: #651413; --menu-secondary: #f2cb29; --menu-accent: #eba526; --menu-bg: #fff8df; width: min(100%, 720px); min-height: 100vh; margin: 0 auto; background: var(--menu-bg); box-shadow: 0 0 45px rgba(48,35,31,.14); }
.menu-hero { position: relative; min-height: 315px; display: grid; place-items: end center; padding: 35px 22px; color: #fff; text-align: center; background: linear-gradient(145deg, var(--menu-primary), #360708); background-size: cover; background-position: center; overflow: hidden; }
.menu-hero::before { content: ""; position: absolute; width: 230px; height: 230px; right: -90px; top: -90px; border-radius: 50%; background: rgba(255,255,255,.08); }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(to top, rgba(33,18,14,.86), rgba(33,18,14,.2)); }
.hero-content { position: relative; z-index: 2; }
.public-logo { width: 84px; height: 84px; margin: 0 auto 12px; display: grid; place-items: center; overflow: hidden; border: 5px solid rgba(255,255,255,.85); border-radius: 50%; background: #fff; color: var(--menu-primary); font-size: 36px; box-shadow: 0 10px 30px rgba(0,0,0,.18); }
.public-logo img { width: 100%; height: 100%; object-fit: cover; }
.hero-content h1 { margin: 0; font-size: 31px; }
.hero-content p { max-width: 520px; margin: 7px auto 13px; color: #fff0b0; line-height: 1.7; }
.open-state { display: inline-flex; padding: 7px 12px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.open-state.is-open { color: #dff9e8; background: rgba(36, 125, 74, .82); }
.open-state.is-closed { color: #fff0ec; background: rgba(132,42,32,.75); }
.restaurant-info { padding: 15px 18px; background: #fff; border-bottom: 1px solid #eee2d9; text-align: center; }
.restaurant-info > span { display: block; color: #79685f; font-size: 14px; }
.contact-links { display: flex; justify-content: center; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.contact-links a { padding: 7px 13px; border: 1px solid color-mix(in srgb, var(--menu-primary), #fff 65%); border-radius: 999px; color: var(--menu-primary); text-decoration: none; font-weight: 800; font-size: 13px; }
.public-search { position: relative; margin: 15px 16px 10px; }
.public-search span { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); color: #89766d; font-size: 23px; }
.public-search input { width: 100%; padding: 13px 44px 13px 13px; border: 1px solid #e5d8cf; border-radius: 13px; background: #fff; outline: none; }
.category-tabs {
    position: sticky;
    top: 0;
    z-index: 8;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    gap: 8px;
    max-width: 100%;
    overflow: visible;
    padding: 10px 16px 13px;
    background: color-mix(in srgb, var(--menu-bg), #fff 50%);
    backdrop-filter: blur(10px);
}
.category-tabs button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 0 0 auto;
    max-width: 100%;
    padding: 9px 14px;
    border: 1px solid #eaded5;
    border-radius: 999px;
    background: #fff;
    color: #594940;
    cursor: pointer;
    font-weight: 800;
    white-space: nowrap;
}

/* Keep categories on one swipeable row on phones, while desktop/tablet wraps them
   so no category is cut off at the edge of the public menu. */
@media (max-width: 620px) {
    .category-tabs {
        flex-wrap: nowrap;
        justify-content: flex-start;
        overflow-x: auto;
        overflow-y: hidden;
        scroll-snap-type: inline proximity;
        scroll-padding-inline: 16px;
        overscroll-behavior-inline: contain;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .category-tabs::-webkit-scrollbar { display: none; }
    .category-tabs button { scroll-snap-align: start; }
}
.category-tabs button.active { border-color: var(--menu-primary); background: var(--menu-primary); color: #fff; box-shadow: 0 7px 18px color-mix(in srgb, var(--menu-primary), transparent 75%); }
.public-products { padding: 5px 16px 28px; }
.menu-section { margin-top: 18px; }
.section-title { display: flex; align-items: center; gap: 9px; margin-bottom: 11px; }
.section-title > span { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: color-mix(in srgb, var(--menu-secondary), #fff 60%); }
.section-title h2 { margin: 0; font-size: 21px; }
.menu-items-list { display: grid; gap: 11px; }
.public-product-card { display: grid; grid-template-columns: 128px 1fr; gap: 14px; padding: 10px; border: 1px solid #eadfd7; border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(66,42,31,.05); }
.public-product-image { position: relative; min-height: 122px; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: linear-gradient(145deg, #fff0db, #f5cca3); font-size: 47px; }
.public-product-image img { width: 100%; height: 100%; object-fit: cover; }
.public-product-image b { position: absolute; top: 7px; right: 7px; padding: 4px 8px; border-radius: 999px; background: var(--menu-secondary); color: #4a2b18; font-size: 11px; }
.public-product-content { padding: 4px 0 3px; }
.public-product-content h3 { margin: 0 0 5px; font-size: 18px; }
.public-product-content p { margin: 0 0 8px; color: #806f66; line-height: 1.55; font-size: 14px; }
.item-notes { display: flex; flex-wrap: wrap; gap: 6px; }
.item-notes small { padding: 4px 7px; border-radius: 7px; background: #f7f2ee; color: #806f66; }
.public-price { display: flex; align-items: center; gap: 9px; margin-top: 10px; }
.public-price strong { color: var(--menu-primary); font-size: 17px; }
.public-price del { color: #9b8980; font-size: 13px; }
.menu-empty, .public-error { min-height: 65vh; display: grid; place-items: center; align-content: center; padding: 30px; text-align: center; color: #7c6a61; }
.menu-empty span, .public-error span { font-size: 52px; }
.menu-empty h3, .public-error h1 { margin: 10px 0 2px; color: #3b2a24; }
.menu-empty p, .public-error p { margin: 0; }
.public-error { min-height: 100vh; background: #fff8df; }
.public-footer { padding: 25px 18px 32px; text-align: center; background: #fff; border-top: 1px solid #eaded5; }
.public-footer b, .public-footer span { display: block; }
.public-footer span { margin-top: 4px; color: #8b786f; font-size: 13px; }

@media (max-width: 1120px) {
    .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .settings-grid { grid-template-columns: 1fr; }
}

@media (max-width: 850px) {
    :root { --sidebar: 280px; }
    .sidebar { transform: translateX(105%); transition: .25s ease; }
    .sidebar.open { transform: translateX(0); }
    .backdrop.show { display: block; position: fixed; inset: 0; z-index: 25; background: rgba(0,0,0,.48); }
    .content { margin-right: 0; }
    .menu-btn { display: block; }
    .header-preview { display: none; }
    .content > header { padding: 0 15px; }
    .avatar { margin-right: auto; }
    .page-body { padding: 18px; }
    .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .grid-2, .share-grid { grid-template-columns: 1fr; }
    .qr-card { max-width: 440px; width: 100%; margin: auto; }
    .category-form { grid-template-columns: 1fr 1fr; }
    .category-form .switch-field { grid-column: span 2; }
}

@media (max-width: 620px) {
    .page-title { align-items: flex-start; }
    .page-title h1 { font-size: 24px; }
    .page-title .btn { min-height: 40px; padding: 9px 12px; white-space: nowrap; }
    .stats { gap: 10px; }
    .stats article { min-height: 82px; padding: 13px; }
    .stats strong { font-size: 22px; }
    .stat-icon { width: 42px; height: 42px; }
    .service-features, .use-cases { grid-template-columns: 1fr; }
    .form-grid, .item-form, .settings-form, .category-form, .color-grid { grid-template-columns: 1fr; }
    .span-two, .category-form .switch-field { grid-column: auto; }
    .product-grid { grid-template-columns: 1fr; }
    .filter-bar { grid-template-columns: 1fr; }
    .share-actions { flex-direction: column; }
    .qr-frame { width: 280px; height: 280px; }
    .public-menu { width: 100%; box-shadow: none; }
    .menu-hero { min-height: 285px; }
    .hero-content h1 { font-size: 27px; }
    .public-product-card { grid-template-columns: 105px 1fr; gap: 11px; }
    .public-product-image { min-height: 108px; }
}

/* Authentication and system-owner area */
.signed-user { display: flex; align-items: center; gap: 9px; }
.signed-user > div { min-width: 0; }
.signed-user b, .signed-user small { display: block; }
.signed-user b { max-width: 165px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.signed-user small { margin-top: 2px; color: #f3d36c; }
.logout-button { width: 100%; margin-top: 13px; padding: 10px 12px; border: 1px solid rgba(255,255,255,.25); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-weight: 800; cursor: pointer; }
.logout-button:hover { background: var(--secondary); color: var(--primary-dark); border-color: var(--secondary); }

.login-page { min-height: 100vh; display: grid; grid-template-columns: minmax(470px, 1.15fr) minmax(420px, .85fr); background: #fffaf0; }
.login-visual { position: relative; min-height: 100vh; padding: 38px 52px; display: flex; flex-direction: column; overflow: hidden; color: #fff; background: linear-gradient(150deg, #3a0708 0%, #651413 55%, #811d1c 100%); }
.login-visual::before { content: ""; position: absolute; inset: 0 0 auto; height: 165px; opacity: .2; background: radial-gradient(circle at 10px 15px, #f2cb29 0 4px, transparent 5px) 0 0 / 44px 44px; }
.login-visual::after { content: ""; position: absolute; width: 560px; height: 220px; right: -80px; bottom: -80px; border-radius: 50%; background: #f2cb29; transform: rotate(-9deg); }
.login-brand { position: relative; z-index: 2; display: flex; align-items: center; gap: 13px; }
.login-brand img { width: 68px; height: 68px; object-fit: contain; padding: 6px; border-radius: 18px; background: #fff; }
.login-brand-official img { width: min(100%, 260px); height: auto; padding: 0; border-radius: 0; background: transparent; }
.login-brand strong, .login-brand span { display: block; }
.login-brand strong { font-size: 22px; }
.login-brand span { margin-top: 3px; color: #f7dc78; }
.login-copy { position: relative; z-index: 2; max-width: 650px; margin: auto 0; padding: 60px 0 120px; }
.login-kicker { display: inline-flex; padding: 8px 15px; border: 1px solid rgba(242,203,41,.55); border-radius: 999px; background: rgba(242,203,41,.12); color: #f8d94c; font-weight: 800; }
.login-copy h1 { max-width: 620px; margin: 20px 0 13px; font-size: clamp(36px, 5vw, 64px); line-height: 1.25; }
.login-copy p { max-width: 590px; margin: 0; color: #f2d8ce; font-size: 18px; line-height: 1.9; }
.login-features { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 28px; }
.login-features span { padding: 10px 13px; border-radius: 11px; background: rgba(255,255,255,.1); color: #fff8dc; font-weight: 700; }
.food-shapes { position: absolute; z-index: 2; left: 40px; bottom: 30px; display: flex; align-items: end; gap: 6px; font-size: 58px; filter: drop-shadow(0 12px 18px rgba(0,0,0,.22)); }
.food-shapes span:nth-child(2) { font-size: 48px; transform: translateY(-18px); }
.food-shapes span:nth-child(3) { font-size: 72px; }
.food-shapes span:nth-child(4) { font-size: 65px; transform: translateY(-10px); }
.login-form-side { min-height: 100vh; padding: 30px; display: grid; place-items: center; background: linear-gradient(135deg, #fffdf7, #fff4c7); }
.login-card { width: min(100%, 470px); padding: 36px; border: 1px solid #ead9ad; border-radius: 24px; background: rgba(255,255,255,.94); box-shadow: 0 25px 70px rgba(101,20,19,.14); }
.login-card-heading { text-align: center; }
.login-icon { width: 62px; height: 62px; margin: 0 auto 13px; display: grid; place-items: center; border-radius: 18px; background: var(--secondary); font-size: 27px; box-shadow: 0 10px 25px rgba(242,203,41,.28); }
.login-card-heading h2 { margin: 0; font-size: 29px; color: var(--primary); }
.login-card-heading p { margin: 7px 0 25px; color: var(--muted); }
.login-card form { display: grid; gap: 17px; }
.login-card label { display: grid; gap: 7px; color: #513431; font-weight: 800; }
.login-card input { width: 100%; padding: 13px 14px; border: 1px solid #dbcaa0; border-radius: 11px; background: #fffefa; outline: none; }
.login-card input:focus { border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(242,203,41,.17); }
.login-submit { min-height: 50px; margin-top: 3px; font-size: 16px; background: linear-gradient(135deg, #651413, #861f1d); }
.login-note { margin-top: 22px; padding: 13px 14px; border-radius: 12px; background: #fff7d8; border: 1px solid #f0da83; }
.login-note b, .login-note span { display: block; }
.login-note b { color: var(--primary); }
.login-note span { margin-top: 3px; color: #725e34; font-size: 13px; }
.full { width: 100%; }

.owner-title .eyebrow { display: block; margin-bottom: 6px; }
.secondary-action { background: var(--secondary); color: var(--primary-dark); box-shadow: 0 8px 22px rgba(242,203,41,.26); }
.owner-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 20px; }
.owner-stats article { min-height: 100px; padding: 18px; display: flex; align-items: center; gap: 13px; border: 1px solid var(--line); border-radius: 15px; background: #fff; box-shadow: var(--shadow); }
.owner-stats article > span { width: 50px; height: 50px; display: grid; place-items: center; border-radius: 14px; background: #fff4bd; font-size: 24px; }
.owner-stats small, .owner-stats strong { display: block; }
.owner-stats small { color: var(--muted); }
.owner-stats strong { margin-top: 3px; color: var(--primary); font-size: 25px; }
.create-account-panel { margin-bottom: 20px; border-top: 4px solid var(--secondary); }
.account-form { display: grid; gap: 22px; }
.form-section-title { display: flex; align-items: center; gap: 11px; padding-bottom: 11px; border-bottom: 1px solid var(--line); }
.form-section-title > span { width: 37px; height: 37px; display: grid; place-items: center; border-radius: 11px; background: var(--primary); color: #fff; font-weight: 900; }
.form-section-title b, .form-section-title small { display: block; }
.form-section-title small { margin-top: 2px; color: var(--muted); }
.account-form em { color: #b82424; font-style: normal; }
.form-actions { display: flex; gap: 10px; }
.accounts-heading { gap: 18px; }
.account-search { width: min(100%, 340px); padding: 11px 13px; border: 1px solid var(--line); border-radius: 10px; outline: none; }
.account-search:focus { border-color: var(--secondary); box-shadow: 0 0 0 4px rgba(242,203,41,.16); }
.accounts-list { display: grid; gap: 12px; }
.account-card { display: grid; grid-template-columns: 58px minmax(0, 1fr) auto; gap: 15px; align-items: center; padding: 16px; border: 1px solid var(--line); border-radius: 15px; background: #fffdf7; transition: .18s ease; }
.account-card:hover { transform: translateY(-1px); box-shadow: 0 12px 28px rgba(101,20,19,.08); }
.disabled-account { opacity: .72; background: #f4f0e8; }
.account-logo { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 16px; background: linear-gradient(145deg, var(--primary), #8b211f); color: var(--secondary); font-size: 25px; font-weight: 900; }
.account-name-row { display: flex; align-items: center; gap: 9px; }
.account-name-row h3 { margin: 0; font-size: 19px; }
.account-status { padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 900; }
.account-status.active { color: #166534; background: #dcfce7; }
.account-status.inactive { color: #8b1d1d; background: #fee2e2; }
.account-meta, .account-links { display: flex; flex-wrap: wrap; gap: 7px 15px; margin-top: 7px; color: var(--muted); font-size: 13px; }
.account-meta b { color: #4c3832; }
.account-links a { color: var(--primary); font-weight: 800; text-decoration: none; direction: ltr; }
.subscription { padding: 3px 7px; border-radius: 7px; font-weight: 700; }
.subscription-ok, .subscription-open { color: #166534; background: #ecfdf3; }
.subscription-soon { color: #7c5b00; background: #fff5c3; }
.subscription-expired { color: #991b1b; background: #fee2e2; }
.account-actions { display: flex; flex-direction: column; gap: 7px; min-width: 145px; }
.btn.small { min-height: 36px; padding: 7px 10px; border-radius: 9px; font-size: 12px; }
.danger-soft { color: #991b1b; background: #fee2e2; }
.success-soft { color: #166534; background: #dcfce7; }

@media (max-width: 1050px) {
    .login-page { grid-template-columns: 1fr 440px; }
    .login-visual { padding: 32px; }
    .owner-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 820px) {
    .login-page { display: block; background: #fff4c7; }
    .login-visual { min-height: 300px; padding: 24px; }
    .login-copy { padding: 38px 0 75px; }
    .login-copy h1 { font-size: 34px; }
    .login-copy p, .login-features { display: none; }
    .food-shapes { left: 18px; bottom: 10px; font-size: 40px; }
    .food-shapes span:nth-child(3), .food-shapes span:nth-child(4) { font-size: 47px; }
    .login-form-side { min-height: auto; padding: 18px; }
    .login-card { margin-top: -35px; position: relative; z-index: 4; padding: 25px; }
    .account-card { grid-template-columns: 52px 1fr; }
    .account-logo { width: 52px; height: 52px; }
    .account-actions { grid-column: 1 / -1; flex-direction: row; }
    .account-actions .btn { flex: 1; }
}

@media (max-width: 620px) {
    .owner-stats { grid-template-columns: 1fr 1fr; gap: 9px; }
    .owner-stats article { min-height: 85px; padding: 12px; }
    .owner-stats article > span { width: 42px; height: 42px; }
    .accounts-heading { display: block; }
    .account-search { width: 100%; margin-top: 12px; }
    .account-meta { display: grid; gap: 5px; }
    .form-actions { flex-direction: column; }
}

/* Language switch, self-registration and bidirectional layout */
.language-switch {
    min-width: 44px;
    min-height: 36px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    color: var(--primary);
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 5px 16px rgba(78,43,29,.07);
}
.language-switch:hover { background: var(--cream); }
.header-language-switch { margin-inline-start: auto; }
.header-preview { margin-inline-start: 0; margin-inline-end: 0; }
.login-language-switch { position: absolute; z-index: 20; top: 20px; inset-inline-end: 20px; border-color: rgba(255,255,255,.55); }
.login-page { position: relative; }
.register-card.is-register { width: min(100%, 680px); }
.registration-form { gap: 15px !important; }
.registration-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.registration-grid label { min-width: 0; }
.register-slug { display: flex; direction: ltr; border: 1px solid #dbcaa0; border-radius: 11px; overflow: hidden; background: #fffefa; }
.register-slug span { display: grid; place-items: center; padding: 0 11px; color: var(--muted); background: #f7f2e7; white-space: nowrap; }
.register-slug input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.link-button { border: 0; padding: 8px 0 0; background: transparent; color: var(--primary); font-weight: 900; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.link-button.centered { display: block; margin: 4px auto 0; }
.registration-entry .link-button { margin-top: 7px; }
.otp-input { text-align: center; letter-spacing: 9px; font-size: 25px !important; font-weight: 900; }
.otp-expiry { margin: -3px 0 7px; text-align: center; color: var(--muted); font-size: 13px; }
.registration-success { margin: 22px 0; padding: 18px; border: 1px solid #bce6ce; border-radius: 13px; background: #ecfdf3; text-align: center; }
.registration-success strong, .registration-success span { display: block; }
.registration-success strong { color: #166534; font-size: 17px; }
.registration-success span { margin-top: 7px; color: #4f6f5c; line-height: 1.7; }
.account-status.pending { color: #7c5b00; background: #fff5c3; }
.self-register-badge { padding: 3px 7px; border-radius: 7px; color: #664d03; background: #fff3cd; font-weight: 800; }
.public-menu-language-wrap { position: fixed; z-index: 50; top: 12px; left: 50%; width: min(100%, 720px); transform: translateX(-50%); pointer-events: none; padding: 0 12px; }
.public-language-switch { pointer-events: auto; float: inline-end; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); }

[dir="ltr"] { font-family: Arial, "Segoe UI", sans-serif; }
[dir="ltr"] .sidebar { inset: 0 auto 0 0; box-shadow: 12px 0 32px rgba(61,27,18,.18); }
[dir="ltr"] .content { margin-right: 0; margin-left: var(--sidebar); }
[dir="ltr"] .sidebar nav a.active,
[dir="ltr"] .sidebar nav a:hover { transform: translateX(2px); }
[dir="ltr"] .status-dot { margin-left: 0; margin-right: 7px; }
[dir="ltr"] .setup-steps a:hover { transform: translateX(3px); }
[dir="ltr"] .featured-ribbon,
[dir="ltr"] .public-product-image b { right: auto; left: 12px; }
[dir="ltr"] .public-product-image b { left: 7px; }
[dir="ltr"] .public-search span { right: auto; left: 14px; }
[dir="ltr"] .public-search input { padding: 13px 13px 13px 44px; }
[dir="ltr"] .menu-hero::before { right: auto; left: -90px; }

@media (min-width: 821px) {
    [dir="rtl"] .header-preview { margin-right: 0; }
    [dir="ltr"] .header-preview { margin-left: 0; }
}

@media (max-width: 850px) {
    [dir="ltr"] .sidebar { transform: translateX(-105%); }
    [dir="ltr"] .sidebar.open { transform: translateX(0); }
    [dir="ltr"] .content { margin-left: 0; }
    [dir="rtl"] .content { margin-right: 0; }
}

@media (max-width: 620px) {
    .registration-grid { grid-template-columns: 1fr; }
    .login-language-switch { top: 12px; inset-inline-end: 12px; }
}

/* Managed restaurant image uploads */
.image-upload-field {
    display: block;
    padding: 15px;
    border: 1px solid #ead9ad;
    border-radius: 14px;
    background: linear-gradient(145deg, #fffdf6, #fff9e8);
}
.field-caption { display: grid; gap: 4px; margin-bottom: 12px; }
.field-caption b { color: var(--primary); font-size: 15px; }
.field-caption small { color: var(--muted); line-height: 1.6; font-weight: 500; }
.image-upload-layout { display: grid; grid-template-columns: 220px 1fr; gap: 16px; align-items: center; }
.profile-image-layout { grid-template-columns: 180px 1fr; }
.image-preview {
    width: 100%;
    overflow: hidden;
    border: 1px solid #dfcfbd;
    border-radius: 14px;
    background: #f8f1e8;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.55);
}
.item-image-preview { aspect-ratio: 4 / 3; }
.logo-image-preview { width: 160px; aspect-ratio: 1 / 1; }
.cover-image-preview { width: 180px; aspect-ratio: 16 / 9; }
.image-preview img { width: 100%; height: 100%; display: block; object-fit: cover; }
.logo-image-preview img { object-fit: contain; padding: 8px; background: #fff; }
.image-placeholder { width: 100%; height: 100%; min-height: 118px; display: grid; place-items: center; align-content: center; gap: 5px; color: var(--muted); }
.image-placeholder span { font-size: 36px; }
.image-placeholder small { font-weight: 700; }
.image-upload-actions { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; }
.image-picker-btn {
    position: relative;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 9px 14px;
    border-radius: 10px;
    background: var(--primary);
    color: #fff !important;
    font-weight: 800 !important;
    cursor: pointer;
    overflow: hidden;
}
.image-picker-btn:hover { background: var(--primary-dark); }
.image-picker-btn input[type="file"] {
    position: absolute;
    width: 1px !important;
    height: 1px;
    opacity: 0;
    pointer-events: none;
}
.image-remove-btn { min-height: 42px; padding: 9px 14px; border: 1px solid #efc6bf; background: #fff0ed; color: #9a2d24; }
.selected-file { flex-basis: 100%; color: var(--muted); direction: ltr; text-align: start; font-weight: 600; word-break: break-all; }
.compact-upload-field { margin-top: 3px; }

@media (max-width: 620px) {
    .image-upload-layout,
    .profile-image-layout { grid-template-columns: 1fr; }
    .item-image-preview,
    .logo-image-preview,
    .cover-image-preview { width: 100%; max-width: none; }
    .logo-image-preview { max-height: 230px; }
    .image-upload-actions { align-items: stretch; flex-direction: column; }
    .image-picker-btn, .image-remove-btn { width: 100%; }
}

/* Password visibility controls */
.password-input-wrap {
    position: relative;
    width: 100%;
}
.password-input-wrap > input {
    padding-inline-end: 48px !important;
}
.password-eye {
    position: absolute;
    inset-inline-end: 6px;
    top: 50%;
    width: 37px;
    height: 37px;
    padding: 0;
    display: grid;
    place-items: center;
    transform: translateY(-50%);
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--primary);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}
.password-eye:hover,
.password-eye:focus-visible {
    background: #fff4bd;
    outline: none;
}

/* Subscription and payments */
.subscription-page-title .eyebrow,
.subscription-status-card .eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-weight: 900;
}
.subscription-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
    gap: 18px;
}
.subscription-status-card {
    min-height: 330px;
    display: grid;
    grid-template-columns: 82px minmax(0, 1fr);
    gap: 20px;
    align-items: start;
    background: linear-gradient(145deg, #fff, #fff9e8);
    border-top: 4px solid var(--secondary);
}
.subscription-status-card.requires-payment {
    border-top-color: var(--primary);
    background: linear-gradient(145deg, #fff, #fff2ef);
}
.subscription-state-icon {
    width: 76px;
    height: 76px;
    display: grid;
    place-items: center;
    border-radius: 22px;
    background: var(--secondary);
    color: var(--primary);
    font-size: 34px;
    box-shadow: 0 12px 26px rgba(242,203,41,.25);
}
.subscription-status-card h2 { margin: 3px 0 8px; font-size: 28px; }
.subscription-status-card p { color: var(--muted); line-height: 1.8; }
.subscription-date-row {
    margin-top: 20px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 12px;
    background: #fff;
    border: 1px solid var(--line);
}
.subscription-date-row span { color: var(--muted); }
.subscription-date-row strong { color: var(--primary); direction: ltr; }
.trial-progress-info {
    margin-top: 14px;
    padding: 14px;
    border-radius: 12px;
    background: #fff7d8;
    border: 1px solid #f0da83;
}
.trial-progress-info b,
.trial-progress-info span { display: block; }
.trial-progress-info span { margin-top: 4px; color: var(--muted); }
.subscription-plan-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(155deg, #500b0c, #791b19);
    color: #fff;
    border-color: #651413;
}
.subscription-plan-card::after {
    content: "";
    position: absolute;
    width: 220px;
    height: 220px;
    inset-inline-end: -110px;
    bottom: -120px;
    border-radius: 50%;
    background: rgba(242,203,41,.14);
}
.plan-badge {
    display: inline-flex;
    padding: 6px 10px;
    border-radius: 999px;
    background: rgba(242,203,41,.15);
    color: #ffe378;
    border: 1px solid rgba(242,203,41,.35);
    font-weight: 900;
}
.subscription-plan-card h2 { margin-top: 17px; }
.plan-price { margin: 17px 0 2px; display: flex; align-items: baseline; gap: 8px; }
.plan-price strong { font-size: 44px; color: var(--secondary); }
.plan-price span { color: #ffe9a2; font-weight: 800; }
.subscription-plan-card > p { margin-top: 0; color: #efd8ce; }
.plan-features { margin: 20px 0; padding: 0; list-style: none; display: grid; gap: 10px; color: #fff8df; }
.subscription-pay-button { position: relative; z-index: 2; background: var(--secondary); color: #54100f; box-shadow: none; }
.gateway-note { position: relative; z-index: 2; display: block; margin-top: 12px; color: #efd8ce; line-height: 1.6; }
.billing-contact-card { margin-top: 18px; }
.subscription-loading { min-height: 180px; display: grid; place-items: center; color: var(--primary); font-weight: 800; }
.subscription-nav-badge {
    margin-inline-start: auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: var(--secondary);
    color: #4b0c0c;
    font-size: 10px;
}

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

@media (max-width: 620px) {
    .subscription-status-card { grid-template-columns: 1fr; min-height: auto; }
    .subscription-date-row { align-items: flex-start; flex-direction: column; }
}

/* Administration: trial and subscription settings */
.service-subscription-settings {
    margin-bottom: 18px;
    border-top: 4px solid var(--secondary);
    background: linear-gradient(145deg, #fff, #fffaf0);
}
.subscription-settings-heading {
    align-items: center;
    gap: 18px;
}
.subscription-settings-heading h2 { margin-top: 3px; }
.subscription-settings-summary {
    min-width: 160px;
    padding: 13px 16px;
    display: grid;
    gap: 2px;
    text-align: center;
    border-radius: 14px;
    background: var(--primary);
    color: #fff;
}
.subscription-settings-summary strong { font-size: 21px; color: var(--secondary); direction: ltr; }
.subscription-settings-summary small { color: #f6dfd4; }
.subscription-settings-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-top: 14px;
}
.subscription-settings-grid label > small {
    display: block;
    margin-top: 5px;
    color: var(--muted);
    font-size: 11px;
}

.sidebar-subscription {
    margin-top: 3px;
    font-size: 10px !important;
    font-weight: 800;
}
.sidebar-subscription.active { color: #ffe275; }
.sidebar-subscription.expired { color: #ffb0a6; }

.dashboard-subscription-note {
    margin-top: 18px;
    padding: 12px 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border-radius: 12px;
    font-weight: 800;
}
.dashboard-subscription-note.active {
    background: #fff7d8;
    border: 1px solid #ecd56f;
    color: #5d4800;
}
.dashboard-subscription-note.expired {
    background: #fff0ed;
    border: 1px solid #efc6bf;
    color: #8a221c;
}
.dashboard-subscription-note a {
    color: var(--primary);
    white-space: nowrap;
    text-decoration: underline;
}

@media (max-width: 980px) {
    .subscription-settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
    .subscription-settings-heading { align-items: stretch; flex-direction: column; }
    .subscription-settings-summary { width: 100%; }
    .subscription-settings-grid { grid-template-columns: 1fr; }
    .dashboard-subscription-note { align-items: flex-start; flex-direction: column; }
}


/* Administration: manual subscription renewal */
.manual-renew-box {
    grid-column: 1 / -1;
    margin-top: 6px;
    padding: 16px;
    border: 1px solid #ecd59c;
    border-radius: 14px;
    background: linear-gradient(180deg, #fffdf8 0%, #fff8e8 100%);
}
.manual-renew-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 13px; }
.manual-renew-heading > div { display: grid; gap: 4px; }
.manual-renew-heading strong { color: var(--primary); font-size: 16px; }
.manual-renew-heading small { color: var(--muted); line-height: 1.7; }
.manual-renew-close { border: 0; background: transparent; color: var(--primary); font-size: 25px; line-height: 1; cursor: pointer; padding: 0 4px; }
.manual-renew-current, .manual-renew-preview {
    display: flex; align-items: center; justify-content: space-between; gap: 14px;
    padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.manual-renew-current { margin-bottom: 12px; }
.manual-renew-current span, .manual-renew-preview span { color: var(--muted); }
.manual-renew-current b, .manual-renew-preview strong { color: var(--primary); direction: ltr; }
.manual-renew-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 12px; }
.manual-renew-grid label { display: grid; gap: 7px; font-weight: 700; }
.manual-renew-grid input { width: 100%; }
.manual-renew-grid small { color: var(--muted); font-weight: 400; line-height: 1.6; }
.manual-renew-preview { border-color: #e3c66f; background: #fff9dd; }
.manual-renew-warning { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff1f0; color: #991b1b; font-size: 13px; }
.manual-renew-actions { display: flex; gap: 9px; margin-top: 14px; }
@media (max-width: 720px) {
    .manual-renew-grid { grid-template-columns: 1fr; }
    .manual-renew-current, .manual-renew-preview { align-items: flex-start; flex-direction: column; }
    .manual-renew-actions { flex-direction: column; }
    .manual-renew-actions .btn { width: 100%; }
}

/* =========================================================
   Restaurant operations: tables, orders, kitchen
   ========================================================= */
.operations-stats { margin-top: 15px; }
.operations-grid { align-items: start; }
.operation-meta { margin-top: 5px; color: var(--muted); font-size: 12px; direction: ltr; text-align: start; }
.compact-select { min-width: 180px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }
.page-actions-inline { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.danger-soft { background: #fff0ed !important; color: #a23429 !important; }
.ordering-settings-note { margin-top: 14px; padding: 11px 13px; border: 1px solid #ead9ad; border-radius: 11px; background: #fffbed; color: var(--muted); line-height: 1.7; }
.table-list article { flex-wrap: wrap; }
.table-qr-panel { margin-top: 18px; }
.table-qr-layout { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: center; }
.table-qr-layout .qr-frame { margin: 0; }
.table-qr-layout label { display: block; margin-bottom: 7px; font-weight: 800; }

.order-board-three { margin-top: 4px; }
.order-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.order-board > section { min-height: 440px; padding: 12px; border: 1px solid #e8ddd6; border-radius: 16px; background: #f3efeb; }
.order-board > section > h2 { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 0 12px; font-size: 17px; }
.order-board > section > h2 span { min-width: 28px; padding: 4px 8px; border-radius: 999px; background: #fff; text-align: center; font-size: 12px; }
.board-empty { padding: 24px 10px; text-align: center; color: var(--muted); }
.order-card { margin-bottom: 10px; padding: 14px; border-inline-start: 4px solid #d6cbc5; }
.order-card.status-new { border-inline-start-color: #bf6b22; }
.order-card.status-preparing { border-inline-start-color: #d5a200; }
.order-card.status-ready { border-inline-start-color: #1d8b5e; }
.order-card.status-completed { border-inline-start-color: #4b7d5e; }
.order-card.status-cancelled { border-inline-start-color: #b8574e; }
.order-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.order-card-head strong, .order-card-head small { display: block; }
.order-card-head small { margin-top: 3px; color: var(--muted); }
.order-source, .order-customer { margin: 8px 0 0; color: var(--muted); font-size: 13px; }
.order-card ul { margin: 12px 0; padding-inline-start: 20px; }
.order-card li { margin-bottom: 7px; }
.order-card li b, .order-card li small { display: block; }
.order-card li small { margin-top: 2px; color: #9a6755; }
.order-card footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; border-top: 1px solid #eee5df; padding-top: 11px; }
.order-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.badge.status-new { background: #fff0d8; color: #8a4b10; }
.badge.status-preparing { background: #fff5c9; color: #735800; }
.badge.status-ready { background: #dcf4e8; color: #176c49; }
.badge.status-completed { background: #e2efe5; color: #355e44; }
.badge.status-cancelled { background: #fbe7e4; color: #8f352d; }
.completed-orders-panel { margin-top: 18px; }
.completed-orders-list { display: grid; gap: 8px; }
.completed-orders-list article { display: grid; grid-template-columns: minmax(180px, 1fr) auto auto auto; align-items: center; gap: 12px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.completed-orders-list article div b, .completed-orders-list article div small { display: block; }
.completed-orders-list article small { color: var(--muted); }

.kitchen-live { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 17px; }
.kitchen-ticket { min-height: 320px; display: flex; flex-direction: column; padding: 20px; border-radius: 18px; background: #252321; color: #fff; box-shadow: 0 14px 30px rgba(0,0,0,.12); border-top: 7px solid #d7a51f; }
.kitchen-ticket.ready { border-top-color: #28a06b; background: #1f2a24; }
.kitchen-ticket.accepted { border-top-color: #d9802c; }
.kitchen-ticket header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kitchen-ticket header > span:first-child { color: #efc994; font-size: 13px; }
.kitchen-ticket h2 { margin: 16px 0 4px; font-size: 20px; }
.kitchen-lines { display: grid; gap: 10px; margin: 18px 0; }
.kitchen-lines > div { padding: 10px 11px; border-radius: 11px; background: rgba(255,255,255,.07); }
.kitchen-lines h3 { margin: 0; font-size: 17px; }
.kitchen-lines p { margin: 5px 0 0; color: #ffd5bf; }
.kitchen-ticket footer { margin-top: auto; }
.kitchen-ready-note { display: inline-flex; padding: 9px 12px; border-radius: 9px; background: rgba(255,255,255,.1); color: #dff7e9; }
.kitchen-empty { grid-column: 1 / -1; min-height: 360px; display: grid; place-items: center; align-content: center; text-align: center; border: 1px dashed #d9ccc4; border-radius: 18px; background: #fff; color: var(--muted); }
.kitchen-empty > span { width: 68px; height: 68px; display: grid; place-items: center; border-radius: 50%; background: #ddf4ea; color: #187456; font-size: 34px; }
.kitchen-empty h2 { margin: 14px 0 3px; color: var(--ink); }
.kitchen-empty p { margin: 0; }

/* =========================================================
   Public ordering / cart / checkout
   ========================================================= */
.table-context-badge { width: fit-content; max-width: 100%; margin: 8px auto 0; padding: 6px 10px; border-radius: 999px; background: color-mix(in srgb, var(--menu-secondary), #fff 68%); color: var(--menu-primary) !important; font-weight: 800; }
.public-price-order { justify-content: space-between; }
.quick-add-wrap { display: flex; align-items: center; gap: 7px; }
.quick-add-wrap > span { min-width: 24px; height: 24px; display: grid; place-items: center; border-radius: 999px; background: color-mix(in srgb, var(--menu-secondary), #fff 55%); color: var(--menu-primary); font-size: 12px; font-weight: 900; }
.quick-add { width: 34px; height: 34px; border: 0; border-radius: 50%; background: var(--menu-primary); color: #fff; cursor: pointer; font-size: 24px; line-height: 1; box-shadow: 0 7px 16px color-mix(in srgb, var(--menu-primary), transparent 75%); }
.ordering-unavailable-note { margin: 0 16px 20px; padding: 12px 14px; border: 1px solid #ead8c2; border-radius: 12px; background: #fff9ef; color: #7d685a; text-align: center; font-size: 13px; }
.public-menu.cart-is-open { overflow: hidden; }
.public-cart-bar { position: fixed; z-index: 30; left: 50%; bottom: 14px; transform: translateX(-50%); width: min(680px, calc(100% - 28px)); min-height: 58px; display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 11px; padding: 10px 14px; border: 0; border-radius: 15px; background: var(--menu-primary); color: #fff; cursor: pointer; box-shadow: 0 18px 36px rgba(49,25,18,.28); }
.public-cart-bar .cart-count { min-width: 34px; height: 34px; display: grid; place-items: center; padding: 0 7px; border-radius: 999px; background: var(--menu-secondary); color: #4d2d1a; font-weight: 900; }
.public-cart-bar b { text-align: start; }
.public-cart-bar strong { direction: ltr; }
.cart-backdrop { position: fixed; z-index: 70; inset: 0; background: rgba(24,14,10,.56); backdrop-filter: blur(2px); }
.public-cart-drawer { position: fixed; z-index: 80; top: 0; bottom: 0; right: max(0px, calc((100vw - 720px) / 2)); width: min(100%, 520px); display: flex; flex-direction: column; overflow: hidden; background: #fff; color: #34251f; box-shadow: -18px 0 45px rgba(0,0,0,.24); }
[dir="ltr"] .public-cart-drawer { right: auto; left: max(0px, calc((100vw - 720px) / 2)); box-shadow: 18px 0 45px rgba(0,0,0,.24); }
.public-cart-drawer > header { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border-bottom: 1px solid #eee2da; background: #fffdf9; }
.public-cart-drawer > header h2 { margin: 0; }
.public-cart-drawer > header small { color: #877268; }
.public-cart-drawer > header button { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f4ece7; color: var(--menu-primary); cursor: pointer; font-size: 24px; }
.cart-lines { overflow-y: auto; padding: 12px 16px 4px; }
.cart-lines article { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 9px; padding: 12px 0; border-bottom: 1px solid #eee5df; }
.cart-lines article .grow b, .cart-lines article .grow small { display: block; }
.cart-lines article .grow small { margin-top: 3px; color: #8b776d; }
.cart-lines article > strong { min-width: 70px; text-align: end; color: var(--menu-primary); direction: ltr; }
.cart-qty { display: flex; align-items: center; gap: 7px; }
.cart-qty button { width: 30px; height: 30px; border: 1px solid #e4d7cf; border-radius: 50%; background: #fff; color: var(--menu-primary); cursor: pointer; font-size: 19px; }
.cart-qty span { min-width: 24px; text-align: center; font-weight: 800; }
.cart-note { grid-column: 1 / -1; width: 100%; padding: 8px 10px; border: 1px solid #e9ddd5; border-radius: 9px; background: #fffaf6; outline: none; }
.checkout-section { padding: 13px 16px; border-top: 7px solid #f7f1ed; }
.checkout-section h3 { margin: 0 0 11px; }
.order-type-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-bottom: 11px; }
.order-type-options label { padding: 10px; border: 1px solid #e5d8cf; border-radius: 10px; background: #fff; cursor: pointer; font-weight: 700; }
.order-type-options label.active { border-color: var(--menu-primary); background: color-mix(in srgb, var(--menu-primary), #fff 93%); color: var(--menu-primary); }
.order-type-options input { accent-color: var(--menu-primary); }
.locked-table-order { margin-bottom: 12px; padding: 11px 12px; border: 1px solid color-mix(in srgb, var(--menu-primary), #fff 70%); border-radius: 10px; background: color-mix(in srgb, var(--menu-primary), #fff 94%); color: var(--menu-primary); font-weight: 800; }
.checkout-field { display: grid; gap: 6px; margin-top: 10px; font-weight: 700; }
.checkout-field input, .checkout-field select, .checkout-field textarea { width: 100%; padding: 10px 11px; border: 1px solid #e4d7cf; border-radius: 9px; background: #fff; outline: none; }
.cart-summary { padding: 12px 16px; border-top: 1px solid #eee2da; background: #fffdf9; }
.cart-summary > div { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 5px 0; }
.cart-summary span { color: #7f6c62; }
.cart-summary b, .cart-summary strong { direction: ltr; }
.cart-summary .grand-total { margin-top: 5px; padding-top: 10px; border-top: 1px dashed #dfd2c9; }
.cart-summary .grand-total strong { color: var(--menu-primary); font-size: 20px; }
.cart-error { margin: 0 16px 10px; padding: 10px 12px; border-radius: 9px; background: #fff0ed; color: #962f27; font-size: 13px; }
.submit-order-btn { margin: 0 16px 16px; min-height: 50px; border: 0; border-radius: 12px; background: var(--menu-primary); color: #fff; cursor: pointer; font-weight: 900; font-size: 16px; }
.submit-order-btn:disabled { opacity: .65; cursor: wait; }
.order-success-state { min-height: calc(100vh - 72px); display: grid; place-items: center; align-content: center; gap: 8px; padding: 30px; text-align: center; }
.order-success-state > span { width: 74px; height: 74px; display: grid; place-items: center; border-radius: 50%; background: #dcf4e8; color: #187456; font-size: 38px; font-weight: 900; }
.order-success-state h2, .order-success-state p { margin: 0; }
.order-success-state strong { margin: 8px 0; color: var(--menu-primary); font-size: 23px; }

@media (max-width: 1120px) {
    .kitchen-live { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
    .order-board { grid-template-columns: 1fr; }
    .order-board > section { min-height: auto; }
    .table-qr-layout { grid-template-columns: 1fr; }
    .table-qr-layout .qr-frame { margin: 0 auto; }
    .completed-orders-list article { grid-template-columns: 1fr auto; }
    .completed-orders-list article > strong, .completed-orders-list article > small { text-align: end; }
}

@media (max-width: 700px) {
    .page-actions-inline { width: 100%; align-items: stretch; }
    .page-actions-inline .compact-select { flex: 1; min-width: 0; }
    .kitchen-live { grid-template-columns: 1fr; }
    .public-cart-drawer { right: 0; left: 0; width: 100%; }
    [dir="ltr"] .public-cart-drawer { left: 0; right: 0; }
    .public-cart-bar { bottom: 9px; width: calc(100% - 18px); }
}

@media (max-width: 520px) {
    .public-product-card { grid-template-columns: 96px 1fr; }
    .public-price-order { align-items: flex-end; }
    .order-type-options { grid-template-columns: 1fr; }
    .cart-lines article { grid-template-columns: minmax(0, 1fr) auto; }
    .cart-lines article > strong { grid-column: 1 / -1; text-align: start; }
}

/* =========================================================
   Split order channels + delivery drivers
   ========================================================= */
.order-channel-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:16px; margin:8px 0 18px; }
.order-channel-card { display:grid; grid-template-columns:auto minmax(0,1fr) auto; align-items:center; gap:14px; padding:20px; border:1px solid var(--line); border-radius:18px; background:#fff; color:var(--ink); text-decoration:none; box-shadow:0 10px 28px rgba(70,45,32,.06); }
.order-channel-card:hover { transform:translateY(-1px); box-shadow:0 14px 34px rgba(70,45,32,.1); }
.order-channel-card h2 { margin:2px 0 4px; font-size:19px; }
.order-channel-card p,.order-channel-card small { margin:0; color:var(--muted); }
.order-channel-card > strong { min-width:48px; height:48px; display:grid; place-items:center; border-radius:14px; background:#f7f1ed; font-size:20px; }
.order-channel-icon { width:52px; height:52px; display:grid; place-items:center; border-radius:16px; font-size:25px; background:#fff3e7; }
.delivery-channel .order-channel-icon { background:#e8f5ef; }
.pickup-channel .order-channel-icon { background:#fff2cc; }
.order-channel-actions { display:flex; flex-wrap:wrap; gap:10px; }
.delivery-flow-summary { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:4px 0 16px; }
.delivery-flow-summary article { padding:14px 16px; border:1px solid var(--line); background:#fff; border-radius:14px; }
.delivery-flow-summary small,.delivery-flow-summary strong { display:block; }
.delivery-flow-summary strong { margin-top:4px; font-size:23px; }
.delivery-board { grid-template-columns:repeat(3,minmax(0,1fr)); }
.delivery-order-card .delivery-address { padding:9px 10px; background:#f7f3f0; border-radius:10px; color:#674f43; }
.delivery-state-row { display:flex; flex-wrap:wrap; align-items:center; justify-content:space-between; gap:8px; padding:9px 10px; margin-bottom:10px; border-radius:10px; background:#eef8f3; color:#236b51; font-size:12px; }
.delivery-mobile-note { display:inline-flex; align-items:center; padding:7px 9px; border-radius:9px; background:#edf7f2; color:#247252; font-size:12px; }
.drivers-layout { display:grid; grid-template-columns:minmax(280px,360px) minmax(0,1fr); gap:16px; }
.driver-form-panel { align-self:start; display:grid; gap:11px; }
.driver-form-panel label { display:grid; gap:6px; font-size:13px; font-weight:600; }
.driver-form-panel input[type="text"],.driver-form-panel input[type="password"],.driver-form-panel input:not([type]) { width:100%; min-height:42px; padding:9px 11px; border:1px solid var(--line); border-radius:10px; background:#fff; }
.driver-form-panel .check-row { display:flex; align-items:center; gap:8px; }
.driver-list { display:grid; gap:10px; }
.driver-list article { display:grid; grid-template-columns:auto minmax(0,1fr) auto auto auto; align-items:center; gap:10px; padding:12px; border:1px solid var(--line); border-radius:13px; background:#fff; }
.driver-list article small { display:block; color:var(--muted); }
.driver-avatar { width:44px; height:44px; display:grid; place-items:center; border-radius:13px; background:#f7eee8; font-size:21px; }
.driver-actions { display:flex; gap:6px; }
.kitchen-channel-tabs { display:flex; flex-wrap:wrap; gap:9px; margin:0 0 16px; }
.kitchen-channel-tabs button { border:1px solid var(--line); border-radius:999px; background:#fff; color:var(--ink); padding:10px 15px; cursor:pointer; font:inherit; font-weight:700; }
.kitchen-channel-tabs button.active { background:var(--primary); color:#fff; border-color:var(--primary); }
.kitchen-delivery-address { padding:8px 10px; border-radius:9px; background:rgba(255,255,255,.08); color:#f2d6c5; }

@media (max-width: 1050px) {
  .order-channel-grid { grid-template-columns:1fr; }
  .drivers-layout { grid-template-columns:1fr; }
  .delivery-flow-summary { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .driver-list article { grid-template-columns:auto minmax(0,1fr) auto; }
  .driver-list article .driver-actions { grid-column:2 / -1; }
}
@media (max-width: 640px) {
  .delivery-flow-summary { grid-template-columns:1fr 1fr; }
  .driver-list article { grid-template-columns:auto minmax(0,1fr); }
  .driver-list article > .badge,.driver-list article .driver-actions { grid-column:2; justify-self:start; }
}

/* ================= Restaurant Website Builder ================= */
.website-admin-title { align-items: flex-start; }
.website-title-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.website-theme-panel, .website-pages-panel, .website-gallery-admin, .website-messages-panel { margin-bottom: 20px; }
.website-theme-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 24px; align-items: stretch; }
.website-help { margin: 9px 0 17px; line-height: 1.7; }
.website-color-grid.is-disabled { opacity: .6; }
.website-footer-fields { margin-top: 18px; }
.website-enabled-switch { min-width: 180px; }
.website-mini-preview { min-height: 330px; overflow: hidden; border: 1px solid color-mix(in srgb, var(--site-primary, #651413) 18%, white); border-radius: 20px; background: var(--site-bg, #fff8df); box-shadow: 0 18px 40px rgba(50,20,15,.12); }
.website-mini-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 15px 18px; background: var(--site-primary, #651413); color: #fff; }
.mini-brand { display: flex; align-items: center; gap: 7px; }
.mini-brand span { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px; background: #fff; color: var(--site-primary, #651413); }
.mini-nav { display: flex; gap: 13px; font-size: 11px; opacity: .92; }
.mini-hero { min-height: 215px; padding: 35px 28px; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; background: radial-gradient(circle at 80% 45%, color-mix(in srgb, var(--site-secondary, #f2cb29) 35%, transparent), transparent 29%), linear-gradient(145deg, var(--site-primary, #651413), color-mix(in srgb, var(--site-primary, #651413) 72%, #000)); color: #fff; }
.mini-hero small { color: var(--site-secondary, #f2cb29); font-weight: 800; }
.mini-hero h3 { width: min(90%, 320px); margin: 8px 0 16px; font-size: 24px; line-height: 1.35; }
.mini-hero button { border: 0; border-radius: 9px; padding: 9px 15px; background: var(--site-secondary, #f2cb29); color: var(--site-primary, #651413); font-weight: 900; }
.mini-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 9px; padding: 14px; }
.mini-cards i { display: block; height: 46px; border-radius: 10px; background: color-mix(in srgb, var(--site-primary, #651413) 8%, white); border: 1px solid color-mix(in srgb, var(--site-primary, #651413) 12%, white); }
.website-pages-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.website-page-card { display: flex; align-items: center; gap: 13px; padding: 15px; border: 1px solid #eadfd6; border-radius: 15px; background: #fff; transition: .18s ease; }
.website-page-card:hover { border-color: #d5bdad; box-shadow: 0 9px 26px rgba(75,38,25,.07); }
.website-page-card.is-inactive { opacity: .66; background: #fbf9f7; }
.website-page-icon { flex: 0 0 auto; width: 48px; height: 48px; display: grid; place-items: center; border-radius: 14px; background: var(--cream); color: var(--primary); font-size: 23px; font-weight: 900; }
.website-page-card-head { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.website-page-card h3 { margin: 0; }
.website-page-card small { display: block; margin-top: 4px; direction: ltr; text-align: start; color: var(--muted); }
.website-page-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.website-page-meta span { padding: 4px 8px; border-radius: 999px; background: #faf1e9; color: #795147; font-size: 11px; font-weight: 700; }
.website-page-editor { margin-top: 20px; }
.website-editor-grid { margin-top: 6px; }
.website-page-image-editor { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.website-page-image-preview { width: min(100%, 460px); height: 230px; }
.website-page-image-preview img { width: 100%; height: 100%; object-fit: cover; }
.gallery-upload-btn { position: relative; overflow: hidden; cursor: pointer; }
.gallery-upload-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.website-gallery-editor-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.website-gallery-editor-grid article { overflow: hidden; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.website-gallery-editor-grid article > img { width: 100%; height: 155px; display: block; object-fit: cover; background: #f4eee8; }
.gallery-edit-fields { display: grid; gap: 7px; padding: 10px; }
.gallery-edit-fields input[type="text"], .gallery-edit-fields input:not([type]) { width: 100%; }
.gallery-edit-fields > input { width: 100%; padding: 8px 9px; border: 1px solid var(--line); border-radius: 8px; }
.gallery-edit-fields > div { display: flex; align-items: center; gap: 8px; }
.gallery-edit-fields input[type="number"] { width: 70px; padding: 7px; border: 1px solid var(--line); border-radius: 8px; }
.gallery-edit-fields label { font-size: 12px; color: var(--muted); }
.gallery-card-actions { justify-content: flex-end; }
.website-message-list { display: grid; gap: 9px; }
.website-message-list article { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid #eadfd7; border-radius: 14px; background: #fff; }
.website-message-list article.is-unread { border-color: #dfc35b; background: #fffdf5; }
.message-status-dot { width: 9px; height: 9px; margin-top: 7px; border-radius: 50%; background: #b9aca5; }
.is-unread .message-status-dot { background: var(--accent); box-shadow: 0 0 0 4px rgba(235,165,38,.15); }
.message-name-line { display: flex; justify-content: space-between; gap: 12px; }
.message-name-line h3 { margin: 0; font-size: 16px; }
.message-name-line small { color: var(--muted); }
.website-message-list p { margin: 7px 0; white-space: pre-line; line-height: 1.7; }
.message-contact { display: flex; flex-wrap: wrap; gap: 12px; color: var(--muted); font-size: 13px; direction: ltr; }

/* ================= Public Restaurant Website ================= */
.restaurant-site { --site-primary:#651413; --site-secondary:#f2cb29; --site-accent:#eba526; --site-bg:#fff8df; min-height: 100vh; background: #fff; color: #2f1e1b; }
.site-header { position: sticky; top: 0; z-index: 70; min-height: 78px; display: flex; align-items: center; gap: 22px; padding: 10px clamp(18px, 5vw, 78px); background: color-mix(in srgb, var(--site-primary) 96%, transparent); color: #fff; box-shadow: 0 8px 26px rgba(45,16,13,.13); backdrop-filter: blur(10px); }
.site-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-inline-end: auto; }
.site-logo { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; overflow: hidden; border-radius: 13px; background: #fff; color: var(--site-primary); }
.site-logo img { width: 100%; height: 100%; object-fit: contain; padding: 4px; }
.site-brand strong, .site-brand small { display: block; }
.site-brand strong { font-size: 18px; }
.site-brand small { margin-top: 2px; color: color-mix(in srgb, var(--site-secondary) 84%, white); font-size: 11px; }
.site-nav { display: flex; align-items: center; justify-content: flex-end; gap: clamp(8px, 1.6vw, 22px); }
.site-nav a, .site-language-btn { border: 0; background: transparent; color: #fff; text-decoration: none; font-weight: 700; font-size: 14px; white-space: nowrap; cursor: pointer; }
.site-nav a { position: relative; padding: 10px 2px; }
.site-nav a::after { content:""; position:absolute; inset:auto 0 1px; height:2px; transform:scaleX(0); background:var(--site-secondary); transition:.18s ease; }
.site-nav a:hover::after, .site-nav a.active::after { transform: scaleX(1); }
.site-nav .site-menu-link { padding: 9px 14px; border-radius: 9px; background: var(--site-secondary); color: color-mix(in srgb, var(--site-primary) 90%, #000); }
.site-nav .site-menu-link::after { display:none; }
.site-language-btn { padding: 8px 11px; border: 1px solid rgba(255,255,255,.35); border-radius: 9px; }
.site-mobile-nav-btn { display:none; margin-inline-start:auto; border:0; border-radius:9px; padding:8px 11px; background:rgba(255,255,255,.12); color:#fff; font-size:20px; }
.site-main { min-height: 60vh; }
.site-home-hero { position: relative; min-height: min(680px, 78vh); display: grid; align-items: center; overflow: hidden; background: radial-gradient(circle at 25% 35%, color-mix(in srgb, var(--site-secondary) 24%, transparent), transparent 28%), linear-gradient(125deg, color-mix(in srgb, var(--site-primary) 94%, #000), color-mix(in srgb, var(--site-primary) 67%, #000)); background-size: cover; background-position: center; color: #fff; }
.site-hero-overlay { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(33,10,8,.80), rgba(45,11,9,.52) 55%, rgba(45,11,9,.18)); }
[dir="rtl"] .site-hero-overlay { background: linear-gradient(270deg, rgba(33,10,8,.80), rgba(45,11,9,.52) 55%, rgba(45,11,9,.18)); }
.site-home-content { position: relative; z-index: 1; width: min(92%, 1200px); margin: 0 auto; padding: 70px 0; }
.site-kicker, .section-kicker { display: inline-block; color: var(--site-secondary); font-weight: 900; letter-spacing: .02em; }
.site-home-content h1 { width: min(780px, 90%); margin: 10px 0 15px; font-size: clamp(42px, 6.2vw, 86px); line-height: 1.05; }
.site-home-content p { width: min(680px, 92%); margin: 0; color: rgba(255,255,255,.88); font-size: clamp(17px, 2vw, 22px); line-height: 1.9; }
.site-home-actions { display:flex; flex-wrap:wrap; gap:12px; margin-top:27px; }
.site-primary-button, .site-secondary-button { display:inline-flex; align-items:center; justify-content:center; gap:7px; min-height:46px; padding:11px 20px; border:0; border-radius:10px; text-decoration:none; cursor:pointer; font-weight:900; }
.site-primary-button { background:var(--site-secondary); color:color-mix(in srgb, var(--site-primary) 90%, #000); box-shadow:0 10px 25px color-mix(in srgb, var(--site-secondary) 24%, transparent); }
.site-secondary-button { border:1px solid rgba(255,255,255,.5); background:rgba(255,255,255,.09); color:#fff; backdrop-filter:blur(8px); }
.site-feature-strip { width:min(94%, 1200px); margin:-42px auto 65px; position:relative; z-index:3; display:grid; grid-template-columns:repeat(4,1fr); border:1px solid color-mix(in srgb, var(--site-primary) 12%, white); border-radius:18px; overflow:hidden; background:#fff; box-shadow:0 18px 42px rgba(65,29,20,.11); }
.site-feature-strip article { padding:24px 20px; text-align:center; border-inline-end:1px solid #eee3db; }
.site-feature-strip article:last-child { border-inline-end:0; }
.site-feature-strip span { width:44px; height:44px; margin:0 auto 9px; display:grid; place-items:center; border-radius:13px; background:color-mix(in srgb, var(--site-secondary) 25%, white); color:var(--site-primary); font-size:20px; }
.site-feature-strip b, .site-feature-strip small { display:block; }
.site-feature-strip small { margin-top:5px; color:#7f6c64; line-height:1.5; }
.site-page-heading { min-height:285px; display:grid; place-content:center; text-align:center; padding:55px 18px; background:radial-gradient(circle at 50% 0%, color-mix(in srgb, var(--site-secondary) 20%, transparent), transparent 35%), linear-gradient(145deg, var(--site-primary), color-mix(in srgb, var(--site-primary) 78%, #000)); color:#fff; }
.site-page-heading span { color:var(--site-secondary); font-weight:800; }
.site-page-heading h1 { margin:7px 0 8px; font-size:clamp(35px,5vw,58px); }
.site-page-heading p { width:min(760px,90vw); margin:0 auto; color:rgba(255,255,255,.82); font-size:17px; line-height:1.8; }
.site-page-container, .site-content-section { width:min(92%,1180px); margin:0 auto; padding:70px 0; }
.site-content-section { display:grid; grid-template-columns:1fr 1fr; gap:55px; align-items:center; }
.site-home-intro { padding-top:55px; }
.site-prose h2, .site-home-intro h2 { margin:7px 0 16px; font-size:clamp(29px,4vw,45px); color:var(--site-primary); }
.site-rich-text { white-space:pre-line; line-height:2; color:#6d5b54; font-size:16px; }
.site-content-image { min-height:390px; overflow:hidden; border-radius:22px; background:color-mix(in srgb,var(--site-bg) 80%, white); box-shadow:0 20px 50px rgba(55,27,20,.11); }
.site-content-image img { width:100%; height:100%; min-height:390px; max-height:520px; display:block; object-fit:cover; }
.site-image-placeholder { min-height:390px; display:grid; place-items:center; font-size:78px; background:radial-gradient(circle, color-mix(in srgb,var(--site-secondary) 28%, white), var(--site-bg)); }
.site-prose .site-primary-button, .site-home-intro .site-primary-button { margin-top:15px; }
.site-gallery-intro { max-width:780px; margin:0 auto 30px; text-align:center; }
.site-gallery-grid { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:14px; }
.site-gallery-grid figure { position:relative; margin:0; min-height:230px; overflow:hidden; border-radius:16px; background:#eee; }
.site-gallery-grid figure:nth-child(5n+1) { grid-column:span 2; }
.site-gallery-grid img { width:100%; height:100%; min-height:230px; display:block; object-fit:cover; transition:.3s ease; }
.site-gallery-grid figure:hover img { transform:scale(1.035); }
.site-gallery-grid figcaption { position:absolute; inset:auto 10px 10px; padding:8px 10px; border-radius:8px; background:rgba(30,13,10,.68); color:#fff; backdrop-filter:blur(7px); font-size:13px; opacity:0; transform:translateY(7px); transition:.2s ease; }
.site-gallery-grid figure:hover figcaption { opacity:1; transform:none; }
.site-empty { min-height:260px; display:grid; place-items:center; align-content:center; text-align:center; color:#7c6b63; border:1px dashed #d9c9bd; border-radius:17px; background:#fffaf3; }
.site-empty span { font-size:46px; }
.site-empty h3 { margin:8px 0 0; }
.site-visit-grid, .site-contact-grid { display:grid; grid-template-columns:.8fr 1.2fr; gap:35px; align-items:stretch; }
.site-visit-info, .site-contact-info { display:grid; gap:12px; align-content:start; }
.site-visit-info article, .site-contact-info article { display:flex; gap:14px; padding:18px; border:1px solid #ecdfd5; border-radius:14px; background:#fff; }
.site-visit-info article > span, .site-contact-info article > span { flex:0 0 auto; width:42px; height:42px; display:grid; place-items:center; border-radius:12px; background:color-mix(in srgb,var(--site-secondary) 24%, white); color:var(--site-primary); font-size:19px; }
.site-visit-info b, .site-contact-info b { display:block; color:var(--site-primary); }
.site-visit-info p, .site-contact-info p { margin:5px 0 0; color:#6f5b53; line-height:1.65; }
.site-contact-info a { display:inline-block; margin-top:5px; color:#6f5b53; text-decoration:none; direction:ltr; }
.site-map-button { margin-top:4px; }
.site-map-visual { min-height:430px; display:grid; place-items:center; align-content:center; text-align:center; gap:8px; border-radius:22px; background:radial-gradient(circle at 60% 40%, color-mix(in srgb,var(--site-secondary) 40%, transparent), transparent 28%), linear-gradient(145deg,color-mix(in srgb,var(--site-bg) 70%, white),#e9e0d6); background-size:cover; background-position:center; color:var(--site-primary); box-shadow:0 20px 46px rgba(55,27,20,.09); }
.site-map-visual span { width:72px; height:72px; display:grid; place-items:center; border-radius:50%; background:var(--site-primary); color:#fff; font-size:30px; box-shadow:0 12px 30px rgba(60,16,14,.25); }
.site-map-visual b { font-size:24px; }
.site-map-visual small { width:min(80%,440px); color:inherit; opacity:.78; line-height:1.7; }
.site-contact-form { padding:28px; border:1px solid #e8dbd1; border-radius:20px; background:linear-gradient(145deg,#fff,#fffaf4); box-shadow:0 17px 43px rgba(55,27,20,.08); }
.site-contact-form h2 { margin:0; color:var(--site-primary); font-size:29px; }
.site-contact-form > p { margin:7px 0 20px; color:#756158; }
.site-contact-form label { display:grid; gap:6px; margin-bottom:11px; color:#503d37; font-weight:700; }
.site-contact-form input, .site-contact-form textarea { width:100%; padding:12px 13px; border:1px solid #decfc4; border-radius:9px; background:#fff; outline:none; color:#35231f; }
.site-contact-form input:focus, .site-contact-form textarea:focus { border-color:var(--site-accent); box-shadow:0 0 0 3px color-mix(in srgb,var(--site-accent) 18%, transparent); }
.site-contact-form .site-primary-button { width:100%; margin-top:4px; }
.site-contact-success { padding:17px; border-radius:12px; background:#e7f7ed; color:#176b41; font-weight:800; }
.site-contact-error { margin:8px 0; padding:10px; border-radius:9px; background:#fff0ed; color:#9b3328; }
.site-footer { display:grid; grid-template-columns:1fr auto; gap:20px 35px; align-items:center; padding:36px clamp(18px,5vw,78px); background:linear-gradient(145deg,color-mix(in srgb,var(--site-primary) 92%,#000),color-mix(in srgb,var(--site-primary) 75%,#000)); color:#fff; }
.site-footer-brand b, .site-footer-brand span { display:block; }
.site-footer-brand b { font-size:20px; }
.site-footer-brand span { margin-top:5px; color:rgba(255,255,255,.66); }
.site-footer-links { display:flex; flex-wrap:wrap; justify-content:flex-end; gap:17px; }
.site-footer-links a { color:rgba(255,255,255,.82); text-decoration:none; font-weight:700; font-size:13px; }
.site-footer small { grid-column:1/-1; padding-top:17px; border-top:1px solid rgba(255,255,255,.13); color:color-mix(in srgb,var(--site-secondary) 78%,white); }

@media (max-width: 1100px) {
    .website-gallery-editor-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
    .site-feature-strip { grid-template-columns: repeat(2,1fr); }
    .site-feature-strip article:nth-child(2) { border-inline-end:0; }
    .site-feature-strip article:nth-child(-n+2) { border-bottom:1px solid #eee3db; }
}

@media (max-width: 900px) {
    .website-theme-grid, .site-content-section, .site-visit-grid, .site-contact-grid { grid-template-columns:1fr; }
    .website-pages-grid { grid-template-columns:1fr; }
    .website-gallery-editor-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .site-mobile-nav-btn { display:block; }
    .site-nav { display:none; position:absolute; inset:78px 14px auto; padding:14px; flex-direction:column; align-items:stretch; gap:4px; border-radius:14px; background:color-mix(in srgb,var(--site-primary) 96%,#000); box-shadow:0 18px 40px rgba(30,11,8,.25); }
    .site-nav.is-open { display:flex; }
    .site-nav a, .site-language-btn { width:100%; padding:11px 12px; text-align:start; border-radius:8px; }
    .site-nav a:hover, .site-nav a.active { background:rgba(255,255,255,.09); }
    .site-nav a::after { display:none; }
    .site-nav .site-menu-link { text-align:center; }
    .site-language-btn { border:1px solid rgba(255,255,255,.2); }
    .site-home-hero { min-height:620px; }
    .site-home-content { text-align:center; }
    .site-home-content h1, .site-home-content p { margin-inline:auto; }
    .site-home-actions { justify-content:center; }
    .site-gallery-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }
    .site-gallery-grid figure:nth-child(5n+1) { grid-column:span 1; }
    .site-footer { grid-template-columns:1fr; text-align:center; }
    .site-footer-links { justify-content:center; }
}

@media (max-width: 600px) {
    .website-title-actions { width:100%; }
    .website-title-actions .btn { flex:1; }
    .website-theme-panel .panel-heading, .website-pages-panel .panel-heading, .website-gallery-admin .panel-heading { align-items:flex-start; flex-direction:column; }
    .website-enabled-switch { width:100%; }
    .mini-nav { display:none; }
    .website-gallery-editor-grid { grid-template-columns:1fr; }
    .website-gallery-editor-grid article { display:grid; grid-template-columns:130px 1fr; }
    .website-gallery-editor-grid article > img { height:100%; min-height:180px; }
    .website-page-card { align-items:flex-start; }
    .website-page-icon { width:42px; height:42px; }
    .message-name-line { flex-direction:column; gap:2px; }
    .site-header { min-height:70px; padding:8px 14px; }
    .site-logo { width:42px; height:42px; }
    .site-brand small { display:none; }
    .site-nav { inset-block-start:70px; }
    .site-home-hero { min-height:540px; }
    .site-home-content { padding:50px 12px; }
    .site-home-content h1 { font-size:42px; }
    .site-home-content p { font-size:16px; }
    .site-home-actions { display:grid; width:min(100%,330px); margin-inline:auto; margin-top:22px; }
    .site-feature-strip { width:92%; grid-template-columns:1fr; margin-top:-25px; }
    .site-feature-strip article { border-inline-end:0; border-bottom:1px solid #eee3db; }
    .site-feature-strip article:last-child { border-bottom:0; }
    .site-page-heading { min-height:235px; }
    .site-page-container, .site-content-section { width:90%; padding:45px 0; }
    .site-content-section { gap:27px; }
    .site-content-image, .site-content-image img, .site-image-placeholder { min-height:270px; }
    .site-gallery-grid { grid-template-columns:1fr; }
    .site-gallery-grid figure { min-height:240px; }
    .site-contact-form { padding:19px; }
    .site-map-visual { min-height:320px; }
    .site-footer { padding:30px 16px; }
}

/* =========================================================
   Small-screen responsive hardening - 2026-09-04
   ========================================================= */

/* Never allow a wide child to stretch the whole application. */
html,
body,
#app,
.app-shell {
    width: 100%;
    max-width: 100%;
}

/*
   لا نضع width:100% على .content في وضع سطح المكتب لأن .content لديها
   margin بمقدار عرض الـ sidebar. الجمع بين width:100% + margin كان يجعل
   الصفحة أعرض من نافذة المتصفح ويقص البطاقات من الجهة المقابلة.
*/
.content,
.page-body {
    min-width: 0;
}

html,
body {
    overflow-x: hidden;
}

img,
svg,
canvas,
video,
iframe {
    max-width: 100%;
}

/* Grid/flex children need min-width:0 so long Arabic/English text and IDs wrap. */
.content > header > *,
.page-title > *,
.panel-heading > *,
.form-grid > *,
.grid-2 > *,
.stats > *,
.owner-stats > *,
.product-grid > *,
.settings-grid > *,
.share-grid > *,
.account-card > *,
.order-board > *,
.delivery-board > *,
.drivers-layout > *,
.order-channel-grid > *,
.website-theme-grid > *,
.website-pages-grid > *,
.site-content-section > *,
.site-visit-grid > *,
.site-contact-grid > * {
    min-width: 0;
}

/* Long references/URLs/order numbers should wrap instead of creating horizontal scroll. */
.panel,
.cards-list article,
.account-card,
.order-card,
.delivery-order-card,
.kitchen-ticket,
.driver-list article,
.website-page-card,
.public-product-card,
.completed-orders-list article {
    overflow-wrap: anywhere;
    word-break: break-word;
}

/* Controls are touch friendly and cannot exceed their container. */
input,
select,
textarea,
button,
.btn {
    max-width: 100%;
}

@media (max-width: 850px) {
    :root {
        --sidebar: min(86vw, 310px);
    }

    .sidebar {
        width: var(--sidebar);
        max-width: calc(100vw - 28px);
        padding-inline: 14px;
        padding-top: calc(16px + env(safe-area-inset-top));
        padding-bottom: calc(12px + env(safe-area-inset-bottom));
    }

    .brand {
        padding-bottom: 16px;
    }

    .sidebar nav a {
        min-height: 46px;
        padding: 11px 12px;
    }

    .content > header {
        height: auto;
        min-height: 66px;
        padding: calc(9px + env(safe-area-inset-top)) 14px 9px;
        flex-wrap: nowrap;
        gap: 9px;
    }

    .content > header > div:not(.avatar) {
        flex: 1 1 auto;
        min-width: 0;
    }

    .content > header b,
    .content > header small {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .header-language-switch {
        margin-inline-start: 0;
        flex: 0 0 auto;
    }

    .avatar,
    .menu-btn {
        flex: 0 0 auto;
    }

    .page-body {
        padding: 16px;
        padding-bottom: calc(18px + env(safe-area-inset-bottom));
    }

    .page-title {
        flex-wrap: wrap;
        margin-bottom: 18px;
    }

    .page-title > div:first-child {
        flex: 1 1 260px;
    }

    .page-title > .btn,
    .page-title > .form-actions,
    .page-title > .page-actions-inline,
    .page-title > .website-title-actions {
        flex: 0 1 auto;
    }

    .panel {
        padding: 17px;
    }

    .panel-heading {
        flex-wrap: wrap;
    }

    .form-actions,
    .order-channel-actions,
    .share-actions,
    .website-title-actions,
    .manual-renew-actions {
        flex-wrap: wrap;
    }

    .copy-box {
        min-width: 0;
    }

    .copy-box input {
        min-width: 0;
    }
}

@media (max-width: 620px) {
    body {
        font-size: 15px;
    }

    .page-body {
        padding: 12px;
    }

    .content > header {
        padding-inline: 10px;
        gap: 7px;
    }

    .content > header b {
        font-size: 14px;
    }

    .content > header small {
        font-size: 11px;
    }

    .menu-btn,
    .language-switch {
        min-width: 40px;
        min-height: 40px;
        padding: 7px 9px;
    }

    .avatar {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }

    .page-title {
        display: grid;
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .page-title h1 {
        font-size: 22px;
        line-height: 1.35;
    }

    .page-title p {
        line-height: 1.65;
    }

    .page-title > .btn,
    .page-title > .form-actions,
    .page-title > .page-actions-inline,
    .page-title > .website-title-actions,
    .page-title > div:last-child:not(:first-child) {
        width: 100%;
    }

    .page-title > .btn,
    .page-title .form-actions .btn,
    .page-title .page-actions-inline .btn,
    .page-title .website-title-actions .btn {
        flex: 1 1 140px;
    }

    .panel {
        padding: 14px;
        border-radius: 14px;
    }

    .panel-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 10px;
        margin-bottom: 14px;
    }

    .panel-heading .btn,
    .panel-heading select,
    .panel-heading input {
        width: 100%;
    }

    .stats,
    .owner-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .stats article,
    .owner-stats article {
        align-items: flex-start;
        gap: 9px;
    }

    .form-actions,
    .share-actions,
    .order-channel-actions,
    .manual-renew-actions,
    .website-title-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .form-actions .btn,
    .share-actions .btn,
    .order-channel-actions .btn,
    .manual-renew-actions .btn,
    .website-title-actions .btn {
        width: 100%;
    }

    .cards-list article {
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .cards-list article .grow {
        flex: 1 1 calc(100% - 70px);
        min-width: 0;
    }

    .cards-list article .icon-btn,
    .cards-list article .btn {
        flex: 1 1 110px;
    }

    .filter-bar {
        gap: 9px;
    }

    .filter-bar input,
    .filter-bar select,
    .form-grid input,
    .form-grid select,
    .form-grid textarea {
        min-height: 44px;
        font-size: 16px;
    }

    .switch-field {
        width: 100%;
        align-self: stretch;
    }

    .copy-box {
        grid-template-columns: 1fr;
    }

    .copy-box .btn,
    .copy-box button {
        width: 100%;
    }

    .qr-frame {
        width: min(100%, 270px);
        height: auto;
        aspect-ratio: 1;
        border-width: 8px;
    }

    #menu-qr img,
    #menu-qr canvas {
        width: 100% !important;
        height: auto !important;
    }

    .account-card {
        gap: 10px;
    }

    .account-actions {
        width: 100%;
        min-width: 0;
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .account-actions .btn {
        width: 100%;
    }

    .order-channel-card {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 15px;
        gap: 11px;
    }

    .order-channel-card > strong {
        grid-column: 1 / -1;
        width: 100%;
        min-width: 0;
        height: auto;
        min-height: 38px;
        border-radius: 10px;
    }

    .delivery-flow-summary {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }

    .driver-list article {
        align-items: start;
    }

    .driver-list article .driver-actions {
        width: 100%;
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .driver-actions .btn,
    .driver-actions button {
        width: 100%;
    }

    .completed-orders-list article {
        grid-template-columns: 1fr;
        gap: 5px;
    }

    .completed-orders-list article > strong,
    .completed-orders-list article > small {
        text-align: start;
    }

    .kitchen-channel-tabs {
        flex-wrap: nowrap;
        overflow-x: auto;
        padding-bottom: 5px;
        scrollbar-width: none;
    }

    .kitchen-channel-tabs::-webkit-scrollbar {
        display: none;
    }

    .kitchen-channel-tabs button {
        flex: 0 0 auto;
        white-space: nowrap;
    }

    .kitchen-ticket {
        padding: 14px;
    }

    .website-page-card {
        flex-wrap: wrap;
    }

    .website-page-card .grow {
        flex: 1 1 calc(100% - 62px);
    }

    .website-page-card .form-actions,
    .website-page-card .gallery-card-actions {
        flex: 1 1 100%;
    }

    .website-mini-preview {
        min-height: 260px;
    }

    .mini-hero {
        min-height: 170px;
        padding: 24px 18px;
    }

    .mini-hero h3 {
        font-size: 20px;
    }

    .mini-cards {
        grid-template-columns: 1fr;
    }

    .site-page-heading h1 {
        font-size: clamp(30px, 11vw, 42px);
    }

    .site-page-heading p {
        width: min(92%, 760px);
        font-size: 15px;
    }

    .site-contact-form,
    .site-visit-info article,
    .site-contact-info article {
        padding: 15px;
    }

    .public-menu-language-wrap {
        top: max(8px, env(safe-area-inset-top));
    }

    .public-cart-bar {
        bottom: calc(8px + env(safe-area-inset-bottom));
    }

    .public-cart-drawer {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .cart-lines {
        padding-inline: 12px;
    }

    .public-product-content h3 {
        font-size: 16px;
    }

    .public-product-content p {
        font-size: 12px;
    }
}

@media (max-width: 430px) {
    .content > header small {
        display: none;
    }

    .content > header {
        min-height: 60px;
    }

    .page-body {
        padding: 10px;
    }

    .stats,
    .owner-stats,
    .delivery-flow-summary,
    .subscription-settings-grid {
        grid-template-columns: 1fr;
    }

    .stats article,
    .owner-stats article {
        min-height: 76px;
    }

    .product-card,
    .panel,
    .account-card,
    .order-card,
    .delivery-order-card,
    .kitchen-ticket {
        border-radius: 12px;
    }

    .account-card {
        grid-template-columns: 1fr;
    }

    .account-logo {
        width: 48px;
        height: 48px;
    }

    .account-actions {
        grid-template-columns: 1fr;
    }

    .driver-list article {
        grid-template-columns: 1fr;
    }

    .driver-list article > .badge,
    .driver-list article .driver-actions {
        grid-column: 1;
    }

    .driver-avatar {
        width: 40px;
        height: 40px;
    }

    .public-product-card {
        grid-template-columns: 88px minmax(0, 1fr);
        gap: 9px;
        padding: 10px;
    }

    .public-product-image {
        min-height: 94px;
    }

    .public-price {
        flex-wrap: wrap;
    }

    .public-cart-bar {
        grid-template-columns: auto minmax(0, 1fr);
        padding: 9px 11px;
    }

    .public-cart-bar > strong {
        grid-column: 1 / -1;
        text-align: center;
    }

    .cart-lines article {
        grid-template-columns: 1fr;
        gap: 7px;
    }

    .cart-lines article > strong,
    .cart-qty {
        grid-column: 1;
        justify-self: start;
    }

    .site-home-content h1 {
        font-size: clamp(34px, 12vw, 42px);
    }

    .site-home-content p {
        font-size: 14px;
    }

    .website-gallery-editor-grid article {
        grid-template-columns: 1fr;
    }

    .website-gallery-editor-grid article > img {
        min-height: 190px;
    }
}

@media (max-width: 360px) {
    .menu-btn,
    .language-switch {
        min-width: 36px;
        width: 36px;
        padding-inline: 5px;
    }

    .avatar {
        width: 34px;
        height: 34px;
    }

    .content > header b {
        font-size: 13px;
    }

    .public-product-card {
        grid-template-columns: 78px minmax(0, 1fr);
    }

    .public-product-image {
        min-height: 84px;
    }
}



/* Order invoice / 80mm thermal receipt */
.invoice-print-btn {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: #fff3cf;
    border-color: #e5bd52;
    color: #651413;
}
.invoice-print-btn:hover { background: #f8df9a; color: #4d0e0d; }

.order-invoice-page {
    min-height: 100vh;
    padding: 24px 14px 48px;
    background: #f7f2ed;
    color: #241b18;
}
.invoice-state {
    width: min(560px, 100%);
    margin: 40px auto;
    display: grid;
    gap: 12px;
}
.invoice-toolbar {
    width: min(460px, 100%);
    margin: 0 auto 14px;
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}
.order-invoice-receipt {
    width: min(420px, 100%);
    margin: 0 auto;
    background: #fff;
    border: 1px solid #e4d7cd;
    border-radius: 18px;
    padding: 22px 20px;
    box-shadow: 0 16px 50px rgba(64, 30, 22, .10);
}
.invoice-header {
    text-align: center;
    padding-bottom: 14px;
    border-bottom: 1px dashed #b9aaa0;
}
.invoice-logo {
    display: block;
    max-width: 112px;
    max-height: 82px;
    object-fit: contain;
    margin: 0 auto 8px;
}
.invoice-header h1 { font-size: 22px; margin: 0 0 5px; }
.invoice-header p { margin: 2px 0; font-size: 12px; color: #675950; }
.invoice-title {
    margin-top: 12px;
    padding: 7px 10px;
    border-radius: 10px;
    background: #651413;
    color: white;
    font-weight: 800;
    font-size: 14px;
}
.invoice-meta {
    padding: 12px 0;
    display: grid;
    gap: 6px;
    border-bottom: 1px dashed #b9aaa0;
}
.invoice-meta > div,
.invoice-totals > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    align-items: baseline;
}
.invoice-meta span,
.invoice-address span,
.invoice-totals span {
    color: #6e6057;
    font-size: 12px;
}
.invoice-meta strong { text-align: end; font-size: 12px; }
.invoice-address { padding: 11px 0; border-bottom: 1px dashed #b9aaa0; }
.invoice-address p { margin: 5px 0 0; font-size: 12px; line-height: 1.6; }
.invoice-lines {
    width: 100%;
    border-collapse: collapse;
    margin: 10px 0;
    table-layout: fixed;
}
.invoice-lines th,
.invoice-lines td {
    border-bottom: 1px solid #eee6e0;
    padding: 7px 3px;
    font-size: 11px;
    vertical-align: top;
}
.invoice-lines th { color: #6e6057; font-weight: 700; }
.invoice-lines th:first-child,
.invoice-lines td:first-child { width: 43%; text-align: start; }
.invoice-lines th:not(:first-child),
.invoice-lines td:not(:first-child) { text-align: center; }
.invoice-lines td strong { display: block; overflow-wrap: anywhere; }
.invoice-lines td small {
    display: block;
    margin-top: 3px;
    color: #7b6a60;
    line-height: 1.45;
}
.invoice-totals {
    padding: 10px 0;
    display: grid;
    gap: 7px;
    border-bottom: 1px dashed #b9aaa0;
}
.invoice-totals strong { font-size: 12px; }
.invoice-grand-total {
    margin-top: 5px;
    padding-top: 9px;
    border-top: 2px solid #651413;
    color: #651413;
}
.invoice-grand-total span,
.invoice-grand-total strong {
    color: #651413;
    font-size: 15px;
    font-weight: 800;
}
.invoice-footer { text-align: center; padding-top: 14px; }
.invoice-footer p { margin: 0 0 5px; font-weight: 800; }
.invoice-footer small { display: block; color: #75655d; line-height: 1.55; }
.invoice-print-time { margin-top: 5px; }

@media (max-width: 480px) {
    .order-invoice-page { padding: 12px 8px 32px; }
    .order-invoice-receipt { padding: 18px 14px; border-radius: 14px; }
    .invoice-toolbar .btn { flex: 1 1 140px; }
}

@media print {
    @page { size: 80mm auto; margin: 3mm; }
    html, body {
        width: 80mm;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    body * { visibility: hidden !important; }
    .order-invoice-page,
    .order-invoice-page * { visibility: visible !important; }
    .no-print { display: none !important; }
    .public-layout,
    .order-invoice-page {
        width: 100% !important;
        min-height: 0 !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
    }
    .order-invoice-receipt {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
        border: 0 !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    .invoice-header h1 { font-size: 18px; }
    .invoice-logo { max-width: 30mm; max-height: 20mm; }
    .invoice-lines th,
    .invoice-lines td,
    .invoice-meta span,
    .invoice-meta strong,
    .invoice-address p,
    .invoice-address span,
    .invoice-totals span,
    .invoice-totals strong,
    .invoice-footer small { font-size: 9.5px; }
    .invoice-grand-total span,
    .invoice-grand-total strong { font-size: 13px; }
    a { color: black !important; text-decoration: none !important; }
}


/* =========================================================
   Responsive hardening pass 2 - operations/mobile boards
   Fixes delivery/order cards becoming narrow vertical columns
   on real phones because .delivery-board was declared after
   the earlier .order-board mobile rule.
   ========================================================= */

/* Tablet and below: every operational board must be one real column. */
@media screen and (max-width: 900px) {
    .order-board,
    .order-board-three,
    .delivery-board {
        grid-template-columns: minmax(0, 1fr) !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    .order-board > section,
    .delivery-board > section {
        width: 100%;
        min-width: 0;
        max-width: 100%;
        min-height: auto;
    }

    .order-card,
    .delivery-order-card {
        width: 100%;
        min-width: 0;
        max-width: 100%;
    }
}

/* Phone layout: cards, statuses, actions and history become vertical and readable. */
@media screen and (max-width: 620px) {
    .delivery-board,
    .order-board,
    .order-board-three {
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) !important;
        gap: 12px;
    }

    .order-board > section,
    .delivery-board > section {
        padding: 10px;
        border-radius: 14px;
        overflow: hidden;
    }

    .order-board > section > h2,
    .delivery-board > section > h2 {
        width: 100%;
        min-width: 0;
        font-size: 16px;
        line-height: 1.45;
        flex-wrap: wrap;
    }

    .order-card,
    .delivery-order-card {
        padding: 12px;
        margin-bottom: 9px;
        overflow: hidden;
    }

    .order-card-head {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: start;
        gap: 8px;
    }

    .order-card-head > div {
        min-width: 0;
    }

    .order-card-head strong,
    .order-card-head small,
    .order-customer,
    .delivery-address,
    .delivery-state-row,
    .order-card li,
    .order-card li b,
    .order-card li small {
        max-width: 100%;
        overflow-wrap: anywhere;
        word-break: normal;
    }

    .order-customer,
    .delivery-address {
        line-height: 1.65;
    }

    .order-card ul {
        padding-inline-start: 18px;
        margin-block: 10px;
    }

    .delivery-state-row {
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 5px;
        line-height: 1.55;
    }

    .order-card footer {
        display: grid;
        grid-template-columns: 1fr;
        align-items: stretch;
        gap: 9px;
    }

    .order-card footer > b {
        display: block;
        width: 100%;
        font-size: 17px;
        text-align: start;
    }

    .order-actions {
        width: 100%;
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        justify-content: stretch;
        gap: 7px;
    }

    .order-actions .btn,
    .order-actions button,
    .order-actions a {
        width: 100%;
        min-width: 0;
        min-height: 42px;
        height: auto;
        padding: 9px 8px;
        white-space: normal;
        line-height: 1.35;
        text-align: center;
    }

    .delivery-flow-summary {
        width: 100%;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }

    .delivery-flow-summary article {
        min-width: 0;
        padding: 12px;
    }

    .completed-orders-list article {
        width: 100%;
        min-width: 0;
        grid-template-columns: minmax(0, 1fr) !important;
        align-items: stretch;
        gap: 6px;
        padding: 12px;
    }

    .completed-orders-list article > * {
        min-width: 0;
        max-width: 100%;
        text-align: start !important;
        overflow-wrap: anywhere;
    }

    .completed-orders-list article .badge {
        width: fit-content;
        max-width: 100%;
    }

    .completed-orders-list article .btn,
    .completed-orders-list article a.btn {
        width: 100%;
    }

    .page-actions-inline {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        width: 100%;
        gap: 8px;
    }

    .page-actions-inline .btn,
    .page-actions-inline button,
    .page-actions-inline a,
    .page-actions-inline select {
        width: 100%;
        min-width: 0;
        white-space: normal;
    }

    /* Prevent any old fixed/min widths from squeezing the page. */
    .compact-select,
    .operation-meta,
    .delivery-mobile-note,
    .kitchen-ready-note {
        min-width: 0;
        max-width: 100%;
    }

    .kitchen-live {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .kitchen-ticket {
        width: 100%;
        min-width: 0;
    }

    .kitchen-ticket header {
        flex-wrap: wrap;
    }

    /* Generic admin grids that should never stay multi-column on a phone. */
    .operations-grid,
    .settings-grid,
    .share-grid,
    .drivers-layout,
    .website-theme-grid,
    .website-pages-grid,
    .site-content-section,
    .site-visit-grid,
    .site-contact-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    /* Tables outside the printable invoice can scroll safely instead of
       stretching the whole application. */
    .page-body table:not(.invoice-lines) {
        display: block;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media screen and (max-width: 430px) {
    .page-actions-inline,
    .order-actions,
    .delivery-flow-summary {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .order-card-head {
        grid-template-columns: minmax(0, 1fr);
    }

    .order-card-head .badge {
        justify-self: start;
    }

    .order-board > section,
    .delivery-board > section {
        padding: 8px;
    }

    .order-card,
    .delivery-order-card {
        padding: 11px 10px;
    }

    .order-card footer > b {
        font-size: 16px;
    }

    .completed-orders-panel {
        padding-inline: 10px;
    }
}


/* =========================================================
   Large-screen layout fix
   Keep the fixed sidebar outside the content width.
   ========================================================= */
@media screen and (min-width: 851px) {
    [dir="rtl"] .content {
        width: auto !important;
        max-width: none !important;
        margin-right: var(--sidebar);
        margin-left: 0;
    }

    [dir="ltr"] .content {
        width: auto !important;
        max-width: none !important;
        margin-left: var(--sidebar);
        margin-right: 0;
    }

    .page-body {
        width: auto !important;
        max-width: none !important;
        min-width: 0;
    }

    .stats,
    .grid-2,
    .panel,
    .reports-section,
    .reports-grid {
        min-width: 0;
        max-width: 100%;
    }

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

    .grid-2 {
        grid-template-columns: minmax(0, 1.25fr) minmax(0, .9fr);
    }
}

/* Very wide monitors: give the dashboard breathing room without stretching cards excessively. */
@media screen and (min-width: 1600px) {
    .page-body {
        padding-inline: clamp(28px, 2vw, 42px);
    }

    .stats {
        gap: 16px;
    }

    .grid-2 {
        gap: 20px;
    }
}

/* Actual driving-distance delivery quote */
.delivery-location-box {
    display: grid;
    gap: 8px;
    padding: 10px;
    border: 1px solid rgba(101, 20, 19, .14);
    border-radius: 14px;
    background: rgba(255, 248, 223, .55);
}

.delivery-location-box > .btn {
    width: 100%;
}

.delivery-location-box small {
    color: #6f625b;
}

.delivery-quote-box {
    display: grid;
    gap: 5px;
    padding: 10px 12px;
    border-radius: 12px;
    background: #f4fbf7;
    border: 1px solid #cce7d6;
}

.delivery-quote-box.error {
    background: #fff4f3;
    border-color: #efc9c5;
}

.delivery-map-link {
    display: inline-block;
    margin-inline-start: 8px;
    font-weight: 700;
}

/* Advanced operations center */
.operations-tabs{display:flex;gap:8px;overflow-x:auto;padding:3px 1px 12px;margin-bottom:14px;scrollbar-width:thin}.operations-tabs button{flex:0 0 auto;min-height:42px;padding:9px 14px;border:1px solid var(--line);border-radius:999px;background:#fff;color:var(--ink);font-weight:800;cursor:pointer}.operations-tabs button.active{background:var(--primary);color:#fff;border-color:var(--primary)}
.operations-section{display:grid;gap:16px}.operations-kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}.operations-kpis article{padding:17px;border:1px solid var(--line);border-radius:16px;background:#fff;box-shadow:var(--shadow)}.operations-kpis small,.operations-kpis strong{display:block}.operations-kpis small{color:var(--muted)}.operations-kpis strong{margin-top:5px;color:var(--primary);font-size:24px}.operations-highlight{margin-top:18px;font-size:30px;font-weight:900;color:var(--primary)}
.operations-list{display:grid;gap:9px;margin-top:16px}.operations-list article{display:flex;align-items:center;gap:10px;padding:12px 13px;border:1px solid var(--line);border-radius:12px;background:#fffdf7}.operations-list article b,.operations-list article small{display:block}.operations-list article small{margin-top:3px;color:var(--muted)}.operations-list.compact{max-height:420px;overflow:auto}.operations-list .low-stock{border-color:#efb7ad;background:#fff3f0}.permissions-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin-top:14px}.permissions-grid label{padding:10px;border:1px solid var(--line);border-radius:10px;background:#fffbed}.operations-section input,.operations-section select{width:100%;padding:10px 12px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--ink)}
.kitchen-ticket.overdue{border-color:#c3382a;box-shadow:0 0 0 2px rgba(195,56,42,.10),var(--shadow)}.kitchen-ticket.overdue header>span:first-child{color:#b42318;font-weight:900}.kitchen-option-summary{color:#651413!important;font-weight:700}
@media(max-width:1100px){.operations-kpis{grid-template-columns:repeat(2,minmax(0,1fr))}.permissions-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:620px){.operations-kpis,.permissions-grid{grid-template-columns:1fr}.operations-list article{flex-wrap:wrap}.operations-list article .grow{flex:1 1 100%}.operations-tabs{margin-inline:-12px;padding-inline:12px}}

.invoice-options{color:#651413!important;font-weight:700}.invoice-payment-status{color:#651413}.invoice-meta strong[dir="ltr"],.invoice-totals strong[dir="ltr"]{overflow-wrap:anywhere}

.payment-return-banner{width:min(100% - 24px,720px);margin:12px auto;padding:12px 15px;border-radius:14px;display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);background:#fff;box-shadow:var(--shadow)}.payment-return-banner strong,.payment-return-banner span{display:block}.payment-return-banner.paid{background:#e9f8ef;border-color:#b8e3c8;color:#17653f}.payment-return-banner.failed{background:#fff0ed;border-color:#f0c5bd;color:#922f25}.payment-return-banner.pending{background:#fff8df;border-color:#ead9ad;color:#70531d}@media(max-width:620px){.payment-return-banner{align-items:flex-start;flex-direction:column;width:calc(100% - 20px);margin:10px}}
