@charset "UTF-8";
/* ==========================================================================
   Neo Nutrition Solutions - authenticated surfaces
   Auth screens, client portal, nutritionist workspace and the admin console.
   Loads after app.css and reuses every brand token from it.
   ========================================================================== */

/* The same rule as app.css, repeated because the console loads this file last
   and a later `display` would otherwise beat the browser's [hidden]. See the
   note in app.css: .mpick is a full-screen overlay that must stay out of the
   way until it is opened. */
[hidden] { display: none !important; }

/* -------------------------------------------------------------- auth screens */
.auth-body { background: var(--canvas); }
.auth-shell { display: grid; grid-template-columns: 1fr 1fr; min-height: 100vh; }
.auth-panel {
    display: flex; flex-direction: column; justify-content: center; gap: var(--s-6);
    padding: var(--s-9) clamp(var(--s-5), 6vw, var(--s-11));
    max-width: 620px; width: 100%; margin-inline: auto;
}
.auth-panel .brand img { height: 46px; }
.auth-panel h1 { font-size: var(--t-2xl); margin-bottom: var(--s-2); }
.auth-aside {
    background: var(--forest); color: #C8D6C3; padding: var(--s-10) var(--s-9);
    display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-8);
    background-image:
        radial-gradient(70% 50% at 100% 0%, rgba(88,153,74,.35), transparent 70%),
        radial-gradient(50% 40% at 0% 100%, rgba(240,133,24,.18), transparent 70%);
}
.auth-aside .tick-list .icon { color: var(--green-300); }
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { display: none; }
    .auth-panel { padding: var(--s-7) var(--s-5); justify-content: flex-start; }
}

/* ------------------------------------------------------------- app shell */
.app { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; background: var(--canvas-alt); }
.app--wide { grid-template-columns: 240px 1fr; }

.side {
    background: var(--forest); color: #B9C8B4; display: flex; flex-direction: column;
    position: sticky; top: 0; height: 100vh; overflow-y: auto; scrollbar-width: thin;
}
.side::-webkit-scrollbar { width: 6px; }
.side::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 3px; }
.side__brand { padding: var(--s-5) var(--s-5) var(--s-4); border-bottom: 1px solid rgba(255,255,255,.1); }
.side__brand img { height: 40px; width: auto; }
.side__role {
    margin-top: var(--s-3); font-size: 10px; letter-spacing: .14em; text-transform: uppercase;
    color: var(--green-300); font-weight: 600;
}
.side__nav { padding: var(--s-4) var(--s-3) var(--s-8); display: grid; gap: 2px; }
.side__group {
    font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: #7F9279;
    padding: var(--s-5) var(--s-3) var(--s-2); font-weight: 600;
}
.side__link {
    display: flex; align-items: center; gap: var(--s-3); padding: 9px var(--s-3);
    border-radius: var(--r-sm); color: #C2D0BD; text-decoration: none; font-size: var(--t-base);
    transition: background .15s var(--ease), color .15s var(--ease);
}
.side__link:hover { background: rgba(255,255,255,.07); color: #fff; }
.side__link.is-active { background: var(--green); color: #fff; font-weight: 500; }
.side__link .icon { flex: none; opacity: .9; }
.side__badge {
    margin-left: auto; background: var(--orange); color: #22160A; font-size: 11px; font-weight: 700;
    min-width: 20px; height: 20px; border-radius: 10px; display: grid; place-items: center; padding: 0 6px;
}
.side__foot { margin-top: auto; padding: var(--s-4); border-top: 1px solid rgba(255,255,255,.1); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topnav {
    position: sticky; top: 0; z-index: 40; background: rgba(250,250,245,.93);
    backdrop-filter: blur(10px); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; gap: var(--s-4); padding: var(--s-4) var(--s-6);
}
.topnav__title { font-family: var(--font-display); font-size: var(--t-xl); font-weight: 600; margin: 0; }
.topnav__sub { font-size: var(--t-sm); color: var(--ink-500); }
.topnav__actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-3); }
.content { padding: var(--s-7) var(--s-6) var(--s-10); flex: 1; }
.content--narrow { max-width: 900px; }

.app-search {
    display: flex; align-items: center; gap: var(--s-2); background: var(--canvas);
    border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 8px 14px;
    min-width: 260px; color: var(--ink-500);
}
.app-search input { border: 0; background: transparent; outline: none; width: 100%; font-size: var(--t-base); }

.avatar {
    width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center;
    background: var(--green-050); color: var(--green-800); font-weight: 600; font-size: var(--t-sm); flex: none;
}
.avatar--lg { width: 56px; height: 56px; font-size: var(--t-md); }
.avatar img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }

.side-toggle { display: none; }
@media (max-width: 1080px) {
    .app { grid-template-columns: 1fr; }
    .side {
        position: fixed; inset: 0 auto 0 0; width: 272px; z-index: 80;
        transform: translateX(-100%); transition: transform .28s var(--ease);
    }
    .side.is-open { transform: none; box-shadow: var(--sh-4); }
    .side-toggle { display: inline-flex; }
    .content { padding: var(--s-5) var(--s-4) var(--s-9); }
    .app-search { min-width: 0; }
}

