:root {
  /* Simply Coaching brand palette (from simplycoaching.co global colors) */
  --sc-teal: #2D6F79; --sc-teal-light: #70B7BF; --sc-teal-soft: #DFF6F7; --sc-teal-mist: #B8D8DB;
  --sc-orange: #F15A29; --sc-orange-ink: #B23E12; --sc-peach: #F9DEC7;
  --sc-yellow: #E9D532; --sc-yellow-soft: #FFF297; --sc-amber: #FBB040; --sc-amber-soft: #FDDBA9;
  --sc-black: #1E1E1E; --sc-gray: #E7E9E9; --sc-gray-2: #C4C7CA; --sc-gray-3: #5B5859;

  --bg: #F4F5F5; --panel: #fff; --ink: var(--sc-black); --muted: var(--sc-gray-3); --line: var(--sc-gray);
  --brand: var(--sc-teal); --brand-ink: #fff; --brand-soft: var(--sc-teal-soft);
  --cta: var(--sc-orange);
  --plan: var(--sc-teal); --act: var(--sc-orange-ink); --reflect: #6B5D00;
  --warn: #B3261E; --warn-soft: #FDECEA; --ok-soft: var(--sc-teal-soft); --lock: #8A4B12; --lock-soft: var(--sc-peach);
  --radius: 12px; --shadow: 0 1px 2px rgba(30,30,30,.06);
  --font-head: "Lexend", system-ui, sans-serif; --font-body: "Mulish", system-ui, sans-serif;
  font-family: var(--font-body); color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); font-size: 15px; line-height: 1.45; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, .btn, .tabs a, .steps div, .stat b, .logo, .bottomnav a, table.list th { font-family: var(--font-head); }
