:root {
  color-scheme: light;
  --ink: #26201e;
  --muted: #655b56;
  --line: #e7ded8;
  --canvas: #faf6f2;
  --white: #fff;
  --brand: #f5381d;
  --action: #c12d17;
  --rail: #211c1b;
  --sidebar-width: 232px;
  --radius: 16px;
  --display: "Bricolage Grotesque", "Inter", system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 14px/1.5 Inter, system-ui, sans-serif; }
h1, h2, h3, p { margin: 0; }
p { color: var(--muted); }
button, input, select, textarea { font: inherit; color: var(--ink); }
button {
  cursor: pointer;
  border: 1px solid transparent;
  border-radius: 9px;
  background: #f1eae5;
  padding: 9px 13px;
  font-weight: 650;
  transition: background-color .15s, box-shadow .15s, transform .15s;
}
button:hover { background: #e9ded7; }
button:disabled { cursor: not-allowed; opacity: .5; }
:focus-visible { outline: 2px solid var(--action); outline-offset: 3px; }
.primary { background: var(--action); color: white; }
.primary:hover { background: #a62411; }
input, select, textarea { border: 1px solid #d8cdc5; background: white; border-radius: 9px; padding: 9px 11px; min-width: 0; }
input[type="checkbox"] { accent-color: var(--action); }
input::placeholder, textarea::placeholder { color: var(--muted); }

.sidebar {
  position: fixed;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  overflow: auto;
  padding: 24px 17px;
  background: var(--rail);
  color: white;
}
.brand { display: grid; place-items: center; width: 100%; background: white; border-radius: 13px; padding: 15px 19px; margin-bottom: 30px; }
.brand img { display: block; width: 100%; height: auto; }
.nav-wrap { display: grid; gap: 4px; }
.nav {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  background: transparent;
  color: #f0e7e2;
  text-align: left;
  font-size: 13px;
  font-weight: 550;
}
.nav:hover { background: #382b27; }
.nav:focus-visible { outline-color: #ff876f; }
.nav.active { background: #542b23; color: #fff6f1; box-shadow: inset 3px 0 var(--brand); }
.nav-icon {
  display: grid;
  flex: 0 0 23px;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 6px;
  background: #ffffff12;
  color: #eac9be;
  font-size: 13px;
  line-height: 1;
}
.nav.active .nav-icon { color: #ffaf9c; background: #ff876f29; }
.side-label { margin: 25px 10px 8px; color: #cfb8af; text-transform: uppercase; font-size: 10px; font-weight: 750; letter-spacing: .11em; }
main { margin-left: var(--sidebar-width); padding: 20px clamp(18px, 3vw, 44px) 30px; max-width: 1800px; min-width: 0; }
.top, .user, .sectiontitle, .cardfoot, .dialoghead, footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.top { padding-bottom: 17px; }
.crumb { color: var(--muted); font-size: 12px; }
.crumb span { margin: 0 5px; }
.crumb b { color: var(--ink); }
.avatar {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  background: #ffe5da;
  color: #873522;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  font-size: 11px;
  font-weight: 750;
}
.user select { max-width: 160px; background-color: #fffdfb; }
.hero {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  overflow: hidden;
  isolation: isolate;
  padding: clamp(23px, 3.5vw, 44px) clamp(20px, 3.25vw, 42px);
  border-radius: 22px;
  margin-bottom: 19px;
  background: linear-gradient(112deg, #29201e 30%, #4c251c 78%, #682819);
  color: white;
}
.hero::before, .hero::after {
  content: "";
  position: absolute;
  z-index: -1;
  width: 270px;
  height: 270px;
  right: -74px;
  top: -85px;
  border: 20px solid #ff603e3d;
  border-radius: 40% 60% 55% 45%;
  transform: rotate(-28deg);
  pointer-events: none;
}
.hero::after { right: -18px; top: -88px; border-width: 1px; border-color: #ff9a8060; }
.hero-copy { min-width: 0; }
.hero h1 { font: 800 clamp(29px, 4vw, 51px)/1.07 var(--display); letter-spacing: -.055em; margin-bottom: 8px; }
.hero p { color: #f5dcd1; }
.hero .primary { flex: 0 0 auto; background: #ffd4c5; color: #711e11; border: 1px solid #ffdfd3; padding: 11px 16px; }
.hero .primary:hover { background: #ffbfa9; }
.hero .primary:focus-visible { outline-color: #ffbfa9; }

.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.stat {
  display: grid;
  gap: 5px;
  padding: 15px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--tone);
}
.stat span { font-size: 12px; font-weight: 650; }
.stat span::before, .colhead > span:first-child::before {
  content: "";
  display: inline-block;
  width: 7px;
  height: 7px;
  margin: 0 7px 1px 0;
  border-radius: 50%;
  background: var(--signal);
}
.stat b { font: 800 30px/1.1 var(--display); letter-spacing: -.04em; }
.stat-active, .column-1 { --surface: #ffece4; --tone: #843521; --signal: #cd4129; }
.stat-done, .column-4 { --surface: #e8f2e9; --tone: #295640; --signal: #43795d; }
.stat-review, .column-2 { --surface: #fff0d9; --tone: #704716; --signal: #9d6429; }
.stat-transfer, .column-3 { --surface: #f2e9f7; --tone: #673e78; --signal: #875798; }
.column-0 { --surface: #f0eae4; --tone: #57463f; --signal: #857269; }
.pilot-status { display: flex; gap: 6px 12px; align-items: center; flex-wrap: wrap; padding: 11px 0 15px; color: var(--muted); font-size: 12px; }
.pilot-role { font-weight: 700; }
.toolbar { display: flex; gap: 9px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tabs { display: flex; align-items: center; flex-wrap: wrap; background: #eee5de; padding: 3px; border-radius: 10px; gap: 2px; }
.tabs button { padding: 6px 11px; background: transparent; font-size: 13px; }
.tabs button:hover { background: #fffbf7aa; }
.tabs .selected { background: #fff; color: #862b1d; box-shadow: 0 1px 3px #46312422; }
#search { margin-left: auto; width: min(100%, 224px); }

.board {
  display: grid;
  grid-template-columns: repeat(5, minmax(168px, 1fr));
  gap: 11px;
  align-items: stretch;
  overflow-x: auto;
  padding: 3px 3px 12px;
  scrollbar-color: #c4aaa0 #f0e7e0;
}
.column { background: var(--surface); border-radius: 13px; padding: 9px; min-height: 255px; }
.colhead { display: flex; align-items: center; justify-content: space-between; gap: 5px; margin: 3px 1px 11px; color: var(--tone); font-size: 12px; font-weight: 750; }
.count { flex: 0 0 auto; font-size: 11px; border-radius: 6px; background: #fff; padding: 2px 6px; }
.card {
  background: #fff;
  border: 1px solid #ded0c766;
  border-radius: 11px;
  padding: 11px;
  margin-bottom: 8px;
  cursor: pointer;
  box-shadow: 0 2px 3px #3b2d2510;
  transition: box-shadow .15s, transform .15s;
  overflow-wrap: anywhere;
}
.card:last-child { margin-bottom: 0; }
.card:hover, .listrow:hover { box-shadow: 0 4px 12px #35251f20; }
.card:hover { transform: translateY(-2px); }
.chip, .badge { display: inline-block; font-size: 11px; font-weight: 650; border-radius: 6px; padding: 2px 7px; background: #eee5f6; color: #67437a; }
.chip.Shoot { background: #e3eee7; color: #325e48; }
.chip.Design { background: #ffebe2; color: #873522; }
.chip.Operations { background: #e4eef7; color: #355b77; }
.chip.Influencer { background: #f5e3eb; color: #7c4262; }
.chip.Strategy { background: #fff0d8; color: #745011; }
.card h3 { font-size: 13px; line-height: 1.35; margin: 6px 0; }
.card p, .due, .card small { color: var(--muted); font-size: 11px; }
.mini, .meter { background: #eee6e1; border-radius: 6px; overflow: hidden; }
.mini { height: 4px; margin: 10px 0 5px; }
.mini i, .meter i { display: block; height: 100%; background: var(--signal, var(--action)); }
.cardfoot { border-top: 1px solid #eee8e4; padding-top: 8px; margin-top: 9px; gap: 6px; }
.cardfoot .avatar { width: 25px; height: 25px; font-size: 9px; }
.due { text-align: right; }
.due.late { color: #a63123; font-weight: 700; }
.due.soon { color: #764f14; font-weight: 700; }
.sectiontitle { margin: 22px 0 13px; }
.sectiontitle h2 { font: 750 21px/1.2 var(--display); letter-spacing: -.035em; }
.team { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.person, .rules, .approval { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.person { --signal: #b9432d; overflow-wrap: anywhere; }
.person.over { --signal: #a06b25; border-color: #ba8744; box-shadow: inset 0 3px #d8ab68; }
.personhead { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.personhead > span:last-child { margin-left: auto; font-weight: 750; font-size: 12px; }
.person small, .muted, .viewlabel { color: var(--muted); font-size: 12px; }
.person button { margin-top: 10px; }
.meter { height: 6px; margin: 13px 0 6px; }
.badge { font-weight: 600; background: #fff0d9; color: #704716; margin: 4px 4px 0 0; }
.notice, .statusline { background: #faeee7; color: #6b4032; border-radius: 9px; padding: 11px 13px; margin: 12px 0; }
.empty { padding: 12px 8px; color: var(--muted); font-size: 12px; }
.listrow {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr .8fr;
  gap: 10px;
  padding: 13px;
  margin-bottom: 5px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
}
.approval, .rules { margin-bottom: 12px; overflow-wrap: anywhere; }
.approval h3, .rules h3 { margin-bottom: 5px; font-family: var(--display); }
.approval button, .rules button { margin-top: 10px; }
.tablewrap { overflow: auto; }
table { border-collapse: collapse; width: 100%; font-size: 12px; }
td, th { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); }
footer { border-top: 1px solid var(--line); margin-top: 24px; padding-top: 13px; font-size: 11px; }
footer button { flex: 0 0 auto; font-size: 11px; padding: 5px 8px; }

dialog {
  border: 1px solid var(--line);
  color: var(--ink);
  border-radius: 19px;
  width: 570px;
  max-width: calc(100% - 24px);
  max-height: 90vh;
  padding: clamp(16px, 3vw, 26px);
  overflow: auto;
  box-shadow: 0 18px 80px #1d121a4a;
}
dialog::backdrop { background: #22181788; backdrop-filter: blur(3px); }
.dialoghead { align-items: start; margin-bottom: 10px; }
.dialoghead h2 { margin: 5px 0; font: 800 24px/1.1 var(--display); letter-spacing: -.03em; overflow-wrap: anywhere; }
label { display: block; font-size: 12px; font-weight: 700; margin: 13px 0 5px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row > * { flex: 1; min-width: 0; }
.field { width: 100%; }
.check { display: flex; gap: 8px; align-items: center; font-weight: 450; margin: 8px 0; }
textarea { width: 100%; min-height: 65px; }
fieldset { border: 1px solid var(--line); border-radius: 9px; margin: 13px 0 0; }
.history { font-size: 12px; padding: 9px; background: #f8f2ee; border-radius: 8px; margin: 5px 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
#toast { position: fixed; bottom: 20px; right: 20px; background: var(--rail); color: white; padding: 12px 16px; border-radius: 10px; z-index: 10; display: none; }

@media (max-width: 1100px) {
  :root { --sidebar-width: 192px; }
  .sidebar { padding: 20px 12px; }
  .brand { padding: 13px; }
  .team { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .sidebar { position: static; display: grid; width: auto; padding: 12px 14px; gap: 8px; }
  .brand { width: 110px; padding: 6px 9px; margin: 0; }
  .nav-wrap { display: flex; flex-wrap: wrap; gap: 4px; }
  .nav { width: auto; min-height: 34px; padding: 4px 7px; font-size: 12px; }
  .nav-icon { flex-basis: 18px; width: 18px; height: 18px; font-size: 10px; }
  .side-label { display: none; }
  main { margin: 0; padding: 14px; }
  .top { padding-bottom: 12px; gap: 6px; }
  .hero { border-radius: 16px; gap: 8px 16px; flex-wrap: wrap; margin-bottom: 12px; }
  .hero p { font-size: 13px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .stat { padding: 10px 12px; }
  .stat b { font-size: 25px; }
  #search { margin: 0; width: 100%; }
  .board { grid-template-columns: repeat(5, minmax(172px, 1fr)); }
  .listrow { grid-template-columns: 1fr 1fr; font-size: 12px; }
  .listrow b { grid-column: 1 / -1; }
}
@media (max-width: 460px) {
  .team { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; transform: none !important; }
}

/* Partner controls use the workspace palette and retain useful mobile tables. */
.control-summary { display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:24px; }
.control-summary>div { border:1px solid var(--line,#ded8d2);background:#fff;border-radius:16px;padding:20px;display:flex;flex-direction:column;gap:6px; }
.control-summary b { font-size:30px;color:#ec4b10; }
.control-summary span,.control-heading p { font-size:13px;color:#685f59; }
.control-heading { display:flex;align-items:center;justify-content:space-between;gap:16px;margin:16px 0; }
.control-tabs { display:flex;flex-wrap:wrap;margin:16px 0;gap:8px; }
.control-invite { display:grid;grid-template-columns:1fr 1fr auto;gap:16px;align-items:end; }
.control-invite input { width:100%;box-sizing:border-box; }
.control-table { overflow-x:auto;background:#fff;border:1px solid #e6dfd8;border-radius:14px;margin:18px 0; }
.control-table table { width:100%;border-collapse:collapse;text-align:left;font-size:14px; }
.control-table caption { text-align:left;font-size:17px;font-weight:700;padding:18px; }
.control-table th,.control-table td { padding:14px 16px;border-top:1px solid #e6dfd8;vertical-align:top;min-width:100px; }
.control-table th { color:#685f59;background:#faf7f4; }
.control-table details { margin-top:8px; }.control-table summary { cursor:pointer; }
.control-actions { display:flex;gap:8px;flex-wrap:wrap;min-width:210px; }
.control-actions .danger { color:#ab3023;border-color:#dba89e; }
.control-settings { display:grid;grid-template-columns:minmax(120px,180px) 1fr;gap:14px; }
.control-settings dt { color:#685f59; }.control-settings dd { margin:0;overflow-wrap:anywhere; }
[hidden] { display:none!important; }
@media(max-width:900px) { .control-invite { grid-template-columns:1fr 1fr; }.control-invite button { grid-column:1/-1; } }
@media(max-width:600px) { .control-summary { gap:8px; }.control-summary>div { padding:12px; }.control-summary span { font-size:11px; }.control-invite { grid-template-columns:1fr; }.control-settings { grid-template-columns:1fr;gap:6px; }.control-settings dd { margin-bottom:14px; } }