/* ---------------------------------------------------------------- KPI tiles */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--s-4); }
.kpi {
    background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-lg);
    padding: var(--s-5); display: flex; flex-direction: column; gap: 6px; position: relative; overflow: hidden;
}
.kpi::after {
    content: ''; position: absolute; inset: auto auto 0 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--green), var(--green-300)); opacity: .9;
}
.kpi--accent::after { background: linear-gradient(90deg, var(--orange), var(--orange-300)); }
.kpi--warn::after { background: linear-gradient(90deg, var(--warn), #E7B45E); }
.kpi--bad::after  { background: linear-gradient(90deg, var(--bad), #E58B85); }
.kpi__label { font-size: var(--t-sm); color: var(--ink-500); display: flex; align-items: center; gap: 8px; }
.kpi__value { font-family: var(--font-display); font-size: clamp(1.6rem, 2vw, 2.1rem); font-weight: 600; color: var(--ink); line-height: 1.1; }
.kpi__delta { font-size: var(--t-xs); font-weight: 600; display: inline-flex; align-items: center; gap: 4px; }
.kpi__delta--up { color: var(--ok); }
.kpi__delta--down { color: var(--bad); }
.kpi__delta--flat { color: var(--ink-400); }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px) { .kpis { grid-template-columns: 1fr; } }

/* ------------------------------------------------------------------ panels */
.panel { background: var(--canvas); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden; }
.panel__head {
    display: flex; align-items: center; gap: var(--s-4); padding: var(--s-5) var(--s-6);
    border-bottom: 1px solid var(--line-soft);
}
.panel__title { font-family: var(--font-display); font-size: var(--t-lg); font-weight: 600; margin: 0; }
.panel__body { padding: var(--s-6); }
.panel__body--flush { padding: 0; }
.panel__foot { padding: var(--s-4) var(--s-6); border-top: 1px solid var(--line-soft); background: var(--canvas-alt); }

/* ------------------------------------------------------------------ tables */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: var(--t-base); }
.table th {
    text-align: left; font-size: var(--t-xs); font-weight: 600; letter-spacing: .08em;
    text-transform: uppercase; color: var(--ink-500); padding: 12px var(--s-5);
    border-bottom: 1px solid var(--line); background: var(--canvas-alt); white-space: nowrap;
}
.table td { padding: 14px var(--s-5); border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tbody tr:hover { background: var(--green-050); }
.table tbody tr:last-child td { border-bottom: 0; }
.table--compact td, .table--compact th { padding: 9px var(--s-4); }
.table a { text-decoration: none; font-weight: 500; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }

/* -------------------------------------------------------------- mini charts */
.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart-bar rect { transition: opacity .15s var(--ease); }
.chart-bar rect:hover { opacity: .78; }
.chart-legend { display: flex; flex-wrap: wrap; gap: var(--s-4); font-size: var(--t-sm); color: var(--ink-600, var(--ink-500)); }
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

.progress { height: 8px; border-radius: 4px; background: var(--line-soft); overflow: hidden; }
.progress__bar { height: 100%; border-radius: 4px; background: var(--green); transition: width .5s var(--ease); }
.progress__bar--accent { background: var(--orange); }
.progress__bar--warn { background: var(--warn); }
.progress__bar--bad { background: var(--bad); }

.ring { transform: rotate(-90deg); }
.ring__track { stroke: var(--line-soft); }
.ring__value { stroke: var(--green); stroke-linecap: round; transition: stroke-dashoffset .6s var(--ease); }

/* ------------------------------------------------------------------ funnel */
.funnel { display: grid; gap: 6px; }
.funnel__row { display: grid; grid-template-columns: 170px 1fr 110px; gap: var(--s-4); align-items: center; font-size: var(--t-sm); }
.funnel__bar { height: 30px; border-radius: 6px; background: var(--green); display: flex; align-items: center; padding-left: 10px; color: #fff; font-weight: 600; min-width: 2px; }
@media (max-width: 720px) { .funnel__row { grid-template-columns: 110px 1fr; } .funnel__row > :last-child { grid-column: 1 / -1; } }

/* -------------------------------------------------------------- timeline */
.timeline { position: relative; padding-left: 26px; display: grid; gap: var(--s-5); }
.timeline::before { content: ''; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline__item { position: relative; }
.timeline__item::before {
    content: ''; position: absolute; left: -24px; top: 6px; width: 10px; height: 10px;
    border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px var(--green-050);
}
.timeline__meta { font-size: var(--t-xs); color: var(--ink-500); }

/* ------------------------------------------------------------------- tabs */
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab {
    padding: 11px var(--s-5); border: 0; background: transparent; white-space: nowrap;
    font-size: var(--t-base); font-weight: 500; color: var(--ink-500);
    border-bottom: 2.5px solid transparent; text-decoration: none;
}
.tab:hover { color: var(--green-800); }
.tab.is-active { color: var(--green-800); border-bottom-color: var(--green); font-weight: 600; }

/* --------------------------------------------------------------- toolbar */
.toolbar { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: center; margin-bottom: var(--s-5); }
.toolbar .input, .toolbar .select { width: auto; min-width: 150px; padding: 9px 12px; font-size: var(--t-sm); }
.seg { display: inline-flex; background: var(--canvas); border: 1.5px solid var(--line); border-radius: var(--r-pill); padding: 3px; }
.seg a, .seg button {
    padding: 6px 13px; border-radius: var(--r-pill); border: 0; background: transparent;
    font-size: var(--t-sm); font-weight: 500; color: var(--ink-500); text-decoration: none;
}
.seg a.is-active, .seg button.is-active { background: var(--green); color: #fff; font-weight: 600; }

/* ----------------------------------------------------------- demo banner */
.demo-banner {
    display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap;
    background: var(--orange-050); border: 1px solid var(--orange-100);
    border-radius: var(--r-md); padding: var(--s-4) var(--s-5); margin-bottom: var(--s-5);
    font-size: var(--t-sm); color: #7A4800;
}
.demo-banner .icon { color: var(--orange-700); flex: none; }

/* ------------------------------------------------------- portal specifics */
.portal { background: var(--canvas-alt); }
.portal .content { max-width: 1180px; }
.greeting { font-family: var(--font-display); font-size: var(--t-2xl); font-weight: 600; margin: 0 0 4px; }
.next-card {
    background: linear-gradient(135deg, var(--forest), var(--forest-soft));
    color: #fff; border-radius: var(--r-lg); padding: var(--s-7); position: relative; overflow: hidden;
}
.next-card::after {
    content: ''; position: absolute; right: -40px; top: -40px; width: 200px; height: 200px;
    border-radius: 50%; background: rgba(88,153,74,.3);
}
.next-card h3 { color: #fff; font-size: var(--t-xl); margin-bottom: var(--s-2); }
.next-card .muted { color: #B9C8B4; }

.metric-card { display: flex; gap: var(--s-4); align-items: center; }
.metric-card__icon { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--green-050); color: var(--green-700); flex: none; }

@media print {
    .side, .topnav, .sticky-cta, .no-print { display: none !important; }
    .app { grid-template-columns: 1fr; }
    body { background: #fff; }
    .panel, .card { box-shadow: none; border-color: #ccc; }
}

/* ==========================================================================
   Account menu - present on every signed-in surface.
   Built on <details>, so it works with no JavaScript.
   ========================================================================== */
.acct { position: relative; }
.acct__trigger {
    display: flex; align-items: center; gap: 5px; cursor: pointer; list-style: none;
    padding: 3px 7px 3px 3px; border-radius: var(--r-pill); border: 1.5px solid transparent;
    transition: background .15s var(--ease), border-color .15s var(--ease);
}
.acct__trigger::-webkit-details-marker { display: none; }
.acct__trigger:hover { background: var(--green-050); border-color: var(--line); }
.acct[open] .acct__trigger { background: var(--green-050); border-color: var(--green-300); }
.acct__chev { color: var(--ink-400); display: inline-flex; transition: transform .2s var(--ease); }
.acct[open] .acct__chev { transform: rotate(180deg); }
.acct__dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--orange);
    position: absolute; top: 2px; left: 30px; border: 2px solid var(--canvas-alt);
}

.acct__menu {
    position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
    min-width: 248px; background: var(--canvas); border: 1px solid var(--line);
    border-radius: var(--r-md); box-shadow: var(--sh-4); overflow: hidden;
    animation: acctIn .16s var(--ease) both;
}
@keyframes acctIn { from { opacity: 0; transform: translateY(-6px); } }
@media (prefers-reduced-motion: reduce) { .acct__menu { animation: none; } }

.acct__head {
    padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line-soft);
    display: flex; flex-direction: column; gap: 2px; background: var(--canvas-alt);
}
.acct__head strong { font-size: var(--t-base); }
.acct__head .pill { align-self: flex-start; }

.acct__item {
    display: flex; align-items: center; gap: var(--s-3); width: 100%;
    padding: 11px var(--s-5); font-size: var(--t-base); color: var(--ink-700);
    text-decoration: none; background: none; border: 0; text-align: left; cursor: pointer;
    transition: background .14s var(--ease), color .14s var(--ease);
}
.acct__item:hover { background: var(--green-050); color: var(--green-800); }
.acct__item .icon { color: var(--ink-400); flex: none; }
.acct__item:hover .icon { color: var(--green-700); }
.acct__out { border-top: 1px solid var(--line-soft); margin: 0; }
.acct__item--danger { color: var(--bad); }
.acct__item--danger .icon { color: var(--bad); }
.acct__item--danger:hover { background: var(--bad-bg); color: var(--bad); }
.acct__item--danger:hover .icon { color: var(--bad); }

/* Sidebar sign-out rendered as a form button rather than a link. */
.side__link--out {
    width: 100%; border: 0; background: none; text-align: left; cursor: pointer; font: inherit;
}
.side__link--out:hover { background: rgba(255, 255, 255, .07); color: #fff; }

/* ---------------------------------------------------- appointment rows */
.appt {
    display: flex; align-items: center; gap: var(--s-5); padding: var(--s-5) var(--s-6);
    border-bottom: 1px solid var(--line-soft); text-decoration: none; color: inherit;
    transition: background .15s var(--ease);
}
.appt:last-child { border-bottom: 0; }
.appt:hover { background: var(--green-050); }
.appt__date {
    width: 60px; flex: none; text-align: center; display: grid; gap: 0;
    border-right: 1px solid var(--line-soft); padding-right: var(--s-4);
}
.appt__dow { font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-500); }
.appt__day { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; line-height: 1.1; color: var(--ink); }
.appt__mon { font-size: 10px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-500); }
.appt__body { display: grid; gap: 3px; min-width: 0; flex: 1; }
.appt__body strong { font-size: var(--t-base); }
.appt__meta { display: grid; gap: 5px; justify-items: flex-end; flex: none; }
.appt__go { color: var(--ink-300); flex: none; }
.appt:hover .appt__go { color: var(--green); }
@media (max-width: 680px) {
    .appt { flex-wrap: wrap; gap: var(--s-4); padding: var(--s-4); }
    .appt__meta { justify-items: flex-start; grid-auto-flow: column; }
    .appt__go { display: none; }
}

/* ------------------------------------------------------------- calendar */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.cal__dow { background: var(--canvas-alt); padding: 9px 6px; text-align: center; font-size: var(--t-xs); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-500); }
.cal__day { background: var(--canvas); min-height: 96px; padding: 7px; display: flex; flex-direction: column; gap: 4px; }
.cal__day--out { background: var(--canvas-alt); }
.cal__day--today { background: var(--green-050); }
.cal__num { font-size: var(--t-sm); font-weight: 600; color: var(--ink-500); }
.cal__day--today .cal__num { color: var(--green-800); }
.cal__ev { display: block; font-size: 11px; line-height: 1.3; padding: 4px 6px; border-radius: 5px; background: var(--green); color: #fff; text-decoration: none; }
.cal__ev--follow { background: var(--orange-050); color: var(--orange-700); border: 1px solid var(--orange-100); }
.cal__ev--done { background: var(--line-soft); color: var(--ink-500); }
.cal__ev--cancelled { background: var(--bad-bg); color: var(--bad); text-decoration: line-through; }
@media (max-width: 720px) { .cal__day { min-height: 62px; padding: 4px; } .cal__ev { font-size: 9px; padding: 2px 4px; } }

/* --------------------------------------------------------------- plans */
.meal { display: flex; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--line-soft); }
.meal:last-child { border-bottom: 0; }
.meal__when { width: 112px; flex: none; }
.meal__type { font-size: var(--t-xs); font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--green-700); }
.meal__time { font-size: var(--t-xs); color: var(--ink-400); }
.meal__body strong { display: block; font-size: var(--t-base); margin-bottom: 2px; }
@media (max-width: 560px) { .meal { flex-direction: column; gap: 4px; } .meal__when { width: auto; } }

/* ------------------------------------------------------------- journal */
.jrnl-scale { display: flex; gap: 6px; }
.jrnl-scale input { position: absolute; opacity: 0; pointer-events: none; }
.jrnl-scale label {
    flex: 1; text-align: center; padding: 10px 4px; border: 1.5px solid var(--line);
    border-radius: var(--r-sm); font-size: var(--t-sm); cursor: pointer; transition: all .15s var(--ease);
}
.jrnl-scale label:hover { border-color: var(--green-300); background: var(--green-050); }
.jrnl-scale input:checked + label { border-color: var(--green); background: var(--green-050); color: var(--green-800); font-weight: 600; }

/* -------------------------------------------------------------- thread */
.msg { display: flex; gap: var(--s-4); padding: var(--s-5) 0; }
.msg__bubble { background: var(--canvas-alt); border: 1px solid var(--line-soft); border-radius: 4px 14px 14px 14px; padding: var(--s-4) var(--s-5); max-width: 76%; }
.msg--mine { flex-direction: row-reverse; }
.msg--mine .msg__bubble { background: var(--green-050); border-color: var(--green-100); border-radius: 14px 4px 14px 14px; }
.msg__meta { font-size: var(--t-xs); color: var(--ink-400); margin-top: 6px; }
.msg--mine .msg__meta { text-align: right; }
@media (max-width: 560px) { .msg__bubble { max-width: 88%; } }

/* ==========================================================================
   Diet plan builder rows
   ========================================================================== */
.pb-row {
    padding: var(--s-4);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
    background: var(--canvas-alt);
    margin-bottom: var(--s-3);
}
.pb-row:last-child { margin-bottom: 0; }
.pb-row:focus-within { border-color: var(--green-300); background: var(--green-050); }

/*
 * Meal row.
 *
 * This was six fixed grid columns (150 + 104 + 1fr + 128 + 86 + 38). They add
 * up to about 546px before gaps, and the plan builder sits in a split layout
 * whose column is narrower than that on a normal screen - so the one flexible
 * column, the meal name, collapsed to a few pixels. The portion field ended up
 * sitting where the meal name should be, which is exactly what it looked like.
 *
 * The media queries that were meant to catch this could not: they measure the
 * viewport, and the problem is the width of the container.
 *
 * Flex with wrapping has no such blind spot. The meal name takes its own full
 * width line at the top, because it is the field that actually needs room, and
 * the four short fields flow underneath at whatever width is available.
 */
.pb-row__grid {
    display: flex;
    flex-wrap: wrap;
    gap: var(--s-2);
    align-items: center;
    margin-bottom: var(--s-2);
}
.pb-row__grid > :nth-child(1) { flex: 0 1 148px; }            /* meal type   */
.pb-row__grid > :nth-child(2) { flex: 0 1 100px; }            /* time        */
.pb-row__grid > :nth-child(3) { flex: 1 1 100%; order: -1; }  /* meal name   */
.pb-row__grid > :nth-child(4) { flex: 1 1 120px; }            /* portion     */
.pb-row__grid > :nth-child(5) { flex: 0 1 84px; }             /* kcal        */
.pb-row__grid > .pb-del       { flex: 0 0 36px; margin-left: auto; }
.pb-row__grid .input,
.pb-row__grid .select { padding: 9px 11px; font-size: var(--t-sm); }
.pb-row .textarea { min-height: 54px; padding: 9px 11px; font-size: var(--t-sm); }

.pb-del {
    width: 36px; height: 36px; border: 1.5px solid var(--line); border-radius: var(--r-sm);
    background: var(--canvas); color: var(--ink-400); display: grid; place-items: center;
    transition: all .15s var(--ease);
}
.pb-del:hover { border-color: var(--bad); color: var(--bad); background: var(--bad-bg); }

/* On a phone the four short fields each take a full line rather than being
   squeezed two-up, because a 60px-wide portion field cannot be typed into. */
@media (max-width: 480px) {
    .pb-row__grid > :nth-child(1),
    .pb-row__grid > :nth-child(2),
    .pb-row__grid > :nth-child(4) { flex: 1 1 100%; }
}

/* ==========================================================================
   Admin console extras
   ========================================================================== */

/* Modules that are mapped but not yet built. Shown so the full information
   architecture is visible, but never clickable, so no link leads nowhere. */
.side__link--soon {
    opacity: .42;
    cursor: default;
    pointer-events: none;
}
.side__soon {
    margin-left: auto;
    font-size: 9px;
    letter-spacing: .1em;
    text-transform: uppercase;
    font-weight: 700;
    color: #7F9279;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: var(--r-pill);
    padding: 2px 6px;
}

/* Dense tables read better in the console than the airier public spacing. */
.console .table td { padding: 11px var(--s-5); }
.console .kpi__value { font-size: clamp(1.4rem, 1.6vw, 1.9rem); }

/* Inline number inputs in the targets grid. */
.console .table .input { font-size: var(--t-sm); }

/* ==========================================================================
   Front-desk booking: client type-ahead and quick-pick chips
   ========================================================================== */
.ac {
    position: relative;
    margin-top: 6px;
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    background: var(--canvas);
    box-shadow: 0 6px 20px rgba(16, 20, 15, .09);
    overflow: hidden;
    max-height: 290px;
    overflow-y: auto;
}
.ac__item {
    display: block;
    width: 100%;
    padding: 10px var(--s-4);
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    background: transparent;
    text-align: left;
    font: inherit;
    cursor: pointer;
}
.ac__item:last-child { border-bottom: 0; }
.ac__item:hover, .ac__item:focus-visible { background: var(--green-050); }
.ac__item strong { display: block; font-size: var(--t-sm); color: var(--ink); }
.ac__item span   { display: block; font-size: var(--t-xs); color: var(--ink-500); }
.ac__empty { margin: 0; padding: var(--s-4); font-size: var(--t-sm); color: var(--ink-500); }

.chip-btn {
    padding: 7px 13px;
    border: 1px solid var(--line);
    border-radius: var(--r-pill);
    background: var(--canvas);
    font: inherit;
    font-size: var(--t-sm);
    color: var(--ink-700);
    cursor: pointer;
    transition: all .15s var(--ease);
}
.chip-btn:hover { border-color: var(--green-300); background: var(--green-050); }

.ta-center { text-align: center; }

/* ==========================================================================
   Staff accounts: permission grid and danger zone
   ========================================================================== */
.perm-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
    gap: var(--s-4);
}
.perm-mod {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    padding: var(--s-3) var(--s-4) var(--s-4);
    margin: 0;
    min-width: 0;
}
.perm-mod legend {
    padding: 0 6px;
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-500);
}
.perm {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    font-size: var(--t-sm);
    color: var(--ink-700);
    cursor: pointer;
}
.perm input { flex: none; }
.perm--exception { color: var(--orange-700); font-weight: 600; }
.perm em { color: var(--orange); font-style: normal; font-size: 18px; line-height: 1; }

.danger-zone > summary {
    cursor: pointer;
    font-size: var(--t-sm);
    font-weight: 600;
    color: var(--bad);
    padding: 8px 0;
    list-style: none;
}
.danger-zone > summary::-webkit-details-marker { display: none; }
.danger-zone > summary::before { content: "\26A0  "; }

.steps-list { margin: 0 0 var(--s-4); padding-left: 1.1rem; }
.steps-list li { margin-bottom: 8px; font-size: var(--t-sm); color: var(--ink-700); line-height: 1.5; }

/* ==========================================================================
   Consultation: intake flags, attendee rows, key-value readouts
   ========================================================================== */
.flags {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: var(--s-3);
    margin-bottom: var(--s-5);
}
.flag {
    display: flex;
    gap: var(--s-3);
    align-items: flex-start;
    padding: var(--s-3) var(--s-4);
    border: 1px solid var(--warn);
    border-left-width: 3px;
    border-radius: var(--r-md);
    background: var(--warn-bg);
}
.flag svg { flex: none; margin-top: 2px; color: var(--warn); }
.flag strong { display: block; font-size: var(--t-sm); color: var(--ink); }
.flag span   { display: block; font-size: var(--t-xs); color: var(--ink-700); line-height: 1.45; }

.att-row {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1.2fr) 72px auto 100px 32px;
    gap: var(--s-2);
    align-items: center;
    margin-bottom: var(--s-2);
}
.att-row .input { margin: 0; }
.att-row__charge { margin: 0; white-space: nowrap; font-size: var(--t-xs); }
.att-row__del {
    width: 32px; height: 32px;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    background: var(--canvas);
    color: var(--ink-400);
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
}
.att-row__del:hover { border-color: var(--bad); color: var(--bad); }

