/* The modern appearance is the only site theme; styles.css stays as the base layer. */
:root { --ui-blue: oklch(0.67 0.15 255); --ui-green: oklch(0.73 0.12 157); --ui-red: oklch(0.72 0.17 22); --ui-gold: oklch(0.79 0.12 83); --ui-bg: oklch(0.20 0.01 255); --ui-surface: oklch(0.245 0.012 255); --ui-raised: oklch(0.29 0.015 255); --ui-text: oklch(0.95 0.005 255); --ui-muted: oklch(0.70 0.015 255); --ui-line: oklch(0.36 0.015 255); --ui-overlay: oklch(0.1 0 0 / .72); --ui-focus: 0 0 0 3px oklch(0.67 0.15 255 / .22); --ui-shadow: 0 12px 36px oklch(0.1 0 0 / .22); }
.brand-icon img { width:100%;height:100%;object-fit:contain; }
.site-sidebar,.workspace-bar,.sidebar-shade { display:none; }
html[data-theme="modern"] { color-scheme:dark; --text:var(--ui-text);--muted:var(--ui-muted);--good:var(--ui-green);--bad:var(--ui-red);--warn:var(--ui-gold);--line:var(--ui-line);--card1:var(--ui-surface);--card2:var(--ui-surface); }
html[data-theme="modern"] body { background:var(--ui-bg);color:var(--ui-text);font-family:'Noto Sans Arabic','Manrope',sans-serif;line-height:1.65;letter-spacing:0; }
html[data-theme="modern"] button,html[data-theme="modern"] input,html[data-theme="modern"] select { font-family:inherit; }
html[data-theme="modern"] .page-shell:not(.auth-shell) { max-width:1600px;margin-inline-start:248px;padding:0 32px 24px; }
html[data-theme="modern"] .site-sidebar { display:flex;flex-direction:column;position:fixed;inset-block:0;inset-inline-start:0;width:248px;padding:28px 18px 18px;background:var(--ui-surface);border-inline-end:1px solid var(--ui-line);z-index:40;overflow-y:auto; }
.sidebar-brand { display:flex;align-items:center;gap:12px;padding:0 8px 24px;border-bottom:1px solid var(--ui-line); }
.sidebar-brand img { width:48px;height:48px;object-fit:contain; }
.sidebar-brand strong { font-family:'Sora',sans-serif;font-size:22px;color:var(--ui-text); }
.sidebar-brand small { display:block;color:var(--ui-muted);font-size:11px; }
.nav-group-label { font-size:11px;color:var(--ui-muted);margin:24px 12px 10px; }
.sidebar-nav { display:flex;flex-direction:column;gap:5px; }
.sidebar-nav button { display:flex;align-items:center;gap:12px;text-align:start;background:none;border:1px solid transparent;border-radius:6px;padding:12px;color:var(--ui-muted);cursor:pointer;font-size:13px;font-weight:600;min-height:46px; }
.sidebar-nav button:hover { color:var(--ui-text);background:var(--ui-raised); }
.sidebar-nav button.active { color:var(--ui-blue);background:color-mix(in oklch,var(--ui-blue) 12%,transparent);border-color:color-mix(in oklch,var(--ui-blue) 20%,transparent); }
.ui-icon { width:20px;height:20px;flex-shrink:0;display:inline-block;vertical-align:middle; }
.sidebar-bottom { margin-top:auto;padding:24px 8px 0; }
.theme-switch { display:grid;grid-template-columns:1fr 1fr;gap:4px;padding:4px;background:var(--ui-bg);border:1px solid var(--ui-line);border-radius:6px;margin-top:8px; }
.theme-switch button { border:0;border-radius:4px;background:none;color:var(--ui-muted);padding:8px;font-size:12px;cursor:pointer; }
.theme-switch button[aria-pressed="true"] { background:var(--ui-raised);color:var(--ui-text); }
.sidebar-account { display:flex;align-items:center;justify-content:space-between;gap:8px;border-top:1px solid var(--ui-line);margin-top:22px;padding-top:18px;color:var(--ui-text);font-size:13px; }
.sidebar-account a { color:var(--ui-muted);padding:6px; }
html[data-theme="modern"] .page-shell:not(.auth-shell) > .topbar { display:none; }
html[data-theme="modern"] .workspace-bar { display:flex;justify-content:space-between;align-items:center;gap:12px;min-height:88px;border-bottom:1px solid var(--ui-line);margin-bottom:28px; }
.workspace-bar h1 { font-size:20px;font-weight:700;margin:0; }
.workspace-heading,.workspace-actions { display:flex;align-items:center;gap:12px; }
.market-live { display:flex;align-items:center;gap:7px;font:11px 'Manrope',sans-serif;color:var(--ui-muted);direction:ltr; }
.market-live::before { content:'';width:6px;height:6px;border-radius:50%;background:var(--ui-green); }
.mobile-menu { display:none; }
html[data-theme="modern"] .icon-btn,html[data-theme="modern"] .ghost-btn { display:inline-flex;align-items:center;justify-content:center;gap:8px;color:var(--ui-text);background:var(--ui-raised);border:1px solid var(--ui-line);border-radius:6px;box-shadow:none;min-height:38px;text-decoration:none; }
html[data-theme="modern"] .icon-btn { width:38px;height:38px; }
html[data-theme="modern"] .primary-btn { background:var(--ui-blue);color:var(--ui-bg);border:1px solid var(--ui-blue);border-radius:6px;font-weight:700;min-height:44px; }
html[data-theme="modern"] button:hover { filter:brightness(1.08); }
html[data-theme="modern"] :is(button,a,input,select,summary):focus-visible { outline:2px solid var(--ui-blue);outline-offset:3px; }
html[data-theme="modern"] .glass { background:none;border:0;border-radius:0;box-shadow:none;backdrop-filter:none; }
html[data-theme="modern"] .hero { padding:0;margin:0 0 20px; }
html[data-theme="modern"] .hero h1 { font-family:'Sora',sans-serif;font-size:28px;line-height:1.4; }
html[data-theme="modern"] .hero p { color:var(--ui-muted);font-size:13px; }
html[data-theme="modern"] .compact-controls { grid-template-columns:repeat(3,minmax(0,1fr));gap:18px;padding:22px 0;border-block:1px solid var(--ui-line);margin:0;align-items:start; }
html[data-theme="modern"] .field { min-width:0;gap:7px; }
html[data-theme="modern"] .field label { color:var(--ui-muted);font-size:12px; }
html[data-theme="modern"] :is(.field input,.field select,.ingredient-row select,.ingredient-row input,.best-sort-wrap select,textarea) { background:var(--ui-surface);color:var(--ui-text);border:1px solid var(--ui-line);border-radius:6px;font-size:13px;min-height:44px;height:auto;padding:10px 12px;width:100%; }
html[data-theme="modern"] input:focus,html[data-theme="modern"] select:focus { border-color:var(--ui-blue);box-shadow:var(--ui-focus);outline:none; }
html[data-theme="modern"] input[type="checkbox"],html[data-theme="modern"] input[type="radio"] { accent-color:var(--ui-blue);width:16px;min-height:16px; }
html[data-theme="modern"] .craft-amount-box { background:var(--ui-surface);border-color:var(--ui-line);border-radius:6px;height:44px; }
html[data-theme="modern"] .craft-amount-box input { color:var(--ui-text); }
html[data-theme="modern"] .status-card { padding:14px 0;margin:0 0 28px;gap:10px;font-size:12px; }
html[data-theme="modern"] #statusText { color:var(--ui-green); }
html[data-theme="modern"] .content-grid { grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:28px; }
html[data-theme="modern"] .content-grid > section:last-child { grid-column:1 / -1;border-top:1px solid var(--ui-line);padding-top:24px; }
html[data-theme="modern"] .panel { padding:0;margin-bottom:28px;min-width:0; }
html[data-theme="modern"] .panel-head { gap:12px;flex-wrap:wrap;margin-bottom:18px; }
html[data-theme="modern"] .panel-head h2 { font-size:18px; }
html[data-theme="modern"] :is(.info-card,.ingredient-card,.ingredient-row,.access-mode,.access-user,.npc-compare,.logs-box) { background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:6px;color:var(--ui-text);box-shadow:none; }
html[data-theme="modern"] .info-card { padding:18px; }
html[data-theme="modern"] .info-value { font-family:'Manrope','Noto Sans Arabic',sans-serif;font-size:24px;overflow-wrap:anywhere;font-variant-numeric:tabular-nums; }
html[data-theme="modern"] .summary-grid { gap:12px;grid-template-columns:repeat(2,minmax(0,1fr)); }
html[data-theme="modern"] .summary-grid .info-card:first-child { background:none;padding:0 0 16px;border:0;border-bottom:1px solid var(--ui-line); }
html[data-theme="modern"] :is(.positive,.good,.best-metrics .positive,.info-card.positive .info-value,.tree-summary .positive,.tree-steps .positive) { color:var(--ui-green); }
html[data-theme="modern"] :is(.negative,.bad,.best-metrics .negative,.info-card.negative .info-value,.tree-summary .negative,.tree-steps .negative) { color:var(--ui-red); }
html[data-theme="modern"] :is(.item-summary-recipe,.final-amount-badge,.mc-title) { color:var(--ui-blue); }
html[data-theme="modern"] .chip { color:var(--ui-muted);background:var(--ui-raised);border:1px solid var(--ui-line);border-radius:4px;font-size:11px; }
html[data-theme="modern"] .ingredient-card { padding:18px; }
html[data-theme="modern"] .ingredient-title { position:static;margin:0 0 16px;display:flex;flex-wrap:wrap;justify-content:space-between;gap:10px; }
html[data-theme="modern"] .ingredient-title .title-with-icon { order:-1;flex-basis:100%;justify-content:start;overflow-wrap:anywhere; }
html[data-theme="modern"] .ingredient-title .chip { position:static; }
html[data-theme="modern"] .ingredient-title span:not(.chip) { font-size:16px; }
html[data-theme="modern"] .ingredient-stats { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
html[data-theme="modern"] .ingredient-stat-box { min-width:0;max-width:none;background:none;border:0;border-inline-end:1px solid var(--ui-line);border-radius:0;padding:4px; }
html[data-theme="modern"] .ingredient-stat-box:last-child { border:0; }
html[data-theme="modern"] .ingredient-stat-label { color:var(--ui-muted);font-size:10px; }
html[data-theme="modern"] .ingredient-stat-value { color:var(--ui-text);overflow-wrap:anywhere;font-variant-numeric:tabular-nums; }
html[data-theme="modern"] .ingredient-meta { color:var(--ui-muted); }
html[data-theme="modern"] .tree-head .best-title { font-size:19px;font-family:'Manrope',sans-serif; }
html[data-theme="modern"] .tree-card { padding:16px;margin-bottom:6px; }
html[data-theme="modern"] .tree-summary { margin:10px 0;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px; }
html[data-theme="modern"] .tree-summary > div { background:var(--ui-raised);border-radius:4px;padding:8px 10px; }
html[data-theme="modern"] .tree-summary b { font-size:18px;font-family:'Manrope',sans-serif;overflow-wrap:anywhere; }
html[data-theme="modern"] .tree-block { border:0;border-top:1px solid var(--ui-line);background:none;padding:10px 0 0;border-radius:0;margin-top:10px; }
html[data-theme="modern"] .tree-block h4 { color:var(--ui-text);margin-bottom:8px; }
html[data-theme="modern"] .tree-line { border-bottom:1px solid var(--ui-line);padding:6px 0; }
html[data-theme="modern"] .tree-line:last-child { border:0; }
html[data-theme="modern"] .tree-steps li { padding:14px 0;border-color:var(--ui-line); }
html[data-theme="modern"] .tree-node { border-color:var(--ui-blue);padding-inline-start:20px; }
html[data-theme="modern"] .tree-item { background:var(--ui-raised);border-radius:4px;padding:8px 12px; }
html[data-theme="modern"] .suggest-filters { gap:16px;padding:0 0 24px;border-bottom:1px solid var(--ui-line); }
html[data-theme="modern"] .suggest-note { color:var(--ui-muted);font-size:12px; }
html[data-theme="modern"] .best-sort-wrap { margin-bottom:16px; }
html[data-theme="modern"] .mc-tooltip { background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:6px;font-family:'Manrope',sans-serif; }
html[data-theme="modern"] :is(.mc-sub,.mc-dim) { color:var(--ui-muted); }
html[data-theme="modern"] .mc-key { color:var(--ui-text); }
html[data-theme="modern"] .mc-coins { color:var(--ui-gold); }
html[data-theme="modern"] :is(.mini-note,.npc-verdict.npc,.info-card.highlight) { color:var(--ui-gold);background:color-mix(in oklch,var(--ui-gold) 8%,transparent);border-color:color-mix(in oklch,var(--ui-gold) 30%,transparent);border-radius:6px; }
html[data-theme="modern"] .npc-verdict.bazaar { background:color-mix(in oklch,var(--ui-green) 8%,transparent);border-color:var(--ui-green);border-radius:6px; }
html[data-theme="modern"] .auth-error { color:var(--ui-red);background:color-mix(in oklch,var(--ui-red) 10%,transparent);border-color:var(--ui-red); }
html[data-theme="modern"] .footer { margin-top:30px;padding:20px 0;border-top:1px solid var(--ui-line);color:var(--ui-muted);font-size:11px;gap:12px; }
html[data-theme="modern"] .auth-shell { padding-top:64px;max-width:500px; }
html[data-theme="modern"] .auth-shell .topbar { display:block;text-align:center;padding:0 0 28px; }
html[data-theme="modern"] .auth-shell .brand { flex-direction:column; }
html[data-theme="modern"] .auth-shell .brand-icon { width:80px;height:80px;background:none;border:0; }
html[data-theme="modern"] .auth-shell h1 { font-family:'Sora',sans-serif;font-size:24px;margin:8px 0; }
html[data-theme="modern"] .auth-shell p { color:var(--ui-muted);font-size:13px; }
html[data-theme="modern"] .auth-panel { padding:28px;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:8px; }
.auth-appearance { display:flex;justify-content:center;margin-top:18px; }
.workspace-hidden { display:none !important; }
@media(min-width:1800px) { html[data-theme="modern"] .page-shell:not(.auth-shell) { margin-inline-end:auto; } }
@media(max-width:1100px) { html[data-theme="modern"] .site-sidebar { width:220px;padding-inline:14px; } html[data-theme="modern"] .page-shell:not(.auth-shell) { margin-inline-start:220px;padding-inline:22px; } html[data-theme="modern"] .content-grid { grid-template-columns:1fr; } html[data-theme="modern"] .market-info { grid-template-columns:repeat(auto-fit,minmax(220px,1fr)); } }
@media(max-width:760px) { html[data-theme="modern"] .page-shell:not(.auth-shell) { margin-inline-start:0;padding-inline:18px; } html[data-theme="modern"] .site-sidebar { width:260px;transform:translateX(100%);transition:transform .2s; } html[data-theme="modern"] .sidebar-open .site-sidebar { transform:none; } html[data-theme="modern"] .sidebar-open .sidebar-shade { display:block;position:fixed;inset:0;background:var(--ui-overlay);z-index:39;border:0; } html[data-theme="modern"] .mobile-menu { display:inline-flex; } html[data-theme="modern"] .workspace-bar { min-height:72px;margin-bottom:22px; } .workspace-bar h1 { font-size:16px; } .market-live { display:none; } html[data-theme="modern"] .hero h1 { font-size:24px; } html[data-theme="modern"] .compact-controls { grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; } html[data-theme="modern"] .compact-controls .field-buy,html[data-theme="modern"] .compact-controls .field-sell { grid-column:1 / -1; } html[data-theme="modern"] .tree-summary { grid-template-columns:1fr;gap:8px; } html[data-theme="modern"] .tree-summary > div { flex-direction:row;justify-content:space-between;align-items:center;gap:8px; } html[data-theme="modern"] .tree-card { padding:16px; } html[data-theme="modern"] .tree-steps li { flex-direction:column; } html[data-theme="modern"] .tree-head .best-title { font-size:16px; } html[data-theme="modern"] .recipe-form-grid { grid-template-columns:1fr; } html[data-theme="modern"] .auth-shell { padding-top:28px; } html[data-theme="modern"] .auth-panel { padding:22px; } html[data-theme="modern"] .access-grid { grid-template-columns:1fr; } }
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none !important;scroll-behavior:auto !important; } }/* Final layout constraints */
html[data-theme="modern"] .icon-btn.mobile-menu { display:none; }
html[data-theme="modern"] .ingredient-stats { grid-template-columns:repeat(4,minmax(0,1fr)); }
html[data-theme="modern"] .info-value:not(.item-summary-value):not(.good):not(.bad) { font-size:20px; }
@media(max-width:760px) {
 html[data-theme="modern"] .icon-btn.mobile-menu { display:inline-flex; }
 html[data-theme="modern"] .compact-controls { grid-template-columns:repeat(2,minmax(0,1fr)); }
 html[data-theme="modern"] .compact-controls .field:nth-child(-n+2),html[data-theme="modern"] .compact-controls .field-mode { grid-column:1 / -1; }
 html[data-theme="modern"] .compact-controls .action-field { align-self:end; }
 html[data-theme="modern"] .compact-controls .action-field > label { display:none; }
 html[data-theme="modern"] .compact-controls .field label { margin-bottom:0; }
 html[data-theme="modern"] .ingredient-stats { grid-template-columns:repeat(2,minmax(0,1fr));row-gap:16px; }
 html[data-theme="modern"] .ingredient-stat-box:nth-child(2) { border:0; }
}

