@import url('https://fonts.googleapis.com/css2?family=Onest:wght@400;500;600;700;800&display=swap');

/* Palette after syntx.ai: warm cream paper, near-black ink, red-orange accent. */
:root {
  --bg: #ede6da;
  --panel: #f5f0e9;
  --panel-2: #e6ddce;
  --sand: #e3d3bb;
  --line: #d8cbb8;
  --text: #241e20;
  --muted: #7a6a66;
  --accent: #e54717;
  --accent-hover: #cf3d10;
  --accent-ink: #f5f0e9;
  --ink: #241e20;
  --danger: #c62f2f;
  --ok: #2f8f57;
  --radius: 16px;
  --st-new: #7b5cc4;
  --st-waiting: #8c7f78;
  --st-work: #3a66c4;
  --st-review: #e54717;
  --st-changes: #b8306a;
  --st-approved: #2f8f57;
  --st-paid: #5b4a4a;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 Onest, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { margin: 0; line-height: 1.15; letter-spacing: -.02em; }
h1 { font-size: 26px; font-weight: 800; }
h2 { font-size: 18px; font-weight: 700; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* header */
.top {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 20px;
  padding: 12px 24px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.logo { font-weight: 800; font-size: 20px; letter-spacing: .03em; color: var(--text); display: flex; align-items: center; gap: 10px; text-transform: uppercase; }
.logo::before { content: ""; width: 1.05em; height: 1.05em; background: url(/brand/montio-mark.svg) center / contain no-repeat; }
.logo:hover { text-decoration: none; }
.nav { display: flex; gap: 4px; flex: 1; }
.nav a { color: var(--muted); padding: 7px 14px; border-radius: 10px; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--panel-2); text-decoration: none; }
.nav a.active { color: var(--accent-ink); background: var(--ink); }
.me { color: var(--text); font-weight: 600; display: flex; align-items: center; gap: 8px; }
.me:hover { text-decoration: none; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--sand); display: grid; place-items: center; font-weight: 700; font-size: 14px; color: var(--ink); }

.wrap { max-width: 1440px; margin: 0 auto; padding: 24px; }
.narrow { max-width: 820px; }

/* controls */
button, .btn {
  font: inherit; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text);
  cursor: pointer; white-space: nowrap;
}
button:hover, .btn:hover { border-color: var(--muted); text-decoration: none; }
button:disabled { opacity: .45; cursor: default; }
.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.dark { background: var(--ink); border-color: var(--ink); color: var(--accent-ink); }
.dark:hover { background: #3a3033; border-color: #3a3033; }
.success { background: var(--ok); border-color: var(--ok); color: #fff; }
.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.ghost:hover { color: var(--text); background: var(--panel-2); border-color: transparent; }
.danger-text { color: var(--danger); }
.big { padding: 14px 22px; font-size: 16px; border-radius: 14px; }
.sm { padding: 5px 10px; font-size: 13px; border-radius: 9px; }

input, select, textarea {
  font: inherit; color: var(--text);
  background: #fffdf9; border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; width: 100%;
}
input:not([type=checkbox]):not([type=radio]), select { min-height: 44px; }
select {
  appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background: #fffdf9 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%237a6a66' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 18%, transparent); }
input[readonly] { background: var(--panel-2); color: var(--muted); }
textarea { resize: vertical; min-height: 44px; }
label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }

.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }

/* status pill */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px;
  background: color-mix(in srgb, var(--c) 13%, transparent); color: var(--c);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }

/* board */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 20px; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab { padding: 8px 16px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); font-weight: 600; }
.tab.active { background: var(--ink); color: var(--accent-ink); border-color: var(--ink); }

.board { display: grid; grid-template-columns: repeat(5, minmax(210px, 1fr)); gap: 12px; align-items: stretch; overflow-x: auto; padding-bottom: 10px; }
.col { background: var(--panel-2); border-radius: var(--radius); padding: 10px; min-height: 140px; border: 1px dashed transparent; }
.col-head { display: flex; justify-content: space-between; align-items: center; padding: 4px 4px 10px; }
.col-head .count { color: var(--muted); font-size: 13px; font-weight: 600; }
.col.drop { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--panel-2)); }

