/* ==========================================================================
   NutriClinic — UI system
   Mobile-first · light / dark / auto themes · accent colour from CMS
   Layout engine: [data-menu="top|left|right"] on <html>
   ========================================================================== */

:root {
  --font: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Fraunces", "Georgia", "Times New Roman", serif;
  --radius: 14px;
  --radius-sm: 9px;
  --sidebar-w: 248px;
  --topbar-h: 60px;
  --gutter: 16px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --bg: #f4f6f3;
  --surface: #ffffff;
  --surface-2: #eef2ee;
  --surface-3: #e4ebe5;
  --ink: #15231d;
  --ink-2: #33443d;
  --muted: #5d6c66;
  --line: #dbe3dd;
  --line-strong: #c4d0c8;
  --shadow: 0 1px 2px rgba(20, 35, 29, .05), 0 6px 24px -8px rgba(20, 35, 29, .12);
  --shadow-lg: 0 24px 60px -12px rgba(15, 30, 24, .28);
  --good: #23855a;  --good-bg: #e3f3ea;
  --warn: #a96f00;  --warn-bg: #fbf0d6;
  --bad: #b8342c;   --bad-bg: #fbe5e3;
  --info: #2d6aa8;  --info-bg: #e3eef9;
  --accent-ink: var(--accent-ink-light, #23704f);
  --accent-soft: rgba(var(--accent-rgb, 47, 143, 107), .12);
  --accent-softer: rgba(var(--accent-rgb, 47, 143, 107), .06);
  --zone-green: rgba(35, 133, 90, .13);
  --zone-yellow: rgba(214, 160, 20, .16);
  --zone-red: rgba(200, 60, 50, .10);
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0d1412; --surface: #141d1a; --surface-2: #1a2622; --surface-3: #22302b;
  --ink: #e4ede9; --ink-2: #c3d1cb; --muted: #93a69e; --line: #26352f; --line-strong: #34463f;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -10px rgba(0, 0, 0, .55);
  --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
  --good: #5bcf96; --good-bg: rgba(91, 207, 150, .13);
  --warn: #f0bf4c; --warn-bg: rgba(240, 191, 76, .13);
  --bad: #ff8178;  --bad-bg: rgba(255, 129, 120, .13);
  --info: #79b3f0; --info-bg: rgba(121, 179, 240, .13);
  --accent-ink: var(--accent-ink-dark, #6fd3a8);
  --accent-soft: rgba(var(--accent-rgb, 47, 143, 107), .22);
  --accent-softer: rgba(var(--accent-rgb, 47, 143, 107), .1);
  --zone-green: rgba(91, 207, 150, .14);
  --zone-yellow: rgba(240, 191, 76, .14);
  --zone-red: rgba(255, 129, 120, .10);
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] {
    --bg: #0d1412; --surface: #141d1a; --surface-2: #1a2622; --surface-3: #22302b;
    --ink: #e4ede9; --ink-2: #c3d1cb; --muted: #93a69e; --line: #26352f; --line-strong: #34463f;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 28px -10px rgba(0, 0, 0, .55);
    --shadow-lg: 0 24px 60px -12px rgba(0, 0, 0, .7);
    --good: #5bcf96; --good-bg: rgba(91, 207, 150, .13);
    --warn: #f0bf4c; --warn-bg: rgba(240, 191, 76, .13);
    --bad: #ff8178;  --bad-bg: rgba(255, 129, 120, .13);
    --info: #79b3f0; --info-bg: rgba(121, 179, 240, .13);
    --accent-ink: var(--accent-ink-dark, #6fd3a8);
    --accent-soft: rgba(var(--accent-rgb, 47, 143, 107), .22);
    --accent-softer: rgba(var(--accent-rgb, 47, 143, 107), .1);
    --zone-green: rgba(91, 207, 150, .14);
    --zone-yellow: rgba(240, 191, 76, .14);
    --zone-red: rgba(255, 129, 120, .10);
    color-scheme: dark;
  }
}

/* smooth theme transitions (disabled until first paint to avoid flashes) */
html.theme-ready body, html.theme-ready .card, html.theme-ready .topbar, html.theme-ready .sidebar,
html.theme-ready .btn, html.theme-ready input, html.theme-ready select, html.theme-ready textarea {
  transition: background-color .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), box-shadow .35s var(--ease);
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink); font: 15px/1.55 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-ink); text-decoration-thickness: 1px; text-underline-offset: 2px; }
h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 1.9rem); }
h2 { font-size: 1.2rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 .9em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 20px 0; }
code, kbd { font: 13px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; background: var(--surface-2); padding: 2px 6px; border-radius: 6px; word-break: break-all; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.icon { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-lg { width: 24px; height: 24px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 999; background: var(--accent); color: var(--on-accent); padding: 8px 14px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* ---------- layout engine: portal ---------- */
.app { min-height: 100vh; }
.topbar {
  position: sticky; top: 0; z-index: 40; height: var(--topbar-h);
  display: flex; align-items: center; gap: 8px; padding: 0 var(--gutter);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px); -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--ink); text-decoration: none; letter-spacing: -.01em; min-width: 0; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent); color: var(--on-accent); flex: none; }
