/* Diet Maestro client portal — mobile first.
   Deliberately NOT theme.css: the dashboard is the dietitian's tool and is dark;
   this is the client's experience of the brand. No third-party fonts or scripts
   are loaded here (spec §8) — Poppins can be self-hosted into /fonts later. */

:root {
    --green: #334c06;
    --green-2: #4a6d09;
    --lime: #b2dd4c;
    --pale: #dbe8c0;
    --wash: #f6f9ee;
    --line: #e2e7d6;
    --yellow: #f2c900;
    --ink: #1f1f1f;
    --muted: #6e7266;
    --danger-bg: #fff4f2;
    --danger-ink: #9a3412;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    padding: 0;
    background: var(--wash);
    color: var(--ink);
    font-family: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    -webkit-text-size-adjust: 100%;
}

.portal-shell {
    max-width: 480px;
    margin: 0 auto;
    padding: 20px 20px calc(32px + env(safe-area-inset-bottom, 0px));
}

.portal-shell.centred {
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.brand { display: flex; align-items: center; gap: 10px; margin-bottom: 28px; }
.brand img { height: 30px; width: auto; }
.brand span { font-weight: 600; color: var(--green); letter-spacing: -0.01em; }

h1 { font-size: 22px; font-weight: 700; color: var(--green); margin: 0 0 8px; letter-spacing: -0.01em; }
.sub { color: var(--muted); font-size: 13px; margin: 0 0 24px; }
.section-label {
    font-size: 11px; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.12em; color: var(--green-2); margin-bottom: 6px;
}

.card {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 16px;
    padding: 16px;
    margin-bottom: 14px;
}
.card.highlight { background: var(--pale); border-color: transparent; }
.card.dark { background: var(--green); border-color: transparent; color: #fff; }
.card h2 { font-size: 15px; font-weight: 600; margin: 0 0 4px; }
.card p { margin: 0; }
.card .row { padding: 10px 0; border-bottom: 1px solid var(--line); }
.card .row:last-child { border-bottom: 0; padding-bottom: 0; }
.card .row:first-child { padding-top: 0; }
.card .row strong { display: block; font-size: 14px; font-weight: 600; }
.card .row span { color: var(--muted); font-size: 13px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 12px; font-weight: 600; color: var(--green); margin-bottom: 6px; }
.field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 15px;
    font-family: inherit;
    color: var(--ink);
    background: #fff;
    border: 1.5px solid var(--line);
    border-radius: 12px;
}
.field input:focus { outline: none; border-color: var(--green-2); box-shadow: 0 0 0 2px rgba(74, 109, 9, 0.15); }

.btn {
    display: block;
    width: 100%;
    height: 48px;
    border: 0;
    border-radius: 14px;
    font-family: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}
.btn.primary { background: var(--green); color: #fff; }
.btn.secondary { background: var(--lime); color: var(--green); }
.btn.link {
    background: none; color: var(--muted); font-weight: 400; font-size: 13px;
    height: auto; text-decoration: underline; padding: 8px 0;
}
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

.error {
    background: var(--danger-bg);
    color: var(--danger-ink);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 13px;
    margin-bottom: 16px;
}

.checks { list-style: none; margin: 0 0 20px; padding: 0; }
.checks li { color: var(--muted); font-size: 13px; padding: 3px 0; }
.checks li::before { content: "•"; color: var(--green-2); font-weight: 700; margin-right: 8px; }

.consent-check { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0; font-size: 14px; }
.consent-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--green); }

.help { color: var(--muted); font-size: 12px; margin-top: 20px; }
.trust { color: var(--green-2); font-size: 12px; font-weight: 600; margin-top: 16px; }
.footnote { color: var(--muted); font-size: 11px; margin-top: 24px; text-align: center; }

.back-link {
    display: inline-block;
    color: var(--muted);
    font-size: 13px;
    text-decoration: none;
    margin-bottom: 14px;
}
.back-link:hover { color: var(--green-2); }

.card .row a { color: var(--green-2); text-decoration: none; font-weight: 600; }
.card .row a:hover { text-decoration: underline; }

/* ---- the plan, as screens ---- */

.day-nav { display: flex; gap: 8px; overflow-x: auto; padding: 2px 0 14px; }
.day-chip {
    flex: 0 0 auto;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--green);
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}
.day-chip:hover { background: var(--pale); }

.day-block { scroll-margin-top: 12px; }

.meal { padding: 12px 0; border-bottom: 1px solid var(--line); }
.meal:last-of-type { border-bottom: 0; }
.meal-head { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.meal-slot { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green); }
.meal-time { font-size: 12px; color: var(--muted); }
.meal-text { margin: 6px 0 0; font-size: 14px; line-height: 1.55; }

.note {
    margin-top: 14px;
    padding: 12px 14px;
    background: #fffbe6;
    border-left: 3px solid var(--yellow);
    border-radius: 0 12px 12px 0;
}
.note p { margin: 4px 0 0; font-size: 13px; }
.sleep { margin: 12px 0 0; font-size: 13px; color: var(--muted); }

.targets { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 10px; }
.targets div { text-align: center; }
.targets strong { display: block; font-size: 16px; font-weight: 700; color: var(--green); }
.targets span { font-size: 11px; color: var(--muted); }

.guidelines { margin: 10px 0 0; padding-left: 18px; }
.guidelines li { font-size: 13px; line-height: 1.6; margin-bottom: 8px; }