.kv-head {
    margin: var(--s-4) 0 var(--s-2);
    font-size: var(--t-xs);
    font-weight: 700;
    letter-spacing: .05em;
    text-transform: uppercase;
    color: var(--ink-400);
}
.kv-head:first-child { margin-top: 0; }
.kv {
    display: flex;
    justify-content: space-between;
    gap: var(--s-3);
    padding: 5px 0;
    border-bottom: 1px solid var(--line-soft);
    font-size: var(--t-sm);
}
.kv span   { color: var(--ink-500); flex: none; max-width: 48%; }
.kv strong { text-align: right; font-weight: 600; color: var(--ink); min-width: 0; }

@media (max-width: 720px) {
    .att-row { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 32px; }
    .att-row__charge { grid-column: 1 / 3; }
}

/* ==========================================================================
   Finance: invoices, totals, report tables
   ========================================================================== */
.inv-totals {
    max-width: 340px;
    margin-left: auto;
    margin-top: var(--s-5);
}
.inv-totals .kv { border-bottom: 1px solid var(--line-soft); }
.kv--total {
    border-top: 1px solid var(--line);
    border-bottom: 0 !important;
    padding-top: 9px;
    margin-top: 3px;
}
.kv--total span   { color: var(--ink); font-weight: 600; }
.kv--total strong { font-size: var(--t-lg); color: var(--green-900); }