/* روابط داخل القائمة الجانبية (نفس شكل الأزرار) */
.sidebar-nav a { display:flex;align-items:center;gap:12px;text-align:start;border:1px solid transparent;border-radius:6px;padding:12px;color:var(--ui-muted);font-size:13px;font-weight:600;min-height:46px;text-decoration:none; }
.sidebar-nav a:hover { color:var(--ui-text);background:var(--ui-raised); }
.sidebar-nav a[aria-current="page"] { color:var(--ui-blue);background:color-mix(in oklch,var(--ui-blue) 12%,transparent);border-color:color-mix(in oklch,var(--ui-blue) 20%,transparent); }
html[data-theme="modern"] :is(.tree-head,.tree-line,.tree-summary,.tree-steps,.access-modes) { min-width:0; }
html[data-theme="modern"] :is(.tree-head,.tree-line,.tree-steps li,.access-modes) { flex-wrap:wrap;gap:10px; }
html[data-theme="modern"] :is(.tree-item,.tree-line bdi,.step-text,.best-title,.access-user) { overflow-wrap:anywhere; }
html[data-theme="modern"] .tree-node { padding-inline-start:14px; }
html[data-theme="modern"] button:disabled { opacity:.55;cursor:default; }
/* Framed tools must not inherit the horizontal layout of public recipes.
   Keep this correction in the optional stylesheet for both appearances. */