.card {
  display: block; color: var(--text);
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  margin-bottom: 8px; overflow: hidden; cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.card:hover { text-decoration: none; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(36, 30, 32, .1); }
.card .thumb { aspect-ratio: 16 / 10; background: var(--ink) center / cover no-repeat; display: grid; place-items: center; color: #a39090; font-size: 12px; }
.card .body { padding: 10px 12px; }
.card .title { font-weight: 600; font-size: 14px; margin-bottom: 6px; word-break: break-word; }
.card .meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.card .card-action { margin-top: 8px; width: 100%; }
.badge { font-size: 12px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--accent); color: var(--accent-ink); }
.tag { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; background: var(--panel-2); color: var(--muted); }
.late { color: var(--danger); font-weight: 600; }

/* modal */
.modal-bg { position: fixed; inset: 0; background: rgba(36, 30, 32, .45); display: grid; place-items: center; z-index: 50; padding: 16px; }
.modal { width: 100%; max-width: 540px; max-height: calc(100vh - 32px); overflow: auto; background: var(--panel); border-radius: 20px; padding: 24px; box-shadow: 0 20px 60px rgba(36, 30, 32, .25); }
.modal h2 { margin-bottom: 16px; }

/* review page */
.review { display: grid; grid-template-columns: minmax(0, 1fr) 410px; gap: 20px; align-items: start; }
.player-box { background: var(--ink); border-radius: var(--radius); overflow: hidden; position: relative; }
.player-box video { display: block; width: 100%; max-height: 72vh; background: var(--ink); }
.markers { position: relative; height: 22px; margin: 8px 2px 0; border-radius: 8px; background: var(--panel-2); cursor: pointer; }
.markers .progress { position: absolute; left: 0; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent) 22%, transparent); border-radius: 8px; pointer-events: none; }
.markers .dot { position: absolute; top: 4px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: var(--accent); border: 2px solid var(--panel); cursor: pointer; }
.markers .dot.done { background: var(--ok); }
.markers .dot.editor { background: var(--ink); }
.markers .dot.draft { background: var(--panel); border: 2px solid var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin-top: 6px; }
kbd { font: 600 11px/1 Onest, sans-serif; padding: 2px 6px; border-radius: 5px; background: var(--panel); border: 1px solid var(--line); }

.side { display: flex; flex-direction: column; gap: 14px; }
.comments { display: flex; flex-direction: column; gap: 8px; }
.comment { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.comment.active { border-color: var(--accent); }
.comment.done { opacity: .55; }
.comment.done .ctext { text-decoration: line-through; }
.comment .chead { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.tc { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); padding: 2px 8px; border-radius: 6px; cursor: pointer; border: 0; font-size: 12px; }
.comment.editor .tc { color: var(--ink); background: var(--panel-2); }
.ctext { white-space: pre-wrap; word-break: break-word; }
.check { width: 18px; height: 18px; accent-color: var(--ok); margin: 0; flex: none; }

.composer { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; }
.composer .at { font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 500; }

.info-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }

.banner { border-radius: var(--radius); padding: 14px 16px; border: 1px solid var(--line); background: var(--panel); }
.banner.warn { border-color: color-mix(in srgb, var(--accent) 50%, transparent); background: color-mix(in srgb, var(--accent) 8%, var(--panel)); }
.banner.ok { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: color-mix(in srgb, var(--ok) 8%, var(--panel)); }

/* client cabinet */
.c-section { margin-bottom: 28px; }
.c-section h2 { margin-bottom: 12px; display: flex; align-items: center; gap: 8px; }
.c-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }

/* client kanban */
.c-board { display: grid; grid-template-columns: repeat(5, minmax(180px, 1fr)); gap: 12px; align-items: stretch; }
.c-col { background: var(--panel-2); border-radius: var(--radius); padding: 10px; border: 2px solid transparent; min-height: 120px; }
.c-col .col-head b { font-size: 15px; }
.c-col.need { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--panel-2)); }
.c-col .card .body { padding: 10px 12px 12px; }
.c-col .card-action { margin-top: 10px; width: 100%; }
@media (max-width: 1000px) {
  .c-board { grid-template-columns: 1fr; }
  .c-col.need { order: -1; }
  .c-col.empty-col { display: none; }
}

/* invoices */
.list-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.list-row:last-child { border-bottom: 0; }
.inv-table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.inv-table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); }
.inv-table td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.inv-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }

/* login */
.login-card { max-width: 420px; margin: 12vh auto 0; text-align: center; }
.tg-btn { background: #2aabee; border-color: #2aabee; color: #fff; width: 100%; }
.tg-btn:hover { background: #229ed9; border-color: #229ed9; }

/* drawing on the frame */
.ink { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; touch-action: none; }
.ink.on { pointer-events: auto; cursor: crosshair; outline: 3px solid var(--accent); outline-offset: -3px; border-radius: var(--radius); }
.composer-extras { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.composer-extras:empty { display: none; }
.tag .x { border: 0; background: none; padding: 0 0 0 6px; font-size: 12px; color: var(--muted); }
button.tag { border: 0; padding: 2px 8px; font-size: 12px; font-weight: 600; margin-top: 6px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); }

details.more { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: 14px; font-weight: 600; }

/* replies under a comment */
.reply { margin: 8px 0 0 10px; padding: 6px 10px; border-left: 3px solid var(--line); background: var(--panel-2); border-radius: 0 8px 8px 0; }
.reply.editor { border-left-color: var(--ink); }
.reply .chead { margin-bottom: 2px; }
.reply-box { margin-top: 8px; }
.reply-box .quick { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.reply-box .quick button { font-weight: 500; }

/* what changed since the previous version */
.prev-round { padding: 14px 16px; }
.prev-item { display: flex; align-items: flex-start; gap: 8px; width: 100%; text-align: left; white-space: normal; font-weight: 400;
  padding: 7px 8px; border: 0; border-radius: 8px; background: transparent; }
.prev-item:hover { background: var(--panel-2); }
.prev-item .mark { width: 18px; flex: none; text-align: center; color: var(--muted); font-weight: 700; }
.prev-item.is-done .mark { color: var(--ok); }
.prev-item .tc { flex: none; }

/* onboarding tour */
.tour-shade { position: fixed; inset: 0; z-index: 200; }
.tour-shade.full { background: rgba(36, 30, 32, .55); }
.tour-spot { position: fixed; z-index: 201; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(36, 30, 32, .55); outline: 3px solid var(--accent); pointer-events: none; transition: all .2s ease; }
.tour-bubble { position: fixed; z-index: 202; width: min(380px, calc(100vw - 24px)); background: var(--panel); border-radius: 18px; padding: 16px; box-shadow: 0 20px 60px rgba(36, 30, 32, .35); }
.tour-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.tour-face { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; flex: none; background: var(--sand); }
.tour-title { font-weight: 800; font-size: 17px; letter-spacing: -.01em; }
.tour-count { font-size: 12px; color: var(--muted); }
.tour-text { line-height: 1.5; margin-bottom: 12px; }
.tour-actions { display: flex; gap: 6px; align-items: center; }

/* support chat */
.support-btn { position: fixed; right: 18px; bottom: 18px; z-index: 90; border-radius: 99px; padding: 5px 16px 5px 5px; display: flex; align-items: center; gap: 9px; font-weight: 600; background: var(--ink); border-color: var(--ink); color: var(--accent-ink); box-shadow: 0 8px 24px rgba(36, 30, 32, .25); }
.support-face { position: relative; width: 40px; height: 40px; flex: none; }
.support-face img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; display: block; background: var(--cream, #ede6da); }
.support-face .dot { position: absolute; top: 0; right: 0; box-shadow: 0 0 0 2px var(--ink); }
.support-row { display: flex; gap: 6px; align-items: flex-end; align-self: flex-start; max-width: 90%; }
.support-row .support-msg { max-width: none; }
.support-ava { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; flex: none; }
.support-btn:hover { background: #3a3033; border-color: #3a3033; }
.support-btn .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); display: inline-block; }
.support-panel { position: fixed; right: 18px; bottom: 76px; z-index: 91; width: min(360px, calc(100vw - 24px)); height: min(480px, calc(100vh - 110px)); background: var(--panel);
  border-radius: 18px; box-shadow: 0 20px 60px rgba(36, 30, 32, .3); display: flex; flex-direction: column; overflow: hidden; }
.support-top { display: flex; gap: 10px; align-items: center; padding: 12px 14px; background: var(--ink); color: var(--accent-ink); }
.support-top img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.support-top .x { margin-left: auto; background: none; border: 0; color: var(--accent-ink); padding: 4px 8px; }
.support-msgs { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 8px; background: var(--bg); }
.support-msg { max-width: 82%; padding: 8px 11px; border-radius: 14px; white-space: pre-wrap; word-break: break-word; font-size: 14px; }
.support-msg.me { align-self: flex-end; background: var(--accent); color: var(--accent-ink); border-bottom-right-radius: 4px; }
.support-msg.them { align-self: flex-start; background: var(--panel); border: 1px solid var(--line); border-bottom-left-radius: 4px; }
.support-msg .time { display: block; font-size: 11px; opacity: .65; margin-top: 2px; }
.support-form { display: flex; gap: 8px; padding: 10px; border-top: 1px solid var(--line); }
.support-form textarea { min-height: 42px; max-height: 120px; }
.support-links { padding: 6px 12px 10px; font-size: 13px; display: flex; gap: 12px; flex-wrap: wrap; background: var(--bg); }
@media (max-width: 640px) { .support-btn .label { display: none; } .support-btn { padding: 4px; } }

/* Montio the mascot: soft edges melt the photo's own cream backdrop into the page. */
.mascot {
  display: block; width: 160px; height: 160px; object-fit: cover; margin: 0 auto;
  -webkit-mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
  mask-image: radial-gradient(closest-side, #000 72%, transparent 100%);
}
.mascot.sm { width: 110px; height: 110px; }
.mascot.lg { width: 220px; height: 220px; }
.hero { display: flex; align-items: center; gap: 18px; }
.hero .mascot { margin: 0; flex: none; }
.empty-state { text-align: center; padding: 28px 16px; }
.empty-state h2 { margin: 6px 0 6px; }
.empty-state p { margin: 0 auto 16px; max-width: 420px; color: var(--muted); }
@media (max-width: 640px) { .hero { flex-direction: column; text-align: center; } }

.toast-action { margin-left: 12px; padding: 4px 10px; font-size: 13px; border-radius: 8px; background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.today { color: var(--accent); font-weight: 700; }
.soon { color: var(--accent); }
.card.is-late { border-color: var(--danger); }
.card.is-today { border-color: var(--accent); }
.card.file-over { outline: 3px dashed var(--accent); outline-offset: -3px; }
.card .uploading { margin-top: 8px; }
.tag.fresh { background: color-mix(in srgb, var(--st-new) 15%, transparent); color: var(--st-new); }
.tag.paid { background: color-mix(in srgb, var(--ok) 14%, transparent); color: var(--ok); }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--ink); color: var(--accent-ink); padding: 11px 18px; border-radius: 12px; font-weight: 600; z-index: 100; box-shadow: 0 8px 30px rgba(36, 30, 32, .3); }
.empty { color: var(--muted); text-align: center; padding: 30px 10px; font-size: 14px; }
.progressbar { height: 6px; background: var(--panel-2); border-radius: 99px; overflow: hidden; margin-top: 10px; }
.progressbar > div { height: 100%; width: 0; background: var(--accent); transition: width .2s; }

@media (max-width: 1000px) {
  .review { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(5, 250px); }
}
@media (max-width: 640px) {
  .wrap { padding: 16px; }
  .top { padding: 10px 16px; gap: 10px; }
  .nav a { padding: 6px 8px; }
  .me span:not(.avatar) { display: none; }
  .info-grid, .grid-2 { grid-template-columns: 1fr; }
  .player-box video { max-height: 55vh; }
  .hint { display: none; }
  /* On a phone the comment box goes right under the video: pause, type, done. */
  .side .composer { order: -1; }
  .actions-row { flex-direction: column; align-items: stretch; }
}

/* compare two versions */
.modal.wide { max-width: 980px; }
.compare { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.compare video { width: 100%; max-height: 62vh; background: #000; border-radius: 12px; display: block; }
.compare select { width: auto; flex: 1; }

.linklike { background: none; border: 0; padding: 0; min-height: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; }
.linklike:hover { color: var(--ink); }

.search { max-width: 220px; }
@media (max-width: 640px) { .search { max-width: none; flex: 1 1 100%; order: 10; } }

.email-list { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

/* Room at the bottom so the Montio chat button never covers the last buttons on a page. */
body:has(.support-btn) .wrap { padding-bottom: 96px; }
.card.busy { cursor: progress; }
.card .upload-pct { margin-top: 4px; }

/* small "since when" date on cards and the history of a video */
.stage-since { margin-top: 6px; font-size: 11px; color: var(--muted); text-align: right; }
.history { margin-top: 16px; }
.history summary { cursor: pointer; font-weight: 600; font-size: 14px; }
.history ol { list-style: none; margin: 10px 0 0; padding: 0 0 0 14px; border-left: 2px solid var(--line); }
.history li { position: relative; padding: 0 0 10px 10px; font-size: 13px; }
.history li::before { content: ''; position: absolute; left: -20px; top: 5px; width: 8px; height: 8px; border-radius: 50%; background: var(--c, var(--muted)); }
.history li .when { color: var(--muted); font-size: 12px; display: block; }