/* Invoice line editor */
.inv-line {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr) 76px 110px 92px auto 32px;
    gap: var(--s-2);
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid var(--line-soft);
}
.inv-line .input,
.inv-line .select { margin: 0; }
.inv-line__total {
    text-align: right;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--ink);
    font-size: var(--t-sm);
}
.inv-line__tax { margin: 0; font-size: var(--t-xs); white-space: nowrap; }

/* Report library rows */
.report-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-4);
    padding: var(--s-3) 0;
    border-bottom: 1px solid var(--line-soft);
}
.report-row:last-child { border-bottom: 0; }
.report-row strong { font-size: var(--t-sm); }

.table--report td,
.table--report th { font-variant-numeric: tabular-nums; white-space: nowrap; }
.table--report td:first-child { white-space: normal; }

.code-block {
    margin: 0;
    padding: var(--s-4);
    background: var(--canvas-alt);
    border: 1px solid var(--line-soft);
    border-radius: var(--r-md);
    font-size: var(--t-xs);
    line-height: 1.5;
    overflow-x: auto;
    max-height: 320px;
}

.is-disabled { opacity: .4; pointer-events: none; }

@media (max-width: 900px) {
    .inv-line {
        grid-template-columns: minmax(0, 1fr) 70px 100px 32px;
        row-gap: var(--s-2);
        padding: var(--s-3) 0;
    }
    .inv-line > .select     { grid-column: 1 / 5; }
    .inv-line__total        { grid-column: 1 / 3; text-align: left; }
    .inv-line__tax          { grid-column: 3 / 5; justify-self: end; }
    .inv-totals             { max-width: none; }
    .report-row             { flex-wrap: wrap; }
}