html[data-theme] .ingredient-card:is(.tree-card,.access-card) {
 display:block;min-width:0;width:100%;
}
html[data-theme] #treeList { width:100%;min-width:0;align-items:stretch; }
html[data-theme] .ingredient-card.tree-card { max-width:none;margin-inline:0;box-sizing:border-box; }
html[data-theme] .tree-card > :is(.tree-head,.tree-summary,.tree-block,.best-sub) {
 width:100%;min-width:0;
}
html[data-theme] .tree-card .tree-head {
 display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:10px;
}
html[data-theme] .tree-card .best-main { min-width:0; }
html[data-theme] .tree-card .best-title { overflow-wrap:anywhere; }
html[data-theme] .tree-card .tree-summary {
 display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;
}
html[data-theme] .tree-summary > div { min-width:0; }
html[data-theme] .tree-summary b { display:block;direction:ltr;text-align:start;font-variant-numeric:tabular-nums; }
html[data-theme] .tree-card .tree-line {
 display:grid;grid-template-columns:minmax(0,1fr) 110px 90px;align-items:baseline;gap:10px;
}
html[data-theme] .tree-line > span:first-child { min-width:0;overflow-wrap:anywhere; }
html[data-theme] .tree-line b { white-space:nowrap; }
html[data-theme] .tree-card .tree-steps li {
 display:block;text-align:start;min-width:0;padding-block:8px;
}
html[data-theme] .tree-card .step-text { min-width:0;overflow-wrap:anywhere; }
html[data-theme] .tree-card .tree-sell-line { display:flex;justify-content:flex-start;margin-top:3px;gap:8px; }
html[data-theme] .tree-card .tree-block { clear:both; }
/* Nested lists and their item labels stay in normal flow, even if the
   original stylesheet supplies a compact inline list style. */
