:root {
    --bg: #eef5f0;
    --screen: #f9fbf8;
    --card: #ffffff;
    --muted: #8b978d;
    --text: #152016;
    --soft-text: #617064;
    --line: #edf1eb;
    --green: #62bd68;
    --green-dark: #2f8f46;
    --green-soft: #eaf8ec;
    --orange: #ffaf52;
    --danger: #ff6f61;
    --shadow: 0 18px 48px rgba(29, 55, 38, .12);
    --shadow-soft: 0 10px 28px rgba(25, 45, 32, .08);
    --radius-lg: 28px;
    --radius-md: 20px;
    --radius-sm: 14px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

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

button,
input,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

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

.webview-bg {
    position: relative;
    display: flex;
    justify-content: center;
    overflow-x: hidden;
}

.webview-bg::before,
.webview-bg::after {
    content: "";
    position: fixed;
    inset: -20% auto auto -10%;
    width: 70vw;
    height: 120vh;
    background: rgba(255, 255, 255, .34);
    transform: rotate(28deg);
    pointer-events: none;
}

.webview-bg::after {
    inset: auto -20% -30% auto;
    background: rgba(255, 255, 255, .22);
}

.mobile-frame {
    position: relative;
    z-index: 1;
    width: min(100%, 430px);
    min-height: 100vh;
    background: var(--screen);
    overflow-x: hidden;
}

.app-screen {
    min-height: 100vh;
    padding: 24px 20px 110px;
}

@media (min-width: 760px) {
    body {
        align-items: center;
        padding: 28px 0;
    }

    .mobile-frame {
        min-height: 850px;
        max-height: calc(100vh - 56px);
        border-radius: 34px;
        box-shadow: 0 28px 80px rgba(29, 49, 39, .18);
        overflow-y: auto;
    }

    .mobile-frame::-webkit-scrollbar {
        width: 0;
    }
}

/* Shared */
.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.2;
    letter-spacing: .01em;
}

.client-header,
.top-line,
.product-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.client-header {
    margin-bottom: 18px;
}

.client-header h1,
.top-line h1 {
    margin: 2px 0 0;
    font-size: 20px;
    line-height: 1.15;
    letter-spacing: -.03em;
}

.client-header p {
    margin: 4px 0 0;
    color: var(--muted);
    font-size: 13px;
}

.compact-header {
    margin-bottom: 20px;
}

.header-actions,
.product-topbar > div,
.hero-actions > div {
    display: flex;
    gap: 8px;
}

.icon-btn,
.round-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border: 0;
    border-radius: 50%;
    background: var(--card);
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.round-btn {
    width: 38px;
    height: 38px;
    font-size: 24px;
}

.icon-btn {
    font-size: 17px;
}

.top-line {
    margin-bottom: 20px;
}

.top-line h1 {
    flex: 1;
    text-align: left;
}

.section-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 22px 0 14px;
}

.section-title h2 {
    margin: 0;
    font-size: 18px;
    line-height: 1.2;
    letter-spacing: -.03em;
}

.section-title a,
.section-title span {
    color: var(--green-dark);
    font-size: 12px;
    font-weight: 700;
}

.section-title.compact {
    margin: 18px 0 10px;
}

.section-title.compact h2 {
    font-size: 15px;
}

.meta-row,
.delivery-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 11px;
}

.delivery-row {
    justify-content: space-between;
    width: 100%;
    color: var(--soft-text);
    font-size: 12px;
}

.primary-btn,
.checkout-btn,
.add-cart-btn,
.offer-btn,
.logout-big {
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(77, 181, 92, .28);
}

.primary-btn,
.logout-big {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
}

.primary-btn.inline {
    width: auto;
    min-height: 42px;
    padding: 0 18px;
    display: inline-flex;
}

.alert-error,
.success-card,
.muted-box {
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    font-size: 13px;
}

.alert-error {
    margin: 18px 0 12px;
    color: #9f2b25;
    background: #fff0ee;
}