.brand-mark svg { width: 19px; height: 19px; }
.brand-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-family: var(--font-display); font-size: 1.12rem; font-weight: 600; }
.topbar .spacer { flex: 1; }
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 1px solid transparent; background: transparent; color: var(--ink-2); cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.icon-btn .dot { position: absolute; top: 5px; right: 5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font: 700 10.5px/17px var(--font); text-align: center; border: 2px solid var(--surface); }
.menu-toggle { display: inline-grid; }

.sidebar {
  position: fixed; z-index: 60; top: 0; bottom: 0; width: min(84vw, var(--sidebar-w));
  background: var(--surface); border-right: 1px solid var(--line);
  padding: 14px 10px 24px; overflow-y: auto; overscroll-behavior: contain;
  transform: translateX(-105%); transition: transform .28s var(--ease); left: 0;
}
[data-menu="right"] .sidebar { left: auto; right: 0; border-right: 0; border-left: 1px solid var(--line); transform: translateX(105%); }
.sidebar .brand { padding: 4px 8px 16px; }
body.nav-open .sidebar { transform: none; box-shadow: var(--shadow-lg); }
.scrim { position: fixed; inset: 0; z-index: 55; background: rgba(8, 16, 13, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
body.nav-open .scrim { opacity: 1; pointer-events: auto; }

.nav { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav a {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink-2); text-decoration: none; font-weight: 520; white-space: nowrap;
}
.nav a:hover { background: var(--surface-2); color: var(--ink); }
.nav a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-ink); font-weight: 650; }
.nav .count { margin-left: auto; background: var(--bad); color: #fff; border-radius: 10px; font-size: 11px; font-weight: 700; padding: 1px 7px; }
.nav .count:empty { display: none; }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); padding: 14px 12px 6px; }

/* top menu: horizontally scrolling strip under the bar */
.navstrip { display: none; }
[data-menu="top"] .navstrip {
  display: block; position: sticky; top: var(--topbar-h); z-index: 35; background: var(--surface);
  border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none;
}
[data-menu="top"] .navstrip::-webkit-scrollbar { display: none; }
[data-menu="top"] .navstrip .nav { flex-direction: row; padding: 6px var(--gutter); gap: 4px; width: max-content; }
[data-menu="top"] .navstrip .nav a { padding: 8px 12px; }
[data-menu="top"] .sidebar, [data-menu="top"] .menu-toggle { display: none; }

.main { padding: 20px var(--gutter) 96px; max-width: 1320px; margin: 0 auto; width: 100%; min-width: 0; }

@media (min-width: 1000px) {
  :root { --gutter: 28px; }
  [data-menu="left"] .sidebar, [data-menu="right"] .sidebar { transform: none; box-shadow: none; }
  [data-menu="left"] .app-body { padding-left: var(--sidebar-w); }
  [data-menu="right"] .app-body { padding-right: var(--sidebar-w); }
  [data-menu="left"] .topbar .brand, [data-menu="right"] .topbar .brand { display: none; }
  [data-menu="left"] .menu-toggle, [data-menu="right"] .menu-toggle { display: none; }
  .scrim { display: none; }
  .main { padding-top: 28px; }
}