html[data-theme] .tree-card .tree-node {
 display:block;list-style:none;margin:0;padding-block:0;padding-inline:12px 0;
 height:auto;min-width:0;max-width:100%;line-height:1.6;
}
html[data-theme] .tree-card .tree-root { padding:0;border:0; }
html[data-theme] .tree-card .tree-node > li {
 display:flex;flex-direction:column;align-items:stretch;gap:6px;
 position:static;float:none;height:auto;margin:6px 0;padding:0;
 min-width:0;list-style:none;line-height:1.6;
}
html[data-theme] .tree-card .tree-node > li::marker { content:''; }
html[data-theme] .tree-card .tree-node > li::before { content:none; }
html[data-theme] .tree-card .tree-item {
 display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 8px;
 position:static;float:none;transform:none;height:auto;min-height:0;
 margin:0;padding:6px 8px;line-height:1.6;max-width:100%;min-width:0;
}
html[data-theme] .tree-card .tree-item > b { flex-basis:100%;min-width:0;overflow-wrap:anywhere; }
html[data-theme] .tree-card .tree-item :is(.tag,.muted) { position:static;line-height:1.6;height:auto;white-space:normal; }
html[data-theme] .access-grid { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));align-items:start;gap:16px; }
html[data-theme] .access-card > b { display:block;margin-bottom:14px; }
html[data-theme] .access-card .access-modes { display:grid;grid-template-columns:minmax(0,1fr);gap:8px; }
html[data-theme] .access-card .access-mode { justify-content:flex-start;min-width:0;padding:10px 12px; }
html[data-theme] .access-card .access-users { margin-top:14px;gap:8px; }
html[data-theme] .access-user { overflow-wrap:anywhere; }
html[data-theme] .access-mode input,html[data-theme] .access-user input { flex-shrink:0; }
@media(max-width:900px) {
 html[data-theme] .access-grid { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:600px) {
 html[data-theme] .tree-card .tree-head { grid-template-columns:minmax(0,1fr); }
 html[data-theme] .tree-card .tree-head .best-metrics { justify-content:flex-start; }
 html[data-theme] .tree-card .tree-summary { grid-template-columns:minmax(0,1fr); }
 html[data-theme] .tree-card .tree-line { grid-template-columns:minmax(0,1fr) auto;gap:6px 12px; }
 html[data-theme] .tree-line > span:first-child { grid-column:1 / -1; }
 html[data-theme] .tree-line > b { text-align:end; }
 html[data-theme] .tree-card .tree-sell-line { display:grid;grid-template-columns:minmax(0,1fr);gap:4px; }
}
@media(max-width:760px) {
 html[data-theme="modern"] .suggest-filters { grid-template-columns:minmax(0,1fr); }
 html[data-theme="modern"] .tree-summary b { font-size:18px; }
 html[data-theme="modern"] .tree-head > div { max-width:100%; }
 html[data-theme="modern"] .tree-line > span:first-child { flex-basis:100%; }
}

/* Price alerts are an isolated full-width tool in both existing themes. */
html[data-theme] #priceAlertsPanel { min-width:0; }
html[data-theme] #priceAlertsPanel .field { min-width:0; }
html[data-theme] #priceAlertsPanel :is(input,select) { max-width:100%; }
html[data-theme] #alertCancel.hidden { display:none; }
html[data-theme] .alert-fields { display:grid;grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr);gap:16px;align-items:start; }
html[data-theme] .alert-options { border:0;border-top:1px solid var(--line);padding:14px 0;margin:16px 0;display:flex;flex-wrap:wrap;gap:12px 24px;min-width:0; }
html[data-theme] .alert-options legend { font-weight:600;padding-inline-end:12px; }
html[data-theme] .alert-options label { display:flex;align-items:center;gap:8px;font-size:13px; }
html[data-theme] .alert-options input { flex-shrink:0; }
html[data-theme] .alert-list { display:grid;grid-template-columns:minmax(0,1fr);gap:10px; }
html[data-theme] .alert-entry { display:flex;align-items:start;justify-content:space-between;gap:16px;border:1px solid var(--line);background:var(--card1);border-radius:6px;padding:14px 16px;min-width:0; }
html[data-theme] .alert-entry-main { display:grid;gap:5px;min-width:0;overflow-wrap:anywhere; }
html[data-theme] .alert-entry-main strong { font-size:15px; }
html[data-theme] .alert-entry-main small { font-size:12px; }
html[data-theme] .alert-price-line { display:flex;flex-wrap:wrap;align-items:baseline;gap:8px;font-size:13px; }
html[data-theme] .alert-price-line bdi { direction:ltr;font-variant-numeric:tabular-nums; }
html[data-theme] .alert-entry-actions { display:flex;gap:6px;flex-shrink:0; }
html[data-theme] .alert-entry-actions button { width:36px;min-height:36px;padding:4px; }
html[data-theme] #alertSearchResults { display:grid;gap:4px;max-height:220px;overflow:auto;margin-top:6px; }
html[data-theme] #alertSearchResults button { text-align:start;justify-content:flex-start; }
html[data-theme] #priceAlertToasts { position:fixed;inset-inline-end:20px;inset-block-end:20px;width:min(370px,calc(100% - 40px));display:grid;gap:8px;z-index:50; }
html[data-theme] .alert-toast { display:grid;grid-template-columns:minmax(0,1fr) auto;gap:6px 12px;background:var(--card1);color:var(--text);border:1px solid var(--line);border-inline-start:3px solid var(--ui-blue);border-radius:6px;padding:14px;box-shadow:var(--ui-shadow);font-size:13px;overflow-wrap:anywhere; }
html[data-theme] .alert-toast strong,html[data-theme] .alert-toast span,html[data-theme] .alert-toast bdi { grid-column:1; }
html[data-theme] .alert-toast button { grid-column:2;grid-row:1;align-self:start; }
@media(max-width:760px) { html[data-theme] .alert-fields { grid-template-columns:minmax(0,1fr);gap:12px; } html[data-theme] .alert-options { flex-direction:column;gap:12px; } html[data-theme] .alert-entry { flex-wrap:wrap;gap:10px; } html[data-theme] .alert-entry-main { flex:1 1 220px; } }

/* Language: English switches the page to left-to-right. */
html[lang="en"] body { font-family:'Manrope','Noto Sans Arabic',sans-serif; }
html[lang="en"] .workspace-bar h1, html[lang="en"] .hero h1 { letter-spacing:0; }
@media(max-width:760px) { html[dir="ltr"][data-theme="modern"] .site-sidebar { transform:translateX(-100%); } html[dir="ltr"][data-theme="modern"] .sidebar-open .site-sidebar { transform:none; } }
.lang-switch button[lang="en"] { font-family:'Manrope',sans-serif; }
html[dir="ltr"] .mc-dim { direction:ltr;text-align:left; }
/* Unified admin panel (v34): tabs keep each tool in its own framed section so
   permissions, bot, broadcast and logs never flow into each other. */
