:root{
  color-scheme:light;
  --orange:#F97316; --orange-deep:#E8580A; --orange-dark:#C2410C;
  --cream:#FAF7F2; --cream-2:#F2EDE4; --peach:#FBEADD; --peach-2:#FDDCCA;
  --ink:#2C1810; --ink-deep:#1A0F0A; --muted:#8C7B6E;
  --white:#fff; --line:#EBE3D7;
  --shadow:0 1px 2px rgba(44,24,16,.04), 0 8px 24px rgba(44,24,16,.06);
  --radius:16px;
  --font-display:'Switzer',system-ui,-apple-system,'Segoe UI',sans-serif;
  --font-body:'Poppins',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
}
*{box-sizing:border-box;margin:0;padding:0}
input,button,textarea,select{font:inherit}
body{font-family:var(--font-body);background:var(--cream-2);color:var(--ink);-webkit-font-smoothing:antialiased;line-height:1.5}
.display{font-family:var(--font-display)}
.hidden{display:none!important}
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
:focus-visible{outline:2px solid var(--orange);outline-offset:2px}

/* Screens */
#login-screen{min-height:100vh;display:grid;place-items:center;padding:24px}
#app-screen{min-height:100vh}
.login-card{background:var(--white);border:1px solid var(--line);border-radius:16px;padding:36px;max-width:400px;width:100%;box-shadow:var(--shadow);text-align:center}
.login-card h1{font-family:var(--font-display);font-size:26px;font-weight:600;margin-bottom:8px}
.login-card p{color:var(--muted);font-size:14px;margin-bottom:20px}
.login-card input{width:100%;border:1px solid var(--line);border-radius:10px;padding:12px 14px;font-size:14px;margin-bottom:12px}
.login-card button{width:100%;background:var(--orange);color:#fff;border:0;border-radius:10px;padding:12px;font-size:14px;font-weight:600;cursor:pointer}
.login-msg{margin-top:14px;font-size:13px;min-height:18px}

/* App shell */
.app{display:grid;grid-template-columns:248px 1fr;min-height:100vh}
.sidebar{background:var(--ink-deep);color:#E8DDD1;padding:24px 16px;display:flex;flex-direction:column;gap:6px}
.brand{display:flex;align-items:center;gap:11px;padding:4px 8px 22px}
.logo{width:34px;height:34px;border-radius:9px;background:linear-gradient(135deg,var(--orange),var(--orange-dark));
  display:grid;place-items:center;color:#fff;font-weight:600;font-size:18px;font-family:var(--font-display);flex-shrink:0}
.brand b{font-weight:500;font-size:15px;letter-spacing:.01em}
.brand small{display:block;color:#9A8776;font-size:11px;font-weight:300}
.side-label{color:#7C6653;font-size:10.5px;letter-spacing:.14em;text-transform:uppercase;padding:14px 10px 6px}
/* These are <button>s (for keyboard reachability), not the mockup's <div>s. A div is
   transparent, borderless and full-width by default; a button is none of those — it
   arrives with a light UA background, a border and centred text, which renders pale
   text on a pale box against this dark sidebar. So reset those four explicitly. */
.nav-item{display:flex;align-items:center;gap:11px;padding:9px 11px;border-radius:10px;color:#CDBEAD;
  font-size:13.5px;cursor:pointer;transition:.15s;
  background:transparent;border:0;width:100%;text-align:left}
.nav-item:hover{background:#241812;color:#fff}
.nav-item.active{background:#2E1E14;color:#fff}
.nav-item .dot{width:7px;height:7px;border-radius:50%;background:var(--orange)}
.nav-item svg{width:17px;height:17px;opacity:.85}
.side-foot{margin-top:auto;display:flex;align-items:center;gap:10px;padding:10px;border-top:1px solid #2C1E14}
.avatar{width:30px;height:30px;border-radius:50%;background:var(--peach-2);color:var(--ink);
  display:grid;place-items:center;font-size:12px;font-weight:600;flex-shrink:0}
.side-foot .who{font-size:12.5px;color:#E8DDD1}
.side-foot .who small{display:block;color:#8A7563;font-size:10.5px}

/* Main */
.main{background:var(--cream);min-width:0}
.topbar{padding:26px 40px 0;display:flex;align-items:flex-end;justify-content:space-between}
.topbar h1{font-weight:500;font-size:30px;color:var(--ink);letter-spacing:.005em}
.topbar .crumb{color:var(--muted);font-size:12.5px;letter-spacing:.03em;margin-bottom:3px}
.status-pill{display:inline-flex;align-items:center;gap:7px;background:var(--peach);color:var(--orange-dark);
  padding:6px 14px;border-radius:999px;font-size:12.5px;font-weight:500}
.status-pill .dot{width:8px;height:8px;border-radius:50%;background:var(--orange)}

.tabs{display:flex;gap:2px;padding:20px 40px 0;border-bottom:1px solid var(--line)}
.tab{padding:11px 18px;font-size:13.5px;color:var(--muted);cursor:pointer;border-bottom:2px solid transparent;
  margin-bottom:-1px;transition:.15s}
.tab:hover{color:var(--ink)}
.tab.active{color:var(--orange-dark);border-bottom-color:var(--orange);font-weight:500}

.content{padding:28px 40px 48px;max-width:1100px}
.panel{display:none}.panel.active{display:block}

/* Overview */
.grid2{display:grid;grid-template-columns:1.6fr 1fr;gap:20px}
.card{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);padding:24px;box-shadow:var(--shadow)}
.card h3{font-family:var(--font-display);font-weight:600;font-size:21px;margin-bottom:14px}
.card p{color:#5A4A3D;font-size:14px}
.prog{height:8px;background:var(--cream-2);border-radius:99px;overflow:hidden;margin:16px 0 8px}
.prog i{display:block;height:100%;width:62%;background:linear-gradient(90deg,var(--orange),var(--orange-deep));border-radius:99px}
.metrics{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-top:4px}
.metric{background:var(--cream);border:1px solid var(--line);border-radius:12px;padding:14px 16px}
.metric b{font-family:var(--font-display);font-size:28px;font-weight:600;color:var(--orange-dark);display:block;line-height:1}
.metric span{font-size:11.5px;color:var(--muted);letter-spacing:.04em}
.timeline{list-style:none;margin-top:6px}
.timeline li{display:flex;gap:12px;padding:11px 0;border-bottom:1px solid var(--cream-2);font-size:13px;color:#5A4A3D}
.timeline li:last-child{border:0}
.timeline .t-dot{width:9px;height:9px;border-radius:50%;background:var(--peach-2);border:2px solid var(--orange);margin-top:5px;flex-shrink:0}
.timeline small{color:var(--muted);display:block;font-size:11px;margin-top:1px}

/* Board */
.board{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.col-h{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px;padding:0 4px}
.col-h span{font-size:12.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
.col-h b{background:var(--cream-2);color:var(--muted);font-size:11px;padding:2px 9px;border-radius:99px}
.col{background:var(--cream-2);border-radius:14px;padding:10px;min-height:340px}
.task{background:var(--white);border:1px solid var(--line);border-radius:11px;padding:13px 14px;margin-bottom:10px;box-shadow:0 1px 2px rgba(44,24,16,.04);cursor:grab}
.task:hover{border-color:var(--peach-2)}
.task p{font-size:13.5px;color:var(--ink);margin-bottom:9px}
.task .meta{display:flex;align-items:center;justify-content:space-between}
.chip{font-size:10.5px;padding:3px 9px;border-radius:99px;font-weight:500}
.chip.design{background:#FBEADD;color:var(--orange-dark)}
.chip.dev{background:#E7EEF0;color:#3E6A78}
.chip.copy{background:#EEE9F2;color:#6B5A82}
.mini-av{width:22px;height:22px;border-radius:50%;background:var(--ink);color:#fff;display:grid;place-items:center;font-size:9.5px;font-weight:600}

/* Chat */
.chat{background:var(--white);border:1px solid var(--line);border-radius:var(--radius);overflow:hidden;box-shadow:var(--shadow);max-width:720px}
.chat-h{padding:15px 20px;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:10px}
.chat-h b{font-size:14px;font-weight:500}
.chat-h .live{margin-left:auto;font-size:11px;color:#3E8E5A;display:flex;align-items:center;gap:6px}
.chat-h .live i{width:7px;height:7px;border-radius:50%;background:#4CAF6E;display:inline-block}
.msgs{padding:22px 20px;display:flex;flex-direction:column;gap:16px;background:var(--cream);max-height:400px;overflow:auto}
.msg{display:flex;gap:11px;max-width:78%}
.msg .bubble{background:var(--white);border:1px solid var(--line);padding:11px 15px;border-radius:4px 15px 15px 15px;font-size:13.5px;color:#43352B}
.msg .who{font-size:11px;color:var(--muted);margin-bottom:4px}
.msg.me{align-self:flex-end;flex-direction:row-reverse}
.msg.me .bubble{background:var(--orange);color:#fff;border-color:var(--orange);border-radius:15px 4px 15px 15px}
.msg.me .who{text-align:right}
.chat-in{padding:14px 16px;border-top:1px solid var(--line);display:flex;gap:10px;align-items:center}
.chat-in input{flex:1;border:1px solid var(--line);border-radius:99px;padding:11px 18px;font-size:13.5px;background:var(--cream)}
.chat-in input:focus{border-color:var(--peach-2)}
.send{width:40px;height:40px;border-radius:50%;background:var(--orange);border:0;color:#fff;cursor:pointer;display:grid;place-items:center;flex-shrink:0}

/* Notes */
.note-card{background:var(--white);border:1px solid var(--line);border-radius:14px;padding:22px 24px;margin-bottom:16px;box-shadow:var(--shadow);max-width:760px}
.note-card .nh{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.note-card h4{font-family:var(--font-display);font-size:20px;font-weight:600}
.note-card .date{font-size:11.5px;color:var(--muted)}
.ff-tag{display:inline-flex;align-items:center;gap:6px;background:#EEF3EE;color:#3E7A55;font-size:11px;padding:3px 10px;border-radius:99px;margin-bottom:14px}
.note-card ul{margin:0 0 4px 18px;color:#4E3F33;font-size:13.5px}
.note-card li{padding:4px 0}

/* Team-only clients strip */
.clients-strip{display:none;gap:10px;padding:16px 40px 0;flex-wrap:wrap}
.client-tab{background:var(--white);border:1px solid var(--line);border-radius:11px;padding:10px 15px;font-size:13px;cursor:pointer;display:flex;align-items:center;gap:9px;transition:.15s}
.client-tab.active{border-color:var(--orange);background:var(--peach)}
.client-tab .cdot{width:8px;height:8px;border-radius:50%;background:var(--orange)}
.client-tab small{color:var(--muted);font-size:11px}
body.team .clients-strip{display:flex}
/* Role visibility: only ever hide. Never force a display value — these classes land on
   elements with different natural displays (.avatar is grid, .brand small is block). */
body.team .client-only{display:none}
body:not(.team) .team-only{display:none}

/* Task-board composer (team only) */
.task-add{display:flex;gap:10px;margin-bottom:16px;max-width:480px}
.task-add input{flex:1;border:1px solid var(--line);border-radius:10px;padding:10px 14px;background:var(--white);color:var(--ink)}
.task-add-btn{width:auto;height:auto;padding:10px 18px;border-radius:10px}

/* Meeting-notes composer (team only) */
.note-in{width:100%;border:1px solid var(--line);border-radius:8px;padding:9px;margin-bottom:8px;background:var(--cream);color:var(--ink)}
textarea.note-in{min-height:90px;resize:vertical}
.note-add{width:auto;height:auto;padding:8px 16px;border-radius:8px}
.empty-note{color:var(--muted)}

/* Narrow screens: the sidebar becomes a horizontal nav bar. It must NOT be hidden —
   it is the only navigation and the only way to sign out, so hiding it strands the
   user on whatever view loaded first. (The mockup hid it; a mockup has nowhere to go.) */
@media(max-width:820px){
  .app{grid-template-columns:1fr}
  .sidebar{flex-direction:row;align-items:center;gap:4px;padding:10px 12px;overflow-x:auto}
  .sidebar .brand,.sidebar .side-label,.sidebar .side-foot{display:none}
  .nav-item{white-space:nowrap;width:auto}
  .grid2,.board{grid-template-columns:1fr}
  .content{padding:22px}
}