h1 { font-size: 26px; font-weight: 500; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 18px; font-weight: 500; margin: 0 0 10px; }
h3 { font-size: 15px; font-weight: 500; margin: 0 0 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

/* layout */
.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; }
.side { background: var(--sc-black); color: #E7E9E9; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.logo { color: #fff; padding: 0 8px 18px; line-height: 1.1; }
.logo img { display: block; width: 170px; height: auto; }
.hero .logo img { width: 240px; margin: 0 auto; }
.logo .prod { display: block; font-family: var(--font-body); font-size: 12px; color: var(--sc-teal-light); margin-top: 8px; letter-spacing: .02em; }
.logo .dist { display: block; font-family: var(--font-body); font-size: 12px; color: #9a9a9a; }
.side nav a { display: block; color: #E7E9E9; padding: 9px 12px; border-radius: 8px; margin-bottom: 2px; font-family: var(--font-head); border-left: 3px solid transparent; }
.side nav a:hover { background: rgba(255,255,255,.08); text-decoration: none; color: #fff; }
.side nav a.on { background: rgba(255,255,255,.08); border-left-color: var(--sc-orange); color: #fff; text-decoration: none; }
.main { min-width: 0; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 24px;
  background: var(--panel); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.who { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.content { padding: 24px; max-width: 1200px; }
.bottomnav { display: none; }

@media (max-width: 760px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .topbar { padding: 10px 16px; }
  .content { padding: 16px 16px 90px; }
  .bottomnav { display: flex; position: fixed; bottom: 0; left: 0; right: 0; background: var(--sc-black); z-index: 10;
    padding-bottom: env(safe-area-inset-bottom); }
  .bottomnav a { flex: 1; text-align: center; color: #C4C7CA; padding: 12px 2px; font-size: 12px; }
  .bottomnav a.on { color: #fff; font-weight: 600; box-shadow: inset 0 3px 0 var(--sc-orange); }
  .hide-sm { display: none !important; }
  table.list { display: block; overflow-x: auto; }
}

/* components */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 16px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.g4 { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.stat b { font-size: 26px; display: block; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spread { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.btn { display: inline-block; border: 1px solid var(--line); background: #fff; color: var(--ink); padding: 8px 14px;
  border-radius: 8px; cursor: pointer; font: inherit; font-weight: 500; }
.btn:hover { background: #f0f2f6; text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { background: #245a62; }
.btn.cta { background: var(--sc-orange); border-color: var(--sc-orange); color: #fff; }
.btn.cta:hover { background: #d94c1e; }
.btn.blu { background: var(--sc-teal-light); border-color: var(--sc-teal-light); color: var(--sc-black); }
.btn.blu:hover { background: #5fa9b1; }
.btn.sm { padding: 4px 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.badge { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef0f4; color: #3b4456; white-space: nowrap; }
.badge.PLAN { background: var(--sc-teal-soft); color: var(--plan); }
.badge.ACT { background: var(--sc-peach); color: var(--act); }
.badge.REFLECT { background: var(--sc-yellow-soft); color: var(--reflect); }
.badge.Active { background: var(--sc-teal-soft); color: var(--sc-teal); }
.badge.Draft { background: #eef0f4; }
.badge.Paused { background: var(--sc-amber-soft); color: var(--lock); }
.badge.Completed { background: var(--sc-teal); color: #fff; }
.badge.role { background: var(--brand-soft); color: var(--brand); text-transform: capitalize; }
.badge.lock { background: var(--lock-soft); color: var(--lock); }
.badge.overdue { background: var(--warn-soft); color: var(--warn); }
table.list { width: 100%; border-collapse: collapse; background: var(--panel); }
table.list th, table.list td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.list th { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); background: #F7F8F8; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: #F2FAFB; }
.bar { height: 8px; background: var(--sc-gray); border-radius: 99px; overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--sc-teal), var(--sc-teal-light)); }
.help { font-size: 13px; color: #3d3b3c; background: var(--sc-teal-soft); border-left: 3px solid var(--sc-teal); padding: 8px 10px; border-radius: 6px; }
.notice { padding: 10px 12px; border-radius: 8px; background: var(--lock-soft); color: var(--lock); font-size: 14px; margin-bottom: 14px; }
.notice.info { background: var(--sc-yellow-soft); color: var(--sc-black); border-left: 4px solid var(--sc-yellow); }
.private { border: 1px dashed #E3A86F; background: #FFF8F2; }
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; }
dl.kv dt { color: var(--muted); font-size: 13px; }
dl.kv dd { margin: 0; }
@media (max-width: 760px) { dl.kv { grid-template-columns: 1fr; } dl.kv dd { margin-bottom: 8px; } }

/* forms */
label { display: block; font-size: 13px; font-weight: 600; margin: 10px 0 4px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sc-teal-light); outline-offset: 0; border-color: var(--sc-teal); }
input, select, textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--sc-gray-2); border-radius: 8px; font: inherit; background: #fff; }
textarea { min-height: 70px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: auto; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 500; }
.fgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 16px; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label { margin: 0; font-weight: 500; border: 1px solid var(--sc-gray-2); border-radius: 8px; padding: 6px 12px; cursor: pointer; display: flex; gap: 6px; align-items: center; }
.seg input:checked + span { font-weight: 700; color: var(--brand); }

/* tabs & steps */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tabs a { padding: 9px 14px; color: var(--muted); border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--sc-black); border-color: var(--sc-orange); font-weight: 600; text-decoration: none; }
.steps { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.steps div { flex: 1; min-width: 120px; padding: 8px 10px; border-radius: 8px; background: var(--sc-gray); color: var(--muted); font-size: 13px; }
.steps div.on { background: var(--sc-black); color: #fff; font-weight: 500; box-shadow: inset 0 -3px 0 var(--sc-orange); }
.steps div.done { background: var(--sc-teal-soft); color: var(--sc-teal); }

/* moves timeline */
.move { border-left: 4px solid var(--line); padding: 10px 14px; margin-bottom: 12px; background: var(--panel); border-radius: 0 var(--radius) var(--radius) 0; border: 1px solid var(--line); border-left-width: 4px; }
.move.PLAN { border-left-color: var(--plan); }
.move.ACT { border-left-color: var(--act); }
.move.ACT { border-left-color: var(--sc-orange); }
.move.REFLECT { border-left-color: var(--sc-yellow); }

/* coach blu */
.blu { border: 1px solid var(--sc-teal-mist); background: var(--sc-teal-soft); border-radius: var(--radius); padding: 14px; margin: 14px 0; }
.blu h3::before { content: "✦ "; color: var(--sc-teal); }
.blu .draftmove { background: #fff; border: 1px solid var(--sc-teal-mist); border-radius: 8px; padding: 10px; margin-bottom: 8px; }

/* login */
.login { max-width: 860px; margin: 40px auto; padding: 0 16px; }
.users { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 10px; }
.users button { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; cursor: pointer; font: inherit; }
.users button:hover { border-color: var(--sc-orange); background: #FFF8F2; }

#toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--sc-black); color: #fff; padding: 10px 16px;
  border-radius: 8px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 50; max-width: 90vw; }
#toast.show { opacity: 1; }
#toast.err { background: var(--warn); }
details.raw summary { cursor: pointer; color: var(--muted); font-size: 13px; }
details.raw pre { background: var(--sc-black); color: var(--sc-teal-soft); padding: 12px; border-radius: 8px; overflow: auto; max-height: 360px; font-size: 12px; }

/* stat accents + login hero */
.stat { border-top: 3px solid var(--sc-teal); }
.stat:nth-child(2) { border-top-color: var(--sc-orange); } .stat:nth-child(3) { border-top-color: var(--sc-amber); } .stat:nth-child(4) { border-top-color: var(--sc-yellow); }
.login-wrap { min-height: 100vh; background: var(--bg); }
.hero { background: var(--sc-black); color: #fff; padding: 36px 16px 44px; text-align: center; }
.hero .logo { display: inline-block; text-align: center; padding: 0 0 22px; }
.hero h1 { font-size: 30px; color: #fff; max-width: 680px; margin: 0 auto; font-weight: 600; }
.hero h1 em { font-style: normal; color: var(--sc-orange); }
.hero p { color: #C4C7CA; max-width: 620px; margin: 12px auto 0; }
.band { background: var(--sc-yellow); color: var(--sc-black); text-align: center; padding: 8px 16px; font-family: var(--font-head); font-weight: 500; font-size: 14px; }
.login { margin-top: 28px; }