/* ==========================================================================
   Content engine: editor, media library, testimonial cards
   ========================================================================== */

/* --- article editor ----------------------------------------------------- */
.input--lg { font-size: var(--t-lg); font-weight: 600; padding: 12px 14px; }

.slug-row { display: flex; align-items: center; }
.slug-row__prefix {
    padding: 0 10px;
    height: 40px;
    display: grid;
    place-items: center;
    background: var(--line-soft);
    border: 1px solid var(--line);
    border-right: 0;
    border-radius: var(--r-sm) 0 0 var(--r-sm);
    font-size: var(--t-sm);
    color: var(--ink-500);
    white-space: nowrap;
}
.slug-row .input { border-radius: 0 var(--r-sm) var(--r-sm) 0; margin: 0; }

.editor-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 5px;
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: var(--r-sm) var(--r-sm) 0 0;
    background: var(--canvas-alt);
}
.editor-bar button {
    width: 32px;
    height: 30px;
    border: 0;
    border-radius: var(--r-sm);
    background: transparent;
    color: var(--ink-700);
    font-size: var(--t-sm);
    cursor: pointer;
    display: grid;
    place-items: center;
}
.editor-bar button:hover { background: var(--green-050); color: var(--green-800); }

.editor {
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    min-height: 460px;
    font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
    font-size: 13.5px;
    line-height: 1.7;
    resize: vertical;
}
.editor-preview {
    min-height: 460px;
    padding: var(--s-5);
    border: 1px solid var(--line);
    border-radius: 0 0 var(--r-sm) var(--r-sm);
    background: var(--canvas);
    overflow-y: auto;
    max-height: 70vh;
}

