/* ============================================================
CriatiViz Client Portal — design system
Identity: navy #0B1D33 · orange #FF8A00 · off-white #F7F2EC
Fonts: Roboto / Roboto Condensed (self-hosted variable fonts)
============================================================ */

@font-face {
  font-family: 'Roboto';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/Roboto-var.woff2') format('woff2');
}
@font-face {
  font-family: 'Roboto Condensed';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/RobotoCondensed-var.woff2') format('woff2');
}

:root {
  --navy: #0B1D33;
  --navy-deep: #071527;
  --navy-soft: #12294a;
  --orange: #FF8A00;
  --orange-soft: rgba(255, 138, 0, 0.12);
  --offwhite: #F7F2EC;
  --white: #FFFFFF;
  --ink: #0B1D33;
  --ink-muted: rgba(11, 29, 51, 0.68);      /* AA-friendly muted text */
  --orange-text: #A85A00;                   /* orange for TEXT on light bg (4.5:1) */
  --danger: #d64541;
  --danger-text: #b42320;
  --success: #1d9e57;
  --info: #2f6fed;
  --line: rgba(11, 29, 51, 0.10);
  --radius: 12px;
  --shadow: 0 10px 30px rgba(4, 12, 24, 0.35);
  --font: "Roboto", -apple-system, "Segoe UI", Arial, sans-serif;
  --font-cond: "Roboto Condensed", "Roboto", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body.cvp-portal {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  color: var(--ink);
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 138, 0, 0.10), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, #0d2240 100%);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------- top bar ---------------- */
.cvp-topbar {
  display: flex;
  align-items: center;
  gap: 28px;
  padding: 14px 32px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.cvp-brand { display: flex; align-items: center; gap: 14px; text-decoration: none; }
.cvp-brand__logo { height: 30px; display: block; }
.cvp-brand__tag {
  font-size: 9.5px; text-transform: uppercase; letter-spacing: 2.5px; color: rgba(255,255,255,0.5);
  align-self: flex-end; padding-bottom: 3px;
  border-left: 1px solid rgba(255,255,255,0.18); padding-left: 14px; line-height: 1.4;
}

/* inline SVG icons */
.cvp-ic { width: 1.15em; height: 1.15em; vertical-align: -0.2em; flex: none; }
.cvp-ic--orange { color: var(--orange); }

.cvp-nav { display: flex; gap: 4px; margin-left: 12px; }
.cvp-nav__link {
  color: rgba(255,255,255,0.75); text-decoration: none; font-size: 14px;
  padding: 7px 14px; border-radius: 8px; transition: 0.15s;
}
.cvp-nav__link:hover { color: var(--white); background: rgba(255,255,255,0.08); }

.cvp-topbar__user { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.cvp-user-chip__name { color: var(--white); font-weight: 500; font-size: 14px; }
.cvp-user-chip__role { color: var(--orange); font-size: 11px; text-transform: uppercase; letter-spacing: 1px; }

/* ---------------- layout ---------------- */
.cvp-main { flex: 1; width: 100%; max-width: 1400px; margin: 0 auto; padding: 28px 32px 60px; }

.cvp-page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.cvp-page-head__actions { display: flex; gap: 10px; flex-wrap: wrap; }
.cvp-area-label {
  font-family: var(--font-cond); color: var(--orange); font-weight: 700;
  text-transform: uppercase; letter-spacing: 3px; font-size: 13px;
}
.cvp-page-title { font-family: var(--font-cond); font-weight: 700; font-size: 32px; color: var(--white); letter-spacing: 1px; }
.cvp-page-sub { color: rgba(255,255,255,0.6); font-size: 14px; }

.cvp-project-hero { position: relative; display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; margin-bottom: 18px; flex-wrap: wrap; }
.cvp-project-hero__id { text-align: right; position: relative; z-index: 1; }
.cvp-hero-id-label { display: block; color: rgba(255,255,255,0.55); font-size: 11px; text-transform: uppercase; letter-spacing: 2px; }
.cvp-hero-id-value { font-family: var(--font-cond); font-weight: 700; font-size: 30px; color: var(--orange); letter-spacing: 1px; }
/* diagonal-lines + orange corner decoration, like the reference boards */
.cvp-hero-deco {
  position: absolute; top: -28px; right: -32px; width: 240px; height: 46px; pointer-events: none; z-index: 0;
  background:
    linear-gradient(135deg, transparent calc(100% - 42px), var(--orange) calc(100% - 42px)),
    repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,138,0,0.15) 14px 15px);
}
.cvp-project-hero__main { position: relative; z-index: 1; }
.cvp-project-hero__id { z-index: 1; }

/* ---------------- tabs ---------------- */
.cvp-tabs { display: flex; gap: 8px; margin-bottom: 18px; flex-wrap: wrap; }
.cvp-tab {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.7); text-decoration: none; font-family: var(--font-cond);
  font-size: 15px; letter-spacing: 0.5px; padding: 10px 18px;
  border: 1px solid rgba(255,255,255,0.14); border-radius: 10px; transition: 0.15s;
}
.cvp-tab__num { color: var(--orange); font-weight: 700; }
.cvp-tab:hover { background: rgba(255,255,255,0.06); color: var(--white); }
.cvp-tab--active { background: var(--white); color: var(--navy); border-color: var(--white); font-weight: 700; }
.cvp-tab--active .cvp-tab__num { color: var(--orange-text); }

/* ---------------- boards (white cards) ---------------- */
.cvp-board {
  background: var(--white); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 26px 28px; margin-bottom: 26px;
}
.cvp-board--narrow { max-width: 720px; }
/* #171 — centraliza a coluna do My Team sem tocar nos outros formulários. */
.cvp-narrow-page { max-width: 760px; margin: 0 auto; }
.cvp-board--centered { margin-left: auto; margin-right: auto; }
.cvp-board--flush { padding: 0; overflow: hidden; }
.cvp-board__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.cvp-board__head--pad { padding: 22px 28px 0; margin-bottom: 14px; }
.cvp-board__title { font-family: var(--font-cond); font-size: 20px; color: var(--navy); letter-spacing: 0.5px; }
.cvp-center { text-align: center; }

/* ---------------- buttons ---------------- */
.cvp-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  font-family: var(--font); font-weight: 500; font-size: 14px;
  border: none; border-radius: 9px; padding: 10px 18px; cursor: pointer;
  text-decoration: none; transition: 0.15s; line-height: 1.2;
}
.cvp-btn--sm { padding: 6px 12px; font-size: 13px; }
.cvp-btn--block { width: 100%; }
.cvp-btn--primary { background: linear-gradient(135deg, var(--orange), #ff9d2e); color: #fff; box-shadow: 0 4px 14px rgba(255,138,0,0.35); }
.cvp-btn--primary:hover { filter: brightness(1.06); transform: translateY(-1px); }
.cvp-btn--outline { background: transparent; color: var(--orange-text); border: 1.5px solid var(--orange); }
.cvp-btn--outline:hover { background: var(--orange-soft); }
.cvp-page-head__actions .cvp-btn--outline, .cvp-topbar .cvp-btn--outline { color: var(--orange); } /* on navy bg keep brand orange */
.cvp-btn--ghost { background: rgba(11,29,51,0.06); color: inherit; }
.cvp-topbar .cvp-btn--ghost { background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.85); }
.cvp-btn--ghost:hover { filter: brightness(1.1); }
.cvp-btn--approve { background: #1d9e57; color: #fff; }
.cvp-btn--revision { background: #d64541; color: #fff; }

.cvp-link { color: var(--orange-text); font-weight: 500; text-decoration: none; }
.cvp-link:hover { text-decoration: underline; }
.cvp-link--sm { font-size: 12px; }

/* ---------------- forms ---------------- */
.cvp-form { display: flex; flex-direction: column; gap: 14px; }
.cvp-form--panel { margin-top: 16px; padding: 18px; background: var(--offwhite); border-radius: 10px; }
.cvp-form--mini { gap: 8px; margin-top: 8px; text-align: left; }
.cvp-form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; align-items: start; }
.cvp-form__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.cvp-label { display: flex; flex-direction: column; gap: 5px; font-size: 13px; font-weight: 500; color: var(--ink); }
.cvp-input {
  font-family: var(--font); font-size: 14px; color: var(--ink);
  background: var(--white); border: 1.5px solid var(--line); border-radius: 8px;
  padding: 9px 12px; width: 100%; transition: border-color 0.15s;
}
.cvp-input:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px var(--orange-soft); }
.cvp-input--search { max-width: 300px; }
.cvp-input--code { font-family: var(--font-cond); font-weight: 700; letter-spacing: 1px; }
.cvp-input--mini { padding: 4px 6px; font-size: 12px; width: auto; }
textarea.cvp-input { resize: vertical; }
.cvp-hint { font-size: 12.5px; color: var(--ink-muted); background: var(--offwhite); border-left: 3px solid var(--orange); padding: 8px 12px; border-radius: 0 8px 8px 0; }
.cvp-hint-inline { font-weight: 400; color: var(--ink-muted); font-size: 12px; }
.cvp-search { display: flex; gap: 8px; }
.cvp-inline-form { display: inline; }
.cvp-archived-companies { margin: 10px 14px 4px; font-size: 13px; color: var(--ink-muted); }
.cvp-archived-companies summary { cursor: pointer; }
.cvp-archived-companies ul { list-style: none; padding: 8px 0 0; margin: 0; }
.cvp-archived-companies li { display: flex; justify-content: space-between; align-items: center; padding: 4px 0; max-width: 360px; }
/* #62 — per-project access rows in the user form */
.cvp-user-proj { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.cvp-user-proj span { font-size: 13px; }
.cvp-input--sm { width: auto; min-width: 120px; padding: 6px 10px; font-size: 13px; }
.cvp-user-projects { margin: 10px 0; }

/* ---------------- flash ---------------- */
.cvp-flash {
  max-width: 1400px; margin: 14px auto 0; width: calc(100% - 64px);
  padding: 11px 16px; border-radius: 10px; font-size: 14px; font-weight: 500;
}
.cvp-flash--ok { background: #e8f7ee; color: #14713c; border: 1px solid #bfe8d0; }
.cvp-flash--error { background: #fdecec; color: #9c2320; border: 1px solid #f3c6c4; }

/* ---------------- dashboard cards ---------------- */
.cvp-cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.cvp-project-card {
  display: block; text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 12px; padding: 18px;
  transition: 0.15s; background: var(--white);
}
.cvp-project-card:hover { border-color: var(--orange); box-shadow: 0 6px 18px rgba(255,138,0,0.15); transform: translateY(-2px); }
.cvp-project-card__top { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 10px; }
.cvp-code { font-family: var(--font-cond); font-weight: 700; color: var(--orange-text); letter-spacing: 1px; }
.cvp-project-card__name { font-family: var(--font-cond); font-size: 19px; margin-bottom: 2px; }
.cvp-project-card__company { color: var(--ink-muted); font-size: 13px; margin-bottom: 12px; }
.cvp-progress { height: 8px; background: rgba(11,29,51,0.08); border-radius: 99px; overflow: hidden; }
.cvp-progress--lg { height: 12px; }
.cvp-progress__bar { height: 100%; background: linear-gradient(90deg, var(--orange), #ffb35c); border-radius: 99px; transition: width 0.4s; }
.cvp-progress__label { font-size: 12px; color: var(--ink-muted); margin-top: 5px; display: inline-block; }

/* ---------------- tables ---------------- */
.cvp-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.cvp-table th {
  text-align: left; font-family: var(--font-cond); font-size: 12px; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--ink-muted); padding: 10px 12px; border-bottom: 2px solid var(--line);
}
.cvp-table td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.cvp-table td:last-child, .cvp-table th:last-child { text-align: right; }
.cvp-table .cvp-row-actions { justify-content: flex-end; }
.cvp-td-num { text-align: center; width: 90px; }
.cvp-td-strong { font-weight: 500; }
.cvp-td-wrap { max-width: 260px; white-space: normal; }
.cvp-empty { color: var(--ink-muted); font-style: italic; padding: 14px; }
.cvp-muted { color: var(--ink-muted); }

/* ---------------- board 01 ---------------- */
.cvp-info-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(225px, 1fr)); gap: 14px; margin-bottom: 22px; }
.cvp-info-card {
  border: 1px solid var(--line); border-radius: 12px; padding: 16px 18px;
  display: flex; flex-direction: column; gap: 3px; background: #fdfcfb;
  box-shadow: 0 1px 3px rgba(11,29,51,0.04); transition: 0.15s;
}
.cvp-info-card:hover { border-color: rgba(255,138,0,0.45); box-shadow: 0 4px 14px rgba(11,29,51,0.07); }
.cvp-info-card__icon { color: var(--orange); margin-bottom: 4px; }
.cvp-info-card__icon .cvp-ic { width: 22px; height: 22px; }
.cvp-info-card__label { font-family: var(--font-cond); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1.8px; color: #5a6774; }
.cvp-info-card__value { font-weight: 700; font-size: 16.5px; color: var(--navy); line-height: 1.3; }
.cvp-info-card__sub { font-size: 12px; color: var(--ink-muted); }
.cvp-navy-pill {
  display: inline-block; background: var(--navy); color: #fff; font-family: var(--font-cond);
  font-weight: 700; font-size: 12px; letter-spacing: 1.5px; padding: 6px 16px; border-radius: 99px;
}

.cvp-progress-block, .cvp-stage-block { border: 1px solid var(--line); border-radius: 12px; padding: 20px 24px; margin-bottom: 16px; background: #fdfcfb; }
.cvp-progress-block__grid { display: grid; grid-template-columns: 220px 130px 1fr; gap: 24px; align-items: center; }
.cvp-progress-block__label { display: flex; flex-direction: column; gap: 2px; }
.cvp-block-label { display: flex; align-items: center; gap: 8px; font-family: var(--font-cond); font-weight: 700; font-size: 14px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--navy); margin-bottom: 4px; }
.cvp-block-sub { font-size: 12px; color: var(--ink-muted); }
.cvp-progress-pct-wrap { display: flex; flex-direction: column; align-items: center; }
.cvp-progress-pct { font-family: var(--font-cond); font-weight: 700; font-size: 46px; color: var(--navy); line-height: 1; }
.cvp-progress-pct-label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--ink-muted); }
.cvp-progress-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--ink-muted); margin-top: 7px; }