html[data-theme] .admin-panel { display:block; }
html[data-theme] .admin-panel.hidden { display:none; }
html[data-theme] .admin-intro { margin:0 0 18px; }
html[data-theme] .admin-tabs { display:flex;gap:4px;padding:4px;margin-bottom:20px;background:var(--ui-bg);border:1px solid var(--ui-line);border-radius:8px;overflow-x:auto;scrollbar-width:none; }
html[data-theme] .admin-tabs [role="tab"] { flex:1 0 auto;min-height:40px;padding:8px 16px;border:0;border-radius:6px;background:none;color:var(--ui-muted);font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap; }
html[data-theme] .admin-tabs [role="tab"][aria-selected="true"] { background:var(--ui-raised);color:var(--ui-text);box-shadow:inset 0 -2px 0 var(--ui-blue); }
html[data-theme] .admin-section { display:block;min-width:0;padding:22px;background:var(--ui-surface);border:1px solid var(--ui-line);border-radius:10px; }
html[data-theme] .admin-section[hidden] { display:none; }
html[data-theme] .admin-section-head { display:flex;flex-wrap:wrap;align-items:flex-start;justify-content:space-between;gap:12px 20px;padding-bottom:16px;margin-bottom:18px;border-bottom:1px solid var(--ui-line); }
html[data-theme] .admin-section-head > div:first-child { min-width:0;flex:1 1 260px; }
html[data-theme] .admin-section-head h3 { margin:0 0 4px;font-size:17px; }
html[data-theme] .admin-section-head p { margin:0;font-size:13px; }
html[data-theme] .admin-actions { display:flex;flex-wrap:wrap;align-items:center;gap:10px; }
html[data-theme] .admin-columns { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px;align-items:start;margin-top:18px; }
html[data-theme] .admin-block { min-width:0;padding:16px;background:var(--ui-bg);border:1px solid var(--ui-line);border-radius:8px; }
html[data-theme] .admin-block-head { display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:12px; }
html[data-theme] .admin-block-head h4 { margin:0;font-size:14px; }
html[data-theme] .admin-block .ingredients-list { display:flex;flex-direction:column;gap:8px;max-height:420px;overflow-y:auto; }
html[data-theme] .admin-block .ingredient-card.public-row { display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:10px;min-width:0; }
html[data-theme] .admin-block .best-main { min-width:0;flex:1 1 160px; }
html[data-theme] .admin-invite { display:flex;flex-wrap:wrap;align-items:center;gap:10px;min-width:0; }
html[data-theme] .admin-invite .best-title { flex-basis:100%;margin:0; }
html[data-theme] .admin-form { display:flex;flex-direction:column;gap:16px; }
html[data-theme] .admin-field { display:flex;flex-direction:column;gap:6px;min-width:0;margin:0;padding:0;border:0; }
html[data-theme] .admin-field legend,html[data-theme] .admin-field > label { font-size:13px;font-weight:700;color:var(--ui-text);padding:0;margin-bottom:6px; }
html[data-theme] .admin-field :is(input,select,textarea) { width:100%;box-sizing:border-box;min-height:42px;padding:9px 12px;background:var(--ui-bg);color:var(--ui-text);border:1px solid var(--ui-line);border-radius:6px;font:inherit;font-size:14px; }
html[data-theme] .admin-field textarea { resize:vertical;min-height:140px;line-height:1.7; }
html[data-theme] .admin-counter { align-self:flex-end;font-size:12px; }
html[data-theme] .admin-grid-2 { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px; }
html[data-theme] .admin-grid-2[hidden],html[data-theme] .admin-hint[hidden],html[data-theme] .admin-results[hidden] { display:none; }
html[data-theme] .admin-hint { margin:-4px 0 0;font-size:12px; }
html[data-theme] .admin-choice-row { display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px; }
html[data-theme] .admin-choice { display:flex;align-items:flex-start;gap:10px;padding:12px 14px;background:var(--ui-bg);border:1px solid var(--ui-line);border-radius:8px;cursor:pointer;min-width:0; }
html[data-theme] .admin-choice:has(input:checked) { border-color:var(--ui-blue);background:color-mix(in oklch,var(--ui-blue) 10%,var(--ui-bg)); }
html[data-theme] .admin-choice input { margin-top:4px;flex-shrink:0;accent-color:var(--ui-blue); }
html[data-theme] .admin-choice b { display:block;font-size:14px; }
html[data-theme] .admin-choice small { display:block;color:var(--ui-muted);font-size:12px; }
html[data-theme] .admin-preview { padding:14px;background:var(--ui-bg);border:1px dashed var(--ui-line);border-radius:8px; }
html[data-theme] .admin-preview-label { display:block;font-size:11px;color:var(--ui-muted);margin-bottom:8px; }
html[data-theme] .admin-preview-bot { display:block;color:var(--ui-blue);font-size:13px;margin-bottom:4px; }
html[data-theme] .admin-preview-title { font-size:17px;font-weight:800;margin-bottom:4px; }
html[data-theme] .admin-preview-text { white-space:pre-wrap;overflow-wrap:anywhere;font-size:14px; }
html[data-theme] .admin-preview-foot { display:block;margin-top:6px;color:var(--ui-muted);font-size:11px; }
html[data-theme] .admin-submit { justify-content:flex-end; }
html[data-theme] #broadcastStatus[data-tone="good"] { color:var(--ui-green); }
html[data-theme] #broadcastStatus[data-tone="bad"] { color:var(--ui-red); }
html[data-theme] .admin-results { margin-top:20px;border:1px solid var(--ui-line);border-radius:8px;overflow:hidden; }
html[data-theme] .admin-results-head { display:flex;justify-content:space-between;gap:10px;padding:10px 14px;background:var(--ui-raised); }
html[data-theme] .admin-result { display:flex;flex-wrap:wrap;justify-content:space-between;gap:4px 12px;padding:10px 14px;border-top:1px solid var(--ui-line);font-size:13px; }
html[data-theme] .admin-result-name { font-weight:700;min-width:0;overflow-wrap:anywhere; }
html[data-theme] .admin-result.is-ok .admin-result-info { color:var(--ui-green); }
html[data-theme] .admin-result.is-bad .admin-result-info { color:var(--ui-red); }
html[data-theme] .admin-section .logs-box { max-height:480px;margin:0; }
html[data-theme] .admin-section .access-grid { margin:0; }
@media(max-width:900px) {
 html[data-theme] .admin-columns { grid-template-columns:minmax(0,1fr); }
}
@media(max-width:600px) {
 html[data-theme] .admin-section { padding:16px; }
 html[data-theme] .admin-grid-2,html[data-theme] .admin-choice-row { grid-template-columns:minmax(0,1fr); }
 html[data-theme] .admin-tabs [role="tab"] { padding:8px 12px; }
 html[data-theme] .admin-submit .primary-btn { flex:1 1 100%; }
}
html[data-theme] .admin-actions { flex:0 0 auto; }
html[data-theme] .admin-panel :is(.admin-actions,.admin-invite) :is(.primary-btn,.ghost-btn) { width:auto;display:inline-flex;align-items:center;justify-content:center;padding:0 18px;min-height:40px;font-size:13px;text-decoration:none;white-space:nowrap; }
html[data-theme] .admin-panel .admin-submit .primary-btn { min-height:44px;padding:0 26px; }
html[data-theme] .admin-panel .admin-choice input { width:18px;height:18px;min-height:0;padding:0;margin:3px 0 0;border:0;box-shadow:none; }
html[data-theme] .admin-panel .admin-choice span { min-width:0;flex:1 1 auto; }

