/* Inner pages: recipe library, weekly menu and admin panel. Tokens come from app.css. */

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.inner-page { min-height: 100vh; background: var(--tb-bg); }
.inner-header {
    display: flex; align-items: center; justify-content: space-between; gap: 18px;
    width: min(1200px, calc(100% - 32px)); min-height: 80px; margin: 0 auto; border-bottom: 1px solid rgba(var(--tb-shadow), .08);
}
.inner-nav { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.inner-nav-link { padding: 8px 12px; border-radius: 10px; color: var(--tb-text-muted); font-size: 13px; font-weight: 700; transition: color .2s, background .2s; }
.inner-nav-link:hover { color: var(--green-800); background: var(--green-100); }
.inner-nav-link.active { color: var(--green-800); background: var(--green-100); }
/* Account links in page headers */
.header-actions { display: flex; align-items: center; gap: 14px; }
.account-menu { display: flex; align-items: center; gap: 6px; }
.account-menu form { margin: 0; }
.account-email { max-width: 190px; overflow: hidden; padding: 8px 10px; border-radius: 10px; color: var(--green-950); font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.account-email:hover { background: var(--green-100); }
.account-email:focus-visible { outline: 3px solid var(--green-300); outline-offset: 2px; }

/* "My account" page and the SMS code step */
.account-container { max-width: 640px; }
.account-welcome { margin-bottom: 18px; padding: 18px 20px; border-radius: 16px; background: var(--green-50); }
.account-welcome h1 { margin: 0 0 6px; color: var(--green-950); font-size: 22px; font-weight: 900; }
.account-welcome p { margin: 0; line-height: 2; }
.account-card { margin-bottom: 16px; padding: clamp(18px, 4vw, 26px); border: 1px solid var(--tb-border); border-radius: 18px; background: var(--tb-white); }
.account-card h2 { margin: 0 0 14px; font-size: 17px; }
.account-card .rtl-input { text-align: right; }
.account-facts { display: grid; gap: 8px; margin: 0 0 16px; }
.account-facts div { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px dashed var(--tb-border); }
.account-facts dt { color: var(--muted); }
.account-facts dd { margin: 0; font-weight: 800; }
.account-logout { margin: 0; }
.account-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.account-card-head h2 { margin: 0; }
.account-hint { color: var(--muted); font-size: 12px; }
.account-addresses { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.account-addresses li { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 12px; border: 1px solid var(--tb-border); border-radius: 12px; }
.account-addresses p { margin: 4px 0; line-height: 1.9; }
.account-addresses form { margin: 0; }
.account-welcome .admin-primary { display: inline-flex; margin-top: 10px; }
.auth-field .code-input { font-size: 22px; letter-spacing: .4em; text-align: center; }

/* Persian date picker (menu builder) */
.pdate { position: relative; }
.pdate-toggle { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 46px; padding: 10px 13px; border: 1px solid var(--tb-border); border-radius: 11px; color: var(--ink); background: var(--tb-white); font: inherit; text-align: right; cursor: pointer; }
.pdate-toggle:focus-visible { outline: 3px solid var(--green-300); outline-offset: 2px; }
.pdate-panel { position: absolute; z-index: 30; top: calc(100% + 6px); right: 0; width: 290px; padding: 12px; border: 1px solid var(--tb-border); border-radius: 16px; background: var(--tb-white); box-shadow: 0 18px 40px rgba(var(--tb-shadow), .16); }
.pdate-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.pdate-nav { width: 34px; height: 34px; border: 0; border-radius: 10px; background: var(--green-100); cursor: pointer; font-size: 16px; }
.pdate-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.pdate-weekday { padding: 4px 0; color: var(--muted); font-size: 12px; font-weight: 800; }
.pdate-day { height: 34px; border: 0; border-radius: 9px; background: transparent; font: inherit; font-size: 13px; cursor: pointer; }
.pdate-day:hover { background: var(--green-100); }
.pdate-day.friday { color: #b42318; }
.pdate-day.today { box-shadow: inset 0 0 0 1px var(--green-600); }
.pdate-day.selected { color: var(--tb-white); background: var(--green-700); font-weight: 800; }
.pdate-time { display: flex; align-items: center; gap: 8px; margin-top: 10px; font-size: 13px; font-weight: 800; }
.pdate-time input { padding: 6px 8px; border: 1px solid var(--tb-border); border-radius: 9px; font: inherit; }
.pdate-foot { display: flex; justify-content: space-between; margin-top: 10px; }
.pdate-link { padding: 4px 6px; border: 0; color: var(--green-800); background: none; font: inherit; font-size: 13px; font-weight: 800; cursor: pointer; }

/* Customer report (/admin/customers) */
.admin-heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.customer-filters { margin: 0 0 18px; padding: 16px; border: 1px solid var(--tb-border); border-radius: 16px; background: var(--tb-white); }
.customer-filter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px 12px; }
.customer-filter-grid label { display: grid; gap: 4px; color: var(--tb-text); font-size: 12px; font-weight: 800; }
.customer-filter-grid input, .customer-filter-grid select { min-height: 38px; padding: 6px 9px; border: 1px solid var(--tb-border); border-radius: 9px; background: var(--tb-white); font: inherit; font-weight: 400; }
.customer-filters .admin-actions { margin-top: 12px; }
.customer-stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 10px; margin: 0 0 14px; }
.customer-stats div { display: grid; gap: 2px; padding: 10px 12px; border-radius: 12px; background: var(--green-100); text-align: center; }
.customer-stats strong { color: var(--green-950); font-size: 20px; }
.customer-stats span { color: var(--muted); font-size: 12px; }
.customer-table th a { color: inherit; text-decoration: underline dotted; }
.customer-table .customer-tastes { max-width: 220px; font-size: 12px; line-height: 1.8; }
.price-pantry { text-align: center; }
.price-pantry input { width: 18px; height: 18px; accent-color: var(--green-700); }

/* Salt, spices… from the customer's own kitchen (recipe page) */
.pantry-note { margin: 12px 0; padding: 10px 12px; border-radius: 12px; background: #fff8e8; line-height: 2; }
.pantry-note small { display: block; color: var(--muted); font-size: 12px; }

/* Profile questionnaire (/Account/Profile) */
.wizard-container { max-width: 760px; }
.wizard-progress { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.wizard-progress a { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 2px; border-radius: 10px; color: var(--muted); font-size: 12px; text-align: center; text-decoration: none; }
.wizard-progress a:hover { background: var(--green-100); }
.wizard-progress a:focus-visible { outline: 3px solid var(--green-300); outline-offset: 2px; }
.wizard-dot { display: grid; place-items: center; width: 30px; height: 30px; border: 2px solid var(--tb-border); border-radius: 50%; background: var(--tb-white); font-weight: 800; }
.wizard-progress .done .wizard-dot { border-color: var(--green-600); color: var(--tb-white); background: var(--green-600); }
.wizard-progress .current .wizard-dot { border-color: var(--green-800); color: var(--green-800); }
.wizard-progress .current a { color: var(--green-950); font-weight: 800; }
.wizard-card { padding: clamp(20px, 4vw, 32px); border: 1px solid var(--tb-border); border-radius: 22px; background: var(--tb-white); box-shadow: 0 14px 40px rgba(var(--tb-shadow), .06); }
.wizard-card h1 { margin: 0 0 16px; color: var(--green-950); font-size: clamp(20px, 3.4vw, 26px); font-weight: 900; }
.wizard-welcome { margin: 0 0 14px; padding: 12px 14px; border-radius: 12px; background: var(--green-100); line-height: 2; }
.wizard-counter { display: flex; align-items: center; gap: 8px; margin: 0 0 6px; color: var(--muted); font-size: 13px; }
.wizard-optional { padding: 2px 8px; border-radius: 999px; color: var(--green-800); background: var(--green-100); font-size: 11px; font-weight: 800; }
.required-mark { color: #b42318; font-size: 11px; font-weight: 700; }
.wizard-note { margin: -6px 0 14px; color: var(--muted); font-size: 13px; line-height: 2; }
.wizard-form .auth-field input, .wizard-form .auth-field textarea { text-align: right; }
.wizard-form .auth-field textarea { width: 100%; padding: 10px 13px; border: 1px solid var(--tb-border); border-radius: 11px; font: inherit; resize: vertical; }
.wizard-form .short-input { max-width: 180px; }
.wizard-form input[dir="ltr"] { text-align: left; }
.wizard-two { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.choice-group { margin: 0 0 18px; padding: 0; border: 0; }
.choice-group legend { margin-bottom: 9px; padding: 0; color: var(--tb-text); font-size: 13px; font-weight: 800; }
.choice-grid { display: grid; gap: 10px; }
.choice-grid.three { grid-template-columns: repeat(3, 1fr); }
.choice-grid.four { grid-template-columns: repeat(4, 1fr); }
.choice-grid.six { grid-template-columns: repeat(6, 1fr); }
.choice-card { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 92px; padding: 12px 8px; border: 2px solid var(--tb-border); border-radius: 16px; background: var(--tb-white); text-align: center; cursor: pointer; transition: border-color .15s ease, background .15s ease, transform .15s ease; }
.choice-card.compact { min-height: 48px; }
.choice-card:hover { border-color: var(--green-300); transform: translateY(-1px); }
.choice-card input, .picture-card input, .chip-option input { position: absolute; opacity: 0; pointer-events: none; }
.choice-card:has(input:checked) { border-color: var(--green-700); background: var(--green-100); }
.choice-card:has(input:focus-visible), .picture-card:has(input:focus-visible), .chip-option:has(input:focus-visible) { outline: 3px solid var(--green-300); outline-offset: 2px; }
.choice-icon { font-size: 26px; line-height: 1.2; }
.choice-icon.people { font-size: 17px; letter-spacing: -3px; }
.choice-label { font-size: 13px; font-weight: 800; }
.choice-card small { color: var(--muted); font-size: 11px; line-height: 1.6; }
.picture-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.picture-card { position: relative; display: flex; flex-direction: column; overflow: hidden; border: 2px solid var(--tb-border); border-radius: 16px; background: var(--tb-white); cursor: pointer; transition: border-color .15s ease, transform .15s ease; }
.picture-card:hover { border-color: var(--green-300); transform: translateY(-2px); }
.picture-card img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; }
.picture-card .choice-label { padding: 8px; text-align: center; }
.picture-check { position: absolute; top: 8px; left: 8px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--tb-white); background: var(--green-700); font-weight: 900; opacity: 0; transform: scale(.6); transition: opacity .15s ease, transform .15s ease; }
.picture-card:has(input:checked) { border-color: var(--green-700); }
.picture-card:has(input:checked) .picture-check { opacity: 1; transform: none; }
.chip-picker { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-option { position: relative; cursor: pointer; }
.chip-option span { display: inline-block; padding: 7px 13px; border: 1px solid var(--tb-border); border-radius: 999px; font-size: 13px; transition: background .15s ease, border-color .15s ease; }
.chip-option:hover span { border-color: var(--green-300); }
.chip-option:has(input:checked) span { border-color: var(--green-700); color: var(--green-950); background: var(--green-100); font-weight: 800; }
.chip-option.warn:has(input:checked) span { border-color: #c2410c; color: #7c2d12; background: #fff1e6; }
.wizard-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 22px; }
.wizard-back { margin-inline-start: auto; color: var(--muted); font-size: 13px; font-weight: 700; }
.wizard-done { text-align: center; }
.wizard-done-icon { font-size: 48px; }
.wizard-done .wizard-actions { justify-content: center; }
.wizard-calories { padding: 12px; border-radius: 12px; background: var(--green-100); line-height: 2; }
.wizard-calories small { display: block; color: var(--muted); font-size: 12px; }
.address-list { margin: 0 0 12px; padding: 0 18px 0 0; line-height: 2; }
@media (max-width: 650px) {
    .wizard-progress .wizard-step-title { display: none; }
    .choice-grid.three, .choice-grid.four { grid-template-columns: repeat(2, 1fr); }
    .choice-grid.six { grid-template-columns: repeat(3, 1fr); }
    .wizard-two { grid-template-columns: 1fr; }
    .picture-grid { grid-template-columns: repeat(2, 1fr); }
}
.auth-resend { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 16px 0 0; color: var(--muted); font-size: 13px; }
.auth-resend a, .auth-link-button { padding: 0; border: 0; color: var(--green-800); background: none; font: inherit; font-weight: 800; cursor: pointer; }
.auth-resend a:focus-visible, .auth-link-button:focus-visible { outline: 3px solid var(--green-300); outline-offset: 2px; }
a.auth-submit { text-decoration: none; }
.account-link { padding: 8px 12px; border: 0; border-radius: 10px; color: var(--green-800); background: transparent; font-size: 13px; font-weight: 800; cursor: pointer; }
.account-link:hover { background: var(--green-100); }
.account-link.primary { border: 1px solid var(--green-700); }
.account-link:focus-visible { outline: 3px solid var(--green-300); outline-offset: 2px; }

.inner-container { width: min(1200px, calc(100% - 32px)); margin: 0 auto; padding: 30px 0 70px; }

.library-heading h1, .admin-heading h1, .admin-title { margin: 8px 0 6px; color: var(--green-950); font-size: clamp(26px, 4vw, 36px); font-weight: 900; letter-spacing: -.6px; }
.library-heading p { margin: 0 0 20px; color: var(--muted); font-size: 14px; line-height: 2; }
.library-filters { display: flex; gap: 10px; max-width: 520px; margin: 0 0 16px; }
.library-filters input { flex: 1; min-width: 0; min-height: 46px; padding: 10px 14px; border: 1px solid var(--tb-border); border-radius: 12px; outline: none; background: var(--tb-white); }
.library-filters input:focus { border-color: var(--tb-secondary); box-shadow: 0 0 0 3px var(--tb-light); }
.library-filters button { padding: 0 20px; border: 0; border-radius: 12px; color: var(--tb-white); background: var(--green-800); font-weight: 800; cursor: pointer; }
.library-filters button:hover { background: var(--green-950); }
.category-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.chip { padding: 7px 14px; border: 1px solid var(--tb-border); border-radius: 999px; color: var(--tb-text-muted); background: var(--tb-white); font-size: 13px; font-weight: 700; transition: all .2s; }
.chip:hover { border-color: var(--green-500); color: var(--green-800); }
.chip.active { border-color: var(--green-800); color: var(--tb-white); background: var(--green-800); }
.library-count { margin: 0 0 12px; color: var(--muted); font-size: 13px; }
.library-message { padding: 34px; border: 1px dashed var(--tb-border-strong); border-radius: 18px; color: var(--tb-text-muted); background: var(--tb-white); text-align: center; font-size: 14px; line-height: 2; }
.library-message a { color: var(--green-800); font-weight: 800; }
.menu-status { margin: 0 0 22px; color: var(--muted); font-size: 14px; line-height: 2; }
.menu-status strong { color: var(--green-800); }

.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 18px; }
.recipe-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--tb-border); border-radius: 20px; background: var(--tb-white); box-shadow: 0 8px 24px rgba(var(--tb-shadow), .04); transition: transform .22s, box-shadow .22s, border-color .22s; }
a.recipe-card:hover { transform: translateY(-4px); border-color: var(--tb-border-strong); box-shadow: 0 16px 34px rgba(var(--tb-shadow), .1); }
a.recipe-card:focus-visible { outline: 3px solid var(--green-300); outline-offset: 3px; }
.recipe-card-image { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; background: var(--green-50); }
.recipe-card-body { display: flex; flex-direction: column; gap: 6px; padding: 14px 16px 16px; }
.recipe-card-category { align-self: flex-start; padding: 3px 9px; border-radius: 8px; color: var(--green-700); background: var(--green-100); font-size: 11px; font-weight: 800; }
.recipe-card h3 { margin: 2px 0 0; color: var(--green-950); font-size: 16px; font-weight: 900; }
.recipe-card-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 12px; }
.recipe-card-calories { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: #b4552c; font-size: 12px; font-weight: 800; }
.recipe-card-calories span { color: var(--muted); font-weight: 600; }
.library-toolbar { display: flex; flex-wrap: wrap; gap: 4px 24px; margin-bottom: 6px; }
.library-toolbar .category-chips { align-items: center; margin-bottom: 14px; }
.toolbar-label { color: var(--muted); font-size: 12px; font-weight: 700; }
.calorie-box { margin-top: 14px; padding: 14px 16px; border: 1px solid #f3dccb; border-radius: 16px; background: #fff8f2; }
.calorie-box h2 { margin: 0 0 6px; color: #8a3f1c; font-size: 15px; font-weight: 900; }
.calorie-box p { margin: 0 0 10px; font-size: 14px; }
.calorie-box .category-chips { margin-bottom: 10px; }
.calorie-total { color: #8a3f1c; }
.calorie-table { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 0; }
.calorie-table > div { padding: 8px 10px; border: 1px solid #f3dccb; border-radius: 12px; background: var(--tb-white); text-align: center; }
.calorie-table > div.active { border-color: #b4552c; }
.calorie-table dt { color: var(--tb-text-muted); font-size: 11px; font-weight: 700; }
.calorie-table dd { margin: 4px 0 0; color: #8a3f1c; font-size: 14px; font-weight: 900; }
.recipe-card-labels { display: flex; flex-wrap: wrap; gap: 5px; }
.meal-tag { padding: 3px 9px; border-radius: 8px; font-size: 11px; font-weight: 800; white-space: nowrap; }
.meal-tag.veg { color: var(--tb-primary); background: var(--tb-light); }
.meal-tag.healthy { color: #1f5f73; background: #dff1f6; }
.recipe-video { margin-top: 20px; padding-top: 18px; border-top: 1px dashed var(--tb-border); }
.recipe-video h3 { margin: 0 0 10px; color: var(--tb-dark); font-size: 15px; font-weight: 900; }
.recipe-video-frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; border-radius: 16px; background: var(--tb-light); }
.recipe-video-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.recipe-video-file { display: block; width: 100%; border-radius: 16px; background: #000; }
.meal-tag.oven { color: #8a3f1c; background: #fbefe4; }
.meal-tag.skewer { color: #7a5b1d; background: #fff2d6; }
.tag-chip.active { border-color: var(--tb-primary); background: var(--tb-primary); }
.tag-picker { margin: 0 0 16px; padding: 14px; border: 1px solid var(--tb-border); border-radius: 14px; }
.tag-picker legend { padding: 0 6px; color: var(--tb-text); font-size: 13px; font-weight: 800; }
.tag-picker .auth-check { margin: 8px 0 0; line-height: 1.8; }
.picker-option .meal-tag { margin-inline-start: auto; }
.recipe-card.sold-out { opacity: .55; filter: grayscale(.6); }
.ingredient-filter { margin: 0 0 18px; padding: 12px 16px; border: 1px solid var(--tb-border); border-radius: 16px; background: var(--tb-white); }
.ingredient-filter summary { color: var(--tb-text); font-size: 14px; font-weight: 800; cursor: pointer; }
.ingredient-filter summary strong { color: var(--green-800); }
.ingredient-group h3 { margin: 14px 0 8px; color: var(--muted); font-size: 12px; font-weight: 800; }
.ingredient-group .category-chips { gap: 6px; margin-bottom: 0; }
.ingredient-group .chip { padding: 5px 11px; font-size: 12px; }
.ingredient-group .chip small, .cuisine-chips .chip small { margin-inline-start: 4px; opacity: .65; font-size: 11px; }
.cuisine-chips { padding-bottom: 14px; border-bottom: 1px dashed var(--tb-border); }
.recipe-card-cuisine { align-self: flex-start; padding: 3px 9px; border-radius: 8px; color: #7a5b1d; background: #fff2d6; font-size: 11px; font-weight: 800; }
.ingredient-clear { display: inline-block; margin-top: 12px; color: var(--green-800); font-size: 12px; font-weight: 800; }
.ingredient-tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 14px; padding: 0; list-style: none; }
.ingredient-tags .chip { padding: 4px 10px; font-size: 12px; }

.back-link { display: inline-flex; gap: 6px; margin-bottom: 16px; color: var(--green-800); font-size: 13px; font-weight: 800; }
.back-link:hover { color: var(--green-950); }
.recipe-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 32px; align-items: center; margin-bottom: 28px; }
.recipe-hero img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 24px; box-shadow: 0 20px 50px rgba(var(--tb-shadow), .12); }
.recipe-summary h1 { margin: 10px 0 8px; color: var(--green-950); font-size: clamp(28px, 4vw, 42px); font-weight: 900; letter-spacing: -.8px; }
.recipe-summary p { margin: 0 0 18px; color: var(--tb-text-muted); font-size: 15px; line-height: 2.1; }
.recipe-facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin: 0; }
.recipe-facts div { padding: 12px; border: 1px solid var(--tb-border); border-radius: 14px; background: var(--tb-white); text-align: center; }
.recipe-facts dt { color: var(--muted); font-size: 11px; }
.recipe-facts dd { margin: 4px 0 0; color: var(--green-950); font-size: 14px; font-weight: 800; }
.recipe-columns { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 20px; align-items: start; }
.recipe-panel { padding: 22px 24px; border: 1px solid var(--tb-border); border-radius: 22px; background: var(--tb-white); }
.recipe-panel h2 { margin: 0 0 14px; color: var(--green-950); font-size: 19px; font-weight: 900; }
.ingredient-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.ingredient-list li { position: relative; padding: 8px 26px 8px 10px; border-radius: 10px; background: var(--green-50); color: var(--ink); font-size: 14px; line-height: 1.8; }
.ingredient-list li::before { position: absolute; right: 10px; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); content: ''; }
.step-list { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step-list li { position: relative; padding-right: 46px; color: var(--ink); font-size: 14px; line-height: 2.05; counter-increment: step; }
.step-list li::before { position: absolute; right: 0; top: 2px; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 11px; color: var(--green-800); background: var(--green-100); font-weight: 900; content: counter(step, persian); }
.recipe-note { margin: 16px 0 0; padding: 10px 12px; border-radius: 10px; color: #7a5b1d; background: #fff6e2; font-size: 12px; line-height: 1.9; }
.recipe-empty { color: var(--muted); font-size: 14px; }

/* Admin panel */
.admin-tabs { display: inline-flex; gap: 4px; margin-bottom: 18px; padding: 4px; border-radius: 14px; background: var(--green-100); }
.admin-tabs a { padding: 8px 16px; border-radius: 10px; color: var(--tb-text-muted); font-size: 13px; font-weight: 800; }
.admin-tabs a.active { color: var(--green-950); background: var(--tb-white); box-shadow: 0 2px 8px rgba(var(--tb-shadow), .08); }
.admin-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.admin-primary, .admin-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 12px; font-size: 14px; font-weight: 800; cursor: pointer; }
.admin-primary { border: 0; color: var(--tb-white); background: var(--green-800); }
.admin-primary:hover { background: var(--green-950); }
.admin-secondary { border: 1px solid var(--tb-border); color: var(--green-800); background: var(--tb-white); }
.admin-link { color: var(--green-800); font-size: 13px; font-weight: 800; }
.admin-link:hover { text-decoration: underline; }
.admin-success { margin-bottom: 14px; padding: 12px 14px; border-radius: 11px; color: var(--tb-dark); background: var(--tb-light); font-size: 13px; }
.admin-table-wrap { overflow-x: auto; border: 1px solid var(--tb-border); border-radius: 18px; background: var(--tb-white); }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { padding: 12px 14px; color: var(--muted); background: var(--tb-bg); font-weight: 700; text-align: right; white-space: nowrap; }
.admin-table td { padding: 10px 14px; border-top: 1px solid var(--tb-border); vertical-align: middle; white-space: nowrap; }
.admin-name { color: var(--green-950); font-weight: 800; }
.admin-thumb { display: block; width: 64px; height: 48px; object-fit: cover; border-radius: 9px; background: var(--green-50); }
.status-badge { padding: 3px 9px; border-radius: 8px; font-size: 11px; font-weight: 800; }
.status-badge.on { color: var(--tb-dark); background: var(--tb-light); }
.status-badge.off { color: #7b6f6f; background: #f1efee; }
.status-badge.soon { color: #7a5b1d; background: #fff2d6; }

.admin-lead { margin: -6px 0 16px; color: var(--muted); font-size: 13px; line-height: 2; }
.admin-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.admin-card { display: grid; gap: 6px; padding: 20px; border: 1px solid var(--tb-border); border-radius: 18px; background: var(--tb-white); transition: transform .2s, box-shadow .2s, border-color .2s; }
.admin-card:hover { transform: translateY(-3px); border-color: var(--tb-border-strong); box-shadow: 0 14px 30px rgba(var(--tb-shadow), .08); }
.admin-card-icon { font-size: 26px; }
.admin-card strong { color: var(--green-950); font-size: 16px; }
.admin-card span:last-child { color: var(--muted); font-size: 13px; line-height: 1.9; }
.role-badges { display: flex; flex-wrap: wrap; gap: 5px; }
.status-badge.owner { color: var(--tb-white); background: var(--green-800); }
.role-picker { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; border: 0; }
.role-picker legend { margin-bottom: 10px; color: var(--tb-text); font-size: 14px; font-weight: 800; }
.role-option { display: flex; align-items: flex-start; gap: 12px; padding: 14px; border: 1px solid var(--tb-border); border-radius: 14px; cursor: pointer; }
.role-option:has(input:checked) { border-color: var(--green-600); background: var(--green-50); }
.role-option input { width: 18px; height: 18px; margin-top: 3px; accent-color: var(--green-700); }
.role-option span { display: grid; gap: 2px; }
.role-option strong { color: var(--green-950); font-size: 14px; }
.role-option small { color: var(--muted); font-size: 12px; }
.order-list { display: grid; gap: 10px; }
.order-item { border: 1px solid var(--tb-border); border-radius: 16px; background: var(--tb-white); }
.order-item summary { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 14px 16px; font-size: 13px; cursor: pointer; }
.order-item .recipe-empty, .order-weeks { margin: 0; padding: 0 16px 14px; }
.order-weeks { display: grid; gap: 8px; list-style: none; font-size: 13px; }
.order-weeks li { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }

.admin-form { padding: 24px; border: 1px solid var(--tb-border); border-radius: 22px; background: var(--tb-white); }
.admin-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 18px; }
.admin-form-grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.admin-form-grid .span-2 { grid-column: 1 / -1; }
.admin-form textarea, .admin-form select { width: 100%; padding: 10px 13px; border: 1px solid var(--tb-border); border-radius: 11px; outline: none; color: var(--ink); background: var(--tb-white); line-height: 1.9; }
.admin-form select { min-height: 46px; }
.admin-form textarea:focus, .admin-form select:focus { border-color: var(--tb-secondary); box-shadow: 0 0 0 3px var(--tb-light); }
.admin-form .auth-field input:not([type=checkbox]):not([type=file]) { text-align: right; }
.admin-check-field { align-content: end; }
.admin-image-row { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; }
.admin-image-row > div { display: grid; gap: 8px; }
.admin-preview { width: 160px; height: 120px; object-fit: cover; border-radius: 14px; background: var(--green-50); }
.admin-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 8px; }

.menu-meal-picker { margin: 4px 0 18px; padding: 0; border: 0; }
.menu-meal-picker legend { margin-bottom: 10px; color: var(--tb-text); font-size: 14px; font-weight: 800; }
.menu-meal-picker legend span { color: var(--muted); font-weight: 600; }
.picker-group h2 { margin: 14px 0 8px; color: var(--green-700); font-size: 13px; font-weight: 900; }
.picker-options { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 8px; }
.picker-option { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid var(--tb-border); border-radius: 12px; font-size: 13px; cursor: pointer; }
.picker-option:has(input:checked) { border-color: var(--green-600); background: var(--green-50); }
.picker-option img { width: 48px; height: 36px; object-fit: cover; border-radius: 7px; }
.picker-option input { width: 17px; height: 17px; accent-color: var(--green-700); }

@media (max-width: 800px) {
    .recipe-hero, .recipe-columns { grid-template-columns: 1fr; }
    .admin-form-grid, .admin-form-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
    .account-email { max-width: 110px; padding: 7px 6px; font-size: 12px; }
}
@media (max-width: 650px) {
    .header-actions { gap: 6px; }
    .account-link { padding: 7px 8px; font-size: 12px; }
    /* The phone menu (MobileMenu.razor) takes over the links and the account menu. */
    .inner-header { position: relative; min-height: 68px; }
    .inner-header > .inner-nav, .inner-header > .account-menu { display: none; }
}
@media (max-width: 560px) {
    .recipe-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .recipe-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
    .recipe-card-body { padding: 10px 11px 12px; }
    .recipe-card h3 { font-size: 14px; }
    .recipe-card-meta { flex-direction: column; gap: 2px; font-size: 11px; }
    .recipe-panel, .admin-form { padding: 18px 16px; }
}

/* ---------- Magazine: article cards, list and article page ---------- */
.article-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.article-card { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--tb-border); border-radius: 22px; background: var(--tb-white); box-shadow: 0 8px 24px rgba(var(--tb-shadow), .04); transition: translate .22s, box-shadow .22s, border-color .22s; }
.article-card:hover { translate: 0 -3px; border-color: var(--tb-border-strong); box-shadow: 0 16px 34px rgba(var(--tb-shadow), .09); }
.article-card-image { overflow: hidden; aspect-ratio: 16 / 10; background: var(--tb-light); }
.article-card-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: scale .5s ease; }
.article-card:hover .article-card-image img { scale: 1.04; }
.article-card-body { display: flex; flex: 1; flex-direction: column; gap: 8px; padding: 18px 20px 20px; }
.article-card-category { align-self: flex-start; padding: 4px 10px; border-radius: 8px; color: var(--tb-primary); background: var(--tb-light); font-size: 11px; font-weight: 800; }
.article-card h3 { margin: 2px 0 0; color: var(--tb-dark); font-size: 17px; font-weight: 900; line-height: 1.7; }
.article-card p { display: -webkit-box; margin: 0; overflow: hidden; color: var(--tb-text-muted); font-size: 13px; line-height: 2; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.article-card-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; color: var(--tb-text-muted); font-size: 12px; }
.article-card.featured { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); margin-bottom: 22px; }
.article-card.featured .article-card-image { aspect-ratio: auto; min-height: 300px; }
.article-card.featured .article-card-body { justify-content: center; gap: 12px; padding: 34px 36px; }
.article-card.featured h3 { font-size: clamp(20px, 2.4vw, 27px); line-height: 1.6; }
.article-card.featured p { -webkit-line-clamp: 4; font-size: 14px; }

.article-detail { max-width: 820px; margin: 0 auto; }
.article-header { display: flex; flex-direction: column; gap: 12px; margin-bottom: 26px; }
.article-header h1 { margin: 0; color: var(--tb-dark); font-size: clamp(26px, 4.2vw, 40px); font-weight: 900; line-height: 1.55; letter-spacing: -.5px; }
.article-lead { margin: 0; color: var(--tb-text-muted); font-size: 16px; line-height: 2.1; }
.article-header .article-card-meta { margin: 0; padding: 0; }
.article-cover { display: block; width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: 24px; background: var(--tb-light); }
.article-body { margin-top: 30px; color: var(--tb-text); font-size: 16px; line-height: 2.25; }
.article-body p { margin: 0 0 18px; }
.article-body h2 { margin: 34px 0 12px; color: var(--tb-dark); font-size: 21px; font-weight: 900; }
.article-body ul { margin: 0 0 20px; padding-inline-start: 22px; }
.article-body li { margin-bottom: 8px; }
.article-body li::marker { color: var(--tb-secondary); }
.article-cta { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin-top: 36px; padding: 24px 26px; border: 1px solid var(--tb-border); border-radius: 22px; background: var(--tb-light); }
.article-cta strong { display: block; color: var(--tb-dark); font-size: 16px; font-weight: 900; }
.article-cta span { color: var(--tb-text-muted); font-size: 13px; }
.article-related { max-width: 1200px; margin: 54px auto 0; }
.article-related h2 { margin: 0 0 18px; color: var(--tb-dark); font-size: 22px; font-weight: 900; }
.article-body-input { font-size: 14px; line-height: 2; }

@media (max-width: 800px) {
    .article-card.featured { grid-template-columns: 1fr; }
    .article-card.featured .article-card-image { min-height: 0; aspect-ratio: 16 / 10; }
    .article-card.featured .article-card-body { padding: 20px; }
    .article-body { font-size: 15px; }
}
.picker-slot { margin-inline-start: auto; padding: 3px 6px; border: 1px solid var(--tb-border); border-radius: 8px; background: var(--tb-white); font-size: 12px; }

/* ---------- Weekly menu by slot ---------- */
.menu-slot { margin-bottom: 30px; }
.menu-slot-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 14px; margin-bottom: 12px; }
.menu-slot-heading h2 { margin: 0; color: var(--tb-dark); font-size: 20px; font-weight: 900; }
.menu-slot-heading span { color: var(--tb-text-muted); font-size: 12px; }
.menu-plan-note { margin: 0 0 22px; padding: 12px 16px; border-radius: 14px; color: var(--tb-text); background: var(--tb-light); font-size: 13px; line-height: 2; }

/* ---------- Ingredient prices and meal cost ---------- */
.price-table input, .price-table select { width: 100%; min-width: 80px; padding: 6px 8px; border: 1px solid var(--tb-border); border-radius: 8px; background: var(--tb-white); font-size: 13px; }
.price-table .price-new td { background: var(--tb-bg); }
.cost-panel { margin: 4px 0 6px; padding: 16px 18px; border: 1px solid var(--tb-border-strong); border-radius: 16px; background: var(--tb-white); }
.cost-panel header { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 16px; margin-bottom: 10px; }
.cost-panel h2 { margin: 0; color: var(--tb-dark); font-size: 15px; font-weight: 900; }
.cost-totals { display: flex; flex-wrap: wrap; gap: 6px 16px; color: var(--tb-text-muted); font-size: 13px; }
.cost-totals strong { color: var(--tb-primary); }
.cost-table { font-size: 12px; }
.cost-source { color: var(--tb-text-muted); font-size: 11px; }
.cost-unpriced { margin: 10px 0 0; color: #8a3f1c; font-size: 12px; line-height: 1.9; }

/* ---------- Weekly menu builder ---------- */
.builder-dates { margin-bottom: 14px; }
.builder-dates input { width: 100%; }
.builder-slots { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.builder-slot { display: grid; gap: 2px; min-width: 110px; padding: 10px 14px; border: 1px solid var(--tb-border); border-radius: 14px; color: var(--tb-text); background: var(--tb-white); text-align: right; cursor: pointer; font: inherit; }
.builder-slot strong { font-size: 13px; }
.builder-slot small { color: var(--tb-text-muted); font-size: 11px; }
.builder-slot.active { border-color: var(--tb-primary); color: var(--tb-white); background: var(--tb-primary); }
.builder-slot.active small { color: rgba(255, 255, 255, .85); }
.builder-slot.add { place-content: center; border-style: dashed; color: var(--tb-primary); font-weight: 800; }
.builder { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); align-items: start; gap: 16px; }
.builder-finder, .builder-slot-panel, .builder-packages { padding: 16px 18px; border: 1px solid var(--tb-border); border-radius: 18px; background: var(--tb-white); }
.builder-slot-panel { position: sticky; top: 12px; }
.builder h2, .builder-packages h2 { margin: 0 0 12px; color: var(--tb-dark); font-size: 16px; font-weight: 900; }
.builder-search { width: 100%; padding: 10px 12px; border: 1px solid var(--tb-border); border-radius: 12px; font: inherit; }
.builder-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin: 10px 0; }
.builder-quick .auth-check { margin: 0; }
.builder-quick select { padding: 6px 8px; border: 1px solid var(--tb-border); border-radius: 8px; font: inherit; font-size: 13px; }
.builder-ingredients { margin-bottom: 10px; padding: 10px 12px; border: 1px dashed var(--tb-border-strong); border-radius: 14px; }
.builder-ingredients summary { color: var(--tb-dark); font-size: 13px; font-weight: 800; cursor: pointer; }
.builder-ingredients summary strong { color: var(--tb-primary); }
.builder-ingredients .chip { font: inherit; font-size: 12px; cursor: pointer; }
.builder-ingredients .ingredient-clear { border: 0; background: none; cursor: pointer; font: inherit; }
.builder-results, .builder-chosen { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.builder-results { max-height: 640px; overflow-y: auto; }
.builder-results li { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid transparent; border-radius: 12px; }
.builder-results li:hover { background: var(--tb-bg); }
.builder-results li.in-current { border-color: var(--tb-border-strong); background: var(--tb-light); }
.builder-results img { width: 56px; height: 42px; flex-shrink: 0; object-fit: cover; border-radius: 8px; }
.builder-meal { display: grid; flex: 1; gap: 2px; min-width: 0; }
.builder-meal a { color: var(--tb-text); font-size: 13px; font-weight: 800; }
.builder-meal small { color: var(--tb-text-muted); font-size: 11px; }
.builder-meal small b { color: var(--tb-primary); }
.builder-add, .builder-remove { flex-shrink: 0; padding: 6px 10px; border-radius: 10px; font: inherit; font-size: 12px; font-weight: 800; cursor: pointer; }
.builder-add { border: 1px solid var(--tb-primary); color: var(--tb-primary); background: var(--tb-white); }
.builder-add:hover { color: var(--tb-white); background: var(--tb-primary); }
.builder-remove { border: 1px solid #f3dccb; color: #b42318; background: #fff8f2; }
.builder-slot-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.builder-slot-heading .admin-link { border: 0; background: none; cursor: pointer; font: inherit; }
.builder-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px; }
.builder-stats > div { display: grid; gap: 3px; padding: 10px 12px; border-radius: 12px; background: var(--tb-bg); }
.builder-stats span, .builder-stats small { color: var(--tb-text-muted); font-size: 11px; }
.builder-stats strong { color: var(--tb-dark); font-size: 15px; font-weight: 900; }
.builder-chosen li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; background: var(--tb-bg); font-size: 13px; }
.builder-chosen li span { flex: 1; font-weight: 800; }
.builder-chosen li small { color: var(--tb-text-muted); font-size: 11px; }
.builder-totals { margin-top: 12px; }
.builder-totals summary { color: var(--tb-dark); font-size: 13px; font-weight: 800; cursor: pointer; }
.builder-unslotted { margin-top: 16px; }
.builder-unslotted h3 { margin: 0 0 8px; color: var(--tb-text-muted); font-size: 13px; }
.builder-packages { margin-top: 16px; }
@media (max-width: 900px) {
    .builder { grid-template-columns: 1fr; }
    .builder-slot-panel { position: static; }
}