.cvp-stage-track { display: flex; align-items: flex-start; margin-top: 20px; }
.cvp-stage { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 9px; position: relative; text-align: center; }
.cvp-stage::before {
  content: ''; position: absolute; top: 21px; left: -50%; width: 100%; height: 2px;
  background: rgba(11,29,51,0.12);
}
.cvp-stage:first-child::before { display: none; }
.cvp-stage--done::before, .cvp-stage--current::before { background: var(--orange); }
.cvp-stage__dot {
  width: 44px; height: 44px; border-radius: 50%; background: var(--white);
  border: 2px solid rgba(11,29,51,0.18); z-index: 1;
  display: flex; align-items: center; justify-content: center; color: #7c8794; transition: 0.2s;
}
.cvp-stage__dot .cvp-ic { width: 19px; height: 19px; }
.cvp-stage--done .cvp-stage__dot { border-color: var(--orange); background: #fff; color: var(--orange); }
.cvp-stage--current .cvp-stage__dot { border-color: var(--orange); background: var(--orange); color: #fff; box-shadow: 0 0 0 6px var(--orange-soft); }
.cvp-stage__name { font-family: var(--font-cond); font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: #5a6774; max-width: 116px; }
.cvp-stage--current .cvp-stage__name { color: var(--orange); }
.cvp-stage-warning { margin-top: 12px; color: #9c2320; font-weight: 500; font-size: 13.5px; }

.cvp-howitworks {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--offwhite); border-radius: 10px; padding: 14px 18px;
  font-size: 13px; color: #4c5a68; border: 1px solid rgba(11,29,51,0.07);
}
.cvp-howitworks__icon { color: var(--orange); padding-top: 1px; }
.cvp-howitworks strong { color: var(--navy); }

/* ---------------- board 02 ---------------- */
.cvp-b2-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 20px; margin-bottom: 20px; }
.cvp-b2-cell, .cvp-b2-row { border: 1px solid var(--line); border-radius: 12px; padding: 20px 22px; background: #fdfcfb; }
.cvp-b2-row { margin-bottom: 20px; }
.cvp-b2-story { display: grid; grid-template-columns: 1fr 1.1fr; gap: 20px; align-items: start; }
.cvp-b2-story__cover { display: block; border-radius: 10px; overflow: hidden; box-shadow: 0 6px 18px rgba(11,29,51,0.18); }
.cvp-b2-story__cover img { width: 100%; height: 100%; min-height: 220px; object-fit: cover; display: block; transition: transform 0.25s; }
.cvp-b2-story__cover:hover img { transform: scale(1.03); }
.cvp-b2-row--folder { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cvp-b2-folder__left { display: flex; align-items: center; gap: 16px; }
.cvp-b2-folder__icon {
  width: 52px; height: 52px; border-radius: 50%; background: var(--navy); color: #fff;
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.cvp-b2-folder__icon .cvp-ic { width: 22px; height: 22px; }
/* Drive access granted by hand — full width, below the folder button, so the
   e-mail field never squeezes the row it shares. */
.cvp-drive-access { flex-basis: 100%; border-top: 1px solid var(--line); margin-top: 16px; padding-top: 14px; font-size: 13px; }
.cvp-drive-access__form { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cvp-drive-access__form .cvp-input { flex: 1 1 260px; max-width: 340px; }
.cvp-longtext { white-space: pre-line; }
.cvp-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.cvp-chip {
  font-family: var(--font-cond); font-size: 11.5px; font-weight: 700; letter-spacing: 1.6px;
  padding: 6px 14px; border-radius: 99px; background: var(--navy); color: var(--orange);
}
.cvp-chip--orange { background: var(--orange); color: #fff; }
.cvp-chip--ghost { background: transparent; color: #5a6774; border: 1.5px solid var(--line); }
.cvp-mt { margin-top: 20px; }
.cvp-track { display: flex; align-items: center; gap: 14px; margin-top: 14px; flex-wrap: wrap; }
.cvp-track__play {
  width: 42px; height: 42px; border-radius: 50%; border: 2px solid var(--navy); color: var(--navy);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.cvp-track__meta { display: flex; flex-direction: column; line-height: 1.35; }
.cvp-track__label { font-size: 10px; text-transform: uppercase; letter-spacing: 1.6px; color: var(--ink-muted); }
.cvp-ref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 14px; margin-top: 14px; }
.cvp-ref-card { text-decoration: none; color: var(--ink); }
.cvp-ref-card__thumb {
  position: relative; display: block; aspect-ratio: 16/9; border-radius: 9px; overflow: hidden;
  background: linear-gradient(145deg, #13273f, #0a1626);
}
.cvp-ref-card__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cvp-ref-card__play {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #fff;
}
.cvp-ref-card__play .cvp-ic { width: 30px; height: 30px; filter: drop-shadow(0 2px 6px rgba(0,0,0,0.5)); transition: 0.15s; }
.cvp-ref-card:hover .cvp-ref-card__play .cvp-ic { transform: scale(1.15); color: var(--orange); }
.cvp-ref-card__name { display: block; font-size: 12.5px; font-weight: 500; margin-top: 6px; color: #4c5a68; }
.cvp-b2-foot { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 18px; border-top: 1px solid var(--line); padding-top: 20px; }
.cvp-b2-foot__item { display: flex; gap: 12px; align-items: flex-start; }
.cvp-b2-foot__icon { color: var(--orange); flex: none; padding-top: 2px; }
.cvp-b2-foot__icon .cvp-ic { width: 22px; height: 22px; }
.cvp-b2-foot__label { display: block; font-family: var(--font-cond); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: var(--orange); margin-bottom: 3px; }
.cvp-b2-foot p { font-size: 13.5px; color: #4c5a68; }

/* ---------------- board 03 — take board (rows = takes, columns = attributes) ---------------- */
/* Take Board — Excel-style auto-fit: the table always fits the viewport width.
   Columns share the width via <colgroup>; long content truncates with ellipsis
   and opens in a modal. Horizontal scroll only survives as a narrow-screen
   fallback (< 1100px), where 12 columns physically cannot fit. */
/* #56 — vertical scroll box so the header row can stay frozen while the take
   rows scroll (see the last take and the column titles at the same time). */
.cvp-tk-scroll { overflow-x: visible; overflow-y: auto; max-height: calc(100vh - 200px); }
.cvp-tk { border-collapse: separate; border-spacing: 0; font-size: 12.5px; width: 100%; table-layout: fixed; }
.cvp-tk th, .cvp-tk td { vertical-align: top; text-align: left; }
.cvp-col-take     { width: 9%; }
.cvp-col-img      { width: 11%; }
.cvp-col-story    { width: 14.5%; }
.cvp-col-story-sm { width: 10%; }   /* storyboard column — reduced */
.cvp-col-sm       { width: 7.5%; }
.cvp-col-xs       { width: 5%; }    /* audio FX — reduced */
.cvp-col-md       { width: 9.5%; }
.cvp-col-prio     { width: 8%; }    /* priority — widened 5% */
.cvp-col-client   { width: 14%; }

/* header row (dark navy, one label per attribute column) — compact */
.cvp-tk__head {
  background: var(--navy); color: #fff; padding: 10px 9px;
  font-family: var(--font-cond); font-weight: 700; font-size: 10.5px;
  text-transform: uppercase; letter-spacing: 1.1px; line-height: 1.3;
  border-left: 1px solid rgba(255,255,255,0.09); border-bottom: 1px solid rgba(255,255,255,0.12);
  vertical-align: middle; white-space: normal; overflow-wrap: break-word;
  /* #56 — freeze the header row on vertical scroll of .cvp-tk-scroll. */
  position: sticky; top: 0; z-index: 2;
}
.cvp-tk__head--take { position: sticky; left: 0; z-index: 3; border-left: none; }

/* take column (first, sticky, navy — one row per take) — compact */
.cvp-tk__take {
  position: sticky; left: 0; z-index: 2; background: var(--navy); color: #fff;
  padding: 10px 9px;
  border-bottom: 1px solid rgba(255,255,255,0.09);
  vertical-align: middle; overflow-wrap: break-word;
}
.cvp-tk__take::before { content: ''; position: absolute; inset: 0; background: var(--navy); z-index: -1; }
.cvp-tk__take > * { position: relative; }
.cvp-tk__takenum { display: block; font-family: var(--font-cond); font-weight: 700; font-size: 13.5px; letter-spacing: 1.6px; color: var(--orange); }
.cvp-tk__takename { display: block; font-size: 12px; font-weight: 400; color: rgba(255,255,255,0.85); margin-top: 2px; line-height: 1.35; }
.cvp-tk__row--awaiting .cvp-tk__take { box-shadow: inset 3px 0 0 var(--orange); }

/* attribute cells — compact, fixed layout truncates instead of stretching */
.cvp-tk__cell {
  background: #fff; padding: 9px 9px;
  border-left: 1px solid var(--line); border-bottom: 1px solid var(--line);
  font-size: 12.5px; color: #33404d; line-height: 1.45;
  overflow: hidden; overflow-wrap: break-word;
}
.cvp-tk__row:nth-child(even) .cvp-tk__cell { background: #fbfbfa; }
.cvp-tk__cell--img { padding: 7px; }
.cvp-tk__cell--dur { font-variant-numeric: tabular-nums; white-space: nowrap; }
.cvp-tk__cell--internal { background: #fdf7ea !important; }
.cvp-tk .cvp-btn--sm { padding: 4px 8px; font-size: 11px; }
.cvp-tk .cvp-input--mini { width: 100%; max-width: 130px; font-size: 11.5px; padding: 4px 6px; }
.cvp-tk .cvp-pill { white-space: normal; line-height: 1.3; }
.cvp-tk__img { width: 100%; aspect-ratio: 16/9; object-fit: cover; border-radius: 8px; display: block; transition: 0.15s; }
.cvp-tk__img:hover { transform: scale(1.02); box-shadow: 0 6px 16px rgba(11,29,51,0.25); }
.cvp-tk__noimg {
  display: flex; align-items: center; justify-content: center; aspect-ratio: 16/9;
  border: 1.5px dashed var(--line); border-radius: 8px; color: #b9c2cb;
}
.cvp-tk__noimg .cvp-ic { width: 26px; height: 26px; }
/* #170 — a coluna Human Figures cortava "AI Custom Characters". Em table-layout
   fixed a coluna é estreita; em vez de rebalancear a tabela toda, o texto passa
   a QUEBRAR (alinhado ao topo, ícone fixo) e o rótulo aparece inteiro em 2 linhas
   em vez de sumir na borda. No celular o #176 troca a tabela por cartões. */
.cvp-hf { display: inline-flex; align-items: flex-start; gap: 6px; white-space: normal; word-break: break-word; }
.cvp-hf .cvp-ic { color: #8b5cf6; flex: none; margin-top: 1px; }
.cvp-client-comment { font-size: 12.5px; margin: 8px 0 4px; background: var(--offwhite); padding: 7px 10px; border-radius: 8px; }
.cvp-act summary { cursor: pointer; margin-top: 7px; list-style: none; }
.cvp-act summary::-webkit-details-marker { display: none; }
.cvp-act[open] summary { color: var(--navy); }

/* ---------------- pills / statuses ---------------- */
.cvp-pill {
  display: inline-block; font-family: var(--font-cond); font-weight: 700; font-size: 11px;
  letter-spacing: 1.2px; text-transform: uppercase; padding: 5px 12px; border-radius: 7px;
  white-space: nowrap;
}
.cvp-pill--plain { background: rgba(11,29,51,0.08); color: var(--navy); }
/* soft pastel status pills (reference boards) */
.cvp-st-analyzing            { background: #e8ecf1; color: #47566a; }
.cvp-st-storyboarding        { background: #ffe4c2; color: #a35200; }
.cvp-st-animation            { background: #dbe7ff; color: #1d4ed8; }
.cvp-st-preview              { background: #e9dcff; color: #6d28d9; }
.cvp-st-preparing-for-render { background: #d2f1f0; color: #0e7472; }
.cvp-st-render-queue         { background: #d7f2e0; color: #157a3c; }
.cvp-st-finalized            { background: #c9e7d4; color: #0f5132; }
.cvp-st-revision-requested   { background: #ffdcda; color: #b42320; }
.cvp-cs-pending              { background: #e8ecf1; color: #47566a; }
.cvp-cs-approved             { background: #d7f2e0; color: #157a3c; }
.cvp-cs-revision-requested   { background: #ffdcda; color: #b42320; }
/* filter dots need a solid color regardless of pill text color */
.cvp-filter__dot.cvp-st-analyzing            { background: #64748b; }
.cvp-filter__dot.cvp-st-storyboarding        { background: #ff8a00; }
.cvp-filter__dot.cvp-st-animation            { background: #2f6fed; }
.cvp-filter__dot.cvp-st-preview              { background: #8b5cf6; }
.cvp-filter__dot.cvp-st-preparing-for-render { background: #0ea5a4; }
.cvp-filter__dot.cvp-st-render-queue         { background: #16a34a; }
.cvp-filter__dot.cvp-st-finalized            { background: #14532d; }
.cvp-filter__dot.cvp-st-revision-requested   { background: #d64541; }
.cvp-role-admin    { background: var(--navy); color: #fff; }
.cvp-role-approver { background: var(--orange); color: #fff; }
.cvp-role-viewer   { background: #e8ecf1; color: #47566a; }
.cvp-prio-high   { color: #d64541; font-weight: 700; }
.cvp-prio-medium { color: #ff8a00; font-weight: 700; }
.cvp-prio-low    { color: #1d9e57; font-weight: 700; }
select.cvp-prio-high   { color: #d64541; }
select.cvp-prio-medium { color: #d97400; }
select.cvp-prio-low    { color: #1d9e57; }
.cvp-dot { font-size: 10px; }

/* ---------------- edit panels ---------------- */
.cvp-edit-panel { margin-top: 18px; }
.cvp-edit-panel > summary { list-style: none; display: inline-flex; cursor: pointer; }
.cvp-edit-panel > summary::-webkit-details-marker { display: none; }

/* ---------------- login ---------------- */
.cvp-login-page { align-items: center; justify-content: center; display: flex; }
.cvp-login-wrap { width: 100%; max-width: 420px; padding: 24px; }
.cvp-login-card { background: var(--white); border-radius: 16px; box-shadow: var(--shadow); padding: 0 0 30px; overflow: hidden; }
.cvp-login-card .cvp-form, .cvp-login-card > .cvp-flash, .cvp-login-card > .cvp-login-foot { margin-left: 34px; margin-right: 34px; }
.cvp-login-brandbar {
  background:
    radial-gradient(400px 130px at 85% -30%, rgba(255,138,0,0.25), transparent 65%),
    var(--navy);
  border-bottom: 4px solid var(--orange);
  padding: 30px 34px; text-align: center;
}
.cvp-login-logo { height: 40px; max-width: 100%; }
.cvp-login-brand { text-align: center; margin: 20px 34px 22px; }
.cvp-login-title { font-family: var(--font-cond); font-weight: 700; font-size: 24px; letter-spacing: 2px; color: var(--navy); }
.cvp-login-sub { font-size: 13px; color: var(--ink-muted); margin-top: 4px; }
.cvp-login-foot { text-align: center; font-size: 12px; color: var(--ink-muted); margin-top: 20px; }
.cvp-login-card .cvp-flash { width: auto; margin: 0 34px 14px; }

/* ---------------- footer ---------------- */
.cvp-footer {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 18px 32px; border-top: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55); font-size: 12.5px;
}
.cvp-footer__logo { height: 20px; opacity: 0.85; }
.cvp-footer__lock { margin-left: auto; display: inline-flex; align-items: center; gap: 10px; }
.cvp-footer__lockring {
  width: 34px; height: 34px; border-radius: 50%; border: 1.5px solid var(--orange); color: var(--orange);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}

/* ---------------- toasts ---------------- */
.cvp-toasts { position: fixed; top: 16px; right: 16px; z-index: 1000; display: flex; flex-direction: column; gap: 10px; max-width: min(420px, calc(100vw - 32px)); }
.cvp-toast {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 13px 16px; border-radius: 12px; font-size: 14px; font-weight: 500;
  box-shadow: 0 10px 30px rgba(4,12,24,0.35);
  opacity: 0; transform: translateX(24px); transition: opacity 0.35s, transform 0.35s;
}
.cvp-toast--show { opacity: 1; transform: translateX(0); }
.cvp-toast--ok { background: #0f4d2c; color: #d8f5e4; border: 1px solid #1d9e57; }
.cvp-toast--error { background: #5c1513; color: #ffe3e2; border: 1px solid #d64541; }
.cvp-toast__x { margin-left: auto; background: none; border: none; color: inherit; font-size: 18px; cursor: pointer; line-height: 1; opacity: 0.7; }
.cvp-toast__x:hover { opacity: 1; }

/* ---------------- stats ---------------- */
.cvp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 22px; }
.cvp-stat {
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 12px; padding: 16px 18px; display: flex; flex-direction: column;
}
.cvp-stat__ic { color: var(--orange); margin-bottom: 6px; }
.cvp-stat__ic .cvp-ic { width: 20px; height: 20px; }
.cvp-stat__n { font-family: var(--font-cond); font-weight: 700; font-size: 34px; color: var(--white); line-height: 1.1; }
.cvp-stat__l { font-size: 12px; text-transform: uppercase; letter-spacing: 1.5px; color: rgba(255,255,255,0.55); }
.cvp-stat--warn .cvp-stat__n { color: #ff9d9a; }
.cvp-stat--ok .cvp-stat__n { color: #7fe0a9; }

/* ---------------- attention / await ---------------- */
.cvp-board--attention { border-left: 5px solid #d64541; }
.cvp-attention-list { display: flex; flex-direction: column; }
.cvp-attention-item {
  display: flex; align-items: center; gap: 14px; padding: 12px 8px;
  text-decoration: none; color: var(--ink); border-bottom: 1px solid var(--line); transition: background 0.15s;
}
.cvp-attention-item:last-child { border-bottom: none; }
.cvp-attention-item:hover { background: var(--offwhite); }
.cvp-attention-item__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.cvp-attention-item__body .cvp-muted { font-size: 12.5px; }
.cvp-attention-item__go { margin-left: auto; color: var(--orange); font-size: 20px; }

.cvp-await-banner {
  display: block; text-decoration: none; margin-bottom: 18px;
  background: linear-gradient(90deg, rgba(255,138,0,0.18), rgba(255,138,0,0.06));
  border: 1px solid rgba(255,138,0,0.5); color: #ffd9a8;
  padding: 13px 18px; border-radius: 12px; font-size: 14.5px; transition: 0.15s;
}
.cvp-await-banner:hover { background: rgba(255,138,0,0.25); color: #fff; }
.cvp-await-inline { color: #b45309; background: rgba(255,138,0,0.12); border-radius: 99px; padding: 5px 13px; font-size: 13px; font-weight: 500; }
/* The schedule cannot be met. Red rather than the orange above: that one is a
   nudge ("takes are waiting"), this one says the dates do not add up. */
.cvp-schedule-warn {
  display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px;
  background: rgba(192,57,43,0.16); border: 1px solid rgba(192,57,43,0.75);
  color: rgba(255,255,255,0.92); padding: 13px 18px; border-radius: 12px;
  font-size: 14px; line-height: 1.5;
}
.cvp-schedule-warn .cvp-ic { color: #ff8a80; flex-shrink: 0; margin-top: 2px; }

/* ---------------- filters ---------------- */
.cvp-filters { display: flex; flex-wrap: wrap; gap: 8px; padding: 0 28px 14px; }
.cvp-filter {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: 12.5px; font-weight: 500; color: var(--ink-muted);
  border: 1.5px solid var(--line); border-radius: 99px; padding: 5px 13px; transition: 0.15s;
}
.cvp-filter:hover { border-color: var(--orange); color: var(--ink); }
.cvp-filter--on { background: var(--navy); border-color: var(--navy); color: #fff; }
.cvp-filter__dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }

/* ---------------- thread / history ---------------- */
.cvp-thread { list-style: none; margin-top: 8px; display: flex; flex-direction: column; gap: 8px; max-height: 260px; overflow-y: auto; padding-right: 4px; }
.cvp-thread__item { border-left: 3px solid var(--line); padding: 4px 10px; font-size: 12.5px; }
.cvp-thread__item--approval { border-left-color: #1d9e57; }
.cvp-thread__item--revision { border-left-color: #d64541; }
.cvp-thread__item--status { border-left-color: #2f6fed; }
.cvp-thread__meta { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.cvp-thread__kind { font-size: 10px; font-weight: 700; letter-spacing: 1px; color: var(--ink-muted); }
.cvp-thread__body { display: block; margin-top: 2px; }

/* ---------------- modal ---------------- */
.cvp-modal { position: fixed; inset: 0; z-index: 2000; display: flex; align-items: center; justify-content: center; }
.cvp-modal[hidden] { display: none !important; pointer-events: none !important; visibility: hidden !important; }
.cvp-modal__backdrop { position: absolute; inset: 0; background: rgba(4,12,24,0.8); backdrop-filter: blur(3px); }
.cvp-modal__box {
  position: relative; background: var(--navy-deep); border-radius: 14px; overflow: hidden;
  width: min(960px, 94vw); box-shadow: 0 30px 80px rgba(0,0,0,0.6); border: 1px solid rgba(255,255,255,0.12);
}
.cvp-modal__body iframe { width: 100%; aspect-ratio: 16 / 9; max-height: 82vh; border: 0; display: block; }
.cvp-modal__body img { width: 100%; max-height: 82vh; object-fit: contain; display: block; }
.cvp-modal__close {
  position: absolute; top: 8px; right: 10px; z-index: 2; background: rgba(0,0,0,0.55);
  color: #fff; border: none; border-radius: 50%; width: 42px; height: 42px; font-size: 22px; cursor: pointer;
}
/* Company quick-create modal sits on the dark --navy-deep box, so its labels
   and ghost button need light text to stay readable. */
#cvpCompanyModal .cvp-label { color: #eaf1fb; }
#cvpCompanyModal .cvp-btn--ghost { color: #eaf1fb; background: rgba(255,255,255,0.14); }

/* ---------------- misc ---------------- */
.cvp-row-actions { white-space: nowrap; display: flex; gap: 10px; align-items: center; }
.cvp-link--danger { color: #c0392b; background: none; border: none; cursor: pointer; font-family: inherit; font-size: inherit; font-weight: 500; padding: 0; }
.cvp-link--danger:hover { text-decoration: underline; }
.cvp-danger-zone { display: block; margin-top: 14px; }
.cvp-user-chip { text-decoration: none; display: flex; flex-direction: row; align-items: center; gap: 10px; padding: 4px 8px; border-radius: 8px; transition: 0.15s; }
.cvp-user-chip:hover { background: rgba(255,255,255,0.08); }
.cvp-user-chip__avatar {
  width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--orange), #ffb35c);
  color: var(--navy); font-weight: 700; display: inline-flex; align-items: center; justify-content: center; font-size: 15px;
}
.cvp-user-chip__meta { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.25; }
.cvp-feed { list-style: none; display: flex; flex-direction: column; }
.cvp-feed__item { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; padding: 9px 4px; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.cvp-feed__item:last-child { border-bottom: none; }
.cvp-feed__when { color: var(--ink-muted); font-size: 12px; min-width: 118px; }

/* ---------------- annotator ---------------- */
.cvp-anno { display: flex; flex-direction: column; max-height: 92vh; }
.cvp-anno__bar { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 60px 12px 16px; background: var(--navy); flex-wrap: wrap; } /* 60px right = space for modal ×  */
.cvp-anno__undo-btn { margin-left: auto; padding: 5px 14px; font-size: 12px; letter-spacing: 0.5px; border: 1px solid rgba(255,255,255,0.3); }
.cvp-anno__title { font-family: var(--font-cond); font-weight: 700; color: var(--white); letter-spacing: 1px; }
.cvp-anno__tools { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.cvp-anno__tool {
  background: rgba(255,255,255,0.1); color: #fff; border: 1.5px solid transparent;
  border-radius: 8px; padding: 6px 11px; font-size: 15px; cursor: pointer; transition: 0.15s;
}
.cvp-anno__tool:hover { background: rgba(255,255,255,0.2); }
.cvp-anno__tool--on { border-color: var(--orange); background: rgba(255,138,0,0.25); }
.cvp-anno__color { width: 34px; height: 34px; border-radius: 50%; border: 2.5px solid transparent; cursor: pointer; }
.cvp-anno__color--on { border-color: #fff; box-shadow: 0 0 0 2px var(--orange); }
.cvp-anno__sep { width: 1px; height: 24px; background: rgba(255,255,255,0.2); margin: 0 4px; }
.cvp-anno__size { background: rgba(255,255,255,0.1); color: #fff; border: none; border-radius: 8px; padding: 6px 8px; font-size: 13px; }
.cvp-anno__size option { color: var(--ink); }
.cvp-anno__stage { overflow: auto; background: #06101e; text-align: center; }
.cvp-anno__stage canvas { max-width: 100%; height: auto; cursor: crosshair; display: block; margin: 0 auto; touch-action: none; }
.cvp-anno__foot { display: flex; gap: 10px; padding: 12px 16px; background: var(--navy); align-items: center; }
.cvp-anno__foot .cvp-input { flex: 1; }
.cvp-anno-list { list-style: none; display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.cvp-anno-item { display: flex; flex-direction: column; gap: 3px; }
.cvp-anno-thumb { width: 130px; border-radius: 8px; border: 2px solid var(--orange); display: block; transition: 0.15s; }
.cvp-anno-thumb:hover { transform: scale(1.04); }
/* #69 — layer annotations: the transparent strokes sit over the take background */
.cvp-anno-thumb-wrap--layer { display: inline-block; border-radius: 8px; background-size: cover; background-position: center; border: 2px solid var(--orange); overflow: hidden; }
.cvp-anno-thumb-wrap--layer .cvp-anno-thumb { border: 0; border-radius: 0; }
/* Composite viewer inside the modal */
.cvp-anno-view { position: relative; display: inline-block; max-width: 100%; }
.cvp-anno-view img { display: block; max-width: 100%; }
.cvp-anno-view__layer { position: absolute; inset: 0; width: 100%; height: 100%; }
.cvp-anno-nav { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(11,29,51,0.75); color: #fff; border: 0; width: 40px; height: 40px; border-radius: 50%; font-size: 20px; cursor: pointer; }
.cvp-anno-nav--prev { left: 8px; } .cvp-anno-nav--next { right: 8px; }
.cvp-anno-caption { color: #fff; text-align: center; margin-top: 10px; font-size: 13px; }
.cvp-breadcrumb { display: inline-block; color: rgba(255,255,255,0.65); text-decoration: none; font-size: 13px; margin-bottom: 10px; }
.cvp-breadcrumb:hover { color: var(--orange); }
.cvp-error-title { font-family: var(--font-cond); font-weight: 700; font-size: 28px; color: var(--navy); margin-bottom: 8px; }
.cvp-error-sub { color: var(--ink-muted); margin-bottom: 18px; }
.cvp-table-scroll { overflow-x: auto; }

/* segmented take-status bar (dashboard cards + Board 01) */
.cvp-segbar { display: flex; height: 9px; border-radius: 99px; overflow: hidden; gap: 2px; background: rgba(11,29,51,0.06); }
.cvp-segbar--lg { height: 14px; margin-top: 14px; }
.cvp-segbar__seg { display: block; min-width: 6px; }
.cvp-segbar__seg.cvp-st-analyzing            { background: #64748b; }
.cvp-segbar__seg.cvp-st-storyboarding        { background: #ff8a00; }
.cvp-segbar__seg.cvp-st-animation            { background: #2f6fed; }
.cvp-segbar__seg.cvp-st-preview              { background: #8b5cf6; }
.cvp-segbar__seg.cvp-st-preparing-for-render { background: #0ea5a4; }
.cvp-segbar__seg.cvp-st-render-queue         { background: #16a34a; }
.cvp-segbar__seg.cvp-st-finalized            { background: #14532d; }
.cvp-segbar__seg.cvp-st-revision-requested   { background: #d64541; }
.cvp-seglegend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; }
.cvp-seglegend__item {
  display: inline-flex; align-items: center; gap: 7px; text-decoration: none;
  font-size: 12.5px; color: #4c5a68; transition: 0.15s;
}
.cvp-seglegend__item:hover { color: var(--navy); }
.cvp-seglegend__item strong { color: var(--navy); }

/* "updated since your last visit" badge */
.cvp-new-badge {
  display: inline-block; vertical-align: 2px; margin-left: 6px;
  background: var(--orange); color: #fff; font-family: var(--font-cond);
  font-size: 9px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase;
  padding: 2px 7px; border-radius: 99px; animation: cvpPulse 2s ease-in-out infinite;
}
@keyframes cvpPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* quick status change + admin tools row */
.cvp-status-quick { display: block; margin-top: 8px; }
.cvp-status-quick .cvp-input--mini { max-width: 100%; }
.cvp-admin-tools { display: flex; align-items: center; gap: 14px; margin-top: 18px; flex-wrap: wrap; }

.cvp-pager { display: flex; align-items: center; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.cvp-pager__item {
  display: inline-flex; align-items: center; justify-content: center; min-width: 34px; height: 34px;
  padding: 0 8px; border: 1.5px solid var(--line); border-radius: 8px; text-decoration: none;
  color: var(--ink); font-size: 13.5px; font-weight: 500; transition: 0.15s;
}
.cvp-pager__item:hover { border-color: var(--orange); }
.cvp-pager__item--on { background: var(--navy); border-color: var(--navy); color: #fff; }

/* ---------------- import ---------------- */
.cvp-input--mono { font-family: Consolas, Menlo, monospace; font-size: 12.5px; }
.cvp-code-sample {
  background: var(--navy-deep); color: #cfe3ff; font-family: Consolas, Menlo, monospace;
  font-size: 11.5px; line-height: 1.45; padding: 14px 16px; border-radius: 10px;
  overflow-x: auto; margin: 6px 0 12px;
}
.cvp-steps { padding-left: 20px; display: flex; flex-direction: column; gap: 6px; font-size: 14px; margin: 6px 0 4px; }

/* ---------------- responsive ---------------- */
@media (max-width: 1100px) {
  /* narrow-screen fallback: 12 columns can't fit — restore horizontal swipe */
  .cvp-tk-scroll { overflow-x: auto; scrollbar-color: var(--orange) rgba(11,29,51,0.08); }
  .cvp-tk { width: 1080px; }
}

@media (max-width: 900px) {
  /* take board on small screens: narrower sticky take column + horizontal swipe */
  .cvp-tk { width: 1020px; }
  .cvp-progress-block__grid { grid-template-columns: 1fr; gap: 10px; }
  .cvp-progress-pct-wrap { align-items: flex-start; }
  .cvp-b2-story { grid-template-columns: 1fr; }
  .cvp-filters { padding: 0 16px 14px; }
  .cvp-board__head--pad { padding: 18px 16px 0; }
  /* comfortable touch targets for the client's primary actions */
  .cvp-form--mini .cvp-btn { padding: 11px 16px; font-size: 14px; }
  .cvp-input--mini { padding: 9px 10px; font-size: 14px; }
}

@media (max-width: 760px) {
  .cvp-main { padding: 20px 14px 40px; }
  .cvp-topbar { padding: 10px 14px; gap: 12px; flex-wrap: wrap; }
  .cvp-brand__tag, .cvp-user-chip__meta { display: none; }
  .cvp-nav { margin-left: 0; }
  .cvp-nav__link { padding: 6px 10px; font-size: 13px; }
  .cvp-page-title { font-size: 24px; }
  .cvp-hero-id-value { font-size: 22px; }
  .cvp-form__row { grid-template-columns: 1fr; }
  .cvp-b2-grid { grid-template-columns: 1fr; }
  .cvp-board { padding: 18px 16px; }
  .cvp-tabs { gap: 6px; }
  .cvp-tab { padding: 8px 12px; font-size: 13.5px; }
  .cvp-stage-track { overflow-x: auto; padding-bottom: 8px; }
  .cvp-stage { min-width: 86px; }
  .cvp-stage__name { font-size: 9.5px; }
  .cvp-progress-pct { font-size: 30px; }
  .cvp-info-grid { grid-template-columns: 1fr 1fr; }
  .cvp-cards-grid { grid-template-columns: 1fr; }
  .cvp-page-head__actions .cvp-btn { padding: 8px 12px; font-size: 13px; }
  .cvp-feed__when { min-width: auto; }
  .cvp-b2-row--folder { flex-direction: column; align-items: flex-start; }
  .cvp-hero-deco { right: -14px; top: -20px; width: 140px; height: 34px; }
  .cvp-flash { width: calc(100% - 28px); }
}

@media (max-width: 480px) {
  .cvp-tk { width: 960px; }
}

@media (max-width: 460px) {
  .cvp-info-grid { grid-template-columns: 1fr; }
  .cvp-stats { grid-template-columns: 1fr 1fr; }
}

/* ---------------- polish: focus, scrollbars, hover, print ---------------- */
:focus-visible { outline: 3px solid rgba(255,138,0,0.55); outline-offset: 2px; border-radius: 4px; }
.cvp-input:focus-visible { outline: none; }

/* #116 — `height` só vale para a barra HORIZONTAL. A vertical herdava a largura
   do sistema (~15–17 px) e ainda assim recebia o estilo laranja: ficava grossa e
   destoante. `width` resolve a vertical.
   O gradiente também estava errado: a 90deg ele atravessa a LARGURA da barra, o
   que numa barra vertical não se vê. `to bottom` corre no comprimento. */
.cvp-tk-scroll::-webkit-scrollbar { height: 11px; width: 9px; }
.cvp-tk-scroll::-webkit-scrollbar-track { background: rgba(11,29,51,0.06); border-radius: 99px; }
.cvp-tk-scroll::-webkit-scrollbar-thumb { background: linear-gradient(90deg, var(--orange), #ffb35c); border-radius: 99px; }
.cvp-tk-scroll::-webkit-scrollbar-thumb:vertical { background: linear-gradient(180deg, var(--orange), #ffb35c); }

.cvp-btn--outline:hover { transform: translateY(-1px); }
.cvp-btn:active { transform: translateY(0) scale(0.98); }
.cvp-table tbody tr { transition: background 0.12s; }
.cvp-table tbody tr:hover { background: rgba(255,138,0,0.045); }

.cvp-toast::before { font-weight: 700; }
.cvp-toast--ok::before { content: '✓'; color: #7fe0a9; }
.cvp-toast--error::before { content: '!'; color: #ff9d9a; }

.cvp-login-page {
  background:
    repeating-linear-gradient(135deg, transparent 0 22px, rgba(255,138,0,0.05) 22px 23px),
    radial-gradient(1200px 500px at 85% -10%, rgba(255, 138, 0, 0.12), transparent 60%),
    linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 55%, #0d2240 100%);
}

.cvp-annotate-btn {
  display: inline-flex; align-items: center; gap: 5px;
  border: 1.5px solid rgba(255,138,0,0.55); border-radius: 8px; padding: 5px 10px;
  background: rgba(255,138,0,0.07); margin-top: 8px; transition: 0.15s;
}
.cvp-annotate-btn:hover { background: rgba(255,138,0,0.18); }

@media print {
  .cvp-topbar, .cvp-footer, .cvp-tabs, .cvp-filters, .cvp-act, .cvp-edit-panel,
  .cvp-annotate-btn, .cvp-danger-zone, .cvp-page-head__actions, .cvp-toasts { display: none !important; }
  body.cvp-portal { background: #fff; }
  .cvp-board { box-shadow: none; border: 1px solid #ccc; }
  .cvp-page-title, .cvp-page-sub { color: #0B1D33; }
}

/* reduce motion for users who prefer it */
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ============================================================
   v8 additions — media fallbacks, clamped cells, service cards,
   preview popup, proposals (same identity: navy/orange/off-white)
============================================================ */

/* --- visual fallback for links without a real thumbnail --- */
.cvp-media-fallback {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px; aspect-ratio: 16/9; width: 100%;
  border: 1.5px dashed rgba(11,29,51,0.22); border-radius: 8px;
  background: var(--offwhite); color: var(--ink-muted);
  text-decoration: none; text-align: center; padding: 6px; transition: 0.15s;
}
.cvp-media-fallback:hover { border-color: var(--orange); color: var(--orange-text); }
.cvp-media-fallback__icon .cvp-ic { width: 22px; height: 22px; }
.cvp-media-fallback__label {
  font-family: var(--font-cond); font-size: 10.5px; font-weight: 600;
  letter-spacing: 0.6px; text-transform: uppercase;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.cvp-b2-story__cover.cvp-media-fallback { min-height: 220px; aspect-ratio: auto; box-shadow: none; }
.cvp-ref-card__thumb--fallback {
  display: flex; align-items: center; justify-content: center;
  background: var(--offwhite); border: 1.5px dashed rgba(11,29,51,0.22);
  color: var(--ink-muted);
}
.cvp-ref-card__thumb--fallback .cvp-media-fallback__icon .cvp-ic { width: 26px; height: 26px; }
.cvp-tk__thumb-link { display: block; text-decoration: none; }

/* --- clamped cells: 3 lines + ellipsis; overflow opens a modal --- */
.cvp-clamp {
  display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical;
  overflow: hidden; position: relative;
}
.cvp-clamp--more { cursor: pointer; }
.cvp-clamp--more::after {
  content: '… more'; position: absolute; right: 0; bottom: 0;
  background: linear-gradient(90deg, transparent, #fff 28%);
  padding-left: 22px; color: var(--orange-text);
  font-family: var(--font-cond); font-size: 11px; font-weight: 700;
  letter-spacing: 0.6px; text-transform: uppercase;
}
.cvp-tk__row:nth-child(even) .cvp-clamp--more::after { background: linear-gradient(90deg, transparent, #fbfbfa 28%); }
.cvp-tk__cell--internal .cvp-clamp--more::after { background: linear-gradient(90deg, transparent, #fdf7ea 28%); }
.cvp-clamp--more:hover { color: var(--navy); }
.cvp-clamp--more:focus-visible { outline: 2px solid rgba(255,138,0,0.55); border-radius: 4px; }

/* full-content modal for clamped cells */
.cvp-modal-text { background: #fff; border-radius: 12px; padding: 26px 28px; max-width: 620px; min-width: min(520px, 84vw); max-height: 76vh; overflow-y: auto; }
.cvp-modal-text h3 {
  font-family: var(--font-cond); font-size: 13px; font-weight: 700;
  letter-spacing: 1.4px; text-transform: uppercase; color: var(--orange-text);
  margin-bottom: 12px; padding-bottom: 10px; border-bottom: 1px solid var(--line);
}
.cvp-modal-text__body { font-size: 14.5px; line-height: 1.65; color: var(--ink); }

/* --- preview popup (full image + in-popup markup entry) --- */
.cvp-preview-pop { display: flex; flex-direction: column; gap: 0; background: var(--navy-deep); border-radius: 12px; overflow: hidden; }
.cvp-preview-pop img { display: block; max-width: min(1200px, 88vw); max-height: 74vh; object-fit: contain; }
.cvp-preview-pop__bar {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  padding: 12px 16px; background: var(--navy); border-top: 2px solid var(--orange);
}

/* --- service selection cards (Board 01 / forms) --- */
.cvp-svc-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin: 4px 0 14px; }
.cvp-svc-card {
  position: relative; display: flex; flex-direction: column; align-items: center; gap: 7px;
  padding: 14px 10px 12px; border: 1.5px solid var(--line); border-radius: 10px;
  background: #fff; cursor: pointer; transition: 0.15s; user-select: none; text-align: center;
}
.cvp-svc-card:hover { border-color: rgba(255,138,0,0.55); }
.cvp-svc-card input { position: absolute; opacity: 0; width: 100%; height: 100%; top: 0; left: 0; cursor: pointer; margin: 0; }
.cvp-svc-card__icon { display: flex; }
.cvp-svc-card__icon .cvp-ic { width: 22px; height: 22px; color: var(--ink-muted); transition: 0.15s; }
.cvp-svc-card__name { font-family: var(--font-cond); font-size: 12px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--ink); }
/* Lit by the checkbox alone. There used to be a `cvp-svc-card--on` class printed
   by PHP as well: nothing ever removed it, so a card that started out selected
   stayed lit after being unticked — the icon went grey while the box kept
   claiming the service was still in. */
.cvp-svc-card:has(input:checked) {
  border-color: var(--orange); background: var(--orange-soft);
  box-shadow: inset 0 0 0 1px var(--orange);
}
.cvp-svc-card:has(input:checked) .cvp-svc-card__icon .cvp-ic { color: var(--orange); }
.cvp-svc-card:has(input:focus-visible) { outline: 3px solid rgba(255,138,0,0.55); outline-offset: 2px; }
.cvp-chips--tight { gap: 5px; }
.cvp-chips--tight .cvp-chip { font-size: 10px; padding: 3px 9px; }

/* --- proposals --- */
.cvp-prop-list { display: flex; flex-direction: column; gap: 12px; }
.cvp-prop-card {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px 18px;
}
.cvp-prop-card__main { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.cvp-prop-card__code { font-family: var(--font-cond); font-weight: 700; font-size: 13px; letter-spacing: 1.6px; color: var(--orange-text); }
.cvp-prop-card__name { font-size: 16px; }
.cvp-prop-card__side { display: flex; flex-direction: column; align-items: flex-end; gap: 9px; flex-shrink: 0; }
.cvp-prop-card__actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.cvp-prop-st-draft    { background: rgba(11,29,51,0.08); color: var(--ink-muted); }
.cvp-prop-st-sent     { background: rgba(47,111,237,0.12); color: var(--info); }
.cvp-prop-st-accepted { background: rgba(29,158,87,0.13); color: var(--success); }
.cvp-prop-st-rejected { background: rgba(214,69,65,0.12); color: var(--danger-text); }
/* #153 — os três estados novos. `Client agreed` é LARANJA de propósito: não é
   verde de "concluído", é "assinado e ESPERANDO VOCÊ" — o estado que mais pede
   ação do Fabio em todo o portal. */
.cvp-prop-st-client-agreed  { background: rgba(255,138,0,0.16); color: var(--orange-text); font-weight: 800; }
.cvp-prop-st-under-revision { background: rgba(255,138,0,0.10); color: var(--orange-text); }
.cvp-prop-st-cancelled      { background: rgba(11,29,51,0.10); color: var(--ink-muted); }
.cvp-prop-st-change-requested { background: rgba(255,138,0,0.10); color: var(--orange-text); }

/* O motivo do cancelamento é obrigatório e o cliente lê — o campo precisa de
   espaço para uma frase de verdade, não de uma caixinha simbólica. */
.cvp-cancel-form { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.cvp-cancel-form .cvp-input--mini { min-width: 210px; }

@media (max-width: 760px) {
  .cvp-prop-card { flex-direction: column; }
  .cvp-prop-card__side { align-items: flex-start; }
  .cvp-preview-pop img { max-width: 92vw; }
}

/* ── Proposal form v9 additions ────────────────────────────────────── */
.cvp-form-section-title {
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-cond); font-size: 11px; font-weight: 700;
  letter-spacing: 1.8px; text-transform: uppercase; color: var(--orange-text);
  margin: 24px 0 10px; padding-bottom: 8px;
  border-bottom: 1.5px solid var(--orange-soft);
}
.cvp-form-section-title .cvp-ic { color: var(--orange); width: 16px; height: 16px; }
.cvp-form__row--3 { grid-template-columns: 1fr 1fr 1fr; }

/* Pipeline toggle (radio cards instead of <select>) */
.cvp-pipeline-toggle {
  display: flex; gap: 10px; margin-top: 6px;
}
.cvp-pipeline-opt {
  position: relative; /* CRITICAL: contains the absolute input so it doesn't bleed to page */
  display: flex; align-items: center; gap: 8px; cursor: pointer;
  padding: 9px 16px; border: 1.5px solid var(--line); border-radius: 8px;
  background: #fff; transition: 0.15s; user-select: none; font-size: 14px; font-weight: 600;
}
.cvp-pipeline-opt--on {
  border-color: var(--orange); background: var(--orange-soft);
  box-shadow: inset 0 0 0 1px var(--orange);
}
.cvp-pipeline-opt:has(input:focus-visible) { outline: 3px solid rgba(255,138,0,0.45); outline-offset: 2px; }

/* ── Proposal form v10 ─────────────────────────────────────────── */
.cvp-company-select-wrap { display: flex; gap: 8px; align-items: center; }
.cvp-company-select-wrap .cvp-input { flex: 1; }

/* Input with currency prefix */
.cvp-input-prefix-wrap { position: relative; display: flex; align-items: center; }
.cvp-input-prefix {
  position: absolute; left: 10px; font-weight: 600; color: var(--navy); font-size: 14px;
  pointer-events: none; z-index: 1;
}
.cvp-input--with-prefix { padding-left: 28px; }

/* Takes builder */
.cvp-takes-builder { border: 1px solid var(--line); border-radius: 8px; overflow: hidden; margin: 8px 0 12px; }
.cvp-takes-builder__head {
  display: grid; grid-template-columns: 1fr 180px 36px;
  gap: 8px; padding: 7px 12px;
  background: var(--navy); color: rgba(255,255,255,0.7);
  font-family: var(--font-cond); font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase;
}
.cvp-takes-row {
  display: grid; grid-template-columns: 1fr 180px 36px;
  gap: 8px; padding: 6px 8px; border-top: 1px solid var(--line); align-items: center;
  background: #fff; transition: background 0.1s;
}
.cvp-takes-row:nth-child(even) { background: #fafafa; }
.cvp-takes-row .cvp-input { margin: 0; padding: 6px 9px; font-size: 13px; }
.cvp-takes-row .cvp-link--sm { padding: 0; min-width: 24px; text-align: center; }
.cvp-takes-summary { margin-top: 12px; align-items: flex-end; }
.cvp-takes-total-display { display: flex; flex-direction: column; gap: 4px; }
.cvp-takes-total-display .cvp-label { margin: 0; font-size: 11px; }
.cvp-takes-total-display strong { font-size: 22px; color: var(--navy); font-family: var(--font-cond); }

/* ── Music style cards ─────────────────────────────────────────── */
.cvp-music-cards {
  display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 16px;
}
.cvp-music-card {
  position: relative; /* REQUIRED: contains the absolute input */
  display: flex; align-items: center; padding: 7px 14px;
  border: 1.5px solid var(--line); border-radius: 20px;
  background: #fff; cursor: pointer; user-select: none;
  transition: border-color 0.15s, background 0.15s; font-size: 13px;
}
/* Input covers entire card area — click anywhere on the pill triggers it */
.cvp-music-card input {
  position: absolute; inset: 0; opacity: 0;
  cursor: pointer; margin: 0; width: 100%; height: 100%;
}
.cvp-music-card__name { font-weight: 500; color: var(--ink); }
.cvp-music-card--on { border-color: var(--orange); background: var(--orange-soft); }
.cvp-music-card--on .cvp-music-card__name { color: var(--orange-text); font-weight: 700; }
.cvp-music-card:hover { border-color: rgba(255,138,0,0.5); }
.cvp-music-card--clear { border-style: dashed; color: var(--ink-muted); }

/* ── Company contacts ──────────────────────────────────────────── */
.cvp-contact-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 24px; }
.cvp-contact-card {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 18px; background: var(--offwhite);
  border: 1.5px solid var(--line); border-radius: 10px;
}
.cvp-contact-card--primary {
  border-color: var(--orange); background: var(--orange-soft);
}
.cvp-contact-card__main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.cvp-contact-card__avatar {
  width: 40px; height: 40px; border-radius: 50%; flex-shrink: 0;
  background: var(--navy); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-cond); font-weight: 700; font-size: 16px;
}
.cvp-contact-card--primary .cvp-contact-card__avatar { background: var(--orange); }
.cvp-contact-card__info { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.cvp-contact-card__name { font-weight: 600; color: var(--navy); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.cvp-contact-card__role { font-size: 12.5px; color: var(--ink-muted); }
.cvp-contact-card__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--ink-muted); margin-top: 2px; }
.cvp-contact-card__meta span { display: flex; align-items: center; gap: 5px; }
.cvp-contact-card__meta .cvp-ic { width: 13px; height: 13px; color: var(--orange); }
.cvp-contact-card__actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; flex-wrap: wrap; justify-content: flex-end; }
.cvp-chip--orange { background: rgba(255,138,0,0.18); color: var(--orange-text); font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 99px; letter-spacing: 0.8px; }
.cvp-chip--ghost { background: rgba(11,29,51,0.08); color: var(--ink-muted); font-size: 10px; font-weight: 600; padding: 2px 8px; border-radius: 99px; letter-spacing: 0.6px; }
.cvp-divider { border: none; border-top: 1.5px solid var(--line); margin: 24px 0; }
.cvp-label--inline { display: flex; align-items: center; gap: 8px; font-weight: 500; cursor: pointer; }
.cvp-label--inline input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--orange); }

/* ── Annotator: zoom rail + undo spacing ───────────────────────── */
.cvp-anno__layout { display: flex; flex: 1; overflow: hidden; min-height: 0; }
.cvp-anno__zoom-rail {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 8px; background: var(--navy); border-right: 1px solid rgba(255,255,255,0.1);
  min-width: 44px;
}
.cvp-anno__zoom-btn {
  width: 30px; height: 30px; border-radius: 6px; border: 1px solid rgba(255,255,255,0.2);
  background: rgba(255,255,255,0.08); color: #fff; cursor: pointer; font-size: 16px;
  display: flex; align-items: center; justify-content: center; line-height: 1;
  transition: background 0.15s;
}
.cvp-anno__zoom-btn:hover { background: rgba(255,138,0,0.3); border-color: var(--orange); }
.cvp-anno__zoom-label { font-size: 10px; color: rgba(255,255,255,0.6); font-family: var(--font-cond); font-weight: 700; }
.cvp-anno__stage { flex: 1; overflow: auto; background: #06101e; text-align: center; }
/* Undo: moved to left side of toolbar, away from close button */
#cvpAnnoUndo { margin-left: 8px; }

/* ── Proposals filter banner ───────────────────────────────────── */
/* 🐛 #157 — o texto era ILEGÍVEL. `--orange-soft` é laranja a 12% de
   transparência, e esta faixa fica FORA dos cartões brancos, direto sobre o fundo
   escuro do admin: o translúcido deixava o escuro passar, e o texto `--navy`
   (#0B1D33) sumia contra ele. Só dava para ler selecionando com o mouse.
   Texto claro resolve sem mexer no visual da faixa, que o Fabio já aprovou. */
.cvp-filter-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 20px; background: var(--orange-soft);
  border: 1.5px solid var(--orange); border-radius: var(--radius);
  margin-bottom: 16px; font-size: 14px; color: #fff;
}
.cvp-filter-banner strong { color: #fff; font-weight: 800; }
/* O link "Show all proposals" é `.cvp-btn--ghost`, que herda cor escura pelo
   mesmo motivo — precisa da própria regra, senão continua invisível. */
.cvp-filter-banner .cvp-btn--ghost { color: #fff; border-color: rgba(255,255,255,.35); }
.cvp-filter-banner .cvp-btn--ghost:hover { background: rgba(255,255,255,.12); }
.cvp-filter-banner .cvp-ic { color: var(--orange); width: 18px; height: 18px; }

/* ── Project Calendar ───────────────────────────────────────────── */
.cvp-cal-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
}
.cvp-cal-header { background: var(--navy); }
.cvp-cal-dow {
  padding: 8px 0; text-align: center;
  font-family: var(--font-cond); font-size: 11px; letter-spacing: 1.2px;
  text-transform: uppercase; color: rgba(255,255,255,0.6); font-weight: 700;
}
.cvp-cal-cell {
  min-height: 90px; padding: 6px 8px;
  border-right: 1px solid var(--line); border-bottom: 1px solid var(--line);
  vertical-align: top; position: relative;
  transition: background 0.1s;
}
.cvp-cal-cell:nth-child(7n) { border-right: none; }
.cvp-cal-cell--empty { background: rgba(0,0,0,0.015); }
.cvp-cal-cell--today { background: rgba(255,138,0,0.08); }
.cvp-cal-cell--today .cvp-cal-day {
  background: var(--orange); color: #fff; border-radius: 50%;
  width: 22px; height: 22px; display: inline-flex; align-items: center; justify-content: center;
}
.cvp-cal-cell--event { background: rgba(29,158,87,0.07); }
.cvp-cal-cell--conflict { background: rgba(192,57,43,0.08); }
.cvp-cal-day {
  font-size: 12px; font-weight: 600; color: var(--ink-muted);
  display: inline-block; margin-bottom: 4px;
}
.cvp-cal-event {
  display: block; margin-top: 3px; padding: 3px 6px;
  border-radius: 4px; text-decoration: none; font-size: 11px;
  background: #1d9e57; color: #fff;
  overflow: hidden;
}
.cvp-cal-cell--conflict .cvp-cal-event { background: #c0392b; }
.cvp-cal-event__code { font-weight: 700; margin-right: 4px; font-family: var(--font-cond); }
.cvp-cal-event__name { opacity: 0.9; }
/* The delivery day is the one that matters most, so it gets the darker chip —
   the rest of the run is the same colour, one shade back. */
.cvp-cal-event { background: rgba(29,158,87,0.78); }
.cvp-cal-event--delivery { background: #1d9e57; font-weight: 700; }
.cvp-cal-cell--conflict .cvp-cal-event { background: rgba(192,57,43,0.78); }
.cvp-cal-cell--conflict .cvp-cal-event--delivery { background: #c0392b; }
/* Sundays and holidays: nobody works, so nothing is scheduled there. */
.cvp-cal-cell--off { background: rgba(11,29,51,0.05); }
.cvp-cal-cell--off .cvp-cal-day { opacity: 0.45; }
.cvp-cal-off {
  display: block; font-size: 9.5px; line-height: 1.25; color: var(--ink-muted);
  font-family: var(--font-cond); text-transform: uppercase; letter-spacing: 0.3px;
  opacity: 0.75; margin-bottom: 2px;
}

/* ============================================================
   #85/#91 — Combobox suggestions (replaces the browser's own
   <datalist> popup, which ignored every token on this page).
   The wrapper sits inside .cvp-label, which is a flex column,
   so it must not disturb the label/field stacking above it.
============================================================ */
.cvp-combo { position: relative; display: block; }
.cvp-combo__menu {
  position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; right: 0;
  margin: 0; padding: 4px; list-style: none;
  max-height: 260px; overflow-y: auto;
  background: var(--white); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: 10px;
  box-shadow: 0 12px 28px rgba(4, 12, 24, 0.16);
  display: none;
}
.cvp-combo__menu.is-open { display: block; }
.cvp-combo__opt {
  padding: 8px 10px; border-radius: 7px; cursor: pointer;
  font-size: 14px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cvp-combo__opt.is-active,
.cvp-combo__opt:hover { background: var(--orange-soft); color: var(--orange-text); }
.cvp-combo__more {
  padding: 7px 10px; font-size: 12px; color: var(--ink-muted);
  border-top: 1px solid var(--line); margin-top: 4px;
}

/* ============================================================
   #97 — "What the client asked for": the original request kept
   beside the proposal while it is edited. Reference only, so it
   is deliberately quieter than the form — no input styling, and
   it collapses for whoever does not need it.
============================================================ */
.cvp-rqref { background: var(--offwhite); border: 1.5px solid var(--line); margin-bottom: 16px; }
.cvp-rqref__head {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  cursor: pointer; list-style: none; font-size: 14px; color: var(--ink);
}
.cvp-rqref__head::-webkit-details-marker { display: none; }
.cvp-rqref__head::after { content: '▾'; margin-left: auto; color: var(--ink-muted); }
details[open] > .cvp-rqref__head::after { content: '▴'; }
.cvp-rqref__code {
  font-family: var(--font-cond); font-weight: 700; letter-spacing: 1px;
  color: var(--orange-text);
}
.cvp-rqref__tag { font-size: 11.5px; color: var(--ink-muted); font-style: italic; }
.cvp-rqref__grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px 18px; margin: 14px 0 0;
}
/* #106 — item de grid nasce com `min-width:auto`: a célula se RECUSA a encolher
   abaixo do seu conteúdo. Uma URL longa (o link do Maps) é uma palavra só, não
   tem onde quebrar, e empurrava a célula por cima da coluna vizinha
   (`EXPECTED DELIVERY`). `min-width:0` devolve o direito de encolher; o
   `overflow-wrap` dá à URL um lugar para quebrar. Precisa dos dois. */
.cvp-rqref__item, .cvp-rqref__long { min-width: 0; }
.cvp-rqref__item dd, .cvp-rqref__long dd { overflow-wrap: anywhere; }
.cvp-rqref__item dt,
.cvp-rqref__long dt {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px;
  color: var(--ink-muted); margin: 0 0 2px;
}
.cvp-rqref__item dd, .cvp-rqref__long dd { margin: 0; font-size: 14px; color: var(--ink); }
.cvp-rqref__long { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.cvp-rqref__long dd { line-height: 1.55; }

/* ============================================================
   #100 — Submit overlay: the wait made visible.
   Submitting a request talks to Google about twenty times in a
   row (e-mails, then the folder tree, then the sharing), which
   is ~15 s of a page that looks frozen. The overlay says what is
   happening and, by covering the page, makes a second click on
   Submit impossible — which used to re-send every e-mail.
   Pure CSS/SVG: no external asset to fail exactly when the page
   is already slow, and the brand colours are the real ones.
============================================================ */
.cvp-wait {
  position: fixed; inset: 0; z-index: 200;
  display: flex; align-items: center; justify-content: center;
  background: rgba(7, 21, 39, 0.82);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  animation: cvp-wait-in 0.25s ease both;
}
@keyframes cvp-wait-in { from { opacity: 0 } to { opacity: 1 } }
.cvp-wait__card {
  background: var(--white); border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(4, 12, 24, 0.45);
  padding: 34px 38px 30px; text-align: center;
  width: min(420px, calc(100vw - 32px));
}
.cvp-wait__title {
  margin: 18px 0 6px; font-family: var(--font-cond), var(--font);
  font-size: 19px; font-weight: 700; color: var(--ink);
}
.cvp-wait__step {
  margin: 0; font-size: 14px; color: var(--ink-muted); min-height: 40px;
  line-height: 1.45;
}
.cvp-wait__note { margin: 14px 0 0; font-size: 12px; color: var(--ink-muted); font-style: italic; }

/* — the folder taking in sheets — */
.cvp-wait__anim { width: 132px; height: 108px; display: block; margin: 0 auto; }
.cvp-wait__sheet {
  transform-box: fill-box; transform-origin: center;
  animation: cvp-sheet-drop 2.4s cubic-bezier(.45,.05,.35,1) infinite;
  opacity: 0;
}
.cvp-wait__sheet:nth-of-type(2) { animation-delay: 0.8s; }
.cvp-wait__sheet:nth-of-type(3) { animation-delay: 1.6s; }
@keyframes cvp-sheet-drop {
  0%   { transform: translateY(-38px) rotate(-7deg); opacity: 0; }
  18%  { opacity: 1; }
  62%  { transform: translateY(6px) rotate(0deg); opacity: 1; }
  78%  { transform: translateY(10px) rotate(0deg); opacity: 0; }
  100% { transform: translateY(10px) rotate(0deg); opacity: 0; }
}
.cvp-wait__flap {
  transform-box: fill-box; transform-origin: bottom center;
  animation: cvp-flap 2.4s ease-in-out infinite;
}
@keyframes cvp-flap {
  0%, 45%, 100% { transform: scaleY(1); }
  60%           { transform: scaleY(1.045); }
}
/* Someone who asked the system for less motion gets the message, not the show. */
@media (prefers-reduced-motion: reduce) {
  .cvp-wait__sheet, .cvp-wait__flap { animation: none; }
  .cvp-wait__sheet { opacity: 1; }
}

/* ============================================================
   #103 — Accepting a proposal: the tower going up.
   Not a spinner. This is the moment a client said yes, and the
   admin who built this portal is the only person who will ever
   see it — the drawing may as well be the work itself: floors
   landing one over the other, windows coming on as each one
   settles, a light on the roof that keeps watch at the end.
============================================================ */
.cvp-wait__floor {
  transform-box: fill-box; transform-origin: center;
  animation: cvp-floor-rise 4.4s cubic-bezier(.34,1.32,.5,1) infinite;
  opacity: 0;
}
.cvp-wait__floor:nth-of-type(2) { animation-delay: 0.30s; }
.cvp-wait__floor:nth-of-type(3) { animation-delay: 0.60s; }
.cvp-wait__floor:nth-of-type(4) { animation-delay: 0.90s; }
.cvp-wait__floor:nth-of-type(5) { animation-delay: 1.20s; }
@keyframes cvp-floor-rise {
  0%   { transform: translateY(-58px); opacity: 0; }
  9%   { transform: translateY(0);     opacity: 1; }
  82%  { transform: translateY(0);     opacity: 1; }
  92%  { opacity: 0; }
  100% { opacity: 0; }
}
/* the beacon only lights once the building is standing */
.cvp-wait__beacon { animation: cvp-beacon 4.4s ease-in-out infinite; opacity: 0; }
@keyframes cvp-beacon {
  0%, 34%  { opacity: 0; r: 2.5px; }
  42%      { opacity: 1; r: 4px; }
  55%      { opacity: .55; r: 2.8px; }
  70%      { opacity: 1; r: 3.6px; }
  86%, 100%{ opacity: 0; r: 2.5px; }
}
@media (prefers-reduced-motion: reduce) {
  .cvp-wait__floor, .cvp-wait__beacon { animation: none; opacity: 1; }
}

/* ============================================================
   #138 — /documents: os HTML voltados ao cliente, reunidos.
   Índice, não cópia: cada cartão aponta para a rota que já serve
   o documento, e traz o link público pronto para copiar.
   ============================================================ */
.cvp-doc-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px; margin-top: 18px;
}
.cvp-doc {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 18px 20px; display: flex; flex-direction: column;
}
.cvp-doc__hd { display: flex; gap: 13px; align-items: flex-start; }
.cvp-doc__ic {
  flex: none; width: 42px; height: 42px; border-radius: 11px;
  background: rgba(255,138,0,0.10); color: var(--orange-text);
  display: flex; align-items: center; justify-content: center;
}
.cvp-doc__ic svg { width: 22px; height: 22px; }
.cvp-doc__title { margin: 0; font-size: 16px; font-weight: 800; color: var(--navy); }
.cvp-doc__sub { margin: 3px 0 0; font-size: 12.5px; color: var(--ink-muted); }
/* `flex:1` empurra o rodapé para baixo: os cartões têm textos de tamanhos
   diferentes e sem isto os botões ficavam em alturas diferentes. */
.cvp-doc__use { margin: 13px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); flex: 1; }
.cvp-doc__foot { display: flex; gap: 10px; align-items: center; margin-top: 15px; }
.cvp-doc__url { flex: 1; min-width: 0; font-size: 12px; padding: 8px 10px; color: var(--ink-muted); }

/* #136 — a faixa que leva ao guia de serviços, em cada passo do request.
   Discreta de propósito: é ajuda, não instrução. Se competir com os campos,
   vira ruído no formulário que o cliente veio preencher. */
.cvp-rq-guide { margin: -4px 0 16px; font-size: 13px; }
.cvp-rq-guide a {
  color: var(--orange-text); text-decoration: none;
  border-bottom: 1px solid rgba(255,138,0,0.45); padding-bottom: 1px;
}
.cvp-rq-guide a:hover { border-bottom-color: var(--orange); }
.cvp-rq-guide a::after { content: ' ↗'; font-size: 11px; }

/* #111/#114 — faixa de conflito de editores. Vermelha e persistente de propósito:
   o portal não resolve isso sozinho, e um aviso que some seria esquecido junto
   com o editor que ficou restrito esperando. */
.cvp-conflict {
  display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap;
  background: #fff5f5; border: 1px solid #f2c2c2; border-left: 5px solid #d9534f;
  border-radius: 12px; padding: 16px 20px; margin-bottom: 16px;
}
.cvp-conflict__ic {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  background: #d9534f; color: #fff; display: flex; align-items: center; justify-content: center;
}
.cvp-conflict__ic svg { width: 18px; height: 18px; }
.cvp-conflict__body { flex: 1; min-width: 260px; }
.cvp-conflict__body strong { display: block; color: #a33; font-size: 14px; }
.cvp-conflict__body p { margin: 5px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.cvp-conflict__form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cvp-conflict__form .cvp-input--mini { min-width: 230px; font-size: 12.5px; }

/* #128 — balão de contato do cliente. Fixo no canto, discreto até ser clicado. */
.cvp-contact { position: fixed; right: 22px; bottom: 22px; z-index: 60; }
.cvp-contact__toggle {
  width: 52px; height: 52px; border-radius: 50%; border: 0; cursor: pointer;
  background: var(--orange); color: #fff; box-shadow: 0 6px 20px rgba(11,29,51,.28);
  display: flex; align-items: center; justify-content: center; transition: transform .15s;
}
.cvp-contact__toggle:hover { transform: translateY(-2px); }
.cvp-contact__toggle svg { width: 24px; height: 24px; }
.cvp-contact__panel {
  position: absolute; right: 0; bottom: 64px; width: 268px;
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 16px; box-shadow: 0 12px 34px rgba(11,29,51,.18);
}
.cvp-contact__title { margin: 0 0 8px; font-weight: 800; font-size: 14px; color: var(--navy); }
.cvp-contact__hours {
  margin: 0 0 12px; font-size: 12.2px; line-height: 1.45; color: var(--ink-muted);
  display: flex; gap: 8px; align-items: flex-start;
}
.cvp-contact__dot { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 5px; }
.cvp-contact__hours.is-open   .cvp-contact__dot { background: #3fae6a; }
.cvp-contact__hours.is-closed .cvp-contact__dot { background: #c9ced6; }
.cvp-contact__btn {
  display: flex; align-items: center; gap: 9px; padding: 10px 12px; margin-top: 8px;
  border: 1px solid var(--line); border-radius: 9px; text-decoration: none;
  color: var(--navy); font-size: 13.5px; font-weight: 700;
}
.cvp-contact__btn:hover { background: rgba(255,138,0,0.06); border-color: var(--orange); }
.cvp-contact__btn svg { width: 17px; height: 17px; color: var(--orange); }
.cvp-contact__btn--wa svg { color: #25d366; }

/* #117 — o campo de senha e o botão de gerar, lado a lado. */
.cvp-pwgen { display: flex; gap: 8px; align-items: center; }
.cvp-pwgen .cvp-input { flex: 1; min-width: 0; font-family: var(--font-mono, monospace); letter-spacing: .5px; }

/* #127 — seção de pagamentos do projeto. */
.cvp-pay__table { margin: 8px 0 10px; }
.cvp-pay__total { margin: 0 0 16px; font-size: 14px; color: var(--ink); }
.cvp-pay__form {
  display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap;
  padding: 14px 16px; border: 1px dashed var(--line); border-radius: 11px; margin-bottom: 14px;
}
.cvp-pay__form .cvp-label { margin: 0; font-size: 11.5px; }
.cvp-pay__form .cvp-input--mini { min-width: 108px; }
.cvp-pay__invoice {
  display: flex; gap: 14px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 13px 16px; border: 1px solid var(--line); border-radius: 11px; background: #fbfcfd;
}
.cvp-pay__invoice span { display: flex; gap: 8px; align-items: center; font-size: 14px; }
.cvp-pay__invoice svg { width: 17px; height: 17px; color: var(--orange); }
/* O bloco bancário é o único ponto do portal onde um IBAN aparece. O aviso
   embaixo não é enfeite: é o que ensina o cliente a reconhecer a fraude. */
.cvp-pay__bank {
  margin-top: 14px; padding: 16px 20px; border: 1px solid var(--line);
  border-radius: 12px; background: #fbfcfd;
}
.cvp-pay__bank b { display: flex; gap: 8px; align-items: center; font-size: 12px; letter-spacing: .9px;
  text-transform: uppercase; color: var(--orange-text); margin-bottom: 10px; }
.cvp-pay__bank b svg { width: 15px; height: 15px; }
.cvp-pay__bank dl { display: grid; grid-template-columns: auto 1fr; gap: 5px 20px; margin: 0; font-size: 14px; }
.cvp-pay__bank dt { color: var(--ink-muted); }
.cvp-pay__bank dd { margin: 0; font-weight: 700; color: var(--navy); }
.cvp-pay__warn { margin: 12px 0 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-muted); }

/* #124 — dica de e-mail corporativo. Discreta: é sugestão, não erro.
   🐛 #142 (22/07) — a margem do topo era `-6px`, herdada de um campo de altura
   padrão. Este campo tem `padding:12px 14px` e `font-size:16px` inline: mais
   alto, e o -6px puxava a dica para DENTRO da borda inferior do input, cortando
   a primeira linha do texto. Margem positiva e `padding` vertical próprio —
   agora ela encosta no campo sem invadi-lo, com ou sem foco. */
.cvp-rq-tip {
  margin: 8px 0 16px; padding: 6px 0 6px 12px;
  font-size: 12.5px; line-height: 1.55;
  color: var(--ink-muted); border-left: 3px solid rgba(255,138,0,.4);
}

/* #127 — formulário de emissão de invoice. */
.cvp-inv-form .cvp-label { margin-bottom: 12px; }
.cvp-inv-row { display: flex; gap: 14px; flex-wrap: wrap; }
.cvp-inv-row .cvp-label { flex: 1; min-width: 130px; }
.cvp-inv-auto {
  display: flex; gap: 9px; align-items: center; margin: -4px 0 14px;
  padding: 10px 13px; border-radius: 9px; background: rgba(255,138,0,0.07);
  font-size: 13px; color: var(--ink);
}
.cvp-inv-auto svg { width: 16px; height: 16px; color: var(--orange); flex: none; }

/* ============================================================
   #108 — a proposta do lado do cliente.
   ============================================================ */
.cvp-prop-list { display: flex; flex-direction: column; gap: 12px; }
.cvp-prop-card {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 22px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; text-decoration: none; color: inherit; transition: .15s;
}
.cvp-prop-card:hover { border-color: var(--orange); transform: translateY(-1px); }
.cvp-prop-card__main b { display: block; font-family: var(--font-cond); letter-spacing: 1px; color: var(--orange-text); }
.cvp-prop-card__main span { font-size: 15.5px; font-weight: 700; color: var(--navy); }
.cvp-prop-pill { font-size: 11.5px; font-weight: 800; letter-spacing: .6px; text-transform: uppercase;
  padding: 6px 12px; border-radius: 99px; white-space: nowrap; }
.cvp-prop-pill--new  { background: rgba(255,138,0,.12); color: var(--orange-text); }
.cvp-prop-pill--ok   { background: rgba(63,174,106,.14); color: #2c7a4b; }
.cvp-prop-pill--no   { background: rgba(217,83,79,.12); color: #a33; }
.cvp-prop-pill--warn { background: rgba(11,29,51,.08); color: var(--navy); }

.cvp-prop-note {
  display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
  padding: 16px 22px; border-radius: 12px; margin-bottom: 16px; border: 1px solid var(--line);
}
.cvp-prop-note strong { display: block; font-size: 15px; }
.cvp-prop-note p { margin: 4px 0 0; font-size: 13.5px; line-height: 1.5; color: var(--ink); }
.cvp-prop-note--warn { background: #fffaf2; border-color: #f0d9b5; }
.cvp-prop-note--ok   { background: #f3faf5; border-color: #c3e3ce; }
.cvp-prop-note--no   { background: #fff5f5; border-color: #f2c2c2; }

/* #162 — o documento ocupa a largura toda, SEM cartão em volta e SEM rolagem
   própria. O wrapper é transparente e largo; o iframe cresce até a altura do
   conteúdo (JS mede e ajusta), então a única barra de rolagem é a da página.
   O `min-height` fica só como piso antes de o JS medir. */
.cvp-prop-docwrap { width: 100%; margin: 0 0 18px; }
.cvp-prop-doc { display: block; width: 100%; min-height: 1200px; border: 0; background: transparent; overflow: hidden; }

/* #161 — barra do botão "Update scope from services", logo abaixo do campo. */
.cvp-scope-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: -4px 0 6px; }
.cvp-scope-tools__hint { font-size: 12px; }

/* #167 — botão de reenvio do acesso do cliente, na área do projeto. */
.cvp-resend-access { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 12px; }
.cvp-resend-access__hint { font-size: 12px; }

.cvp-prop-act { margin-top: 18px; }
/* #151 — o convite ao fechamento. Maior e mais escuro que o `cvp-muted` que
   estava ali: é a frase que pede o "sim", não uma nota de rodapé. */
.cvp-prop-invite { margin: 6px 0 0; font-size: 15px; line-height: 1.6; color: var(--ink); max-width: 62ch; }
.cvp-prop-form { margin-top: 14px; }
.cvp-prop-buttons { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 6px; }
.cvp-btn--danger { background: #d9534f; color: #fff; }
.cvp-btn--danger:hover { background: #c9302c; }

/* ═══════════════════════════════════════════════════════════════════════════
   #39 — documentos jurídicos (/terms e /proposal-terms).
   Texto longo e denso: a largura é limitada de propósito (~68 caracteres é o
   que se lê sem perder a linha), e o corpo é maior que o do resto do portal —
   ninguém deveria apertar os olhos para ler um contrato.
   ═══════════════════════════════════════════════════════════════════════════ */
.cvp-legal { max-width: 780px; margin: 0 auto; padding: 8px 0 60px; }

.cvp-legal__head { border-bottom: 2px solid var(--line); padding-bottom: 18px; margin-bottom: 26px; }
.cvp-legal__head h1 { font-size: 26px; line-height: 1.25; color: var(--navy); margin: 0 0 10px; }
.cvp-legal__meta { font-size: 13px; color: var(--ink-muted); margin: 0 0 4px; }
.cvp-legal__soon { font-style: italic; }

/* Sumário: numeração própria (1–54), para bater com os títulos das seções. */
.cvp-legal__toc { background: #fafbfc; border: 1px solid var(--line); border-radius: 8px; padding: 18px 22px; margin-bottom: 32px; }
.cvp-legal__toc h2 { font-family: var(--font-cond); font-size: 11px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--ink-muted); margin: 0 0 12px; }
.cvp-legal__toc ol { margin: 0; padding-left: 26px; columns: 2; column-gap: 32px; }
.cvp-legal__toc li { font-size: 13px; line-height: 1.9; break-inside: avoid; }
.cvp-legal__toc a { color: var(--navy); text-decoration: none; }
.cvp-legal__toc a:hover { text-decoration: underline; }

/* `scroll-margin-top` para o link do sumário não esconder o título sob o topo. */
.cvp-legal__sec { margin-bottom: 26px; scroll-margin-top: 20px; }
.cvp-legal__sec h2 { font-size: 17px; color: var(--navy); margin: 0 0 10px; }
.cvp-legal__sec h3 { font-size: 14.5px; color: var(--navy); margin: 18px 0 6px; }
.cvp-legal__sec p { font-size: 14.5px; line-height: 1.7; color: #33414f; margin: 0 0 10px; }
.cvp-legal__sec ul,
.cvp-legal__sec ol { margin: 0 0 12px; padding-left: 24px; }
.cvp-legal__sec li { font-size: 14.5px; line-height: 1.75; color: #33414f; }

/* A cláusula que ainda espera revisão do advogado — visível, nunca escondida. */
.cvp-legal__flag { background: #fff8ec; border-left: 3px solid var(--orange); border-radius: 4px; padding: 12px 14px; font-size: 13.5px !important; line-height: 1.6 !important; }

.cvp-legal__foot { border-top: 2px solid var(--line); padding-top: 18px; margin-top: 40px; }
.cvp-legal__foot p { font-size: 13px; line-height: 1.7; color: var(--ink-muted); margin: 0 0 8px; }

@media (max-width: 640px) {
  .cvp-legal__toc ol { columns: 1; }
  .cvp-legal__head h1 { font-size: 21px; }
}

/* ── O pop-up do aceite da proposta (#108 · #39) ──────────────────────────
   O texto do Documento 2 rola DENTRO do modal: quem aceita tem de poder ler o
   que está aceitando sem sair da tela e perder o que digitou. */
.cvp-modal { position: fixed; inset: 0; z-index: 900; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(16, 26, 38, .55); }
.cvp-modal[hidden] { display: none; }
.cvp-modal__box { background: #fff; border-radius: 10px; width: 100%; max-width: 660px; max-height: 88vh; display: flex; flex-direction: column; box-shadow: 0 18px 50px rgba(0,0,0,.25); }
.cvp-modal__head { padding: 20px 24px 14px; border-bottom: 1px solid var(--line); }
.cvp-modal__head h2 { font-size: 18px; color: var(--navy); margin: 0 0 4px; }
.cvp-modal__head p { font-size: 13px; color: var(--ink-muted); margin: 0; }
.cvp-modal__body { padding: 18px 24px; overflow-y: auto; flex: 1; }
.cvp-modal__body h3 { font-size: 14px; color: var(--navy); margin: 16px 0 5px; }
.cvp-modal__body h3:first-child { margin-top: 0; }
.cvp-modal__body p { font-size: 13.5px; line-height: 1.65; color: #33414f; margin: 0 0 8px; }
.cvp-modal__body ul, .cvp-modal__body ol { margin: 0 0 10px; padding-left: 22px; }
.cvp-modal__body li { font-size: 13.5px; line-height: 1.7; color: #33414f; }
.cvp-modal__foot { padding: 16px 24px 20px; border-top: 1px solid var(--line); }
.cvp-modal__agree { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--navy); margin-bottom: 14px; }
.cvp-modal__agree input { margin-top: 3px; flex: none; }
.cvp-modal__actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }

/* ── #152 — os tres campos que o cliente digita no pop-up dos Termos ─────────
   Duas colunas no desktop, uma no celular. `Company` ocupa a linha inteira: e o
   campo mais longo dos tres e o que mais sofre com meia largura. */
.cvp-sign-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; margin-bottom: 16px; }
.cvp-sign-fields > label:last-child { grid-column: 1 / -1; }
@media (max-width: 560px) { .cvp-sign-fields { grid-template-columns: 1fr; } }

/* ── #120 — "voce ainda usa a senha que mandamos" ───────────────────────────
   AVISO, nao alarme: ambar e discreto. Vermelho diria que ha algo errado, e nao
   ha — manter a senha do e-mail e uma escolha legitima do cliente. */
.cvp-pwd-notice {
  display: flex; gap: 13px; align-items: center; flex-wrap: wrap;
  background: rgba(255, 176, 32, .13); border: 1px solid rgba(209, 139, 0, .35);
  border-radius: 9px; padding: 13px 16px; margin-bottom: 18px;
}
.cvp-pwd-notice__ic { flex: none; display: flex; color: #d18b00; }
.cvp-pwd-notice__ic .cvp-ic { width: 21px; height: 21px; }
.cvp-pwd-notice > div { flex: 1; min-width: 220px; }
.cvp-pwd-notice strong { display: block; font-size: 14px; color: var(--navy); }
.cvp-pwd-notice p { margin: 2px 0 0; font-size: 13px; line-height: 1.5; color: #5c3d00; }

/* ── #152 — divergencia entre o que foi digitado e o cadastro ───────────────
   SO no painel do admin. Ambar, nao vermelho: nao e erro nem bloqueio — e uma
   observacao para quem vai aprovar. */
.cvp-sig-diff {
  display: flex; gap: 9px; align-items: flex-start; margin-top: 8px;
  background: rgba(255, 176, 32, .12); border-left: 3px solid #d18b00;
  border-radius: 6px; padding: 8px 11px; font-size: 12.5px; line-height: 1.55; color: #5c3d00;
}
.cvp-sig-diff .cvp-ic { flex: none; width: 17px; height: 17px; color: #d18b00; margin-top: 1px; }
.cvp-sig-diff strong { display: block; }
.cvp-sig-diff span { display: block; }

/* ── #152 — POP-UP 2: a celebracao ──────────────────────────────────────────
   z-index acima do modal dos Termos (900): os dois existem na mesma pagina, e a
   celebracao chega depois. Sem fechar no fundo — a saida e so o botao laranja. */
.cvp-celebrate {
  position: fixed; inset: 0; z-index: 1200; display: flex;
  align-items: center; justify-content: center; padding: 20px;
  background: rgba(7, 21, 39, .82); backdrop-filter: blur(3px);
}
.cvp-celebrate__box {
  background: linear-gradient(160deg, var(--navy-deep) 0%, var(--navy) 60%, #0d2240 100%);
  border: 1px solid rgba(255, 138, 0, .35); border-radius: 14px;
  box-shadow: 0 26px 70px rgba(0, 0, 0, .45);
  padding: 34px 34px 28px; width: 100%; max-width: 540px; text-align: center; color: #fff;
}
.cvp-celebrate__seal { color: var(--orange); animation: cvp-seal-in .55s ease-out both; }
.cvp-celebrate__seal svg { width: 62px; height: 62px; }
.cvp-celebrate__line {
  font-family: var(--font-cond); font-size: 27px; font-weight: 700; line-height: 1.3;
  margin: 16px 0 0; letter-spacing: .3px;
}
/* Cada palavra entra com o seu proprio atraso (definido no HTML). */
.cvp-celebrate__line span { display: inline-block; animation: cvp-word-in .5s ease-out both; }
.cvp-celebrate__sub {
  font-size: 14px; line-height: 1.65; color: #cfdaea; margin: 14px 0 0;
  animation: cvp-word-in .6s ease-out 2.9s both;   /* entra quando a frase termina */
}
.cvp-celebrate__actions { margin-top: 24px; }

@keyframes cvp-word-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes cvp-seal-in { from { opacity: 0; transform: scale(.6); } to { opacity: 1; transform: none; } }

/* Quem pediu menos movimento ve o mesmo conteudo, sem a animacao. Nada some: as
   palavras so param de entrar uma a uma. */
@media (prefers-reduced-motion: reduce) {
  .cvp-celebrate__seal, .cvp-celebrate__line span, .cvp-celebrate__sub { animation: none; opacity: 1; transform: none; }
}