/* v35: broadcast icon picker + mention tools */
html[data-theme] .admin-panel .admin-grid-title { display:grid;grid-template-columns:minmax(150px,200px) minmax(0,1fr);gap:12px;align-items:end; }
html[data-theme] .admin-panel .admin-mentions { padding:12px 14px;background:var(--ui-bg);border:1px solid var(--ui-line);border-radius:8px;display:flex;flex-direction:column;gap:8px; }
html[data-theme] .admin-panel .admin-mentions-label { font-size:13px;font-weight:700; }
html[data-theme] .admin-panel .admin-mentions .admin-hint { margin:0; }
html[data-theme] .admin-panel .admin-mention-row { display:flex;flex-wrap:wrap;gap:8px;align-items:center; }
html[data-theme] .admin-panel .admin-mention-row input { flex:1 1 220px;min-width:0;width:auto; }
html[data-theme] .admin-panel .admin-mention-row .ghost-btn { width:auto;padding:0 14px;min-height:38px;font-size:13px;white-space:nowrap; }
html[data-theme] .admin-preview-mention { display:inline-block;padding:0 4px;margin:0 1px;border-radius:4px;color:var(--ui-blue);background:color-mix(in oklch,var(--ui-blue) 18%,transparent);font-weight:600; }
@media (max-width:640px) { html[data-theme] .admin-panel .admin-grid-title { grid-template-columns:minmax(0,1fr); } }
/* v36 giveaway tab */
html[data-theme] .admin-panel .admin-grid-3 { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px; }
html[data-theme] .admin-panel .admin-choice-row.admin-choice-3 { grid-template-columns:repeat(3,minmax(0,1fr)); }
html[data-theme] .admin-panel .giveaway-history { margin-top:22px; }
html[data-theme] .admin-panel .giveaway-card { display:flex;flex-direction:column;gap:6px;text-align:start; }
html[data-theme] .admin-panel .giveaway-head { display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px;margin-bottom:4px; }
html[data-theme] .admin-panel .giveaway-head b { font-size:15px;overflow-wrap:anywhere;min-width:0; }
html[data-theme] .admin-panel .giveaway-line { font-size:13px;color:var(--ui-muted);overflow-wrap:anywhere; }
html[data-theme] .admin-panel .giveaway-line b { color:var(--ui-text); }
html[data-theme] .admin-panel .giveaway-state.is-active { color:var(--ui-green); }
html[data-theme] .admin-panel .giveaway-state.is-cancelled { color:var(--ui-red); }
html[data-theme] .admin-panel .giveaway-winners { margin:0;padding-inline-start:20px;font-size:13px;overflow-wrap:anywhere; }
html[data-theme] .admin-panel .giveaway-actions { display:flex;flex-wrap:wrap;gap:8px;margin-top:8px; }
html[data-theme] .admin-panel .giveaway-actions button { width:auto;min-height:36px;padding:0 14px;font-size:13px; }
@media (max-width:640px) { html[data-theme] .admin-panel :is(.admin-grid-3,.admin-choice-row.admin-choice-3) { grid-template-columns:minmax(0,1fr); } }
/* v40: panel permissions for chosen users + linked MyBazaar footer in preview */
html[data-theme] .admin-panel .delegate-block { margin-top:26px;padding-top:22px;border-top:1px solid var(--ui-line);display:flex;flex-direction:column;gap:16px; }
html[data-theme] .admin-panel .delegate-guilds { display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px; }
html[data-theme] .admin-panel .delegate-guild b { overflow-wrap:anywhere; }
html[data-theme] .admin-panel .delegate-guilds .empty-state { grid-column:1/-1; }
html[data-theme] .admin-panel .delegate-card { display:flex;flex-direction:column;gap:8px;text-align:start; }
html[data-theme] .admin-panel .delegate-head { display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:8px; }
html[data-theme] .admin-panel .delegate-head b { font-size:15px;overflow-wrap:anywhere;min-width:0; }
html[data-theme] .admin-panel .delegate-perms { display:flex;flex-wrap:wrap;gap:6px; }
html[data-theme] .admin-panel .chip.is-bad,html[data-theme] .admin-panel #delegateLinkHint[data-tone="bad"] { color:var(--ui-red); }
html[data-theme] .admin-panel #delegateStatus[data-tone="good"] { color:var(--ui-green); }
html[data-theme] .admin-panel #delegateStatus[data-tone="bad"] { color:var(--ui-red); }
html[data-theme] .admin-panel .delegate-remove { color:var(--ui-red); }
html[data-theme] .admin-panel .delegate-host-note { padding:12px 14px;background:var(--ui-bg);border:1px solid var(--ui-line);border-radius:8px;display:flex;flex-direction:column;gap:4px; }
html[data-theme] .admin-preview-foot a { color:var(--ui-blue);text-decoration:none; }
html[data-theme] .admin-preview-foot a:hover { text-decoration:underline; }
@media (max-width:600px) { html[data-theme] .admin-panel .delegate-guilds { grid-template-columns:minmax(0,1fr); } }

/* v41: giveaway entrants list (history grows with the page so the entrants list is not a scroll inside a scroll) */
html[data-theme] .admin-panel .giveaway-history .ingredients-list { max-height:none;overflow:visible; }
html[data-theme] .admin-panel .giveaway-entries { display:flex;flex-direction:column;gap:8px;margin-top:10px;padding-top:10px;border-top:1px solid var(--ui-line); }
html[data-theme] .admin-panel .giveaway-entries[hidden] { display:none; }
html[data-theme] .admin-panel .giveaway-entries-tools { display:flex;flex-wrap:wrap;gap:8px;align-items:center; }
html[data-theme] .admin-panel .giveaway-entries-tools[hidden] { display:none; }
html[data-theme] .admin-panel .giveaway-entries-tools input { flex:1 1 200px;min-width:0;min-height:36px; }
html[data-theme] .admin-panel .giveaway-entries-tools button { width:auto;min-height:36px;padding:0 14px;font-size:13px; }
html[data-theme] .admin-panel .giveaway-entry-list { margin:0;padding-inline-start:28px;max-height:340px;overflow-y:auto;display:flex;flex-direction:column;gap:4px;font-size:13px; }
html[data-theme] .admin-panel .giveaway-entry { display:flex;flex-wrap:wrap;gap:4px 12px;align-items:baseline;padding:6px 8px;border-radius:8px;background:color-mix(in oklch,var(--ui-text) 4%,transparent); }
html[data-theme] .admin-panel .giveaway-entry.is-winner { background:color-mix(in oklch,var(--ui-green) 14%,transparent); }
html[data-theme] .admin-panel .giveaway-entry-name { font-weight:600;color:var(--ui-text);overflow-wrap:anywhere; }
html[data-theme] .admin-panel .giveaway-entry-id { font-family:ui-monospace,monospace;color:var(--ui-muted); }
html[data-theme] .admin-panel .giveaway-entry-meta { color:var(--ui-muted);margin-inline-start:auto;font-size:12px; }