/* ---------- page header ---------- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 16px; margin-bottom: 20px; }
.page-head h1 { margin: 0; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.breadcrumb { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.breadcrumb a { color: var(--muted); }

/* ---------- cards & grids ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card.flat { box-shadow: none; }
.card.tint { background: var(--accent-softer); border-color: var(--accent-soft); }
.grid { display: grid; gap: 16px; }
.grid > .card + .card { margin-top: 0; }
@media (min-width: 700px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } .span-2 { grid-column: span 2; } }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }

.kpi { display: flex; flex-direction: column; gap: 4px; }
.kpi .label { font-size: 12.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .value { font-size: 1.9rem; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.1; }
.kpi .value small { font-size: .95rem; color: var(--muted); font-weight: 600; }
.delta { font-size: 13px; font-weight: 650; }
.delta.down { color: var(--good); } .delta.up { color: var(--warn); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 8px 16px;
  border-radius: 10px; border: 1px solid var(--line-strong); background: var(--surface); color: var(--ink);
  font: 600 14px/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap; touch-action: manipulation;
}
.btn:hover { background: var(--surface-2); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent); filter: brightness(1.07); }
.btn-ghost { border-color: transparent; background: transparent; }
.btn-danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--line)); }
.btn-danger:hover { background: var(--bad-bg); }
.btn-sm { min-height: 32px; padding: 5px 11px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .55; pointer-events: none; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent-ink); font: inherit; cursor: pointer; text-decoration: underline; }
form.inline { display: inline; }

/* ---------- forms ---------- */
label, .label { display: block; font-weight: 600; font-size: 13.5px; margin: 0 0 6px; color: var(--ink-2); }
.field { margin-bottom: 14px; min-width: 0; }
.hint { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
input:not([type]), input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=datetime-local],
input[type=search], input[type=tel], input[type=url], input[type=file], select, textarea {
  width: 100%; min-height: 42px; padding: 9px 12px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font: 15px/1.4 var(--font); appearance: none; -webkit-appearance: none;
}
input[type=file] { padding: 8px; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 34px; }
textarea { min-height: 110px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[type=color] { width: 56px; height: 42px; padding: 3px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; margin: 8px 0; cursor: pointer; }
.check > span { flex: 1; min-width: 0; }
.check input { width: 19px; height: 19px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.form-grid { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } .form-grid .full { grid-column: 1 / -1; } .form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 4px; margin: 0 0 16px; min-width: 0; }
legend { font-weight: 650; padding: 0 6px; }
.segmented { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.segmented label { margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: inline-flex; align-items: center; gap: 6px; padding: 7px 13px; border-radius: 9px; font-weight: 600; font-size: 13.5px; color: var(--muted); cursor: pointer; }
.segmented input:checked + span { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.segmented input:focus-visible + span { outline: 2px solid var(--accent); }

/* layout-picker preview tiles (Settings) */
.layout-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.layout-pick label { margin: 0; cursor: pointer; }
.layout-pick input { position: absolute; opacity: 0; }
.layout-pick .tile { border: 2px solid var(--line); border-radius: 12px; padding: 8px; background: var(--surface); text-align: center; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.layout-pick input:checked + .tile { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-softer); }
.layout-pick .mini { height: 54px; border-radius: 7px; background: var(--surface-2); display: grid; gap: 3px; padding: 4px; margin-bottom: 6px; }
.mini.top { grid-template-rows: 10px 1fr; } .mini.left { grid-template-columns: 16px 1fr; } .mini.right { grid-template-columns: 1fr 16px; }
.mini i { display: block; border-radius: 3px; background: var(--line-strong); } .mini i.nav { background: var(--accent); opacity: .75; }

/* ---------- tables ---------- */
.table-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.table-tools .search { flex: 1 1 220px; position: relative; }
.table-tools .search .icon { position: absolute; left: 11px; top: 12px; color: var(--muted); }
.table-tools .search input { padding-left: 36px; }
.table-tools select { width: auto; min-width: 150px; flex: 0 1 auto; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table.data { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.data th { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
table.data th[data-sort] { cursor: pointer; user-select: none; }
table.data th[data-sort]::after { content: "↕"; opacity: .35; margin-left: 5px; }
table.data th[aria-sort="ascending"]::after { content: "↑"; opacity: 1; }
table.data th[aria-sort="descending"]::after { content: "↓"; opacity: 1; }
table.data tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: var(--accent-softer); }
table.data td.num, table.data th.num { text-align: right; }
table.data .actions { justify-content: flex-end; flex-wrap: nowrap; }
.empty-row td { text-align: center; color: var(--muted); padding: 28px; }
.no-results { padding: 22px; text-align: center; color: var(--muted); }

@media (max-width: 699px) {
  table.data.responsive thead { display: none; }
  table.data.responsive, table.data.responsive tbody, table.data.responsive tr, table.data.responsive td { display: block; width: 100%; }
  table.data.responsive tr { border-bottom: 1px solid var(--line); padding: 10px 4px; }
  table.data.responsive td { border: 0; padding: 4px 12px; display: flex; justify-content: space-between; gap: 12px; text-align: right; }
  table.data.responsive td::before { content: attr(data-label); font-weight: 600; color: var(--muted); text-align: left; font-size: 13px; }
  table.data.responsive td.num { text-align: right; }
  table.data.responsive .actions { justify-content: flex-end; }
}

/* ---------- pills, badges, zones ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 650; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.pill.good, .pill.green, .pill.active, .pill.confirmed, .pill.completed, .pill.sent { background: var(--good-bg); color: var(--good); }
.pill.warn, .pill.yellow, .pill.requested, .pill.invited, .pill.draft, .pill.queued, .pill.sending { background: var(--warn-bg); color: var(--warn); }
.pill.bad, .pill.red, .pill.cancelled, .pill.disabled, .pill.no_show, .pill.failed { background: var(--bad-bg); color: var(--bad); }
.pill.info, .pill.archived, .pill.clients { background: var(--info-bg); color: var(--info); }
.pill.premium { background: linear-gradient(90deg, #f6d77a, #e8b33b); color: #4a3300; }
.pill.free { background: var(--good-bg); color: var(--good); }
.zone-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.zone-dot.green { background: var(--good); } .zone-dot.yellow { background: var(--warn); } .zone-dot.red { background: var(--bad); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; }
.legend .g { background: var(--zone-green); border: 1px solid var(--good); } .legend .y { background: var(--zone-yellow); border: 1px solid var(--warn); } .legend .r { background: var(--zone-red); border: 1px solid var(--bad); }

/* ---------- alerts & toasts ---------- */
.alert { display: flex; gap: 10px; padding: 12px 14px; border-radius: 11px; margin-bottom: 14px; border: 1px solid; font-weight: 500; }
.alert.success { background: var(--good-bg); border-color: color-mix(in srgb, var(--good) 35%, transparent); color: var(--good); }
.alert.error { background: var(--bad-bg); border-color: color-mix(in srgb, var(--bad) 35%, transparent); color: var(--bad); }
.alert.warning { background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 35%, transparent); color: var(--warn); }
.alert.info { background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 35%, transparent); color: var(--info); }
.alert p { margin: 0; color: var(--ink); }
.toasts { position: fixed; z-index: 120; right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast { pointer-events: auto; max-width: 420px; width: 100%; background: var(--ink); color: var(--bg); padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); display: flex; gap: 10px; align-items: center; animation: toast-in .35s var(--ease); font-weight: 500; }
.toast a { color: inherit; font-weight: 700; }
.toast .x { margin-left: auto; background: none; border: 0; color: inherit; opacity: .7; cursor: pointer; font-size: 18px; }
@keyframes toast-in { from { transform: translateY(14px); opacity: 0; } }

/* ---------- dropdowns (notifications, user) ---------- */
.dropdown { position: relative; }
.dropdown-panel {
  position: absolute; right: 0; top: calc(100% + 8px); width: min(92vw, 360px); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 8px; z-index: 80; display: none;
}
.dropdown.open .dropdown-panel { display: block; animation: toast-in .2s var(--ease); }
.dropdown-panel a, .dropdown-panel button.item { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; background: none; border: 0; font: inherit; cursor: pointer; text-align: left; }
.dropdown-panel a:hover, .dropdown-panel button.item:hover { background: var(--surface-2); }
.notif-list { max-height: 60vh; overflow-y: auto; }
.notif { font-size: 14px; line-height: 1.35; }
.notif.unread { background: var(--accent-softer); }
.notif time { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; padding: 6px 10px 8px; font-weight: 650; }
.user-chip { display: flex; align-items: center; gap: 8px; padding: 4px 8px 4px 4px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; color: var(--ink); font: 600 14px var(--font); }
.avatar { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; font-size: 13px; flex: none; }
.user-chip .nm { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) { .user-chip .nm { display: none; } .user-chip { padding: 3px; } }

/* ---------- modal (native <dialog>) ---------- */
dialog.modal {
  border: 0; padding: 0; border-radius: 18px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow-lg);
  width: min(640px, calc(100vw - 24px)); max-height: calc(100dvh - 24px); overflow: hidden;
}
dialog.modal.wide { width: min(900px, calc(100vw - 24px)); }
dialog.modal::backdrop { background: rgba(8, 16, 13, .55); backdrop-filter: blur(3px); }
dialog.modal[open] { animation: modal-in .28s var(--ease); display: flex; flex-direction: column; }
@keyframes modal-in { from { transform: translateY(18px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-size: 1.1rem; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 20px; border-top: 1px solid var(--line); background: var(--surface-2); flex-wrap: wrap; }
@media (max-width: 600px) {
  dialog.modal { width: 100vw; max-width: 100vw; max-height: 92dvh; margin: auto 0 0; border-radius: 20px 20px 0 0; }
  dialog.modal[open] { animation: sheet-in .3s var(--ease); }
  @keyframes sheet-in { from { transform: translateY(100%); } }
}

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; scrollbar-width: none; }
.tabs a, .tabs button { padding: 10px 14px; color: var(--muted); text-decoration: none; font-weight: 600; border: 0; background: none; border-bottom: 2.5px solid transparent; margin-bottom: -1px; white-space: nowrap; cursor: pointer; font-size: 14px; }
.tabs a[aria-selected="true"], .tabs button[aria-selected="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }

/* ---------- charts ---------- */
.chart-box { position: relative; height: 260px; }
.chart-card .now { font-size: 1.5rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.metric-chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.metric-chips button { border: 1px solid var(--line); background: var(--surface); color: var(--ink-2); border-radius: 999px; padding: 6px 13px; font: 600 13px var(--font); cursor: pointer; }
.metric-chips button[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }

/* ---------- meal planner (subgrid-aligned day cards) ---------- */
.day-jump { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 6px; margin-bottom: 8px; scrollbar-width: none; }
.day-jump a { flex: none; padding: 7px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 13px; }
.day-jump a.today { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.planner { display: grid; grid-auto-flow: column; grid-auto-columns: min(86vw, 330px); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 10px; grid-template-rows: auto repeat(5, auto) auto; }
.day { scroll-snap-align: start; display: grid; grid-row: span 7; grid-template-rows: subgrid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.day-head { padding: 12px 14px; background: var(--surface-2); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.day-head strong { font-size: 15px; } .day-head span { font-size: 12px; color: var(--muted); }
.slot { padding: 10px 12px; border-top: 1px solid var(--line); min-height: 64px; }
.slot-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin-bottom: 6px; display: flex; justify-content: space-between; align-items: center; }
.slot-label .add { border: 0; background: none; color: var(--accent-ink); cursor: pointer; padding: 2px; border-radius: 6px; display: inline-grid; }
.slot-label .add:hover { background: var(--accent-soft); }
.meal { display: flex; gap: 8px; align-items: flex-start; padding: 7px 9px; background: var(--accent-softer); border-radius: 9px; margin-bottom: 5px; font-size: 13.5px; line-height: 1.35; }
.meal a { color: var(--ink); font-weight: 600; text-decoration: none; }
.meal a:hover { text-decoration: underline; }
.meal .meta { color: var(--muted); font-size: 12px; display: block; }
.meal .note { display: block; color: var(--ink-2); font-size: 12.5px; font-style: italic; margin-top: 2px; }
.meal .del { margin-left: auto; border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0 2px; font-size: 16px; line-height: 1; }
.meal .del:hover { color: var(--bad); }
.day-total { padding: 10px 14px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 4px 10px; font-variant-numeric: tabular-nums; }
.day-total b { color: var(--ink); }
@media (min-width: 1320px) {
  .planner { grid-auto-flow: row; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-columns: auto; overflow: visible; }
  .day { grid-row: span 7; }
  .meal { font-size: 12.5px; }
}

/* ---------- shopping list ---------- */
.shop-cat { break-inside: avoid; margin-bottom: 18px; }
.shop-cat h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.shop-item { display: flex; align-items: center; gap: 12px; padding: 9px 4px; border-bottom: 1px dashed var(--line); cursor: pointer; }
.shop-item input { width: 21px; height: 21px; accent-color: var(--accent); flex: none; }
.shop-item .qty { margin-left: auto; font-variant-numeric: tabular-nums; color: var(--muted); font-weight: 600; white-space: nowrap; }
.shop-item.done .nm { text-decoration: line-through; color: var(--muted); }
@media (min-width: 800px) { .shop-cols { columns: 2; column-gap: 32px; } }
.progress { height: 8px; border-radius: 8px; background: var(--surface-2); overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--accent); border-radius: 8px; transition: width .4s var(--ease); }

/* ---------- gamification ---------- */
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge-card { text-align: center; padding: 16px 12px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--line); }
.badge-card .emo { font-size: 38px; line-height: 1; display: block; margin-bottom: 8px; }
.badge-card.locked { opacity: .5; filter: grayscale(1); }
.badge-card strong { display: block; font-size: 14px; }
.badge-card small { color: var(--muted); display: block; margin-top: 2px; }
.level-ring { --p: 0; width: 92px; height: 92px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-2) 0); flex: none; }
.level-ring > div { width: 74px; height: 74px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; line-height: 1.05; }
.level-ring b { font-size: 1.6rem; } .level-ring small { font-size: 11px; color: var(--muted); }
.water { display: flex; align-items: center; gap: 16px; }
.water-glass { position: relative; width: 64px; height: 92px; border: 3px solid var(--info); border-top: 0; border-radius: 0 0 16px 16px; overflow: hidden; flex: none; background: var(--surface); }
.water-glass span { position: absolute; left: 0; right: 0; bottom: 0; background: linear-gradient(180deg, #7cc4ff, #3a8ee6); transition: height .6s var(--ease); }
.water .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.streak { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--warn); }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cal-head h2 { margin: 0; min-width: 160px; text-align: center; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--line); gap: 1px; }
.cal .dow { background: var(--surface-2); text-align: center; font-size: 11.5px; font-weight: 700; color: var(--muted); padding: 8px 2px; text-transform: uppercase; }
.cal .cell { background: var(--surface); min-height: 92px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; min-width: 0; }
.cal .cell.out { background: var(--surface-2); opacity: .55; }
.cal .cell.today .d { background: var(--accent); color: var(--on-accent); }
.cal .cell .d { font-size: 12.5px; font-weight: 700; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal .ev { font-size: 11.5px; padding: 2px 6px; border-radius: 6px; background: var(--accent-soft); color: var(--accent-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.cal .ev.requested { background: var(--warn-bg); color: var(--warn); }
.cal .ev.cancelled, .cal .ev.no_show { background: var(--surface-2); color: var(--muted); text-decoration: line-through; }
.cal .ev.completed { background: var(--good-bg); color: var(--good); }
@media (max-width: 640px) { .cal .cell { min-height: 58px; padding: 3px; } .cal .ev { font-size: 0; padding: 0; height: 6px; border-radius: 3px; } }
.slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.slots label { margin: 0; }
.slots input { position: absolute; opacity: 0; }
.slots span { display: block; text-align: center; padding: 9px 4px; border: 1px solid var(--line-strong); border-radius: 9px; font-weight: 600; font-size: 14px; cursor: pointer; font-variant-numeric: tabular-nums; }
.slots input:checked + span { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.appt { display: flex; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.appt:last-child { border-bottom: 0; }
.appt .when { text-align: center; min-width: 56px; background: var(--surface-2); border-radius: 11px; padding: 6px; line-height: 1.1; }
.appt .when b { display: block; font-size: 1.3rem; } .appt .when small { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 700; }

/* ---------- messaging ---------- */
.chat { display: flex; flex-direction: column; height: calc(100dvh - var(--topbar-h) - 170px); min-height: 420px; }
.chat-log { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; background: var(--surface-2); border-radius: var(--radius) var(--radius) 0 0; border: 1px solid var(--line); border-bottom: 0; }
.bubble { max-width: min(78%, 560px); padding: 10px 14px; border-radius: 16px 16px 16px 4px; background: var(--surface); border: 1px solid var(--line); white-space: pre-wrap; word-wrap: break-word; font-size: 14.5px; }
.bubble.me { align-self: flex-end; background: var(--accent); color: var(--on-accent); border-color: var(--accent); border-radius: 16px 16px 4px 16px; }
.bubble .who { display: block; font-size: 11.5px; font-weight: 700; opacity: .75; margin-bottom: 2px; }
.bubble time { display: block; font-size: 11px; opacity: .7; margin-top: 4px; text-align: right; }
.chat-form { display: flex; gap: 8px; padding: 10px; border: 1px solid var(--line); border-radius: 0 0 var(--radius) var(--radius); background: var(--surface); }
.chat-form textarea { min-height: 44px; height: 44px; max-height: 160px; resize: none; }
.conv { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 12px; text-decoration: none; color: var(--ink); }
.conv:hover { background: var(--surface-2); }
.conv .meta { margin-left: auto; text-align: right; font-size: 12px; color: var(--muted); }
.e2e { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--good); font-weight: 600; }

/* ---------- recipes ---------- */
.recipe-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 250px), 1fr)); gap: 16px; }
.recipe-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s var(--ease), box-shadow .2s; }
.recipe-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.recipe-card .ph { aspect-ratio: 16 / 10; background: linear-gradient(135deg, var(--accent-soft), var(--surface-2)); display: grid; place-items: center; position: relative; overflow: hidden; }
.recipe-card .ph img { width: 100%; height: 100%; object-fit: cover; }
.recipe-card .ph .emo { font-size: 42px; opacity: .8; }
.recipe-card .ph .pill { position: absolute; top: 10px; left: 10px; z-index: 3; }
.recipe-card .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.recipe-card h3 { margin: 0; font-size: 1rem; }
.recipe-card .macros { margin-top: auto; display: flex; gap: 10px; font-size: 12.5px; color: var(--muted); font-variant-numeric: tabular-nums; flex-wrap: wrap; }
.recipe-card.locked .ph::after { content: ""; position: absolute; inset: 0; background: rgba(10, 20, 16, .25); backdrop-filter: blur(2px); }
.recipe-card .lock { position: absolute; z-index: 2; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--surface); color: var(--ink); }
.macro-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 10px; }
.macro-bar div { background: var(--surface-2); border-radius: 12px; padding: 10px 12px; }
.macro-bar b { display: block; font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.macro-bar small { color: var(--muted); font-weight: 600; }
.prose h2, .prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .35em; }
.ing-row { display: grid; grid-template-columns: minmax(0, 2fr) 90px 80px minmax(0, 1.2fr) 40px; gap: 8px; margin-bottom: 8px; align-items: center; }
@media (max-width: 700px) { .ing-row { grid-template-columns: 1fr 1fr; } .ing-row .food { grid-column: 1 / -1; } .ing-row .note { grid-column: 1 / 2; } }