.success-card {
    margin-bottom: 16px;
    color: #247333;
    background: var(--green-soft);
    font-weight: 700;
}

.empty-state {
    display: grid;
    place-items: center;
    gap: 8px;
    text-align: center;
    padding: 28px 20px;
    border-radius: var(--radius-lg);
    background: var(--card);
    box-shadow: var(--shadow-soft);
    color: var(--muted);
}

.empty-state strong {
    color: var(--text);
    font-size: 16px;
}

.empty-state p {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

/* Login */
.login-screen {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-bottom: 28px;
}

.brand-mark {
    width: 62px;
    height: 62px;
    display: grid;
    place-items: center;
    border-radius: 20px;
    margin-bottom: 16px;
    background: linear-gradient(145deg, var(--green), var(--green-dark));
    color: #fff;
    font-size: 30px;
    font-weight: 900;
    box-shadow: var(--shadow);
}

.login-screen h1 {
    max-width: 320px;
    margin: 8px 0 10px;
    font-size: 32px;
    line-height: 1.05;
    letter-spacing: -.06em;
}

.login-copy {
    margin: 0 0 20px;
    color: var(--soft-text);
    font-size: 14px;
    line-height: 1.5;
}

.auth-form,
.checkout-form,
.form-card {
    display: grid;
    gap: 12px;
}

.auth-form label,
.checkout-form label:not(.radio-card) {
    display: grid;
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.auth-form input,
.checkout-form input,
.checkout-form textarea,
.promo-box input,
.search-bar input {
    width: 100%;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.auth-form input,
.checkout-form input,
.checkout-form textarea {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.checkout-form textarea {
    min-height: 90px;
    resize: vertical;
    padding-top: 14px;
}

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

.demo-role {
    display: grid;
    gap: 4px;
    min-height: 118px;
    padding: 14px;
    border: 0;
    border-radius: var(--radius-md);
    background: var(--card);
    text-align: left;
    box-shadow: var(--shadow-soft);
}

.demo-role span {
    font-size: 28px;
}

.demo-role strong {
    font-size: 13px;
}

.demo-role small {
    min-width: 0;
    color: var(--muted);
    font-size: 10px;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Home */
.search-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 0 16px;
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    color: var(--muted);
}

.search-bar.active {
    margin-bottom: 14px;
}

.search-bar span {
    color: var(--green-dark);
    font-size: 20px;
    font-weight: 900;
}

.category-scroll {
    display: flex;
    gap: 12px;
    margin: 18px -20px 20px;
    padding: 0 20px 4px;
    overflow-x: auto;
    scrollbar-width: none;
}

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

.category-chip {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    gap: 8px;
    min-width: 74px;
    min-height: 72px;
    padding: 12px;
    border-radius: 20px;
    background: var(--card);
    color: var(--soft-text);
    font-size: 11px;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.category-chip span {
    font-size: 24px;
}

.category-chip.is-active {
    background: var(--green);
    color: #fff;
}

.category-scroll-soft .category-chip {
    display: inline-flex;
    min-width: auto;
    min-height: 42px;
    padding: 0 14px;
    border-radius: 999px;
}

.category-scroll-soft .category-chip span {
    font-size: 16px;
}

.offer-card {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 116px;
    padding: 18px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(135deg, #0f2c21 0%, #235b38 52%, #63bd68 100%);
    color: #fff;
    box-shadow: var(--shadow);
}

.offer-card::after {
    content: "";
    position: absolute;
    inset: -70px -70px auto auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .12);
}

.offer-card div {
    position: relative;
    z-index: 1;
}

.offer-card span {
    font-size: 11px;
    opacity: .9;
}

.offer-card h2 {
    margin: 2px 0 0;
    font-size: 29px;
    line-height: .95;
    letter-spacing: -.05em;
}

.offer-card p {
    margin: 4px 0 12px;
    font-size: 12px;
    opacity: .86;
}

.offer-btn {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 0 14px;
    background: var(--green);
    font-size: 11px;
}

.offer-card img {
    position: relative;
    z-index: 1;
    width: 128px;
    margin-right: -8px;
    align-self: flex-end;
}

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

.restaurant-list {
    display: grid;
    gap: 12px;
}

.restaurant-card {
    position: relative;
    display: grid;
    gap: 10px;
    padding: 10px;
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
    transition: transform .2s ease, box-shadow .2s ease;
}

.restaurant-card:active {
    transform: scale(.98);
}

.restaurant-card-wide {
    grid-template-columns: 92px minmax(0, 1fr);
    align-items: center;
    min-height: 118px;
}

.restaurant-image {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 116px;
    border-radius: 20px;
    background: linear-gradient(145deg, #f0f8ee, #ffffff);
    overflow: hidden;
}

.restaurant-card-wide .restaurant-image {
    min-height: 92px;
}

.restaurant-image img {
    width: 90%;
    height: 90%;
    object-fit: contain;
}

.discount-pill,
.rating-badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
}

.discount-pill {
    position: absolute;
    left: 8px;
    top: 8px;
    min-height: 24px;
    padding: 0 8px;
    background: #12281e;
    color: #fff;
}

.favorite-toggle {
    position: absolute;
    z-index: 2;
    right: 10px;
    top: 10px;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, .88);
    color: var(--muted);
    box-shadow: 0 8px 16px rgba(16, 31, 20, .1);
}

.favorite-toggle.is-favorite {
    color: var(--danger);
}

.round-btn.favorite-toggle {
    position: static;
    width: 38px;
    height: 38px;
}

.restaurant-info h3 {
    margin: 0 0 4px;
    min-height: 34px;
    font-size: 13px;
    line-height: 1.25;
    letter-spacing: -.02em;
}

.restaurant-card-wide .restaurant-info h3 {
    min-height: auto;
    font-size: 15px;
}

.restaurant-info p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.restaurant-card-wide .restaurant-info p {
    font-size: 12px;
}

/* Restaurant */
.page-restaurant .app-screen,
.page-product .app-screen,
.page-cart .app-screen,
.page-checkout .app-screen {
    padding-bottom: 104px;
}

.restaurant-hero {
    position: relative;
    margin: -24px -20px 16px;
    min-height: 238px;
    overflow: hidden;
    border-radius: 0 0 34px 34px;
    background: var(--green-soft);
}

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

.hero-actions {
    position: absolute;
    top: 18px;
    left: 18px;
    right: 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.restaurant-headline {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.restaurant-headline h1,
.product-details h1 {
    margin: 4px 0 0;
    font-size: 26px;
    line-height: 1.05;
    letter-spacing: -.05em;
}

.rating-badge {
    flex: 0 0 auto;
    min-height: 34px;
    padding: 0 12px;
    background: var(--green-soft);
    color: var(--green-dark);
}

.restaurant-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 16px 0;
}

.restaurant-stats span {
    display: grid;
    place-items: center;
    min-height: 54px;
    padding: 8px;
    border-radius: 18px;
    background: var(--card);
    color: var(--soft-text);
    text-align: center;
    font-size: 12px;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.promo-strip {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 18px;
    background: #12281e;
    color: #fff;
}

.promo-strip span {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: var(--green);
    font-weight: 900;
}

.promo-strip p {
    margin: 0;
    font-size: 12px;
    line-height: 1.4;
    opacity: .9;
}

.menu-tabs {
    position: sticky;
    top: 0;
    z-index: 5;
    display: flex;
    gap: 10px;
    margin: 18px -20px 10px;
    padding: 10px 20px;
    overflow-x: auto;
    background: rgba(249, 251, 248, .92);
    backdrop-filter: blur(10px);
    scrollbar-width: none;
}

.menu-tabs::-webkit-scrollbar {
    display: none;
}

.menu-tabs a {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 38px;
    padding: 0 14px;
    border-radius: 999px;
    background: var(--card);
    color: var(--soft-text);
    font-size: 12px;
    font-weight: 800;
    box-shadow: var(--shadow-soft);
}

.menu-tabs a.is-active {
    background: var(--green);
    color: #fff;
}

.menu-list {
    display: grid;
    gap: 12px;
}

.menu-item-card {
    position: relative;
    display: grid;
    grid-template-columns: 92px minmax(0, 1fr) 36px;
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 22px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.menu-item-card img {
    width: 92px;
    height: 92px;
    object-fit: contain;
    border-radius: 18px;
    background: #f3f8f2;
}

.menu-item-card h3 {
    margin: 0 0 4px;
    font-size: 14px;
    line-height: 1.2;
}

.menu-item-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin: 0 0 8px;
    overflow: hidden;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.35;
}

.menu-item-card strong {
    display: inline-block;
    margin-top: 8px;
    font-size: 14px;
}

.mini-add {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 12px;
    background: var(--green);
    color: #fff;
    font-size: 18px;
    font-weight: 900;
}

/* Product */
.product-topbar {
    margin-bottom: 8px;
}

.product-image-wrap {
    display: grid;
    place-items: center;
    min-height: 240px;
    margin: 0 -20px;
    background: radial-gradient(circle, rgba(98, 189, 104, .18), rgba(249, 251, 248, 0) 68%);
}

.product-image-wrap img {
    width: min(82%, 300px);
    filter: drop-shadow(0 30px 32px rgba(38, 66, 43, .2));
}

.product-details {
    margin-top: 4px;
}

.product-details p {
    color: var(--soft-text);
    font-size: 13px;
    line-height: 1.5;
}

.product-meta {
    margin-top: 8px;
}

.size-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin: 18px 0;
}

.size-option {
    display: grid;
    place-items: center;
    min-height: 88px;
    padding: 10px 8px;
    border: 1px solid transparent;
    border-radius: 18px;
    background: var(--card);
    color: var(--muted);
    box-shadow: var(--shadow-soft);
}

.size-option span {
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    margin-bottom: 4px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--green-dark);
    font-size: 11px;
    font-weight: 900;
}

.size-option small {
    font-size: 10px;
}

.size-option strong {
    margin-top: 4px;
    color: var(--text);
    font-size: 12px;
}

.size-option.is-active {
    border-color: var(--green);
    background: #fbfffb;
}

.size-option.is-active span {
    border-color: var(--green);
    background: var(--green);
    color: #fff;
}

.ingredient-list {
    display: grid;
    gap: 10px;
}

.ingredient-row {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) 24px;
    align-items: center;
    gap: 12px;
    min-height: 64px;
    padding: 10px 12px;
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.ingredient-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: #f4f9f4;
    font-size: 22px;
}

.ingredient-row strong {
    display: block;
    font-size: 13px;
}

.ingredient-row small {
    color: var(--muted);
    font-size: 11px;
}

.ingredient-row input {
    accent-color: var(--green);
}

.product-action-bar,
.cart-action-bar {
    position: fixed;
    z-index: 20;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: flex;
    align-items: center;
    gap: 10px;
    width: min(calc(100% - 24px), 398px);
    padding: 10px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .9);
    box-shadow: 0 20px 48px rgba(17, 40, 24, .18);
    backdrop-filter: blur(14px);
}

.counter-control {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 102px;
    height: 48px;
    padding: 0 8px;
    border-radius: 18px;
    background: #f4f8f4;
    font-weight: 900;
}

.counter-control button {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 0;
    border-radius: 10px;
    background: #fff;
    color: var(--green-dark);
    font-size: 18px;
    font-weight: 900;
}

.add-cart-btn {
    flex: 1;
    min-height: 48px;
    padding: 0 16px;
}

/* Cart */
.clear-cart {
    flex: 0 0 auto;
    background: #fff5f3;
}

.cart-list {
    display: grid;
    gap: 12px;
    min-height: 70px;
}

.cart-item {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 10px;
    border-radius: 22px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.cart-item img {
    width: 76px;
    height: 76px;
    object-fit: contain;
    border-radius: 18px;
    background: #f4f9f4;
}

.cart-item h3 {
    margin: 0 0 3px;
    font-size: 14px;
    line-height: 1.2;
}

.cart-item p {
    margin: 0 0 8px;
    color: var(--muted);
    font-size: 11px;
}

.cart-item-bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cart-item-bottom strong {
    font-size: 13px;
}

.qty-control {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 30px;
    padding: 0 6px;
    border-radius: 999px;
    background: var(--green-soft);
    font-weight: 900;
}

.qty-control button {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border: 0;
    border-radius: 50%;
    background: var(--green);
    color: #fff;
}

.promo-box {
    display: grid;
    grid-template-columns: 26px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    margin: 18px 0;
    min-height: 54px;
    padding: 0 12px;
    border-radius: 18px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.promo-box button {
    height: 34px;
    padding: 0 14px;
    border: 0;
    border-radius: 999px;
    background: var(--green);
    color: #fff;
    font-size: 12px;
    font-weight: 800;
}

.summary-card,
.checkout-summary,
.form-card {
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.summary-card {
    display: grid;
    gap: 12px;
    padding: 16px;
}

.summary-card > div {
    display: flex;
    justify-content: space-between;
    color: var(--muted);
    font-size: 13px;
}

.summary-card strong {
    color: var(--text);
}

.summary-total {
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--text) !important;
    font-size: 16px !important;
    font-weight: 900;
}

.cart-action-bar {
    display: block;
}

.checkout-btn {
    width: 100%;
    min-height: 52px;
    padding: 0 18px;
}

/* Checkout */
.checkout-summary {
    display: grid;
    gap: 10px;
    margin-bottom: 16px;
    padding: 16px;
}

.checkout-summary-row {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    color: var(--soft-text);
    font-size: 13px;
}

.checkout-summary-row strong {
    color: var(--text);
}

.checkout-form {
    padding-bottom: 72px;
}

.form-card {
    padding: 16px;
}

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

.radio-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 16px;
    background: #f6faf6;
    color: var(--text);
    font-weight: 800;
}

.radio-card input {
    accent-color: var(--green);
}

.sticky-submit {
    position: fixed;
    left: 50%;
    bottom: 14px;
    z-index: 20;
    width: min(calc(100% - 24px), 398px);
    transform: translateX(-50%);
}

/* Orders */
.order-card {
    display: grid;
    gap: 14px;
    margin-bottom: 12px;
    padding: 16px;
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.order-head {
    display: flex;
    justify-content: space-between;
    gap: 12px;
}

.order-head strong {
    display: block;
    margin-bottom: 4px;
}

.order-head span:not(.status-pill) {
    color: var(--muted);
    font-size: 12px;
}

.status-pill {
    height: 30px;
    padding: 0 10px;
    color: #fff;
}

.status-pill.cooking {
    background: var(--orange);
}

.status-pill.delivered {
    background: var(--green);
}

.timeline {
    display: grid;
    gap: 10px;
}

.timeline div {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 700;
}

.timeline div span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #dfe7df;
}

.timeline div.is-done span,
.timeline div.is-active span {
    background: var(--green);
}

.timeline div.is-active {
    color: var(--text);
}

/* Favorites */
.favorite-hero {
    display: flex;
    gap: 14px;
    align-items: center;
    margin-bottom: 16px;
    padding: 16px;
    border-radius: 24px;
    background: linear-gradient(135deg, #fff, #eff9ef);
    box-shadow: var(--shadow-soft);
}

.favorite-hero > span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    background: #fff;
    color: var(--danger);
    font-size: 28px;
    box-shadow: var(--shadow-soft);
}

.favorite-hero h2 {
    margin: 0 0 4px;
    font-size: 17px;
}

.favorite-hero p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.4;
}

/* Profile */
.profile-avatar {
    width: 46px;
    height: 46px;
    border-radius: 16px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.profile-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 14px;
    padding: 14px;
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.profile-card img {
    width: 68px;
    height: 68px;
    border-radius: 22px;
}

.profile-card strong {
    display: block;
    margin-bottom: 4px;
}

.profile-card span,
.profile-card small {
    display: block;
    color: var(--muted);
    font-size: 12px;
}

.profile-menu {
    display: grid;
    gap: 10px;
    margin: 18px 0;
}

.profile-menu a {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) 18px;
    gap: 12px;
    align-items: center;
    min-height: 70px;
    padding: 12px;
    border-radius: 20px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.profile-menu a > span,
.role-note > span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 15px;
    background: var(--green-soft);
    font-size: 22px;
}

.profile-menu strong {
    display: block;
    font-size: 14px;
}

.profile-menu small {
    display: block;
    margin-top: 3px;
    color: var(--muted);
    font-size: 11px;
}

.profile-menu b {
    color: var(--muted);
    font-size: 20px;
}

.role-note {
    align-items: flex-start;
}

.logout-big {
    margin-top: 20px;
    background: #12281e;
}

/* Bottom navigation */
.bottom-nav {
    position: fixed;
    z-index: 30;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 4px;
    width: min(calc(100% - 24px), 398px);
    min-height: 64px;
    padding: 8px;
    border-radius: 24px;
    background: rgba(255, 255, 255, .92);
    box-shadow: 0 20px 48px rgba(17, 40, 24, .18);
    backdrop-filter: blur(14px);
}

.nav-item {
    position: relative;
    display: grid;
    place-items: center;
    gap: 2px;
    border-radius: 18px;
    color: #a0aaa2;
    font-size: 9px;
    font-weight: 800;
}

.nav-icon {
    font-size: 18px;
    line-height: 1;
}

.nav-item.is-active {
    background: var(--green);
    color: #fff;
}

.cart-badge {
    position: absolute;
    top: 5px;
    right: 10px;
    display: none;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border-radius: 999px;
    background: var(--danger);
    color: #fff;
    font-size: 10px;
    line-height: 17px;
    text-align: center;
}

.cart-badge.has-items {
    display: inline-block;
}

/* Dashboard placeholders */
.dashboard-screen .profile-card {
    justify-content: space-between;
}

.role-card div span {
    display: block;
    margin-top: 4px;
}

.logout-link {
    color: var(--danger);
    font-weight: 800;
    font-size: 13px;
}

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

.dashboard-card {
    min-height: 150px;
    padding: 16px;
    border-radius: 24px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.dashboard-card span {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    margin-bottom: 14px;
    border-radius: 16px;
    background: var(--green-soft);
    font-size: 24px;
}

.dashboard-card strong {
    display: block;
    font-size: 14px;
}

.dashboard-card p {
    margin: 6px 0 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.dashboard-screen .muted-box {
    margin-top: 18px;
    background: var(--card);
}

/* Toast */
.toast {
    position: fixed;
    z-index: 100;
    left: 50%;
    bottom: 92px;
    width: min(calc(100% - 36px), 370px);
    padding: 13px 16px;
    border-radius: 999px;
    background: #12281e;
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    opacity: 0;
    transform: translate(-50%, 12px);
    pointer-events: none;
    transition: opacity .2s ease, transform .2s ease;
}

.toast.is-visible {
    opacity: 1;
    transform: translate(-50%, 0);
}

[hidden] {
    display: none !important;
}

@media (max-width: 360px) {
    .app-screen {
        padding-left: 16px;
        padding-right: 16px;
    }

    .restaurant-grid {
        gap: 10px;
    }

    .menu-item-card {
        grid-template-columns: 78px minmax(0, 1fr) 34px;
    }

    .menu-item-card img {
        width: 78px;
        height: 78px;
    }

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

/* Database dashboards */
.stats-grid .metric-card {
    min-height: 122px;
}

.metric-card strong {
    font-size: 22px;
}

.data-list {
    display: grid;
    gap: 12px;
}

.data-row {
    display: grid;
    grid-template-columns: 62px 1fr;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 22px;
    background: var(--card);
    box-shadow: var(--shadow-soft);
}

.data-row img {
    width: 62px;
    height: 62px;
    object-fit: contain;
    border-radius: 18px;
    background: var(--green-soft);
}

.data-row strong,
.data-row small,
.data-row span {
    display: block;
}

.data-row small,
.data-row span,
.muted-line {
    color: var(--muted);
    font-size: 12px;
    line-height: 1.45;
}

.compact-data-row img {
    width: 54px;
    height: 54px;
}

.compact-order {
    margin-bottom: 0;
}

.status-pill.ready,
.status-pill.on-way {
    background: var(--green-dark);
}

.status-pill.cancelled {
    background: var(--danger);
}

/* Magic bottom navigation for client role */
.bottom-nav.magic-bottom-nav {
    --bar-padding: 10px;
    --slot-width: calc((100% - (var(--bar-padding) * 2)) / var(--nav-count));
    position: fixed;
    z-index: 30;
    left: 50%;
    bottom: 14px;
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(var(--nav-count), minmax(0, 1fr));
    gap: 0;
    width: min(calc(100% - 24px), 398px);
    min-height: 68px;
    padding: 8px var(--bar-padding) 6px;
    border-radius: 25px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 20px 48px rgba(17, 40, 24, .18);
    backdrop-filter: blur(16px);
    overflow: visible;
}

.bottom-nav.magic-bottom-nav::before {
    content: "";
    position: absolute;
    z-index: 0;
    top: -36px;
    left: calc(var(--bar-padding) + (var(--slot-width) * var(--active-index)) + ((var(--slot-width) - 76px) / 2));
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background: var(--screen);
    pointer-events: none;
    transition: left .25s ease;
}

.bottom-nav.magic-bottom-nav .nav-item {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-direction: column;
    min-width: 0;
    min-height: 60px;
    padding: 7px 2px 5px;
    border-radius: 18px;
    color: #8f9a92;
    font-size: 9.5px;
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: .01em;
    background: transparent;
}

.bottom-nav.magic-bottom-nav .nav-icon-wrap {
    position: relative;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: 2px;
    border-radius: 50%;
    color: currentColor;
    transition: transform .22s ease, background .22s ease, box-shadow .22s ease, color .22s ease;
}

.bottom-nav.magic-bottom-nav .nav-icon-wrap svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.9;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.bottom-nav.magic-bottom-nav .nav-label {
    display: block;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color .22s ease, transform .22s ease;
}

.bottom-nav.magic-bottom-nav .nav-item.is-active {
    color: var(--text);
    background: transparent;
}

.bottom-nav.magic-bottom-nav .nav-item.is-active .nav-icon-wrap {
    position: absolute;
    top: -31px;
    width: 60px;
    height: 60px;
    margin: 0;
    background: #32f045;
    color: #102016;
    box-shadow: 0 14px 26px rgba(50, 240, 69, .34), 0 3px 0 rgba(10, 24, 15, .14);
    transform: translateY(0);
}

.bottom-nav.magic-bottom-nav .nav-item.is-active .nav-icon-wrap svg {
    width: 27px;
    height: 27px;
    stroke-width: 1.9;
}

.bottom-nav.magic-bottom-nav .nav-item.is-active .nav-label {
    color: var(--text);
    transform: translateY(1px);
}

.bottom-nav.magic-bottom-nav .cart-badge {
    top: -4px;
    right: -5px;
    min-width: 17px;
    height: 17px;
    padding: 0 5px;
    border: 2px solid #fff;
    line-height: 13px;
}

.bottom-nav.magic-bottom-nav .nav-item.is-active .cart-badge {
    top: 7px;
    right: 7px;
    border-color: #32f045;
}

.page-cart .app-screen {
    padding-bottom: 182px;
}

.page-cart .cart-action-bar {
    bottom: 94px;
}