.seg--sm a,
.seg--sm button {
    padding: 5px 12px;
    font-size: var(--t-xs);
    border: 0;
    background: transparent;
    cursor: pointer;
    border-radius: var(--r-pill);
    color: var(--ink-500);
}
.seg--sm button.is-active { background: var(--canvas); color: var(--green-900); font-weight: 600; }

.syntax-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 6px var(--s-4);
    align-items: baseline;
}
.syntax-grid code {
    padding: 2px 6px;
    background: var(--line-soft);
    border-radius: 4px;
    font-size: var(--t-xs);
    white-space: nowrap;
}

.seo-checks { list-style: none; margin: var(--s-5) 0 0; padding: 0; }
.seo-checks li {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 5px 0;
    font-size: var(--t-sm);
}
.seo-checks .is-ok { color: var(--ink-700); }
.seo-checks .is-ok svg { color: var(--ok); }
.seo-checks .is-no { color: var(--ink-500); }
.seo-checks .is-no svg { color: var(--ink-300); }

/* --- media field and picker --------------------------------------------- */
.media-field__preview {
    aspect-ratio: 16 / 10;
    border-radius: var(--r-md);
    border: 1px solid var(--line);
    overflow: hidden;
    display: grid;
    place-items: center;
    background: var(--canvas-alt);
    margin-bottom: var(--s-3);
}
.media-field__preview img { width: 100%; height: 100%; object-fit: cover; }
.media-field__preview.is-empty { border-style: dashed; color: var(--ink-300); }
.media-field__actions { display: flex; gap: var(--s-2); }
.is-hidden { display: none !important; }