/* v42: أقسام الشجرة + Forge */
html[data-theme="modern"] #treePanel .tree-sections { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:4px 0 14px; }
html[data-theme="modern"] #treePanel .tree-seg { display:inline-flex; padding:3px; gap:3px; border:1px solid var(--ui-line); border-radius:10px; background:var(--ui-surface); }
html[data-theme="modern"] #treePanel .tree-seg.hidden { display:none; }
html[data-theme="modern"] #treePanel .tree-seg button { border:0; background:transparent; color:var(--ui-muted); padding:8px 14px; border-radius:8px; font:inherit; font-weight:600; cursor:pointer; }
html[data-theme="modern"] #treePanel .tree-seg button[aria-pressed="true"] { background:var(--ui-blue); color:var(--ui-bg); }
html[data-theme="modern"] #treePanel .tree-reset { margin-inline-start:auto; }
html[data-theme="modern"] #treePanel .tree-filter-group { border:1px solid var(--ui-line); border-radius:12px; padding:12px 14px; margin-bottom:12px; background:var(--ui-surface); }
html[data-theme="modern"] #treePanel .tree-group-title { margin:0 0 10px; font-size:.9rem; color:var(--ui-muted); font-weight:700; }
html[data-theme="modern"] #treePanel .tree-filter-group .suggest-filters { display:grid; grid-template-columns:repeat(auto-fill, minmax(190px, 1fr)); gap:10px 12px; margin:0; align-items:end; }
html[data-theme="modern"] #treePanel .tree-advanced summary { cursor:pointer; font-weight:700; color:var(--ui-muted); }
html[data-theme="modern"] #treePanel .tree-advanced[open] summary { margin-bottom:10px; }
html[data-theme="modern"] #treePanel .tree-apply-row { display:flex; flex-wrap:wrap; align-items:center; gap:10px; margin:0 0 14px; }
html[data-theme="modern"] #treePanel .forge-card { display:block; text-align:start; }
html[data-theme="modern"] #treePanel .forge-head { display:flex; flex-wrap:wrap; align-items:center; gap:8px; margin-bottom:10px; }
html[data-theme="modern"] #treePanel .forge-head h3 { margin:0; margin-inline-end:auto; font-size:1.05rem; }
html[data-theme="modern"] #treePanel .forge-stats { display:grid; grid-template-columns:repeat(auto-fill, minmax(140px, 1fr)); gap:8px; margin-bottom:10px; }
html[data-theme="modern"] #treePanel .forge-stats > div { border:1px solid var(--ui-line); border-radius:10px; padding:8px 10px; display:flex; flex-direction:column; gap:2px; }
html[data-theme="modern"] #treePanel .forge-stats small { color:var(--ui-muted); }
html[data-theme="modern"] #treePanel .forge-stats b.positive { color:var(--ui-green); }
html[data-theme="modern"] #treePanel .forge-stats b.negative { color:var(--ui-red); }
html[data-theme="modern"] #treePanel .forge-mats { list-style:none; margin:0; padding:0; display:grid; gap:6px; }
html[data-theme="modern"] #treePanel .forge-mat { display:flex; flex-wrap:wrap; align-items:center; gap:6px 10px; padding:7px 10px; border-radius:8px; background:var(--ui-raised); }
html[data-theme="modern"] #treePanel .forge-actions { display:flex; gap:8px; margin-top:10px; }
html[data-theme="modern"] #treePanel .forge-ingredients { display:grid; gap:8px; margin-bottom:10px; }
html[data-theme="modern"] #treePanel .forge-ing-row { display:grid; grid-template-columns:minmax(0, 2fr) minmax(0, 1fr) auto; gap:8px; }
html[data-theme="modern"] .forge-editor-row { display:flex; align-items:center; justify-content:space-between; gap:10px; }
@media (max-width:640px) {
  html[data-theme="modern"] #treePanel .tree-reset { margin-inline-start:0; }
  html[data-theme="modern"] #treePanel .tree-seg { width:100%; }
  html[data-theme="modern"] #treePanel .tree-seg button { flex:1; padding:8px 6px; }
}

/* ---------- v43: لوحة التحكم بقائمة جانبية + التحديد الجماعي ---------- */
html[data-theme] .admin-layout { display:grid;grid-template-columns:220px minmax(0,1fr);gap:20px;align-items:start; }
html[data-theme] .admin-nav { position:sticky;top:16px;display:flex;flex-direction:column;gap:14px;padding:12px;background:var(--ui-bg);border:1px solid var(--ui-line);border-radius:10px; }
html[data-theme] .admin-nav-group { display:flex;flex-direction:column;gap:2px; }
html[data-theme] .admin-nav-group + .admin-nav-group { padding-top:12px;border-top:1px solid var(--ui-line); }
html[data-theme] .admin-nav-title { padding:0 10px 6px;color:var(--ui-muted);font-size:11px;font-weight:700;letter-spacing:.04em; }
html[data-theme] .admin-nav [role="tab"] { display:flex;align-items:center;gap:10px;width:100%;min-height:40px;padding:8px 10px;border:0;border-radius:6px;background:none;color:var(--ui-muted);font-size:13px;font-weight:700;text-align:start;cursor:pointer;white-space:nowrap;transition:background .15s,color .15s; }
html[data-theme] .admin-nav [role="tab"]:hover { background:var(--ui-surface);color:var(--ui-text); }
html[data-theme] .admin-nav [role="tab"][aria-selected="true"] { background:var(--ui-raised);color:var(--ui-text);box-shadow:inset 3px 0 0 var(--ui-blue); }
html[dir="rtl"][data-theme] .admin-nav [role="tab"][aria-selected="true"] { box-shadow:inset -3px 0 0 var(--ui-blue); }
html[data-theme] .admin-nav [role="tab"]:focus-visible { outline:2px solid var(--ui-focus, var(--ui-blue));outline-offset:1px; }
html[data-theme] .admin-nav-icon { width:20px;flex:0 0 20px;text-align:center;font-size:15px; }
html[data-theme] .admin-main { min-width:0; }
html[data-theme] .admin-main > .admin-section + .admin-section { margin-top:0; }