/* ---------- public website ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: color-mix(in srgb, var(--surface) 90%, transparent); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header .inner { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 12px; padding: 0 var(--gutter); height: 66px; }
.site-nav { display: none; }
@media (min-width: 900px) {
  [data-menu="top"] .site-nav { display: flex; gap: 2px; margin-left: 18px; }
  [data-menu="top"] .site-nav a { padding: 8px 12px; border-radius: 9px; color: var(--ink-2); text-decoration: none; font-weight: 560; }
  [data-menu="top"] .site-nav a:hover { background: var(--surface-2); }
  [data-menu="top"] .site-nav a[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); }
  [data-menu="top"] .site-header .menu-toggle { display: none; }
}
.site { min-height: calc(100vh - 66px); }
@media (min-width: 1000px) {
  [data-menu="left"] .site, [data-menu="right"] .site { display: grid; }
  [data-menu="left"] .site { grid-template-columns: var(--sidebar-w) minmax(0, 1fr); }
  [data-menu="right"] .site { grid-template-columns: minmax(0, 1fr) var(--sidebar-w); }
  [data-menu="right"] .site .sidebar { grid-column: 2; grid-row: 1; }
  [data-menu="left"] .site .sidebar, [data-menu="right"] .site .sidebar { position: sticky; top: 66px; height: calc(100vh - 66px); transform: none; }
  [data-menu="left"] .site-header .menu-toggle, [data-menu="right"] .site-header .menu-toggle { display: none; }
}
.site-main { min-width: 0; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 var(--gutter); }
.hero { padding: clamp(40px, 8vw, 96px) 0 clamp(32px, 6vw, 72px); background:
  radial-gradient(900px 400px at 85% -10%, var(--accent-soft), transparent 70%),
  radial-gradient(700px 300px at -10% 110%, var(--accent-softer), transparent 70%); }
.hero h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(2rem, 1.3rem + 3.2vw, 3.6rem); line-height: 1.05; letter-spacing: -.02em; max-width: 16ch; }
.hero p.lead { font-size: clamp(1.05rem, 1rem + .4vw, 1.25rem); color: var(--ink-2); max-width: 56ch; }
.hero .actions { margin-top: 22px; }
.hero-grid { display: grid; gap: 32px; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.2fr 1fr; } }
.hero-card { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow-lg); }
.hero-card .bar { height: 10px; border-radius: 6px; background: var(--surface-2); margin: 8px 0 16px; overflow: hidden; }
.hero-card .bar span { display: block; height: 100%; background: var(--accent); width: 68%; border-radius: 6px; }
.section { padding: clamp(36px, 6vw, 72px) 0; }
.section.alt { background: var(--surface); border-block: 1px solid var(--line); }
.feature { display: flex; gap: 14px; }
.feature .ic { width: 44px; height: 44px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; flex: none; }
.site-footer { border-top: 1px solid var(--line); background: var(--surface); padding: 40px 0 28px; margin-top: 40px; font-size: 14px; }
.site-footer .cols { display: grid; gap: 24px; }
@media (min-width: 800px) { .site-footer .cols { grid-template-columns: 1.3fr 1fr 1.3fr; } }
.site-footer a { color: var(--ink-2); }
.newsletter-form { display: flex; gap: 8px; flex-wrap: wrap; }
.newsletter-form input[type=email] { flex: 1 1 200px; }
.hp { position: absolute !important; left: -9999px !important; }

/* ---------- auth ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background:
  radial-gradient(800px 380px at 100% 0%, var(--accent-soft), transparent 70%), var(--bg); }
.auth-card { width: min(420px, 100%); }
.auth-card .brand { justify-content: center; margin-bottom: 18px; }
.auth-card h1 { font-size: 1.4rem; text-align: center; }
.secure-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12.5px; color: var(--muted); margin-top: 16px; }

/* ---------- misc ---------- */
.empty { text-align: center; padding: 40px 16px; color: var(--muted); }
.empty .emo { font-size: 44px; display: block; margin-bottom: 8px; }
.list-plain { list-style: none; padding: 0; margin: 0; }
.list-plain li { padding: 9px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.list-plain li:last-child { border-bottom: 0; }
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { color: var(--muted); font-weight: 600; } .kv dd { margin: 0; }
.codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; font: 600 15px ui-monospace, monospace; }
.codes span { background: var(--surface-2); padding: 8px; border-radius: 8px; text-align: center; }
.qr { background: #fff; padding: 12px; border-radius: 12px; display: inline-block; }
.qr img { image-rendering: pixelated; width: 200px; height: 200px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatches button { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--line-strong); cursor: pointer; }
.theme-switch { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; }
.theme-switch button { border: 0; background: none; color: var(--muted); padding: 6px 9px; border-radius: 8px; cursor: pointer; display: inline-grid; }
.theme-switch button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.fab { position: fixed; right: 18px; bottom: 18px; z-index: 30; border-radius: 16px; min-height: 52px; padding: 0 20px; box-shadow: var(--shadow-lg); }
@media (min-width: 1000px) { .fab { display: none; } }
.text-right { text-align: right; } .nowrap { white-space: nowrap; } .mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; } .mt { margin-top: 16px; }
.w-auto { width: auto !important; }