.mpick {
    position: fixed;
    inset: 0;
    z-index: 210;
    display: grid;
    place-items: center;
    padding: var(--s-5);
    opacity: 0;
    transition: opacity .2s var(--ease);
}
.mpick.is-open { opacity: 1; }
.mpick__backdrop { position: absolute; inset: 0; background: rgba(16, 20, 15, .55); }
.mpick__panel {
    position: relative;
    width: min(880px, 100%);
    max-height: 86vh;
    display: flex;
    flex-direction: column;
    background: var(--canvas);
    border-radius: var(--r-lg);
    box-shadow: 0 28px 70px -20px rgba(16, 20, 15, .5);
    overflow: hidden;
}
.mpick__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--s-5);
    border-bottom: 1px solid var(--line);
}
.mpick__head .popup__close { position: static; background: transparent; }
.mpick__bar {
    display: flex;
    gap: var(--s-3);
    padding: var(--s-4) var(--s-5);
    border-bottom: 1px solid var(--line-soft);
}
.mpick__bar .input { margin: 0; flex: 1; }
.mpick__bar .select { margin: 0; max-width: 190px; }
.mpick__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(124px, 1fr));
    gap: var(--s-3);
    padding: var(--s-5);
    overflow-y: auto;
    flex: 1;
}
.mpick__item {
    position: relative;
    aspect-ratio: 1;
    border: 1px solid var(--line);
    border-radius: var(--r-sm);
    overflow: hidden;
    padding: 0;
    background: var(--canvas-alt);
    cursor: pointer;
}
.mpick__item:hover { border-color: var(--green); box-shadow: 0 0 0 2px var(--green-100); }
.mpick__item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.mpick__noalt {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--warn);
    color: #fff;
    font-size: 9px;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 2px;
}
.mpick__foot { margin: 0; padding: var(--s-4) var(--s-5); border-top: 1px solid var(--line-soft); }