html[data-theme] .bulk-picker { display:flex;flex-direction:column;border:1px solid var(--ui-line);border-radius:8px;background:var(--ui-bg);overflow:hidden;margin-bottom:18px; }
html[data-theme] .bulk-toolbar { display:flex;flex-wrap:wrap;align-items:center;gap:10px;padding:10px 12px;border-bottom:1px solid var(--ui-line); }
html[data-theme] .bulk-toolbar input[type="search"] { flex:1 1 200px;min-width:0;min-height:38px;margin:0; }
html[data-theme] .bulk-toolbar select { flex:0 0 auto;width:auto;min-height:38px;margin:0; }
html[data-theme] .bulk-all { display:inline-flex;align-items:center;gap:8px;font-size:13px;font-weight:700;cursor:pointer;white-space:nowrap; }
html[data-theme] .admin-panel :is(.bulk-all,.bulk-row) input[type="checkbox"] { width:18px;height:18px;min-height:0;padding:0;margin:0;flex:0 0 auto;box-shadow:none; }
html[data-theme] .bulk-list { display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:6px;padding:10px 12px;max-height:340px;overflow:auto; }
html[data-theme] .bulk-list > .empty-state { grid-column:1 / -1; }
html[data-theme] .bulk-row { display:flex;align-items:center;gap:10px;min-width:0;padding:9px 12px;border:1px solid var(--ui-line);border-radius:6px;background:var(--ui-surface);cursor:pointer;font-size:13px; }
html[data-theme] .bulk-row:hover { border-color:var(--ui-blue); }
html[data-theme] .bulk-row.is-picked { border-color:var(--ui-blue);background:var(--ui-raised); }
html[data-theme] .bulk-name { flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap; }
html[data-theme] .bulk-name bdi[dir="ltr"] { color:var(--ui-muted); }
html[data-theme] .bulk-tag { flex:0 0 auto;padding:2px 8px;border-radius:999px;background:var(--ui-bg);border:1px solid var(--ui-green);color:var(--ui-green);font-size:11px;font-weight:700; }
html[data-theme] .bulk-actions { display:flex;flex-wrap:wrap;align-items:center;gap:8px;padding:10px 12px;border-top:1px solid var(--ui-line);background:var(--ui-surface); }
html[data-theme] .bulk-picked { margin-inline-end:auto;font-size:13px;font-weight:700; }
html[data-theme] .admin-panel .bulk-actions :is(.primary-btn,.ghost-btn) { width:auto;min-height:40px;padding:0 16px;font-size:13px; }
html[data-theme] .admin-panel .bulk-actions :is(.primary-btn,.ghost-btn):disabled { opacity:.45;cursor:not-allowed; }
html[data-theme] .admin-panel .danger-btn { color:var(--ui-red);border-color:var(--ui-red); }
html[data-theme] .bulk-chips { display:flex;flex-wrap:wrap;gap:8px; }
html[data-theme] .bulk-chip { display:inline-flex;align-items:center;gap:6px;padding:4px 6px 4px 12px;border:1px solid var(--ui-line);border-radius:999px;background:var(--ui-surface);font-size:13px; }
html[dir="rtl"][data-theme] .bulk-chip { padding:4px 12px 4px 6px; }
html[data-theme] .admin-panel .bulk-chip button { width:24px;height:24px;min-height:0;padding:0;border:0;border-radius:50%;background:var(--ui-bg);color:var(--ui-muted);font-size:15px;line-height:1;cursor:pointer; }
html[data-theme] .admin-panel .bulk-chip button:hover { background:var(--ui-red);color:var(--ui-text); }
html[data-theme] #forgeEditorsStatus[data-tone="good"] { color:var(--ui-green); }
html[data-theme] #forgeEditorsStatus[data-tone="bad"] { color:var(--ui-red); }

html[data-theme] .access-users-wrap { margin-top:14px; }
html[data-theme] .access-users-wrap.hidden { display:none; }
html[data-theme] .access-card .access-tools { padding:0 0 10px;border:0; }
html[data-theme] .access-card .access-users-wrap .access-users { margin-top:0;max-height:260px; }
html[data-theme] .access-user[hidden] { display:none; }

@media(max-width:860px) {
 html[data-theme] .admin-layout { grid-template-columns:minmax(0,1fr);gap:14px; }
 html[data-theme] .admin-nav { position:static;flex-direction:row;gap:4px;padding:4px;overflow-x:auto;scrollbar-width:none; }
 html[data-theme] .admin-nav::-webkit-scrollbar { display:none; }
 html[data-theme] .admin-nav-group { flex-direction:row;gap:4px; }
 html[data-theme] .admin-nav-group + .admin-nav-group { padding:0 0 0 0;border:0;padding-inline-start:6px;border-inline-start:1px solid var(--ui-line); }
 html[data-theme] .admin-nav-title { display:none; }
 html[data-theme] .admin-nav [role="tab"] { width:auto;flex:0 0 auto;padding:8px 12px; }
 html[data-theme] .admin-nav [role="tab"][aria-selected="true"],html[dir="rtl"][data-theme] .admin-nav [role="tab"][aria-selected="true"] { box-shadow:inset 0 -2px 0 var(--ui-blue); }
}
@media(max-width:600px) {
 html[data-theme] .bulk-list { grid-template-columns:minmax(0,1fr); }
 html[data-theme] .bulk-picked { flex:1 1 100%; }
 html[data-theme] .admin-panel .bulk-actions :is(.primary-btn,.ghost-btn) { flex:1 1 auto; }
}
html[data-theme] .admin-panel #adminSection-delegates .delegate-block { margin-top:0;padding-top:0;border-top:0; }

/* v45: نوع الوصفة + اختيار «أشتريها / أصنعها» */
html[data-theme] .recipe-kind-grid { grid-template-columns:repeat(4,minmax(0,1fr)); margin-top:4px; }
html[data-theme] .recipe-kind-grid .field.hidden { display:none; }
html[data-theme] .choice-seg { display:inline-flex; gap:3px; padding:3px; margin-top:12px; border:1px solid var(--ui-line); border-radius:10px; background:var(--ui-surface); }
html[data-theme] .choice-seg button { border:0; background:transparent; color:var(--ui-muted); padding:8px 14px; border-radius:8px; font:inherit; font-weight:600; cursor:pointer; }
html[data-theme] .choice-seg button[aria-pressed="true"] { background:var(--ui-blue); color:var(--ui-bg); cursor:default; }
html[data-theme] .choice-seg button:disabled { opacity:.6; cursor:wait; }
html[data-theme="modern"] #treePanel .forge-actions { flex-wrap:wrap; }
@media(max-width:760px) {
 html[data-theme] .recipe-kind-grid { grid-template-columns:1fr; }
 html[data-theme] .choice-seg { display:flex; }
 html[data-theme] .choice-seg button { flex:1; padding:8px 6px; }
}
html[data-theme="modern"] #treePanel .forge-actions .primary-btn { width:auto; flex:1 1 auto; }
html[data-theme="modern"] #treePanel .forge-actions .ghost-btn { flex:0 0 auto; }
html[data-theme] .recipe-kind-card .recipe-kind-sub { display:block; margin-top:6px; font-size:13px; font-weight:500; color:var(--ui-muted); }