@media print {
  .topbar, .sidebar, .navstrip, .no-print, .toasts, .fab, .site-header, .site-footer { display: none !important; }
  .app-body { padding: 0 !important; }
  body { background: #fff; color: #000; }
  .card { box-shadow: none; border: 0; }
  .shop-item input { width: 14px; height: 14px; }
}

/* ---------- i18n: EL / EN language switch ---------- */
.lang-switch { display: inline-flex; background: var(--surface-2); border-radius: 11px; padding: 3px; gap: 2px; flex: none; }
.lang-switch a { display: inline-grid; place-items: center; min-width: 34px; height: 30px; padding: 0 8px; border-radius: 8px; font: 700 12.5px/1 var(--font); letter-spacing: .04em; color: var(--muted); text-decoration: none; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current="true"] { background: var(--surface); color: var(--accent-ink); box-shadow: var(--shadow); }
html.lang-switching body { opacity: .6; transition: opacity .15s; }
@media (max-width: 520px) { .topbar .theme-switch { display: none; } .hide-xs { display: none; } }

/* ---------- i18n: bilingual CMS fields (EL / EN tabs) ---------- */
.i18n-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.i18n-head label { margin: 0; }
.i18n-tabs { display: inline-flex; gap: 2px; background: var(--surface-2); border-radius: 9px; padding: 2px; }
.i18n-tabs button { border: 0; background: none; color: var(--muted); font: 700 11.5px/1 var(--font); letter-spacing: .05em; padding: 6px 10px; border-radius: 7px; cursor: pointer; position: relative; }
.i18n-tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.i18n-tabs button::after { content: ""; position: absolute; top: 3px; right: 3px; width: 6px; height: 6px; border-radius: 50%; }
.i18n-tabs button.filled::after { background: var(--good); }
.i18n-tabs button.empty::after { background: var(--warn); }
.i18n-field .i18n-hint { display: none; }
.i18n-field:focus-within .i18n-hint { display: block; }