/* --- media library grid -------------------------------------------------- */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: var(--s-4); }
.mcard {
    border: 1px solid var(--line);
    border-radius: var(--r-md);
    overflow: hidden;
    background: var(--canvas);
}
.mcard > summary {
    display: flex;
    gap: var(--s-3);
    padding: var(--s-3);
    cursor: pointer;
    list-style: none;
    align-items: center;
}
.mcard > summary::-webkit-details-marker { display: none; }
.mcard__thumb {
    width: 60px;
    height: 60px;
    flex: none;
    border-radius: var(--r-sm);
    overflow: hidden;
    background: var(--canvas-alt);
}
.mcard__thumb img { width: 100%; height: 100%; object-fit: cover; }
.mcard__meta { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.mcard__meta strong { font-size: var(--t-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mcard__form {
    padding: var(--s-4) var(--s-4) var(--s-4);
    border-top: 1px solid var(--line-soft);
}
.mcard[open] { box-shadow: var(--sh-2); }

/* --- testimonial cards --------------------------------------------------- */
.tcard { padding: var(--s-5) 0; border-bottom: 1px solid var(--line-soft); }
.tcard:last-child { border-bottom: 0; }
.tcard__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s-3);
    margin-bottom: var(--s-3);
}
.tcard__quote {
    margin: 0 0 var(--s-3);
    padding-left: var(--s-4);
    border-left: 3px solid var(--green-100);
    font-size: var(--t-base);
    line-height: 1.6;
    color: var(--ink-800);
}
.tcard__original { margin-bottom: var(--s-3); }
.tcard__original blockquote {
    margin: var(--s-2) 0 0;
    padding-left: var(--s-4);
    border-left: 2px dashed var(--line);
    color: var(--ink-500);
}
.tcard__who { font-size: var(--t-sm); margin-bottom: var(--s-2); }
.tcard__consent {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    font-size: var(--t-xs);
    color: var(--ink-500);
    padding: 7px 10px;
    border-radius: var(--r-sm);
    background: var(--canvas-alt);
    margin-bottom: var(--s-3);
}
.tcard__consent svg { flex: none; margin-top: 1px; }
.tcard__actions { display: flex; align-items: flex-start; gap: var(--s-2); flex-wrap: wrap; }
.tcard__edit > summary { list-style: none; }
.tcard__edit > summary::-webkit-details-marker { display: none; }

.faq-row { border-bottom: 1px solid var(--line-soft); padding: var(--s-4) 0; }
.faq-row:last-child { border-bottom: 0; }
.faq-row > summary {
    cursor: pointer;
    display: flex;
    gap: var(--s-3);
    align-items: baseline;
    flex-wrap: wrap;
}
.faq-row > summary::-webkit-details-marker { display: none; }

@media (max-width: 760px) {
    .mgrid { grid-template-columns: 1fr; }
    .editor { min-height: 320px; }
    .mpick__bar { flex-wrap: wrap; }
    .mpick__bar .select { max-width: none; }
}

/* ==========================================================================
   The writing box with a formatting bar

   Sits on top of the textarea rather than floating above it, so the bar and
   the box read as one control: the buttons belong to this field and not to
   the form.
   ========================================================================== */
.markup__bar {
    display: flex; flex-wrap: wrap; align-items: center; gap: 4px;
    padding: 6px; background: var(--canvas-alt);
    border: 1.5px solid var(--line); border-bottom: 0;
    border-radius: var(--r-md) var(--r-md) 0 0;
}
.markup__btn {
    display: inline-flex; align-items: center; gap: 4px;
    padding: 5px 9px; font-size: var(--t-xs); font-weight: 600; line-height: 1;
    color: var(--ink-700); background: var(--canvas);
    border: 1px solid var(--line); border-radius: var(--r-sm);
    cursor: pointer; transition: background .12s var(--ease), color .12s var(--ease);
}
.markup__btn:hover  { background: var(--green-050); border-color: var(--green-100); color: var(--green-900); }
.markup__btn:active { transform: translateY(1px); }
.markup__btn.is-active { background: var(--green-900); border-color: var(--green-900); color: #fff; }
.markup__btn--right { margin-left: auto; }
.markup__sep { width: 1px; align-self: stretch; margin: 2px 3px; background: var(--line); }

.markup__text {
    border-top-left-radius: 0; border-top-right-radius: 0;
    font-family: var(--font-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace);
    font-size: var(--t-sm);
}
/* The preview takes the box's place, at the width it will actually be read at. */
.markup__preview {
    padding: var(--s-5) var(--s-6);
    background: var(--canvas);
    border: 1.5px solid var(--line); border-top: 0;
    border-radius: 0 0 var(--r-md) var(--r-md);
    font-size: var(--t-base);
}
.markup__preview > :first-child { margin-top: 0; }
.markup__preview > :last-child  { margin-bottom: 0; }
.markup__preview:empty::before {
    content: 'Nothing to preview yet.'; color: var(--ink-400); font-size: var(--t-sm);
}

/* A panel nested inside a form, for the few fields that belong together and
   have to be read as a group - the facility and the standing in care on the
   registration form, which are the whole point of the exercise. */
.panel--inset {
    background: var(--canvas-alt);
    border: 1.5px solid var(--line);
    box-shadow: none;
}
.panel--inset .panel__head { border-bottom-color: var(--line); }
.panel--inset .panel__title { font-size: var(--t-base); }
