:root {
  --bg: #f7f2ec;
  --paper: #ffffff;
  --cream: #f6e9dc;
  --cream-2: #efe3d6;
  --line: #ebe0d4;
  --ink: #1f1510;
  --ink-2: #4a3a2f;
  --muted: #8c7c70;
  --caramel: #a5622a;
  --caramel-2: #c47e3f;
  --caramel-soft: #f3e2d1;
  --espresso: #1a110b;
  --espresso-2: #2a1c13;
  --espresso-3: #3a291d;
  --danger: #c0392b;
  --s-new: #8c7c70;
  --s-progress: #c47e3f;
  --s-review: #7b5cc4;
  --s-done: #3d8b57;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(42, 28, 19, .06), 0 8px 24px -12px rgba(42, 28, 19, .18);
  --shadow-lg: 0 24px 60px -20px rgba(26, 17, 11, .45);
  --font: 'Montserrat', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --script: 'Pacifico', cursive;
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  /* caramel = the brand accent, espresso = the brand's dark colour; each brand overrides these below */
  --display: var(--font);
  --heading-weight: 800;
  --accent-hover: #8f531f;
  --glow: rgba(196, 126, 63, .22);
  --tag: #8d7a6b;
  --hl1: #d08a4b; --hl2: #f0c08e;
  --login-muted: #b3a294;
  --login-card: #fffaf5;
  --focus: rgba(196, 126, 63, .18);
  --side-text: #c9b8a8;
  --side-muted: #9a8778;
  --tint: #fbf7f3;
  --col: #efe6dc;
  --line-strong: #d9c7b5;
}

* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
/* phones and tablets: no automatic text inflation when rotating, no double-tap zoom */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; touch-action: manipulation; }
body { overflow-x: clip; }
/* iPhones zoom into any text box whose text is smaller than 16px and stay zoomed in — so none is ever smaller */
input, select, textarea { font-size: max(16px, 1em) !important; }
img, video, iframe { max-width: 100%; }
body { background: var(--bg); color: var(--ink); font: 500 14px/1.45 var(--font); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--caramel); }
h1, h2, h3 { margin: 0; letter-spacing: -.02em; }
.hidden { display: none !important; }

/* ---------- login ---------- */
.login {
  position: relative; min-height: 100vh; min-height: 100dvh; overflow: hidden; color: #fff;
  background: radial-gradient(ellipse 55% 55% at 78% 48%, var(--glow), transparent 70%), var(--espresso);
  display: flex; flex-direction: column; padding: calc(24px + env(safe-area-inset-top)) max(clamp(20px, 5vw, 64px), env(safe-area-inset-right)) calc(24px + env(safe-area-inset-bottom)) max(clamp(20px, 5vw, 64px), env(safe-area-inset-left));
}
.login-top { display: flex; justify-content: space-between; align-items: center; position: relative; z-index: 2; }
.logo { font-family: var(--script); font-size: 30px; line-height: 1; color: var(--cream); font-weight: 400; letter-spacing: 0; }
.tag-num { font-family: var(--mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--tag); }
.login-body { flex: 1; display: flex; align-items: center; position: relative; z-index: 2; }
.login-col { width: 100%; max-width: 420px; }
.login h1 { font-size: clamp(34px, 5vw, 50px); line-height: 1.05; font-weight: var(--heading-weight); font-family: var(--display); margin: 10px 0 12px; }
.login h1 span { background: linear-gradient(90deg, var(--hl1), var(--hl2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login p.lead { color: var(--login-muted); max-width: 360px; margin: 0 0 28px; }
.login-card { background: var(--login-card); color: var(--ink); border-radius: 22px; padding: 24px; box-shadow: var(--shadow-lg); }
.login-card .btn { width: 100%; margin-top: 6px; }
.login-roles { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }
.login-roles span { font-size: 11px; color: var(--login-muted); border: 1px solid var(--espresso-3); border-radius: 999px; padding: 4px 10px; }
.login-art { position: absolute; right: -140px; top: 50%; transform: translateY(-50%); width: 760px; max-width: none; opacity: .95; pointer-events: none; z-index: 1; }
.login-foot { position: relative; z-index: 2; }
@media (max-width: 900px) { .login-art { width: 520px; right: -260px; opacity: .35; } }

/* ---------- forms ---------- */
.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); background: var(--paper); border-radius: 12px; padding: 10px 12px;
  outline: none; transition: border-color .15s, box-shadow .15s;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--caramel-2); box-shadow: 0 0 0 3px var(--focus); }
