/* LifeHub theme — loaded last on every Risers Journey page, so it re-skins
   dashboard.css / eot2.css / home.css without touching their layout rules.
   Brand colours sampled from the LifeHub logo: leaf green #8FC63F and
   slate #607A8E. The green is too light to carry white text, so buttons
   and links use a deeper shade of it (--accent) and the bright logo
   green is kept for fills — progress bars, highlights, the header rule. */

:root {
  --brand-green: #8fc63f;
  --brand-green-soft: #f1f8e6;
  --brand-slate: #607a8e;

  --paper: #f7f9f5;
  --paper-soft: #f0f4ec;
  --card: #ffffff;
  --ink: #1e2a33;
  --ink-soft: #56687a;
  --ink-faint: #7d8c99;
  --border: #e3e9df;
  --accent: #3f7718;
  --accent-dark: #2f5e10;
  --accent-soft: #eef6e2;
  --good: #2e7d46;
  --good-soft: #e5f4ea;
  --warn: #9a6a1c;
  --warn-soft: #fbf1df;

  --font-head: 'Poppins', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(30, 42, 51, .04), 0 2px 8px rgba(30, 42, 51, .04);
  --shadow-md: 0 2px 4px rgba(30, 42, 51, .04), 0 12px 32px rgba(30, 42, 51, .08);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
h1, h2, h3, h4 { letter-spacing: -.015em; }
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--brand-green); outline-offset: 2px; }

/* ---- App shell (markup built by assets/brand.js) ----
   Desktop: fixed 256px sidebar + main column. Phone: top bar + bottom tab
   bar. Signed out: just the logo above the centred sign-in card. */
.lh-shell { min-height: 100vh; }
.lh-main {
  min-height: 100vh; display: flex; flex-direction: column;
  background:
    radial-gradient(900px 360px at 70% -140px, rgba(143, 198, 63, .13), transparent 70%),
    radial-gradient(700px 300px at 0% 0%, rgba(96, 122, 142, .07), transparent 70%);
  background-repeat: no-repeat;
}
.lh-has-shell #app {
  width: 100%; max-width: 1120px; margin: 0 auto; flex: 1 0 auto; padding: 40px 40px 72px;
}
.lh-signed-out #app { max-width: 900px; padding-top: 8px; }

.lh-side {
  position: fixed; inset: 0 auto 0 0; width: 256px; z-index: 30;
  background: #fff; border-right: 1px solid var(--border);
  display: flex; flex-direction: column; padding: 22px 16px 16px;
}
.lh-signed-in .lh-main { margin-left: 256px; }
.lh-logo { display: block; padding: 0 8px; }
.lh-logo img { height: 52px; width: auto; display: block; mix-blend-mode: multiply; }
.lh-side-title {
  margin: 18px 8px 20px; padding-top: 16px; border-top: 1px solid var(--border);
  font-family: var(--font-head); font-weight: 600; font-size: 1rem; color: var(--ink);
}
.lh-side-title span {
  display: block; font-family: var(--font-body); font-size: .68rem; font-weight: 600;
  letter-spacing: .12em; text-transform: uppercase; color: var(--brand-slate); margin-top: 2px;
}
.lh-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; overflow-y: auto; }
.lh-nav-section {
  font-size: .66rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint); padding: 18px 12px 6px;
}
.lh-nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px;
  color: var(--ink-soft); text-decoration: none; font-size: .9rem; font-weight: 500;
  transition: background .15s ease, color .15s ease;
}
.lh-nav-item:hover { background: var(--paper-soft); color: var(--ink); }
.lh-nav-item.is-active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }
.lh-nav-item.is-active .lh-ico { color: var(--accent); }
.lh-nav-item.is-soon { opacity: .55; cursor: default; }
.lh-nav-item.is-soon:hover { background: none; color: var(--ink-soft); }
.lh-nav-item em {
  margin-left: auto; font-style: normal; font-size: .62rem; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; background: var(--paper-soft); color: var(--brand-slate); padding: 3px 7px; border-radius: 999px;
}
.lh-ico { width: 20px; height: 20px; flex-shrink: 0; }
/* A term's pages under it in the side panel. */
.lh-nav-row { display: flex; align-items: center; }
.lh-nav-row .lh-nav-item { flex: 1; min-width: 0; }
.lh-nav-toggle { flex: 0 0 auto; width: 30px; height: 30px; margin-left: 2px; display: grid; place-items: center; border: 0; background: none; border-radius: 8px; color: var(--ink-faint); cursor: pointer; }
.lh-nav-toggle:hover { background: var(--paper-soft); color: var(--ink); }
.lh-nav-toggle svg { width: 16px; height: 16px; transition: transform .15s ease; }
.lh-nav-group.is-open .lh-nav-toggle svg { transform: rotate(90deg); }
.lh-nav-subs { display: none; flex-direction: column; gap: 1px; margin: 2px 0 6px 22px; padding-left: 12px; border-left: 1.5px solid var(--border); }
.lh-nav-group.is-open .lh-nav-subs { display: flex; }
.lh-nav-sub { display: block; padding: 6px 10px; border-radius: 9px; color: var(--ink-soft); text-decoration: none; font-size: .83rem; line-height: 1.3; }
.lh-nav-sub:hover { background: var(--paper-soft); color: var(--ink); }
.lh-nav-sub.is-active { background: var(--accent-soft); color: var(--accent-dark); font-weight: 600; }

.lh-profile {
  display: flex; align-items: center; gap: 10px; padding: 12px 8px 4px; margin-top: 12px;
  border-top: 1px solid var(--border);
}
.lh-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--brand-green), #5f9e2a); color: #fff;
  font-family: var(--font-head); font-weight: 600; font-size: 1rem;
}
.lh-staff .lh-avatar { background: linear-gradient(135deg, #7d97ab, var(--brand-slate)); }
.lh-profile-name { flex: 1; min-width: 0; font-weight: 600; font-size: .9rem; line-height: 1.2; }
.lh-profile-name small { display: block; font-weight: 500; font-size: .75rem; color: var(--ink-faint); }
.lh-logout {
  display: inline-flex; padding: 8px; border-radius: 10px; color: var(--ink-faint);
}
.lh-logout:hover { background: var(--paper-soft); color: var(--ink); }

.lh-topbar, .lh-tabbar { display: none; }
.lh-gatebar { padding: 40px 24px 0; display: flex; justify-content: center; }
.lh-gatebar .lh-logo img { height: 64px; }
.lh-signed-out .name-gate, .lh-signed-out .eot2-picker { margin-top: 28px; }


.lh-footer {
  margin-top: auto; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px;
  padding: 18px 40px; font-size: .78rem; color: var(--ink-faint);
}
.lh-footer strong { color: var(--ink-soft); font-weight: 600; }
.lh-footer i { font-style: normal; color: var(--brand-green); padding: 0 5px; }

@media (max-width: 960px) {
  .lh-side { display: none; }
  .lh-signed-in .lh-main { margin-left: 0; padding-bottom: 68px; }
  .lh-signed-in .lh-topbar {
    display: flex; align-items: center; gap: 10px; position: sticky; top: 0; z-index: 30;
    background: rgba(255, 255, 255, .96); border-bottom: 1px solid var(--border); padding: 8px 16px;
  }
  .lh-topbar .lh-logo { padding: 0; }
  .lh-topbar .lh-logo img { height: 38px; }
  .lh-topbar-title { font-family: var(--font-head); font-weight: 600; font-size: .95rem; margin-right: auto; }
  .lh-avatar-sm { width: 32px; height: 32px; font-size: .85rem; }
  .lh-signed-in .lh-tabbar {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: #fff; border-top: 1px solid var(--border);
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  }
  .lh-tabbar .lh-nav-item {
    flex: 1; flex-direction: column; gap: 3px; padding: 6px 4px; font-size: .7rem; text-align: center;
    justify-content: center;
  }
  .lh-tabbar .lh-nav-item.is-active { background: none; }
  .lh-has-shell #app { padding: 28px 20px 48px; box-sizing: border-box; }
  .lh-footer { padding: 16px 20px; }
}
@media (max-width: 560px) {
  .lh-has-shell #app { padding: 22px 16px 40px; }
  .lh-gatebar { padding-top: 28px; }
  .lh-gatebar .lh-logo img { height: 52px; }
  /* 16px text boxes, so a phone doesn't zoom in when one is tapped. */
  html .lh-has-shell input:not([type=checkbox]):not([type=radio]), html .lh-has-shell textarea, html .lh-has-shell select { font-size: 16px; }
}

/* ---- Type ---- */
.eot2-head h1 {
  font-family: var(--font-head); font-weight: 600; font-size: clamp(1.8rem, 4vw, 2.4rem);
  line-height: 1.15; color: var(--ink);
}
.eot2-head p { color: var(--ink-soft); }
.eot2-form-header h1, .name-gate h1, .eot2-picker h1 { font-family: var(--font-head); font-weight: 600; }
.eot2-hub-card h3, .eot2-section-title, .eot2-mom-field label {
  font-family: var(--font-head); font-weight: 600;
}

/* ---- Breadcrumbs ---- */
.dash-crumb, .eot2-crumb { font-size: .82rem; font-weight: 500; margin-bottom: 18px; }
.dash-crumb a, .eot2-crumb a { color: var(--ink-soft); }
.dash-crumb a:hover, .eot2-crumb a:hover { color: var(--accent); }

/* ---- Buttons ---- */
.btn, .eot2-btn {
  font-weight: 600; letter-spacing: .01em; transition: background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.btn-primary, .eot2-btn {
  background: var(--accent); color: #fff; box-shadow: 0 1px 2px rgba(47, 94, 16, .2), 0 6px 16px rgba(63, 119, 24, .18);
}
.btn-primary:hover, .eot2-btn:hover {
  background: var(--accent-dark); transform: translateY(-1px);
}
.eot2-btn-secondary {
  background: #fff; color: var(--ink); border: 1px solid var(--border); box-shadow: var(--shadow-sm);
}
.eot2-btn-secondary:hover { background: var(--accent-soft); border-color: #cfe3b3; color: var(--accent-dark); }

/* ---- Sign-in cards ---- */
.name-gate, .eot2-picker {
  background: #fff; border: 1px solid var(--border); border-radius: 24px;
  box-shadow: var(--shadow-md); padding: 40px 34px 34px; margin-top: 56px;
}
.name-gate::before, .eot2-picker::before {
  content: ''; display: block; width: 56px; height: 56px; margin: 0 auto 18px;
  background: var(--brand-green-soft) url('lifehub-mark.png') center / 38px no-repeat;
  border-radius: 16px;
}
.name-gate h1 { font-size: 1.7rem; }
#gate-name-input, #staff-select, .eot2-field input, .eot2-field select, .eot2-textarea {
  border: 1px solid #d6ded1; border-radius: 12px; background: #fff; color: var(--ink);
  transition: border-color .15s ease, box-shadow .15s ease;
}
#gate-name-input:focus, #staff-select:focus, .eot2-field input:focus, .eot2-field select:focus, .eot2-textarea:focus {
  border-color: var(--brand-green); box-shadow: 0 0 0 4px rgba(143, 198, 63, .2);
}
.gate-msg, .eot2-msg { color: #a3432b; }

/* ---- Cards ---- */
.eot2-hub-card {
  position: relative; background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 26px 24px 24px; box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.eot2-hub-card::after {
  content: 'Open \2192'; margin-top: auto; padding-top: 10px;
  font-size: .82rem; font-weight: 600; color: var(--accent);
}
.eot2-hub-card { display: flex; flex-direction: column; gap: 6px; }
.eot2-hub-card::before {
  content: ''; width: 36px; height: 4px; border-radius: 4px; background: var(--brand-green); margin-bottom: 6px;
}
.eot2-hub-card:hover {
  transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: #d3e6b8;
}

.eot2-scale-legend { background: var(--paper-soft); border: 1px solid var(--border); }
.eot2-item, .eot2-question { background: var(--card); border: 1px solid var(--border); box-shadow: var(--shadow-sm); }
.eot2-item, .eot2-question { border-radius: 14px; transition: border-color .15s ease; }
.eot2-item:has(input:checked) { border-color: #d3e6b8; }

/* ---- Status badges ---- */
.eot2-roster-done, .eot2-status-saved { background: var(--good-soft); color: var(--good); }
.eot2-status-offline { background: #eef1f4; color: var(--ink-soft); }

/* ---- Forms: rating scale + choices ---- */
.eot2-section-title {
  background: none; padding: 0 0 10px; border-radius: 0; font-size: 1.3rem;
  border-bottom: 2px solid var(--brand-green); display: inline-block; margin-bottom: 18px;
}
.eot2-scale label, .eot2-choices label { border: 1px solid #dde4d8; transition: all .15s ease; }
.eot2-scale label:hover, .eot2-choices label:hover { border-color: var(--brand-green); }
.eot2-scale input, .eot2-choices input, .eot2-matrix input { accent-color: var(--accent); }
.eot2-scale label:has(input:checked), .eot2-choices label:has(input:checked) {
  border-color: var(--accent); background: var(--accent-soft); color: var(--accent-dark);
}
.eot2-scale-legend-item strong { color: var(--accent-dark); }
.eot2-form-header { border-bottom: 1px solid var(--border); }

/* ---- Tables ---- */
.eot2-roster-table { background: #fff; }
.eot2-roster-table { border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow-sm); border: 1px solid var(--border); }
.eot2-roster-table thead th { background: var(--paper-soft); color: var(--brand-slate); }
.eot2-roster-table tbody tr:hover { background: #fafcf8; }


/* The full logo already sits above the sign-in card, so drop the small mark. */
.lh-signed-out .name-gate::before, .lh-signed-out .eot2-picker::before { display: none; }

/* Long forms (Self-Assessment, Term Reflection, MOM) read better at a
   narrower measure than the dashboards. */
.lh-has-shell #app:has(.eot2-form-header) { max-width: 900px; }

/* Home tiles in labelled groups (LH_tileGroups). */
.hd-group + .hd-group { margin-top: 26px; }
.hd-group-title {
  font-family: var(--font-body); font-size: .72rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-faint, #7a8893); margin: 0 4px 12px;
}