.textarea { min-height: 120px; resize: vertical; line-height: 1.5; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%238c7c70' stroke-width='1.6' fill='none'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 30px; }
.form-error { color: var(--danger); font-size: 13px; min-height: 18px; margin: -4px 0 8px; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 12px; }
@media (max-width: 420px) { .grid2 { grid-template-columns: minmax(0, 1fr); } }
.input, .select, .textarea { min-width: 0; max-width: 100%; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 0; border-radius: 12px;
  padding: 10px 16px; font-weight: 700; font-size: 13px; background: var(--cream-2); color: var(--ink); transition: transform .08s, background .15s, opacity .15s;
  white-space: nowrap; text-decoration: none;
}
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .5; cursor: default; }
.btn-primary { background: var(--caramel); color: #fff; }
.btn-primary:hover { background: var(--accent-hover); }
.btn-dark { background: var(--espresso-2); color: var(--cream); }
.btn-ghost { background: transparent; }
.btn-ghost:hover { background: var(--cream-2); }
.btn-danger { background: #fbe9e6; color: var(--danger); }
.btn-lg { padding: 13px 18px; font-size: 14px; }
.btn-sm { padding: 6px 10px; font-size: 12px; border-radius: 10px; }
.icon-btn { width: 34px; height: 34px; padding: 0; border-radius: 10px; }

/* ---------- shell ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; min-height: 100dvh; }
.side {
  background: var(--espresso); color: var(--side-text); padding: 22px 14px; display: flex; flex-direction: column; gap: 4px;
  position: sticky; top: 0; height: 100vh; height: 100dvh; overflow-y: auto;
}
.side .logo { padding: 0 10px; font-size: 27px; }
.side .sub { padding: 2px 10px 20px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; color: var(--side-text); text-decoration: none;
  font-weight: 600; border: 0; background: none; width: 100%; text-align: left;
}
.nav-item svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav-item:hover { background: var(--espresso-2); color: #fff; }
.nav-item.active { background: var(--espresso-3); color: #fff; }
.nav-item.active svg { color: var(--caramel-2); opacity: 1; }
.nav-item .count { margin-left: auto; font-size: 11px; background: var(--caramel); color: #fff; border-radius: 999px; padding: 1px 7px; }
.side-spacer { flex: 1; }
.me-card { display: flex; align-items: center; gap: 10px; padding: 10px; border-radius: 14px; background: var(--espresso-2); }
.me-card .who { min-width: 0; flex: 1; }
.me-card b { display: block; color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.me-card small { color: var(--side-muted); font-size: 11px; }
.me-card .icon-btn { background: transparent; color: var(--side-muted); }
.me-card .icon-btn:hover { background: var(--espresso-3); color: #fff; }

.main { min-width: 0; padding: 26px clamp(16px, 3vw, 36px) 60px; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.topbar h1 { font-size: 28px; font-weight: var(--heading-weight); font-family: var(--display); }
.topbar .crumb { margin-bottom: 4px; }
.topbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.bottom-nav { display: none; }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { display: none; }
  .main { padding: calc(14px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) calc(96px + env(safe-area-inset-bottom)) max(16px, env(safe-area-inset-left)); }
  .topbar h1 { font-size: 23px; }
  .bottom-nav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; background: var(--espresso);
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); justify-content: space-around;
  }
  .bottom-nav .nav-item { flex-direction: column; gap: 3px; font-size: 10px; padding: 6px 4px; width: auto; flex: 1; align-items: center; text-align: center; }
  .bottom-nav .nav-item .count { display: none; }
  .mobile-head { display: flex !important; }
}
.mobile-head { display: none; align-items: center; justify-content: space-between; margin: -4px 0 14px; }
.mobile-head .logo { color: var(--espresso); font-size: 24px; }

/* ---------- cards & common ---------- */
.card { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.empty { text-align: center; color: var(--muted); padding: 28px 12px; font-size: 13px; }
.empty b { display: block; color: var(--ink-2); font-size: 14px; margin-bottom: 4px; }

.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px 18px; }
.kpi .label { font-size: 12px; color: var(--muted); font-weight: 600; }
.kpi .value { font-size: 28px; font-weight: var(--heading-weight); font-family: var(--display); letter-spacing: -.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.kpi .hint { font-size: 11px; color: var(--muted); margin-top: 2px; }
.kpi.accent { background: var(--espresso); color: var(--cream); }
.kpi.accent .label, .kpi.accent .hint { color: var(--side-muted); }
@media (max-width: 860px) { .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } .kpi .value { font-size: 23px; } }

.dash { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; }
@media (max-width: 1180px) { .dash { grid-template-columns: minmax(0, 1fr); } }
.stack { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-content: start; }
.card { min-width: 0; }

.avatar {
  width: 30px; height: 30px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 11px; font-weight: 800; color: #fff; letter-spacing: 0;
}
.avatar.sm { width: 24px; height: 24px; font-size: 10px; }
.avatar.lg { width: 48px; height: 48px; font-size: 16px; }
.avatar.none { background: var(--cream-2); color: var(--muted); }

.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; background: var(--cream-2); color: var(--ink-2); white-space: nowrap; }
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.st-new { color: var(--s-new); background: #f1ebe5; }
.st-progress { color: #9a5a22; background: #f8e8d6; }
.st-review { color: var(--s-review); background: #efe9fa; }
.st-done { color: var(--s-done); background: #e5f3ea; }
.pr-high { color: var(--danger); }
.overdue { color: var(--danger) !important; font-weight: 700; }

.row-task { display: flex; align-items: center; gap: 12px; padding: 10px 6px; border-bottom: 1px solid var(--line); cursor: pointer; border-radius: 10px; }
.row-task:last-child { border-bottom: 0; }
.row-task:hover { background: var(--tint); }
.row-task .t { flex: 1; min-width: 0; }
.row-task .t b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row-task .t small { color: var(--muted); font-size: 12px; }

.feed-item { display: flex; gap: 10px; padding: 8px 0; font-size: 13px; }
.feed-item .txt { flex: 1; min-width: 0; color: var(--ink-2); }
.feed-item .txt b { color: var(--ink); }
.feed-item .txt a { cursor: pointer; text-decoration: none; color: inherit; }
.feed-item .txt a:hover { color: var(--caramel); text-decoration: underline; }
.feed-item time { display: block; font-size: 11px; color: var(--muted); }

/* ---------- toolbar ---------- */
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar .input, .toolbar .select { width: auto; padding: 8px 12px; border-radius: 11px; }
.toolbar .search { flex: 1; min-width: 180px; max-width: 320px; }
.seg { display: inline-flex; background: var(--cream-2); border-radius: 12px; padding: 3px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 9px; font-weight: 700; font-size: 12px; color: var(--muted); }
.seg button.on { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

/* ---------- kanban ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 14px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.col { background: var(--col); border-radius: var(--radius); padding: 10px; min-height: 200px; transition: background .15s, box-shadow .15s; }
.col.drop { background: var(--caramel-soft); box-shadow: inset 0 0 0 2px var(--caramel-2); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-weight: 700; font-size: 13px; }
.col-head .n { color: var(--muted); font-weight: 600; }
.col-head .add { margin-left: auto; background: none; border: 0; color: var(--muted); font-size: 18px; line-height: 1; padding: 0 4px; border-radius: 6px; }
.col-head .add:hover { color: var(--caramel); background: var(--paper); }
.col-list { display: grid; gap: 8px; }
.tcard { background: var(--paper); border-radius: 14px; padding: 12px; box-shadow: var(--shadow); cursor: pointer; border: 1px solid transparent; transition: border-color .15s, transform .1s; }
.tcard:hover { border-color: var(--caramel-2); }
.tcard.dragging { opacity: .45; transform: rotate(1.5deg); }
.tcard .thumb { width: calc(100% + 24px); margin: -12px -12px 10px; aspect-ratio: 16/9; object-fit: cover; border-radius: 14px 14px 0 0; display: block; background: var(--cream); }
.tcard .title { font-weight: 700; margin: 6px 0 8px; line-height: 1.3; word-break: break-word; }
.tcard .meta { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); }
.tcard .meta .sp { flex: 1; }
.tcard .meta svg { width: 13px; height: 13px; vertical-align: -2px; }
.type-tag { display: inline-block; font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; padding: 3px 8px; border-radius: 6px; }
@media (max-width: 860px) { .board { grid-template-columns: repeat(4, 82vw); scroll-snap-type: x mandatory; } .col { scroll-snap-align: start; } }

/* list view */
.table-wrap { overflow-x: auto; }
table.list { width: 100%; border-collapse: collapse; background: var(--paper); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.list th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); padding: 12px 14px; background: var(--tint); font-weight: 700; white-space: nowrap; }
table.list td { padding: 11px 14px; border-top: 1px solid var(--line); vertical-align: middle; }
table.list tr.click { cursor: pointer; }
table.list tr.click:hover td { background: var(--tint); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }

/* ---------- calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
@media (max-width: 400px) { .cal-head h2 { min-width: 0 !important; font-size: 16px !important; } }
.cal-head h2 { font-size: 18px; font-weight: var(--heading-weight); font-family: var(--display); min-width: 170px; text-transform: capitalize; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal .dow { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 0 6px 4px; }
.day { background: var(--paper); border-radius: 12px; min-height: 112px; padding: 6px; box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.day:hover { box-shadow: inset 0 0 0 1px var(--caramel-2), var(--shadow); }
.day.other { background: transparent; box-shadow: none; opacity: .45; }
.day.today .d { background: var(--caramel); color: #fff; }
.day .d { font-size: 12px; font-weight: 700; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; }
.day .ev { font-size: 11px; font-weight: 600; padding: 3px 6px; border-radius: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.day .ev.done { text-decoration: line-through; opacity: .6; }
.day .more { font-size: 11px; color: var(--muted); padding: 0 6px; }
@media (max-width: 860px) {
  .day { min-height: 64px; padding: 4px; }
  .day .ev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; }
  .day .more { display: none; }
}
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

/* ---------- content bank ---------- */
.drop-zone {
  border: 2px dashed var(--line-strong); border-radius: var(--radius); padding: 26px; text-align: center; color: var(--muted);
  background: var(--tint); transition: background .15s, border-color .15s; cursor: pointer;
}
.drop-zone b { color: var(--ink-2); display: block; font-size: 15px; margin-bottom: 4px; }
.drop-zone.over { background: var(--caramel-soft); border-color: var(--caramel); color: var(--caramel); }
.drop-zone.compact { padding: 14px; font-size: 12px; }
.drop-zone.compact b { font-size: 13px; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-top: 16px; }
.tile { background: var(--paper); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); cursor: pointer; transition: transform .12s; }
.tile:hover { transform: translateY(-2px); }
.tile .media { aspect-ratio: 1; background: var(--cream); display: grid; place-items: center; overflow: hidden; position: relative; }
.tile .media img, .tile .media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile .media .ext { font-family: var(--mono); font-size: 18px; font-weight: 500; color: var(--caramel); text-transform: uppercase; }
.tile .media .play { position: absolute; width: 38px; height: 38px; border-radius: 50%; background: rgba(26,17,11,.7); display: grid; place-items: center; }
.tile .info { padding: 9px 11px; }
.tile .info b { display: block; font-size: 12px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tile .info small { font-size: 11px; color: var(--muted); }

.attach-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; margin-top: 10px; }
.attach { position: relative; background: var(--cream); border-radius: 10px; overflow: hidden; aspect-ratio: 1; display: grid; place-items: center; cursor: pointer; }
.attach img, .attach video { width: 100%; height: 100%; object-fit: cover; }
.attach .ext { font-family: var(--mono); color: var(--caramel); font-size: 14px; text-transform: uppercase; }
.attach .nm { position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; padding: 14px 6px 4px; color: #fff; background: linear-gradient(transparent, rgba(0,0,0,.65)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.attach .x { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(26,17,11,.7); color: #fff; font-size: 13px; line-height: 1; display: none; }
.attach:hover .x { display: block; }
.attach.pending { opacity: .6; }

/* ---------- target ---------- */
.kpis.six { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1100px) { .kpis.six { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 600px) { .kpis.six { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.camps { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 14px; }
.camp { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; }
.camp .cover { aspect-ratio: 16/10; background: linear-gradient(135deg, var(--espresso-2), var(--caramel)); position: relative; display: grid; place-items: center; }
.camp .cover img, .camp .cover video { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.camp .cover .ph { font-family: var(--script); color: var(--cream); font-size: 26px; opacity: .8; }
.camp .cover .pill { position: absolute; top: 10px; left: 10px; z-index: 1; }
.camp .body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.camp .body h4 { margin: 0; font-size: 15px; font-weight: 700; }
.camp .stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.camp .stats div { background: var(--tint); border-radius: 10px; padding: 8px; }
.camp .stats small { display: block; font-size: 10px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.camp .stats b { font-size: 14px; font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: var(--cream-2); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--caramel); border-radius: 3px; }
.bar.over i { background: var(--danger); }
.chart { display: grid; gap: 10px; }
.chart-row { display: grid; grid-template-columns: minmax(90px, 180px) 1fr 90px; gap: 10px; align-items: center; font-size: 12px; }
.chart-row .nm { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.chart-row .track { height: 18px; background: var(--cream-2); border-radius: 6px; overflow: hidden; }
.chart-row .track i { display: block; height: 100%; background: linear-gradient(90deg, var(--caramel), var(--caramel-2)); border-radius: 6px; }
.chart-row .v { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ---------- team ---------- */
.member-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.danger-text { color: var(--danger) !important; }
.team-block { margin: 26px 0 10px; font-size: 18px; }
.check-line { display: flex; align-items: center; gap: 8px; font-size: 14px; margin: 2px 0 10px; cursor: pointer; }
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.member { display: flex; flex-direction: column; gap: 12px; }
.member .top { display: flex; gap: 12px; align-items: center; }
.member .top b { display: block; font-size: 15px; }
.member .nums { display: flex; gap: 8px; }
.member .nums div { flex: 1; background: var(--tint); border-radius: 10px; padding: 8px 10px; }
.member .nums b { display: block; font-size: 18px; }
.member .nums small { font-size: 11px; color: var(--muted); }
.rights { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: 13px; }
.rights li { margin: 3px 0; }

/* ---------- modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(26, 17, 11, .52); z-index: 50; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 16px; overflow-y: auto; animation: fade .15s; }
.modal { background: var(--bg); border-radius: 22px; width: 100%; max-width: 920px; box-shadow: var(--shadow-lg); animation: pop .18s; }
.modal.narrow { max-width: 480px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 18px 20px 0; }
.modal-head h2 { font-size: 18px; font-weight: var(--heading-weight); font-family: var(--display); flex: 1; }
.modal-body { padding: 18px 20px 20px; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 0 20px 20px; flex-wrap: wrap; }
.modal-foot .sp { flex: 1; }
.task-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 20px; }
.task-grid .side-fields { background: var(--paper); border-radius: 16px; padding: 14px; align-self: start; }
.title-input { font-size: 20px; font-weight: 800; border: 0; background: transparent; padding: 4px 0; width: 100%; outline: none; letter-spacing: -.02em; }
.title-input::placeholder { color: var(--muted); }
.section-label { font-size: 12px; font-weight: 700; color: var(--muted); margin: 18px 0 8px; text-transform: uppercase; letter-spacing: .06em; }
.comment { display: flex; gap: 10px; margin-bottom: 12px; }
.comment .bubble { background: var(--paper); border-radius: 4px 14px 14px 14px; padding: 9px 12px; flex: 1; min-width: 0; white-space: pre-wrap; word-break: break-word; }
.comment .bubble small { display: block; color: var(--muted); font-size: 11px; margin-bottom: 2px; white-space: normal; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; }
.comment-form .textarea { min-height: 44px; height: 44px; }
.meta-line { font-size: 12px; color: var(--muted); margin-top: 10px; line-height: 1.6; }
@media (max-width: 760px) {
  .task-grid { grid-template-columns: 1fr; }
  .overlay { padding: 0; align-items: stretch; }
  .modal { border-radius: 0; min-height: 100%; }
  .modal-head { padding-top: calc(16px + env(safe-area-inset-top)); }
  .modal-foot { padding-bottom: calc(20px + env(safe-area-inset-bottom)); }
  .modal-head, .modal-body, .modal-foot { padding-left: max(16px, env(safe-area-inset-left)); padding-right: max(16px, env(safe-area-inset-right)); }
}

.lightbox { position: fixed; inset: 0; z-index: 60; background: rgba(15, 10, 6, .92); display: flex; flex-direction: column; animation: fade .15s; }
.lightbox .lb-head { display: flex; gap: 8px; align-items: center; padding: calc(14px + env(safe-area-inset-top)) 16px 14px; flex-wrap: wrap; color: var(--cream); }
.lightbox .lb-head .nm { flex: 1; min-width: 0; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.lightbox .lb-head small { display: block; color: #a8937f; font-weight: 500; }
.lightbox .lb-body { flex: 1; display: grid; place-items: center; padding: 0 16px 16px; min-height: 0; }
.lightbox img, .lightbox video, .lightbox iframe { max-width: 100%; max-height: calc(100dvh - 100px); border-radius: 10px; }
.lightbox iframe { width: min(900px, 100%); height: calc(100dvh - 100px); border: 0; background: #fff; }
.lightbox .nofile { color: var(--cream); text-align: center; }

#toasts { position: fixed; z-index: 70; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { background: var(--espresso); color: var(--cream); padding: 11px 16px; border-radius: 12px; box-shadow: var(--shadow-lg); font-weight: 600; font-size: 13px; animation: pop .18s; }
.toast.err { background: var(--danger); color: #fff; }
@media (max-width: 860px) { #toasts { bottom: 86px; } }

@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* =====================================================================
   Brand themes. Coffee Boom (Астана) is the base look above; the others override the tokens.
   Colours and fonts follow each brand's own website.
   ===================================================================== */

/* Сыроварня — farm-house cheese shop: olive, cream, cheese gold; Oswald + Manrope */
[data-brand="syrovarnya"] {
  --bg: #f3efe6; --paper: #fffdf8; --cream: #ebe5d6; --cream-2: #e5e0d4; --line: #e3dccb; --line-strong: #cfc6b0;
  --ink: #23261d; --ink-2: #45483c; --muted: #85806f;
  --caramel: #314d21; --caramel-2: #5f8a3e; --caramel-soft: #e3ead6; --accent-hover: #26401a;
  --espresso: #213114; --espresso-2: #2b3f1c; --espresso-3: #3a5226;
  --glow: rgba(241, 210, 122, .16); --tag: #8fa178; --hl1: #f1d27a; --hl2: #f6e6b0; --login-muted: #b4bea2; --login-card: #fffdf8;
  --focus: rgba(95, 138, 62, .22); --side-text: #cfd7c2; --side-muted: #8fa178; --tint: #f8f5ee; --col: #e9e3d4;
  --font: 'Manrope', system-ui, sans-serif; --display: 'Oswald', 'Manrope', sans-serif; --heading-weight: 600; --radius: 14px;
}
[data-brand="syrovarnya"] .logo { font-family: 'Oswald', sans-serif; font-weight: 600; text-transform: uppercase; letter-spacing: .16em; font-size: 22px; color: #f1d27a; }
[data-brand="syrovarnya"] .mobile-head .logo { color: var(--caramel); }
[data-brand="syrovarnya"] .topbar h1, [data-brand="syrovarnya"] .login h1 { letter-spacing: .01em; }

/* PRO.Хинкали — festive Georgian: terracotta orange, navy, peach, gold ornament; Unbounded + Manrope */
[data-brand="prokhinkali"] {
  --bg: #faf3ee; --paper: #ffffff; --cream: #faece5; --cream-2: #f5e1d6; --line: #f0dfd4; --line-strong: #e9cbbb;
  --ink: #192431; --ink-2: #3a4656; --muted: #8a8f99;
  --caramel: #eb4100; --caramel-2: #f07048; --caramel-soft: #fde2d5; --accent-hover: #c93800;
  --espresso: #192431; --espresso-2: #222f40; --espresso-3: #2e3d52;
  --glow: rgba(235, 65, 0, .22); --tag: #8d98a8; --hl1: #f07048; --hl2: #deb078; --login-muted: #a7b0bd; --login-card: #fffaf7;
  --focus: rgba(235, 65, 0, .2); --side-text: #c8d0dc; --side-muted: #8d98a8; --tint: #fdf7f3; --col: #f6e7de;
  --font: 'Manrope', system-ui, sans-serif; --display: 'Unbounded', 'Manrope', sans-serif; --heading-weight: 700; --radius: 22px;
}
[data-brand="prokhinkali"] .logo { font-family: 'Unbounded', sans-serif; font-weight: 800; font-size: 21px; letter-spacing: -.01em; color: #fff; }
[data-brand="prokhinkali"] .logo i { color: var(--caramel-2); font-style: normal; }
[data-brand="prokhinkali"] .mobile-head .logo { color: var(--espresso); }
[data-brand="prokhinkali"] .topbar h1 { font-size: 24px; }
[data-brand="prokhinkali"] .login h1 { font-size: clamp(28px, 4.2vw, 42px); }
[data-brand="prokhinkali"] .side { background:
  radial-gradient(circle at 100% 0, rgba(235, 65, 0, .18), transparent 40%), var(--espresso); }

/* Coffee Boom Roasters & Bakery — industrial roastery: graphite, concrete, roast copper, "colour of dawn"; Literata + Golos Text */
[data-brand="cbrb-almaty"] {
  --bg: #efece7; --paper: #fbfaf8; --cream: #e7e1d8; --cream-2: #e2ddd5; --line: #dcd6cc; --line-strong: #cdc6ba;
  --ink: #1c1b19; --ink-2: #3d3a35; --muted: #85807a;
  --caramel: #b8642e; --caramel-2: #d4844a; --caramel-soft: #f3e1d2; --accent-hover: #9a5224;
  --espresso: #1b1a18; --espresso-2: #262421; --espresso-3: #35322d;
  --glow: rgba(242, 180, 138, .14); --tag: #7d766d; --hl1: #f2b48a; --hl2: #f8d9b8; --login-muted: #a39d94; --login-card: #fbfaf8;
  --focus: rgba(184, 100, 46, .2); --side-text: #cfcac2; --side-muted: #8a847b; --tint: #f6f4f0; --col: #e4dfd7;
  --font: 'Golos Text', system-ui, sans-serif; --display: 'Literata', Georgia, serif; --heading-weight: 600; --radius: 10px;
}
[data-brand="cbrb-almaty"] .logo { font-family: 'Literata', serif; font-weight: 600; font-size: 24px; color: #fff; }
[data-brand="cbrb-almaty"] .logo small { display: block; font-family: var(--mono); font-size: 9.5px; font-weight: 500; letter-spacing: .22em; text-transform: uppercase; color: var(--hl1); margin-top: 6px; }
[data-brand="cbrb-almaty"] .mobile-head .logo { color: var(--espresso); font-size: 20px; }
[data-brand="cbrb-almaty"] .card, [data-brand="cbrb-almaty"] .kpi, [data-brand="cbrb-almaty"] .tcard, [data-brand="cbrb-almaty"] .day { box-shadow: none; border: 1px solid var(--line); }
[data-brand="cbrb-almaty"] .login { background-image: linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px),
  radial-gradient(ellipse 55% 55% at 78% 48%, var(--glow), transparent 70%); background-size: 48px 48px, 48px 48px, auto; }

/* links back to the object picker / overview in the sidebar */
.side-links { display: grid; gap: 2px; margin-bottom: 8px; }
.side-links a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; color: var(--side-muted); text-decoration: none; font-size: 12px; font-weight: 600; }
.side-links a:hover { background: var(--espresso-2); color: #fff; }
.side-links svg { width: 15px; height: 15px; }
.login-back { color: var(--login-muted); text-decoration: none; font-size: 12px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; }
.login-back:hover { color: #fff; }

/* =====================================================================
   Hub: object picker ("Выберите объект") and the all-plans overview — neutral, Inter
   ===================================================================== */
[data-brand="hub"] {
  --bg: #f3f4f7; --paper: #ffffff; --ink: #0f1729; --ink-2: #374151; --muted: #6b7280; --line: #e5e7eb; --line-strong: #d1d5db;
  --cream: #eef0f4; --cream-2: #e8eaf0; --caramel: #2f54eb; --caramel-2: #4c6ef5; --caramel-soft: #e7ecff; --accent-hover: #2445c9;
  --espresso: #0f1729; --espresso-2: #1c2438; --espresso-3: #2a3350; --tint: #f7f8fa; --focus: rgba(47, 84, 235, .18);
  --font: 'Inter', system-ui, -apple-system, sans-serif; --display: var(--font); --heading-weight: 800;
}
.hub { max-width: 460px; margin: 0 auto; padding: calc(28px + env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) calc(40px + env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left)); min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; }
.hub-brand { display: flex; align-items: center; gap: 14px; margin-bottom: 36px; }
.hub-brand img { width: 52px; height: 52px; border-radius: 15px; box-shadow: 0 8px 20px -8px rgba(31, 46, 120, .5); }
.hub-brand b { display: block; font-size: 20px; font-weight: 800; letter-spacing: -.02em; }
.hub-brand small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 2px; }
.hub h1 { font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.hub .sub { color: var(--muted); margin: 8px 0 22px; font-size: 14.5px; }
.picks { display: grid; gap: 12px; }
.pick { display: flex; align-items: center; gap: 16px; padding: 14px 16px; background: var(--paper); border-radius: 20px; text-decoration: none; color: var(--ink);
  box-shadow: 0 1px 2px rgba(15, 23, 41, .05), 0 6px 18px -10px rgba(15, 23, 41, .16); border: 1px solid #edeef2; transition: transform .12s, box-shadow .15s; }
.pick:hover { transform: translateY(-1px); box-shadow: 0 2px 4px rgba(15, 23, 41, .06), 0 12px 26px -12px rgba(15, 23, 41, .25); }
.pick:active { transform: scale(.99); }
.pick .em { width: 50px; height: 50px; border-radius: 15px; display: grid; place-items: center; font-size: 25px; flex: none; }
.pick .nm { flex: 1; min-width: 0; }
.pick .nm b { display: block; font-size: 16.5px; font-weight: 700; letter-spacing: -.01em; }
.pick .nm small { display: block; color: var(--muted); font-size: 13.5px; margin-top: 1px; }
.pick .nm .who { display: inline-block; margin-top: 5px; font-size: 11px; font-weight: 700; color: var(--caramel); }
.pick svg { color: #9ca3af; flex: none; }
.hint-box { margin-top: 22px; border: 1.5px dashed #dfe2e8; border-radius: 18px; padding: 16px 18px; font-size: 13px; color: var(--muted); line-height: 1.55; }
.hint-box b { display: block; color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.hub-foot { margin-top: auto; padding-top: 28px; text-align: center; }
.hub-foot a { color: var(--ink-2); font-weight: 700; font-size: 14px; text-decoration: none; display: inline-flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px; }
.hub-foot a:hover { background: var(--cream); }
.hub .login-card { background: var(--paper); box-shadow: 0 1px 2px rgba(15,23,41,.05), 0 10px 30px -14px rgba(15,23,41,.25); border: 1px solid #edeef2; margin-top: 4px; }
.hub .back { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; display: inline-flex; gap: 6px; align-items: center; margin-bottom: 18px; }

/* overview: every object's plan on one page */
.ov { max-width: 1280px; margin: 0 auto; padding: calc(22px + env(safe-area-inset-top)) clamp(16px, 3vw, 36px) 60px; }
.ov-top { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 20px; }
.ov-top img { width: 40px; height: 40px; border-radius: 12px; }
.ov-top .t { flex: 1; min-width: 200px; }
.ov-top h1 { font-size: 26px; font-weight: 800; letter-spacing: -.03em; }
.ov-top small { color: var(--muted); font-size: 13px; }
.ov-brands { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
@media (max-width: 1100px) { .ov-brands { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .ov-brands { grid-template-columns: 1fr; } }
.ob { background: var(--paper); border-radius: 18px; padding: 16px 16px 14px; box-shadow: inset 0 4px 0 var(--c), 0 1px 2px rgba(15,23,41,.05), 0 6px 18px -10px rgba(15,23,41,.16); display: flex; flex-direction: column; gap: 10px; }
.ob-head { display: flex; align-items: center; gap: 10px; }
.ob-head .em { width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; font-size: 19px; flex: none; }
.ob-head b { display: block; font-size: 14.5px; line-height: 1.2; }
.ob-head small { color: var(--muted); font-size: 12px; }
.ob-nums { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.ob-nums div { background: var(--tint); border-radius: 10px; padding: 7px 8px; }
.ob-nums b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.ob-nums small { font-size: 10.5px; color: var(--muted); font-weight: 600; }
.ob-nums .bad b { color: var(--danger); }
.ob a.btn { align-self: flex-start; }
.ob.off { opacity: .45; }
.ov-chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 6px 12px; font-weight: 600; font-size: 12.5px; color: var(--ink-2); }
.chip i { width: 9px; height: 9px; border-radius: 50%; background: var(--c); }
.chip.off { opacity: .45; }
.chip.off i { background: transparent; box-shadow: inset 0 0 0 2px var(--c); }
.ov-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .ov-grid { grid-template-columns: minmax(0, 1fr); } }
/* phones: the next-14-days list is more useful than a tiny calendar, so it comes first */
@media (max-width: 860px) { .ov-grid .agenda { order: -1; } }
.day .ev.b { border-left: 3px solid var(--c); background: var(--tint); color: var(--ink); }
.day .ev .bdot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--c); margin-right: 5px; vertical-align: 1px; }
@media (max-width: 860px) { .day .ev.b { background: var(--c); border: 0; } }
.agenda .dayhead { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 6px; }
.agenda .dayhead:first-child { margin-top: 0; }
.agenda .dayhead.today { color: var(--caramel); }
.arow { display: flex; align-items: center; gap: 10px; padding: 9px 8px; border-radius: 10px; cursor: pointer; border-left: 3px solid var(--c); margin-bottom: 4px; background: var(--tint); }
.arow:hover { background: var(--cream); }
.arow .t { flex: 1; min-width: 0; }
.arow .t b { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.arow .t small { color: var(--muted); font-size: 11.5px; }
.arow .em { font-size: 16px; }

/* ---------- «Главная»: week calendar ---------- */
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: start; }
.wk-day { background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 10px; min-height: 180px; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.wk-day.today { box-shadow: inset 0 0 0 2px var(--caramel), var(--shadow); }
.wk-day.past { opacity: .72; }
.wk-date { display: flex; align-items: baseline; gap: 6px; padding: 0 2px 2px; }
.wk-date .dn { font-family: var(--display); font-weight: var(--heading-weight); font-size: 22px; line-height: 1; }
.wk-date .dw { color: var(--muted); font-size: 12px; font-weight: 600; text-transform: capitalize; flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-day.today .dn, .wk-day.today .dw { color: var(--caramel); }
.wk-add { border: 0; background: var(--cream-2); color: var(--ink-2); width: 26px; height: 26px; border-radius: 8px; font-size: 17px; line-height: 1; flex: none; }
.wk-add:hover { background: var(--caramel); color: #fff; }
.wk-free { color: var(--muted); font-size: 12px; padding: 4px 2px; }
.wk-task { border-radius: 12px; padding: 9px 10px; background: var(--tb); border-left: 4px solid var(--tc); cursor: pointer; display: grid; gap: 6px; transition: transform .1s; }
.wk-task:hover { transform: translateY(-1px); }
.wk-task.done { opacity: .55; }
.wk-task.done .wk-title { text-decoration: line-through; }
.wk-task.late { box-shadow: inset 0 0 0 1.5px var(--danger); }
.wk-type { font-size: 10px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--tc); }
.wk-title { font-weight: 700; font-size: 13.5px; line-height: 1.3; color: var(--ink); word-break: break-word; }
.wk-who { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); min-width: 0; }
.wk-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wk-task .pill { font-size: 10.5px; padding: 2px 8px; background: rgba(255,255,255,.7); white-space: normal; line-height: 1.25; }
.wk-date .dl { display: none; }
.wk-date .ds { text-transform: lowercase; }
/* narrower screens: days stacked one under another, empty days folded to a single line */
@media (max-width: 1100px) {
  .week { grid-template-columns: minmax(0, 1fr); }
  .wk-day { min-height: 0; }
  .wk-day.empty-day { flex-direction: row; align-items: center; padding: 8px 10px; }
  .wk-day.empty-day .wk-date { flex: 1; padding: 0; }
  .wk-day.empty-day .wk-free { padding: 0 6px; }
  .wk-date .dn { font-size: 20px; }
  .wk-day:not(.empty-day) { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
  .wk-day:not(.empty-day) .wk-date { grid-column: 1 / -1; }
  .wk-date .dw { font-size: 13px; }
  .wk-date .dl { display: inline; }
  .wk-date .ds { display: none; }
}

/* ---------- owner page («Всё сразу»): big, plain, readable ---------- */
.owner { font-size: 15px; }
.o-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 22px; }
.o-summary > div { background: var(--paper); border-radius: 18px; padding: 16px 18px; box-shadow: 0 1px 2px rgba(15,23,41,.05), 0 6px 18px -10px rgba(15,23,41,.16); }
.o-summary b { display: block; font-size: 30px; font-weight: 800; letter-spacing: -.03em; line-height: 1.1; }
.o-summary span { color: var(--ink-2); font-weight: 600; }
.o-summary .warn b { color: #7b5cc4; }
.o-summary .bad b { color: var(--danger); }
@media (max-width: 700px) { .o-summary { grid-template-columns: 1fr; gap: 8px; } .o-summary > div { display: flex; align-items: baseline; gap: 10px; padding: 12px 16px; } .o-summary b { font-size: 24px; } }
.o-h { font-size: 18px; font-weight: 800; margin: 0 0 10px; }
.ofacts { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; font-size: 14px; color: var(--ink-2); }
.ofacts li { padding-left: 14px; position: relative; }
.ofacts li::before { content: ''; position: absolute; left: 0; top: .55em; width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong); }
.ofacts li b { color: var(--ink); }
.ofacts li.warn::before { background: #7b5cc4; }
.ofacts li.warn b { color: #7b5cc4; }
.ofacts li.bad::before { background: var(--danger); }
.ofacts li.bad b { color: var(--danger); }
.o-bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 22px 0 12px; }
.o-bar .ov-chips { margin: 0; }
.oday { background: var(--paper); border-radius: 18px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(15,23,41,.05), 0 6px 18px -10px rgba(15,23,41,.16); }
.oday.today { box-shadow: inset 0 0 0 2px var(--caramel), 0 6px 18px -10px rgba(15,23,41,.16); }
.oday.late { background: #fdeceb; box-shadow: inset 0 0 0 1px #f3c7c2; }
.oday-h { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 2px 4px 10px; }
.oday-h b { font-size: 17px; font-weight: 800; letter-spacing: -.01em; text-transform: none; }
.oday-h b::first-letter { text-transform: uppercase; }
.oday.today .oday-h b { color: var(--caramel); }
.oday.late .oday-h b { color: var(--danger); }
.oday-h span { color: var(--muted); font-weight: 600; font-size: 13px; white-space: nowrap; }
.orow { display: flex; align-items: center; gap: 12px; padding: 11px 10px; border-radius: 14px; cursor: pointer; border-left: 4px solid var(--c); background: var(--tint); }
.orow + .orow { margin-top: 6px; }
.orow:hover { background: var(--cream); }
.oday.late .orow { background: #fff; }
.oem { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; font-size: 21px; flex: none; }
.ot { flex: 1; min-width: 0; }
.ot > b { display: block; font-size: 15.5px; font-weight: 700; line-height: 1.3; word-break: break-word; }
.owhere { font-size: 12px; font-weight: 700; color: var(--c); text-transform: uppercase; letter-spacing: .04em; }
.owho { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.ostat { flex: none; font-size: 12.5px; font-weight: 700; padding: 5px 10px; border-radius: 999px; white-space: nowrap; }
.ostat.late { background: var(--danger); color: #fff; }
@media (max-width: 600px) {
  .orow { flex-wrap: wrap; }
  .ot { flex-basis: calc(100% - 56px); }
  .ostat { margin-left: 52px; }
}
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 10px 16px; margin: 0; font-size: 15px; }
.facts dt { color: var(--muted); font-weight: 600; }
.facts dd { margin: 0; font-weight: 600; min-width: 0; word-break: break-word; }
@media (max-width: 480px) { .facts { grid-template-columns: 1fr; gap: 2px; } .facts dd { margin-bottom: 10px; } }
.owner-pick { margin-top: 12px; border-color: #c9d4ff; }

/* ---------- «Главная»: one big calendar between the numbers and the activity feed ---------- */
/* the calendar gets the full width; the activity feed sits beside it only on very wide screens */
.home-dash { grid-template-columns: minmax(0, 1fr); }
@media (min-width: 1700px) { .home-dash { grid-template-columns: minmax(0, 3.4fr) minmax(300px, 1fr); } }
.home-cal .cal-head { flex-wrap: wrap; gap: 8px; }
.home-cal .cal-head .sp { flex: 1; }
.hc-month, .hc-week { display: flex; align-items: center; gap: 10px; }
.hc-week { display: none; }
.hcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.hcal .dow { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: 0 6px 2px; }
.hday { background: var(--tint); border-radius: 12px; min-height: 140px; padding: 7px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; min-width: 0; border: 1px solid var(--line); }
.hday:hover { border-color: var(--caramel-2); }
.hday.other { opacity: .4; }
.hday.past:not(.today) .d { color: var(--muted); }
.hday.today { background: var(--paper); box-shadow: inset 0 0 0 2px var(--caramel); border-color: transparent; }
.hday .d { font-size: 13px; font-weight: 800; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; flex: none; }
.hday.today .d { background: var(--caramel); color: #fff; }
.hday .more { font-size: 11px; color: var(--muted); padding: 0 4px; font-weight: 600; }
.hev { --sc: var(--s-new); display: flex; align-items: center; gap: 5px; background: var(--tb); color: var(--ink); border-left: 4px solid var(--sc); border-radius: 7px; padding: 5px 5px 5px 8px; font-size: 12.5px; font-weight: 600; line-height: 1.25; cursor: pointer; min-width: 0; }
.hev:hover { filter: brightness(.97); }
.hev-t { flex: 1; min-width: 0; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; word-break: break-word; }
.hev .avatar.sm { width: 18px; height: 18px; font-size: 8px; }
.m-new { --sc: var(--s-new); } .m-progress { --sc: var(--s-progress); } .m-review { --sc: var(--s-review); } .m-done { --sc: var(--s-done); } .m-late { --sc: var(--danger); }
.hev.m-done { opacity: .55; } .hev.m-done .hev-t { text-decoration: line-through; }
.hev.m-late { background: #fdeceb; }
.hc-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 12px; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.hc-legend span { display: inline-flex; align-items: center; gap: 6px; }
.hc-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--sc); }
.home-week { display: none; }
/* phones: the month grid is too small to read, so the calendar shows the next 7 days instead */
@media (max-width: 860px) {
  .hcal, .hc-month { display: none; }
  .hc-week { display: flex; }
  .home-week { display: grid; }
  .home-cal { padding: 14px; }
  .hc-week h2 { font-size: 16px; text-transform: none; }
}

/* «Дизайны»: one column per designer */
.dz-board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(230px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: start; margin-bottom: 12px; }
@media (max-width: 860px) { .dz-board { grid-auto-columns: 82vw; scroll-snap-type: x mandatory; } .dz-col { scroll-snap-align: start; } }
.dz-col.mine { box-shadow: inset 0 0 0 2px #8a4fa8; }
.dz-card { display: block; text-decoration: none; color: inherit; border-left: 3px solid var(--c); }
.dz-where { display: inline-flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.dz-where i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.dz-meta { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; margin-bottom: 4px; }
.dz-meta .due-late { color: var(--danger); font-weight: 700; }
.dz-meta .ostat { margin: 0; padding: 3px 9px; font-size: 11.5px; }

/* ---------- motion & hover ----------
   Only transform / opacity / colours move, so nothing on the page has to be laid out again. Lifts happen with a
   real mouse only (hover: hover), so phones never keep a "stuck" hover look after a tap. */
:root { --ease: cubic-bezier(.2, .8, .2, 1); --spring: cubic-bezier(.34, 1.5, .64, 1); }
.btn { transition: transform .25s var(--spring), background-color .18s var(--ease), box-shadow .25s var(--ease), color .18s var(--ease), opacity .15s; }
.btn svg, .nav-item svg, .pick .em, .pick > svg { transition: transform .3s var(--spring), color .18s var(--ease), opacity .18s; }
.nav-item { transition: background-color .18s var(--ease), color .18s var(--ease); }
.tcard, .tile, .day, .pick, .ob, .member, .orow, .chip, .seg button, .kpi { transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .2s var(--ease), background-color .2s var(--ease), color .18s var(--ease); }
.btn:not(:disabled):active { transform: scale(.95); transition-duration: .08s; }
.tcard:active, .tile:active, .pick:active, .orow:active, .day:active { transform: scale(.985); transition-duration: .08s; }

@media (hover: hover) {
  .btn:not(:disabled):hover { transform: translateY(-1px); box-shadow: 0 6px 16px -9px rgba(42, 28, 19, .45); }
  .btn-primary:not(:disabled):hover, .btn-dark:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 10px 22px -10px var(--caramel, rgba(42, 28, 19, .6)); }
  .btn-ghost:hover, .icon-btn.btn-ghost:hover { box-shadow: none; }
  .btn:not(:disabled):hover svg { transform: scale(1.14) rotate(-8deg); }
  .btn:not(:disabled):active svg { transform: scale(.9); }

  .nav-item:hover svg { transform: translateX(2px) scale(1.12); opacity: 1; }
  .nav-item.active:hover svg { transform: scale(1.12); }

  .tcard:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(42, 28, 19, .05), 0 16px 30px -14px rgba(42, 28, 19, .35); }
  .tile:hover { transform: translateY(-3px); box-shadow: 0 2px 4px rgba(42, 28, 19, .05), 0 16px 30px -14px rgba(42, 28, 19, .35); }
  .tile:hover .media img { transform: scale(1.04); }
  .pick:hover { transform: translateY(-2px); }
  .pick:hover .em { transform: scale(1.08) rotate(-6deg); }
  .pick:hover > svg { transform: translateX(4px); color: var(--ink); }
  .ob:hover, .member:hover { transform: translateY(-2px); box-shadow: inset 0 4px 0 var(--c, transparent), 0 2px 4px rgba(15, 23, 41, .05), 0 16px 30px -16px rgba(15, 23, 41, .3); }
  .member:hover { box-shadow: 0 2px 4px rgba(42, 28, 19, .05), 0 16px 30px -16px rgba(42, 28, 19, .3); }
  .orow:hover { transform: translateX(3px); }
  .chip:hover { transform: translateY(-1px); }
  .day .ev { transition: transform .2s var(--ease), filter .2s; }
  .day .ev:hover { transform: translateX(2px); filter: brightness(.97); }
}
.tile .media img { transition: transform .5s var(--ease); }

/* a new section eases in instead of popping */
#viewBody.enter { animation: view-in .26s var(--ease); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } }
