/* ============================================================
   HUB ASTRIX — estilos
   Marca: roxo #2D0859 + off-white. Serif editorial + sans.
   ============================================================ */

:root {
  --purple:      #2D0859;
  --purple-700:  #3d1170;
  --purple-500:  #5b2b8f;
  --purple-300:  #9b7bc4;
  --purple-100:  #e7ddf2;
  --cream:       #F6F1E7;
  --cream-2:     #FBF8F1;
  --paper:       #ffffff;
  --ink:         #241b31;
  --ink-soft:    #6a6076;
  --line:        #e7e0d6;
  --green:       #3f7d5f;
  --green-soft:  #e4efe7;
  --amber:       #b5701f;
  --amber-soft:  #f6ecdc;
  --red:         #a8394b;
  --red-soft:    #f4e2e4;
  --shadow:      0 1px 2px rgba(45,8,89,.05), 0 8px 30px rgba(45,8,89,.07);
  --shadow-sm:   0 1px 3px rgba(45,8,89,.08);
  --radius:      18px;
  --radius-sm:   12px;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans:  "Manrope", -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--cream);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--purple-700); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.15; color: var(--purple); margin: 0; }
.serif { font-family: var(--serif); }

/* ---------- LAYOUT ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 250px; flex-shrink: 0;
  background: var(--purple);
  color: #efe7f7;
  padding: 26px 18px;
  position: sticky; top: 0; height: 100vh;
  overflow-y: auto;
  display: flex; flex-direction: column; gap: 6px;
}
.brand { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; padding: 0 8px; }
.brand .logo { font-family: var(--serif); font-size: 28px; font-weight: 600; color: #fff; letter-spacing: .5px; }
.brand .logo b { color: var(--purple-300); }
.brand .sub { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--purple-300); }
.nav { margin-top: 14px; display: flex; flex-direction: column; gap: 3px; }
.nav-label { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--purple-300); padding: 14px 12px 6px; }
.nav a {
  color: #e4d8f2; padding: 9px 12px; border-radius: 10px; font-size: 14px;
  display: flex; align-items: center; gap: 10px; transition: background .12s; text-decoration: none;
}
.nav a:hover { background: rgba(255,255,255,.08); }
.nav a.active { background: #fff; color: var(--purple); font-weight: 600; }
.nav a .ic { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; opacity: .95; flex-shrink: 0; }
.nav a .ic svg { display: block; }
.sidebar .foot { margin-top: auto; font-size: 11px; color: var(--purple-300); padding: 12px 8px 0; border-top: 1px solid rgba(255,255,255,.12); }

.main { flex: 1; min-width: 0; padding: 34px 44px 80px; max-width: 1240px; margin: 0 auto; width: 100%; }

/* ---------- HEADER ---------- */
.page-head { margin-bottom: 26px; }
.page-head .eyebrow { font-size: 11px; letter-spacing: 3px; text-transform: uppercase; color: var(--purple-500); margin-bottom: 8px; }
.page-head h1 { font-size: 40px; letter-spacing: -.5px; }
.page-head p { color: var(--ink-soft); margin: 8px 0 0; max-width: 620px; }

/* ---------- CARDS ---------- */
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); }
.grid { display: grid; gap: 18px; }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- TARÔ DO DIA ---------- */
.tarot-section h2 { margin-bottom: 4px; }
.tarot-intro { color: var(--ink-soft); margin: 0 0 18px; max-width: none; }
.tarot-stage { display: flex; gap: 34px; align-items: center; flex-wrap: wrap; }
.tcard { width: 250px; height: 428px; perspective: 1300px; cursor: pointer; flex-shrink: 0; }
.tcard.is-flipped { cursor: default; }
.tcard-inner { position: relative; width: 100%; height: 100%; transition: transform .75s cubic-bezier(.2,.8,.2,1); transform-style: preserve-3d; }
.tcard.is-flipped .tcard-inner { transform: rotateY(180deg); }
.tcard:not(.is-flipped):hover .tcard-inner { transform: translateY(-4px) rotate(-1deg); }
.tcard-back, .tcard-front { position: absolute; inset: 0; -webkit-backface-visibility: hidden; backface-visibility: hidden; border-radius: 16px; box-shadow: 0 14px 34px rgba(45,8,89,.30); overflow: hidden; }
.tcard-back { background: radial-gradient(130% 130% at 50% 0%, #4a1d86, #2D0859 60%, #1a0538); border: 2px solid #cdb27b; display: grid; place-items: center; }
.tcb-frame { width: 84%; height: 88%; border: 1px solid rgba(205,178,123,.55); border-radius: 10px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background-image: radial-gradient(circle at 22% 18%, rgba(205,178,123,.16) 0 2px, transparent 3px), radial-gradient(circle at 78% 82%, rgba(205,178,123,.16) 0 2px, transparent 3px); }
.tcb-star { font-size: 56px; color: #cdb27b; }
.tcb-label { font-family: var(--serif); letter-spacing: 5px; text-transform: uppercase; color: #cdb27b; font-size: 13px; }
.tcard-front { transform: rotateY(180deg); background: #f2e6cd; border: 2px solid #cdb27b;
  display: flex; align-items: center; justify-content: center; }
.tcard-front img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tcf-sym { font-size: 88px; }
.tcf-name { font-family: var(--serif); font-size: 18px; color: var(--purple); text-transform: uppercase; letter-spacing: 1px; }
.tarot-advice { flex: 1; min-width: 220px; }
.tadv-name { font-family: var(--serif); font-size: 28px; color: var(--purple); margin-bottom: 10px; }
.tadv-text { font-size: 17px; line-height: 1.65; font-style: italic; color: var(--ink); max-width: 480px; }
.tadv-conexao { font-size: 15px; line-height: 1.6; color: var(--ink); font-weight: 700; margin-top: 14px; max-width: 480px; }
.tadv-afirm { margin-top: 16px; max-width: 480px; background: linear-gradient(180deg, #fbf6ea, #f4ead2); border: 1px solid #e3d2a6; border-radius: 12px; padding: 12px 16px; }
.tadv-afirm-label { display: block; font-family: var(--sans); font-style: normal; font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: #b5701f; margin-bottom: 6px; }
.tadv-afirm-text { font-family: var(--serif); font-size: 17px; color: var(--purple); font-style: italic; line-height: 1.5; }
.tadv-foot { font-size: 12px; color: var(--ink-soft); margin-top: 14px; letter-spacing: .3px; }
.tadv-hint { color: var(--ink-soft); font-size: 16px; }
@media (max-width: 620px) { .tcard { width: 210px; height: 360px; } }

/* ---------- STAT TILES ---------- */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 26px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; box-shadow: var(--shadow-sm); }
.stat .n { font-family: var(--serif); font-size: 32px; color: var(--purple); line-height: 1; }
.stat .l { font-size: 12px; color: var(--ink-soft); margin-top: 6px; text-transform: uppercase; letter-spacing: 1px; }

/* ---------- CLIENT CARDS ---------- */
.client-card {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; box-shadow: var(--shadow-sm); transition: transform .12s, box-shadow .12s;
  display: flex; flex-direction: column; gap: 10px; cursor: pointer; text-decoration: none; color: inherit;
}
.client-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); text-decoration: none; }
.client-card .avatar {
  width: 46px; height: 46px; border-radius: 12px; background: var(--purple-100); color: var(--purple);
  display: grid; place-items: center; font-family: var(--serif); font-size: 20px; font-weight: 600;
}
.client-card .name { font-family: var(--serif); font-size: 19px; color: var(--purple); }
.client-card .niche { font-size: 13px; color: var(--ink-soft); }
.client-card .idea { font-size: 13px; color: var(--ink); font-style: italic; border-left: 2px solid var(--purple-100); padding-left: 10px; }
.client-card .foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 6px; flex-wrap: wrap; }

/* ---------- BADGES ---------- */
.badge { font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 600; letter-spacing: .3px; display: inline-flex; align-items: center; gap: 5px; }
.badge.ativo { background: var(--green-soft); color: var(--green); }
.badge.onboarding { background: var(--amber-soft); color: var(--amber); }
.badge.pausado { background: #eee; color: #888; }
.badge.mgmt { background: var(--purple-100); color: var(--purple-700); }
.badge.vol { background: var(--cream); color: var(--ink-soft); border: 1px solid var(--line); }
.badge.tag { background: var(--purple-100); color: var(--purple-700); }

/* ---------- FILTER BAR ---------- */
.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 22px; }
.chip { padding: 7px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.chip.active { background: var(--purple); color: #fff; border-color: var(--purple); }
.search { flex: 1; min-width: 200px; padding: 9px 15px; border-radius: 999px; border: 1px solid var(--line); background: var(--paper); font-size: 14px; font-family: var(--sans); }
.search:focus { outline: 2px solid var(--purple-100); }

/* ---------- CLIENT DETAIL ---------- */
.detail-head { display: flex; align-items: flex-start; gap: 20px; margin-bottom: 8px; }
.detail-head .avatar { width: 68px; height: 68px; border-radius: 16px; background: var(--purple); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-size: 30px; flex-shrink: 0; }
.detail-head h1 { font-size: 34px; }
.detail-head .handle { color: var(--ink-soft); font-size: 14px; }
.tabs { display: flex; gap: 6px 2px; border-bottom: 1px solid var(--line); margin: 24px 0 24px; flex-wrap: wrap; }
.tabs button { background: none; border: none; padding: 10px 14px; font-family: var(--sans); font-size: 14px; font-weight: 600; color: var(--ink-soft); cursor: pointer; border-radius: 9px 9px 0 0; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs button:hover { background: var(--cream); color: var(--purple); }
.tabs button + button { box-shadow: -1px 0 0 var(--line); }
.tabs button.active { color: var(--purple); border-bottom-color: var(--purple); background: var(--purple-100); }

.section { margin-bottom: 26px; }
.section h2 { font-size: 22px; margin-bottom: 14px; }
.info-block { padding: 18px 20px; }
.info-block h3 { font-size: 15px; text-transform: uppercase; letter-spacing: 1px; color: var(--purple-500); margin-bottom: 8px; font-family: var(--sans); font-weight: 700; }
.info-block p { margin: 0; color: var(--ink); }
.banned-list { display: flex; flex-wrap: wrap; gap: 7px; }
.banned-tag { background: var(--red-soft); color: var(--red); padding: 4px 11px; border-radius: 8px; font-size: 13px; font-weight: 600; }

/* ---------- TABLE / TASKS ---------- */
.task-row { display: grid; grid-template-columns: 26px 1fr 175px 150px 120px 30px; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line); }
input[type="date"] { min-width: 140px; }
.task-row:last-child { border-bottom: none; }
.task-row .t-title { font-weight: 600; }
.t-name { outline: none; border-radius: 4px; padding: 1px 3px; cursor: text; }
.t-name:hover { background: var(--cream); }
.t-name:focus { background: #fff; box-shadow: 0 0 0 2px var(--purple-100); }
.task-row .t-title small { display: block; font-weight: 400; color: var(--ink-soft); font-size: 12px; }
.task-row.done .t-title { text-decoration: line-through; color: var(--ink-soft); }
.owner-pill { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--purple-100); color: var(--purple-700); font-weight: 600; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.due { font-size: 13px; color: var(--ink-soft); }
.due.late { color: var(--red); font-weight: 700; }
.due.soon { color: var(--amber); font-weight: 600; }
.due-edit { font-size: 12px; padding: 4px 6px; border-radius: 8px; border: 1px solid var(--line); background: var(--cream-2); color: var(--ink-soft); font-family: var(--sans); width: 100%; }
.due-edit.late { border-color: var(--red); color: var(--red); font-weight: 700; background: var(--red-soft); }
.due-edit.soon { border-color: var(--amber); color: var(--amber); font-weight: 600; background: var(--amber-soft); }
.due-wrap { display: flex; flex-direction: column; gap: 2px; align-items: flex-start; }
.due-hint { font-size: 10px; font-weight: 700; line-height: 1; white-space: nowrap; }
.due-hint.late { color: var(--red); }
.due-hint.soon { color: var(--amber); }
select.status-sel, select.mini { padding: 5px 8px; border-radius: 8px; border: 1px solid var(--line); background: var(--cream-2); font-family: var(--sans); font-size: 12px; font-weight: 600; cursor: pointer; }
select.owner-sel { width: 100%; max-width: 100%; background: var(--purple-100); color: var(--purple-700); border-color: transparent; text-overflow: ellipsis; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--ink-soft); font-size: 15px; padding: 4px; border-radius: 6px; }
.icon-btn:hover { background: var(--cream); color: var(--red); }
.st-todo { color: var(--ink-soft); }
.st-doing { color: var(--amber); }
.st-done { color: var(--green); }
.checkbox { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--purple-300); cursor: pointer; display: grid; place-items: center; background: var(--paper); }
.checkbox.on { background: var(--green); border-color: var(--green); color: #fff; }

.phase-group { margin-bottom: 18px; }
.phase-group .ph-head { font-family: var(--sans); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 1px; color: var(--purple-500); padding: 6px 4px; }

/* ---------- DOCS ---------- */
.doc-row { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.doc-row:last-child { border-bottom: none; }
.doc-ic { width: 36px; height: 36px; border-radius: 9px; background: var(--cream); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.doc-row .d-name { font-weight: 600; }
.dd-name[contenteditable] { outline: none; cursor: text; border-radius: 6px; padding: 1px 5px; margin: -1px -5px; }
.dd-name[contenteditable]:hover, .dd-name[contenteditable]:focus { background: var(--cream); box-shadow: inset 0 0 0 1px var(--line); }
.doc-row .d-meta { font-size: 12px; color: var(--ink-soft); }
.doc-cat { font-size: 11px; padding: 2px 9px; border-radius: 999px; background: var(--purple-100); color: var(--purple-700); font-weight: 600; }

/* ---------- BUTTONS / FORMS ---------- */
.btn { display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 10px; border: 1px solid var(--purple); background: var(--purple); color: #fff; font-family: var(--sans); font-size: 13px; font-weight: 600; cursor: pointer; }
.btn:hover { background: var(--purple-700); text-decoration: none; }
.btn.ghost { background: transparent; color: var(--purple); }
.btn.ghost:hover { background: var(--purple-100); }
.btn.sm { padding: 6px 12px; font-size: 12px; }
.btn.danger { color: #a8394b; border-color: #e2b8c0; }
.btn.danger:hover { background: #a8394b; color: #fff; border-color: #a8394b; }
input[type=text], input[type=date], input[type=url], select, textarea {
  padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); background: var(--paper);
  font-family: var(--sans); font-size: 14px; color: var(--ink); width: 100%;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--purple-100); border-color: var(--purple-300); }
.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.form-row > div { flex: 1; min-width: 140px; }
label.lbl { font-size: 12px; font-weight: 600; color: var(--ink-soft); display: block; margin-bottom: 5px; }

/* ---------- BANNERS ---------- */
.banner { padding: 12px 18px; border-radius: 12px; font-size: 13px; display: flex; gap: 10px; align-items: center; margin-bottom: 20px; }
.banner.info { background: var(--amber-soft); color: var(--amber); border: 1px solid #ecd9b8; }
.banner.live { background: var(--green-soft); color: var(--green); border: 1px solid #cfe4d5; }

/* ---------- EMPTY ---------- */
.empty { text-align: center; padding: 42px 20px; color: var(--ink-soft); }
.empty .big { font-size: 34px; margin-bottom: 8px; }

/* ---------- PROCESS ---------- */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 4px; bottom: 4px; width: 2px; background: var(--purple-100); }
.tl-item { position: relative; padding: 0 0 20px; }
.tl-item::before { content: ""; position: absolute; left: -23px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--purple); border: 2px solid var(--cream); }
.tl-item .when { font-family: var(--serif); font-size: 16px; color: var(--purple); }
.tl-item .who { font-size: 12px; color: var(--purple-500); font-weight: 700; text-transform: uppercase; letter-spacing: .5px; }
.tl-item .what { color: var(--ink); }
.pipeline { display: flex; gap: 8px; flex-wrap: wrap; }
.pipe-step { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; font-weight: 600; font-size: 13px; color: var(--purple); position: relative; }
.pipe-step .num { color: var(--purple-300); margin-right: 6px; }
.flow-step { padding: 16px 18px; margin-bottom: 12px; }
.flow-step h4 { font-family: var(--sans); font-size: 14px; color: var(--purple); margin-bottom: 8px; }
.flow-step ul { margin: 0; padding-left: 18px; color: var(--ink); }
.flow-step ul li { margin-bottom: 3px; }

/* ---------- TEAM ---------- */
.team-card { padding: 18px 20px; display: flex; gap: 14px; align-items: flex-start; }
.team-card .av { width: 44px; height: 44px; border-radius: 11px; background: var(--purple); color: #fff; display: grid; place-items: center; font-family: var(--serif); font-weight: 600; flex-shrink: 0; }
.team-card .nm { font-family: var(--serif); font-size: 18px; color: var(--purple); }
.team-card .rl { font-size: 13px; color: var(--purple-500); font-weight: 600; margin-bottom: 4px; }
.team-card .sc { font-size: 13px; color: var(--ink-soft); }

/* ---------- MODAL ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(36,27,49,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--paper); border-radius: var(--radius); padding: 26px; width: 100%; max-width: 460px; box-shadow: var(--shadow); }
.modal h3 { font-size: 22px; margin-bottom: 16px; }
.modal .actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 20px; }

/* ---------- LOGIN ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; background: var(--purple); padding: 20px; }
.login-box { background: var(--paper); border-radius: 22px; padding: 40px; width: 100%; max-width: 380px; text-align: center; box-shadow: var(--shadow); }
.login-box .logo { font-family: var(--serif); font-size: 40px; color: var(--purple); }
.login-box .logo b { color: var(--purple-300); }
.login-box p { color: var(--ink-soft); margin: 4px 0 22px; }

/* ---------- ONBOARDING BUILDER ---------- */
.onb-row { display: grid; grid-template-columns: 150px 1fr 150px 140px 32px; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); }
.onb-row:last-child { border-bottom: none; }
.onb-row .onb-title { font-weight: 600; }
.onb-row input, .onb-row select { padding: 6px 8px; font-size: 13px; }
@media (max-width: 760px) {
  .onb-row { grid-template-columns: 1fr 1fr; }
  .onb-row .onb-title { grid-column: 1 / -1; }
}

/* ---------- CONTEÚDO ---------- */
.content-row { display: grid; grid-template-columns: 1fr 70px 110px 110px auto; gap: 12px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.content-row:last-child { border-bottom: none; }
.c-code { font-family: var(--serif); font-size: 15px; color: var(--purple); }
.c-fmt { font-size: 11px; background: var(--purple-100); color: var(--purple-700); padding: 1px 7px; border-radius: 999px; font-family: var(--sans); font-weight: 600; margin-left: 4px; }
.c-tema { font-size: 13px; color: var(--ink); margin-top: 2px; }
.c-date { font-size: 12px; color: var(--ink-soft); }
.c-resp { font-size: 12px; color: var(--purple-700); font-weight: 600; }
.status-badge { font-size: 11px; padding: 3px 10px; border-radius: 999px; font-weight: 700; text-align: center; white-space: nowrap; }
.c-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; flex-wrap: wrap; }

.demand-stats { display: flex; gap: 0; overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-sm); }
.dstat { flex: 1 1 0; min-width: 90px; padding: 10px 12px; text-align: center; border-right: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; gap: 3px; }
.dstat:last-child { border-right: none; }
.dstat-n { font-family: var(--serif); font-size: 24px; line-height: 1; }
.dstat-l { font-size: 10.5px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .4px; white-space: nowrap; }

.kanban { display: flex; gap: 12px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.kcol { flex: 0 0 260px; width: 260px; min-width: 260px; max-width: 260px; background: var(--cream-2); border: 1px solid var(--line); border-radius: 14px; padding: 10px; }
.kcol-trafego { background: #e4f4f2; border-color: #0f766e; }
.kc-obs { font-size: 11px; color: var(--amber); background: var(--amber-soft); border-radius: 6px; padding: 4px 7px; margin-top: 6px; overflow-wrap: anywhere; word-break: break-word; }
.kcol-head { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; padding: 4px 6px 10px; border-bottom: 2px solid var(--line); display: flex; justify-content: space-between; margin-bottom: 8px; }
.kcount { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 0 8px; color: var(--ink-soft); }
.kcol-body { display: flex; flex-direction: column; gap: 8px; min-height: 30px; max-height: 78vh; overflow-y: auto; padding-right: 4px; }
.kempty { color: var(--ink-soft); font-size: 12px; text-align: center; padding: 8px; }
.kcard { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; box-shadow: var(--shadow-sm); overflow: visible; flex: 0 0 auto; }
.kcard, .kc-client, .kc-tema, .kc-meta { overflow-wrap: anywhere; word-break: break-word; }
.kc-links a { overflow-wrap: anywhere; word-break: break-all; }
.kcard.dragging { opacity: .45; }
.kcard.drop-target { border-color: var(--purple); box-shadow: 0 -3px 0 -1px var(--purple) inset, var(--shadow-sm); }
.kc-grip { cursor: grab; color: var(--ink-soft); margin-right: 6px; font-size: 13px; letter-spacing: -1px; user-select: none; }
.kc-grip:active { cursor: grabbing; }
.kc-client { font-family: var(--serif); font-size: 14px; color: var(--purple); }
.kc-tema { font-size: 12px; color: var(--ink); margin: 3px 0; }
.kc-meta { font-size: 11px; color: var(--ink-soft); }
.kc-foot { display: flex; gap: 6px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.kc-demandrow { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--ink-soft); }
.kc-demandrow input { padding: 3px 5px; font-size: 11px; border-radius: 6px; border: 1px solid var(--line); }
.kc-links { margin-top: 6px; font-size: 11px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.kc-links a { color: var(--purple-700); font-weight: 600; }
.kc-lnk { background: var(--cream); border: 1px solid var(--line); border-radius: 6px; font-size: 10px; padding: 2px 6px; cursor: pointer; color: var(--ink-soft); }
.kc-lnk:hover { background: var(--purple-100); color: var(--purple-700); }
.load-strip { background: var(--cream-2); border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; margin-bottom: 12px; font-size: 12px; color: var(--ink); display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.load-pill { background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-weight: 600; }
.load-pill.full { background: var(--red-soft); color: var(--red); border-color: var(--red); }
.cont-chip { white-space: normal; }

@media (max-width: 760px) {
  .content-row { grid-template-columns: 1fr auto; }
  .content-row .c-date, .content-row .c-resp { grid-column: 1; font-size: 11px; }
  .c-actions { grid-column: 1 / -1; justify-content: flex-start; }
}

/* ---------- CALENDÁRIO ---------- */
.cal-head { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.cal-head h2 { font-family: var(--serif); font-size: 24px; color: var(--purple); min-width: 220px; text-transform: capitalize; }
.cal-nav { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; width: 38px; height: 38px; cursor: pointer; font-size: 18px; color: var(--purple); }
.cal-nav:hover { background: var(--purple-100); }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; max-width: 1050px; }
.cal-wd { text-align: center; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--ink-soft); padding: 6px 0; }
.cal-cell { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; min-height: 104px; padding: 6px 6px 8px; display: flex; flex-direction: column; gap: 4px; }
.cal-cell.empty { background: transparent; border: none; }
.cal-cell.today { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.cal-cell.cal-add { cursor: pointer; position: relative; }
.cal-cell.cal-add:hover { border-color: var(--purple); background: var(--purple-100); }
.cal-cell .cal-plus { position: absolute; top: 5px; right: 8px; color: var(--purple); font-size: 15px; font-weight: 700; opacity: 0; line-height: 1; }
.cal-cell.cal-add:hover .cal-plus { opacity: .7; }
.cal-cell .dnum { font-family: var(--serif); font-size: 14px; color: var(--ink-soft); font-weight: 600; }
.cal-cell.today .dnum { color: var(--purple); }
.cal-chip { font-size: 11px; padding: 3px 7px; border-radius: 7px; background: var(--purple-100); color: var(--purple-700); font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border: none; text-align: left; width: 100%; }
.cal-chip:hover { background: var(--purple); color: #fff; }
.cal-chip.tipo { background: var(--green-soft); color: var(--green); }
.cal-chip.tipo:hover { background: var(--green); color: #fff; }
.cal-chip .cnt { opacity: .7; }
.cal-chip.chip-blocked { border: 1px dashed currentColor; font-style: italic; }
.cal-more { font-size: 10px; color: var(--ink-soft); padding-left: 2px; }

/* ---------- Barra de formatação (negrito/itálico do corpo e legenda) ---------- */
.fmt-bar { display: flex; align-items: center; gap: 4px; margin: 4px 0 6px; flex-wrap: wrap; }
.fmt-btn { min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); font-size: 14px; cursor: pointer; line-height: 1; }
.fmt-btn:hover { background: var(--purple-100); border-color: var(--purple); }
.fmt-hint { font-size: 11px; color: var(--ink-soft); margin-left: 6px; }

/* ---------- Anotações importantes (mini bloco na Visão geral) ---------- */
.notes-card { background: #fffdf3; border-left: 4px solid #e0b93a; }
.notes-card textarea { width: 100%; margin-top: 8px; background: transparent; border: none; resize: vertical; font-family: var(--sans); font-size: 14px; line-height: 1.5; color: var(--ink); outline: none; min-height: 60px; }

/* ---------- Ícone de informação (ⓘ nos títulos) + tooltips ---------- */
.info-tip { display: inline-flex; align-items: center; justify-content: center; width: 17px; height: 17px; border-radius: 50%; background: var(--purple-100); color: var(--purple); font-family: var(--sans); font-size: 11px; font-weight: 800; font-style: italic; cursor: help; margin-left: 8px; vertical-align: middle; position: relative; }
.info-tip:hover { background: var(--purple); color: #fff; }
.info-tip::after, .tabs button[data-tip]::after, .chip[data-tip]::after {
  content: attr(data-tip); position: absolute; left: 50%; transform: translateX(-50%); top: calc(100% + 8px);
  background: var(--ink); color: #fff; font-family: var(--sans); font-size: 12px; font-weight: 500; font-style: normal; line-height: 1.45; text-align: left;
  padding: 9px 12px; border-radius: 9px; width: max-content; max-width: 280px; white-space: normal;
  opacity: 0; pointer-events: none; transition: opacity .15s; z-index: 60; box-shadow: 0 8px 24px rgba(20,10,40,.28);
}
.info-tip:hover::after { opacity: 1; }
.tabs button { position: relative; }
.tabs button[data-tip]::after { top: calc(100% + 6px); }
.tabs button[data-tip]:hover::after { opacity: 1; }
.chip[data-tip] { position: relative; }
.chip[data-tip]:hover::after { opacity: 1; }

/* ---------- Estratégia mensal (mural por mês) ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.strat-yearnav { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.strat-months { margin-bottom: 12px; }
.chip.strat-month { cursor: pointer; padding: 6px 13px; font-size: 12.5px; }
.strat-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.strat-card { position: relative; background: #fffdf7; border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px 16px; box-shadow: 0 2px 10px rgba(20,10,40,.06); }
.strat-fmt { display: flex; gap: 4px; margin: 0 0 8px; }
.strat-fmt .sfmt { min-width: 30px; height: 28px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); color: var(--ink); font-size: 13px; cursor: pointer; line-height: 1; }
.strat-fmt .sfmt:hover { background: var(--purple-100); border-color: var(--purple); }
.strat-card .strat-title { width: 100%; border: none; background: transparent; font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--purple); outline: none; padding: 0 24px 8px 0; }
.strat-card .strat-title::placeholder { color: var(--purple-300); font-weight: 600; }
.strat-card-title { font-family: var(--serif); font-size: 18px; font-weight: 700; color: var(--purple); margin-bottom: 6px; }
.strat-card .strat-text { width: 100%; border: none; background: transparent; font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--ink); outline: none; min-height: 160px; white-space: pre-wrap; overflow-wrap: anywhere; resize: vertical; overflow: auto; }
.strat-card .strat-text:empty:before { content: attr(data-ph); color: var(--ink-soft); }
.strat-card .strat-ro { font-size: 15px; line-height: 1.55; white-space: pre-wrap; min-height: 40px; }
.strat-links { display: flex; flex-direction: column; gap: 6px; margin-top: 12px; }
.strat-link-row { display: flex; align-items: center; gap: 6px; }
.strat-link-ic { font-size: 13px; }
.strat-link { flex: 1; padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 12.5px; color: var(--ink); }
.strat-link-del { border: none; background: none; color: var(--ink-soft); cursor: pointer; font-size: 12px; padding: 2px 5px; border-radius: 6px; }
.strat-link-del:hover { background: var(--purple-100); color: var(--purple); }
.strat-addlink { margin-top: 8px; background: none; border: 1px dashed var(--line); border-radius: 8px; padding: 5px 11px; font-size: 12px; font-weight: 600; color: var(--purple); cursor: pointer; }
.strat-addlink:hover { background: var(--purple-100); border-color: var(--purple); }
.strat-links-ro { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.strat-link-chip { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--purple-100); color: var(--purple-700); font-weight: 600; text-decoration: none; }
.strat-del { position: absolute; top: 8px; right: 8px; border: none; background: none; color: var(--ink-soft); cursor: pointer; font-size: 14px; opacity: 0; border-radius: 6px; padding: 2px 6px; z-index: 2; }
.strat-card:hover .strat-del { opacity: 1; }
.strat-del:hover { background: var(--purple-100); color: var(--purple); }

/* ---------- Demandas / pedidos (cartões) ---------- */
.demand-card { display: flex; align-items: flex-start; gap: 12px; padding: 14px 4px; border-bottom: 1px solid var(--line); }
.demand-card:last-child { border-bottom: none; }
.demand-card.done { opacity: .55; }
.demand-card.done .demand-title { text-decoration: line-through; }
.demand-ic { width: 34px; height: 34px; border-radius: 9px; background: var(--cream); display: grid; place-items: center; font-size: 16px; flex-shrink: 0; }
.demand-body { flex: 1; min-width: 0; }
.demand-title { font-weight: 600; font-size: 14px; }
.demand-notes { font-size: 13px; color: var(--ink-soft); margin: 4px 0 0; white-space: pre-wrap; }
.demand-meta { font-size: 12px; color: var(--ink-soft); margin-top: 5px; }
.demand-meta .late { color: var(--red); font-weight: 700; }
.demand-meta .soon { color: var(--amber); font-weight: 600; }
.demand-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.demand-actions .demand-status { width: auto; min-width: 130px; max-width: 150px; }
/* Tarefas de gestão editáveis (título/obs contenteditable) */
.gt-title[contenteditable], .gt-obs[contenteditable] { outline: none; cursor: text; border-radius: 6px; padding: 1px 4px; margin: -1px -4px; }
.gt-title[contenteditable]:hover, .gt-obs[contenteditable]:hover, .gt-title:focus, .gt-obs:focus { background: var(--cream); }
.gt-title:empty:before, .gt-obs:empty:before { content: attr(data-ph); color: var(--ink-soft); }

/* ---------- Banco de ideias (tabela) ---------- */
.idea-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.idea-table th { text-align: left; padding: 10px 14px; font-size: 12px; color: var(--ink-soft); text-transform: uppercase; letter-spacing: .04em; border-bottom: 1px solid var(--line); }
.idea-table td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
.idea-table tr:last-child td { border-bottom: none; }
.idea-table tr.idea-used { background: var(--green-soft); }
.idea-table tr.idea-used b { color: var(--green); }
.idea-ed { outline: none; cursor: text; border-radius: 6px; padding: 3px 6px; margin: -3px -6px; min-width: 60px; font-size: 14px; }
.idea-ed.idea-tema { font-weight: 700; }
.idea-ed.idea-obs { color: var(--ink-soft); }
.idea-ed:hover, .idea-ed:focus { background: var(--paper); box-shadow: inset 0 0 0 1px var(--line); }
.idea-ed:empty:before { content: attr(data-ph); color: var(--ink-soft); font-weight: 400; }
.idea-link { padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); font-size: 12px; color: var(--ink); }

/* ---------- Resumo do mês por fase (calendário editorial) ---------- */
.content-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 16px; }
.content-stats .cst { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; text-align: center; }
.content-stats .cst-n { font-family: var(--serif); font-size: 26px; font-weight: 700; color: var(--purple); line-height: 1; }
.content-stats .cst-l { font-size: 12px; color: var(--ink-soft); margin-top: 6px; font-weight: 600; line-height: 1.2; }
@media (max-width: 640px) { .content-stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Pendências do cliente (conteúdo travado) ---------- */
.pend-card { border-left: 4px solid #8a6d1f; margin-bottom: 16px; }
.pend-card h3 { color: #7a5f18; font-family: var(--sans); font-size: 15px; }
.pend-count { display: inline-block; background: #8a6d1f; color: #fff; font-size: 12px; border-radius: 999px; padding: 1px 9px; margin-left: 4px; }
.pend-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pend-row:first-of-type { border-top: none; }
.pend-row .d-name { font-weight: 600; }
.pend-row .d-meta { font-size: 12px; color: var(--ink-soft); margin-top: 2px; }
.cal-cell { align-content: start; }

/* Agenda (mobile) */
.agenda { display: flex; flex-direction: column; gap: 8px; }
.agenda-day { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; gap: 12px; align-items: flex-start; }
.agenda-day.today { border-color: var(--purple); box-shadow: 0 0 0 1px var(--purple); }
.agenda-date { flex-shrink: 0; width: 52px; text-align: center; }
.agenda-date b { font-family: var(--serif); font-size: 22px; color: var(--purple); display: block; line-height: 1; }
.agenda-date span { font-size: 10px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-soft); }
.agenda-chips { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.agenda-chips .cal-chip { white-space: normal; padding: 7px 10px; font-size: 13px; }

/* ---------- MOBILE ---------- */
.menu-btn { display: none; }
@media (max-width: 900px) {
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 12px 16px; gap: 8px; }
  .sidebar .brand { padding: 0 !important; margin: 0; }
  .sidebar .brand img { max-width: 128px; width: auto; }
  .sidebar > .sub { display: none; }
  .sidebar .nav, .sidebar .foot, .sidebar .nav-label { display: none; }
  .sidebar.open .nav { display: flex; width: 100%; }
  .sidebar.open .nav-label { display: block; }
  .sidebar.open .foot { display: block; width: 100%; }
  .menu-btn { display: inline-block; margin-left: auto; background: rgba(255,255,255,.12); color: #fff; border: none; padding: 8px 14px; border-radius: 8px; cursor: pointer; }
  .main { padding: 20px 16px 64px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid.cols-3, .grid.cols-2, .grid.cols-4 { grid-template-columns: 1fr; }
  .page-head h1 { font-size: 28px; }
  .detail-head { flex-wrap: wrap; gap: 12px; }
  .cal-head { flex-wrap: wrap; }
  .cal-head h2 { min-width: 0; flex: 1; font-size: 20px; }
  .cal-head .btn, .cal-head .btn.sm { margin-left: 0 !important; }
  .toolbar { gap: 8px; }

  /* tarefas: vira flex que quebra linha (título em cima, controles embaixo) */
  .task-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
  .task-row .checkbox { order: 0; }
  .task-row .t-title { order: 1; flex: 1 1 70%; }
  .task-row .del-task { order: 2; margin-left: auto; }
  .task-row .owner-sel, .task-row .owner-pill, .task-row .status-sel { order: 3; flex: 1 1 30%; min-width: 96px; }
  .task-row .due-edit { order: 3; flex: 1 1 40%; min-width: 140px; }
}

/* ---------- COMERCIAL / SDR ---------- */
.sdr-list { display: flex; flex-direction: column; }
.sdr-item { display: flex; align-items: center; gap: 10px; padding: 9px 2px; border-bottom: 1px solid var(--line); }
.sdr-item:last-child { border-bottom: none; }
.sdr-item .who { flex: 1; font-weight: 600; color: var(--ink); font-size: 14px; line-height: 1.3; }
.sdr-item .who small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 12px; margin-top: 2px; }
.sdr-resp { font-size: 11px; font-weight: 700; color: var(--purple); background: var(--purple-100); padding: 2px 8px; border-radius: 20px; }
.sdr-obs { font-size: 13px; cursor: help; opacity: .8; }
.sdr-count { font-size: 12px; font-weight: 700; color: var(--purple); background: var(--purple-100); border-radius: 20px; padding: 2px 10px; }
.sdr-pill { font-size: 11px; padding: 3px 9px; border-radius: 20px; font-weight: 700; white-space: nowrap; }
.sdr-pill.ok  { background: var(--green-soft); color: var(--green); }
.sdr-pill.wait{ background: #fbf0d8; color: #9a6b16; }
.sdr-pill.bad { background: var(--red-soft); color: var(--red); }
.sdr-pill.mut { background: var(--purple-100); color: var(--purple); }
.sdr-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.sdr-table th { text-align: left; padding: 10px 12px; background: var(--purple-100); color: var(--purple); font-size: 11px; letter-spacing: .5px; text-transform: uppercase; position: sticky; top: 0; }
.sdr-table td { padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.sdr-table tbody tr:hover { background: var(--paper-2, #faf6ee); }

/* ---------- SUBTABS (Comercial) ---------- */
.subtabs { display: flex; gap: 6px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 22px; }
.subtab { padding: 10px 16px; font-weight: 600; font-size: 14px; color: var(--ink-soft); border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; background: none; cursor: pointer; font-family: inherit; }
.subtab:hover { color: var(--purple); text-decoration: none; }
.subtab.active { color: var(--purple); border-bottom-color: var(--purple); }

/* ---------- SOCIAL SELLER (barras de análise) ---------- */
.big-metric { font-family: var(--serif); font-size: 40px; color: var(--purple); line-height: 1; margin: 6px 0 4px; }
.sbars { display: flex; flex-direction: column; gap: 9px; margin-top: 10px; }
.sbar { display: grid; grid-template-columns: 130px 1fr 44px; align-items: center; gap: 10px; }
.sbar-l { font-size: 12.5px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sbar-track { height: 12px; background: var(--purple-100); border-radius: 20px; overflow: hidden; }
.sbar-fill { height: 100%; background: linear-gradient(90deg, var(--purple-500), var(--purple)); border-radius: 20px; }
.sbar-v { font-size: 13px; font-weight: 700; color: var(--purple); text-align: right; }

/* ---------- TRÁFEGO PAGO + modos da agenda ---------- */
.btn.active-mode { background: var(--purple); color: #fff; border-color: var(--purple); }
.traf-list { display: flex; flex-direction: column; }
.traf-row { display: flex; align-items: center; gap: 12px; padding: 12px 4px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.traf-row:last-child { border-bottom: none; }
.traf-row.is-done { opacity: .7; }
.traf-main { flex: 1; min-width: 200px; }
.traf-title { font-weight: 600; color: var(--ink); font-size: 14px; }
.traf-title small { display: block; font-weight: 500; color: var(--ink-soft); font-size: 12px; margin-top: 2px; }
.traf-links { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.traf-nolink { font-size: 12px; color: var(--ink-soft); font-style: italic; }

/* ---------- NAV bloqueada ---------- */
.nav a.nav-locked { opacity: .5; }
.nav a.nav-locked:hover { opacity: .8; }
.nav-lock { margin-left: auto; font-size: 11px; }

/* ---------- ASSISTENTE IA (chat) ---------- */
.ai-wrap { max-width: 820px; }
.ai-msgs { display: flex; flex-direction: column; gap: 12px; min-height: 300px; max-height: 58vh; overflow-y: auto; padding: 6px 2px 12px; }
.ai-hello { background: var(--purple-100); color: var(--purple); padding: 16px 18px; border-radius: 14px; font-size: 15px; align-self: flex-start; max-width: 90%; }
.ai-bubble { padding: 12px 16px; border-radius: 16px; max-width: 82%; font-size: 15px; line-height: 1.55; }
.ai-me { align-self: flex-end; background: var(--purple); color: #fff; border-bottom-right-radius: 5px; }
.ai-bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--line); color: var(--ink); border-bottom-left-radius: 5px; box-shadow: var(--shadow-sm); }
.ai-err { background: var(--amber-soft); border-color: #e6cfa0; color: #7a5312; }
.ai-bot p { margin: 0 0 8px; }
.ai-bot p:last-child { margin-bottom: 0; }
.ai-bot p.ai-h { margin-top: 12px; color: var(--purple); }
.ai-bot ul { margin: 4px 0 10px; padding-left: 20px; }
.ai-bot li { margin: 3px 0; }
.ai-bot strong { font-weight: 700; color: var(--purple); }
.ai-bot code { background: var(--purple-100); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.ai-typing { color: var(--ink-soft); font-style: italic; }
.ai-input { display: flex; gap: 10px; align-items: flex-end; margin-top: 8px; }
.ai-input textarea { flex: 1; resize: none; border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; font-family: inherit; font-size: 15px; background: var(--paper); color: var(--ink); line-height: 1.4; }
.ai-input textarea:focus { outline: none; border-color: var(--purple-300); }
.ai-input .btn { height: 44px; }
.ai-suggest { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.ai-chip { background: var(--paper); border: 1px solid var(--line); color: var(--purple); border-radius: 20px; padding: 7px 14px; font-size: 13px; cursor: pointer; font-family: inherit; }
.ai-chip:hover { background: var(--purple-100); }

/* ---------- Reordenar materiais (setinhas) ---------- */
.doc-moves { display: flex; flex-direction: column; gap: 1px; margin-right: 2px; }
.doc-moves .doc-move { font-size: 9px; line-height: 1; padding: 2px 5px; color: var(--purple); border: 1px solid var(--line); border-radius: 5px; background: var(--paper); cursor: pointer; }
.doc-moves .doc-move:hover:not([disabled]) { background: var(--purple-100); }
.doc-moves .doc-move[disabled] { opacity: .25; cursor: default; }

/* ---------- Materiais: filtro, categoria editável, drag&drop ---------- */
.doc-filterbar { display: flex; align-items: center; gap: 10px; margin: 0 0 10px 2px; }
.doc-filterbar select { padding: 5px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 13px; color: var(--ink); }
.doc-grip { cursor: grab; color: var(--ink-soft); font-size: 16px; line-height: 1; padding: 0 2px; user-select: none; flex-shrink: 0; letter-spacing: -2px; }
.doc-grip:active { cursor: grabbing; }
.doc-row.dragging { opacity: .45; }
.doc-row.drop-target { box-shadow: inset 0 2px 0 var(--purple); background: var(--purple-100); }
.doc-cat-sel { font-size: 11px; padding: 3px 8px; border-radius: 999px; border: 1px solid var(--purple-100); background: var(--purple-100); color: var(--purple-700); font-weight: 600; max-width: 190px; cursor: pointer; }
.doc-cat-sel:hover { border-color: var(--purple); }

/* ---------- Links & perfis do cliente (Visão geral) ---------- */
.client-link-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.client-link-chip { display: inline-flex; align-items: center; gap: 4px; background: var(--cream); border: 1px solid var(--line); border-radius: 999px; padding: 4px 6px 4px 12px; font-size: 13px; }
.client-link-chip a { color: var(--purple-700); font-weight: 600; text-decoration: none; }
.client-link-chip a:hover { text-decoration: underline; }
.client-link-chip .cl-del { border: none; background: none; color: var(--ink-soft); cursor: pointer; font-size: 12px; line-height: 1; padding: 2px 4px; border-radius: 999px; }
.client-link-chip .cl-del:hover { background: var(--purple-100); color: var(--purple); }
.client-link-add select, .client-link-add input { padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); font-size: 13px; color: var(--ink); width: 100%; }

/* ---------- Links & infos úteis (página do funcionário) ---------- */
.link-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 12px; }
.link-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); background: var(--paper); }
.link-row:last-child { border-bottom: none; }
.link-ic { font-size: 15px; flex-shrink: 0; }
.link-body { flex: 1; min-width: 0; }
.link-name { font-weight: 600; color: var(--ink); font-size: 14px; }
.link-text { font-size: 13px; color: var(--ink-soft); margin-top: 3px; word-break: break-word; white-space: pre-wrap; background: var(--cream-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; }
.link-add { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.link-add input { flex: 1; min-width: 140px; }
.link-add select { flex: 0 0 auto; }

/* ---------- Banco de emojis do cliente (editor de conteúdo) ---------- */
.emoji-bank { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 4px; }
.emoji-chip { font-size: 18px; line-height: 1; padding: 4px 9px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); cursor: pointer; }
.emoji-chip:hover { background: var(--purple-100); border-color: var(--purple-300); }

/* ---------- Automações (comentário → direct, estilo ManyChat) ---------- */
.auto-sec { margin-top: 14px; border: 1px dashed var(--purple-300, #c9b3ec); border-radius: 12px; padding: 12px 14px; background: var(--purple-050, #f6f1fd); }
.auto-sec-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.auto-panel { margin-top: 12px; }
.auto-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.auto-card { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: var(--paper); box-shadow: var(--shadow-sm); }
.auto-card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.auto-code { font-family: var(--serif); font-size: 15px; font-weight: 600; color: var(--purple); }
.auto-field { margin-top: 8px; }
.auto-flabel { display: flex; align-items: center; justify-content: space-between; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--ink-soft); margin-bottom: 3px; }
.auto-flabel .auto-copy { font-size: 13px; padding: 0 4px; }
.auto-val { font-size: 13px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.auto-val.auto-ed { border: 1px solid var(--line); border-radius: 8px; padding: 6px 9px; background: var(--paper); min-height: 20px; }
.auto-val.auto-ed:focus { outline: none; border-color: var(--purple-300, #c9b3ec); box-shadow: 0 0 0 2px var(--purple-100); }
.auto-group { margin-top: 8px; border-left: 3px solid var(--purple-100); padding-left: 10px; }
.auto-glabel { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--purple); margin: 6px 0 2px; }
.auto-manual { margin-top: 10px; border: 1px solid var(--green); border-radius: 10px; padding: 10px 12px; background: var(--green-soft); }
.auto-manual .auto-val.auto-ed { background: #fff; }
.auto-details { margin-top: 12px; }
.auto-details > summary { cursor: pointer; font-size: 12px; font-weight: 700; color: var(--ink-soft); list-style: none; padding: 4px 0; }
.auto-details > summary::-webkit-details-marker { display: none; }
.auto-details > summary::before { content: "▸ "; }
.auto-details[open] > summary::before { content: "▾ "; }
.cal-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--ink-soft); margin: -4px 2px 12px; }
.cal-legend .cl-dot { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-left: 10px; }
.cal-legend .cl-dot:first-child { margin-left: 0; }
.auto-hin { border-bottom: 1px dashed var(--purple-300, #c9b3ec); padding: 0 2px; min-width: 40px; display: inline-block; outline: none; }
.auto-hin-ref { font-weight: 400; color: var(--ink); }
.auto-hin:empty:before, .auto-val.auto-ed:empty:before { content: attr(data-ph); color: var(--ink-soft); opacity: .6; }
.auto-tagmanual { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--amber); background: var(--amber-soft); border-radius: 6px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }
.auto-openlink { font-size: 11px; color: var(--purple); margin-left: auto; margin-right: 8px; white-space: nowrap; }
.auto-addreply { padding: 0 8px !important; font-size: 11px !important; margin-left: 8px; }

/* ---------- Linhas editoriais / Pilares / Funções (3 blocos, itens em chips coloridos) ---------- */
.pil-wrap { display: flex; flex-direction: column; gap: 16px; }
.pil-two { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .pil-two { grid-template-columns: 1fr; } }
.pil-sec { padding: 16px 20px; }
.pil-sec-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.pil-sec-head h3 { margin: 0; font-family: var(--serif); color: var(--purple); font-size: 18px; }
.pil-groups { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 16px; align-items: start; }
.pil-group { border: 1px solid var(--purple-100); border-radius: 14px; overflow: hidden; background: var(--paper); box-shadow: var(--shadow-sm); }
.pil-group-h { display: flex; align-items: center; gap: 4px; padding: 9px 12px; background: var(--purple-100); }
.pil-group-h b, .pil-gtitle { font-family: var(--serif); font-weight: 700; color: var(--purple); font-size: 14px; flex: 1; }
.pil-gtitle { outline: none; border-radius: 6px; padding: 1px 4px; }
.pil-gtitle:focus { background: #fff; box-shadow: 0 0 0 2px var(--purple-300, #c9b3ec); }
.pil-gtitle:empty:before, .pil-item:empty:before { content: attr(data-ph); color: var(--ink-soft); opacity: .6; font-weight: 400; }
.pil-gdel { opacity: .5; flex-shrink: 0; }
.pil-gdel:hover { opacity: 1; }
.pil-ul { list-style: none; margin: 0; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.pil-li { display: flex; align-items: stretch; gap: 4px; }
.pil-item { flex: 1; font-size: 13px; color: var(--ink); line-height: 1.35; border: 1px solid var(--line); border-radius: 9px; padding: 5px 10px; outline: none; transition: box-shadow .1s; }
.pil-gul .pil-item      { background: #f4effb; border-color: #e2d6f2; }             /* Linhas → roxo */
[data-list="pilares"] .pil-item { background: var(--green-soft); border-color: #cde3d4; }  /* Pilares → verde */
[data-list="funcoes"] .pil-item { background: var(--amber-soft); border-color: #ecdcc0; }  /* Funções → âmbar */
.pil-item:focus { box-shadow: 0 0 0 2px var(--purple-300, #c9b3ec); background: #fff; }
.pil-li .pil-x { opacity: 0; flex-shrink: 0; font-size: 12px; align-self: center; }
.pil-li:hover .pil-x { opacity: .5; }
.pil-li .pil-x:hover { opacity: 1; }
.pil-add { margin: 4px 0 2px 12px; background: none; border: 1px dashed var(--line); border-radius: 8px; color: var(--purple); font-size: 12px; padding: 3px 10px; cursor: pointer; }
.pil-add:hover { background: var(--purple-100); border-color: var(--purple-300, #c9b3ec); }
.pil-two .pil-sec .pil-add { margin-left: 12px; }
.pil-seedbar { margin-top: 2px; }
.cup-hint { font-size: 11px; color: var(--ink-soft); margin-top: 4px; min-height: 14px; }
.cup-hint a { color: var(--purple); }
.expandfield { min-height: 40px; line-height: 1.45; resize: vertical; overflow: hidden; transition: min-height .12s ease; white-space: pre-wrap; word-break: break-word; }
.expandfield.expanded { min-height: 92px; }

/* ---------- Comentários no card de conteúdo ---------- */
.cmt-sec { margin-top: 14px; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--cream-2); }
.cmt-list { display: flex; flex-direction: column; gap: 8px; max-height: 240px; overflow-y: auto; margin: 8px 0 10px; }
.cmt-item { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 11px; }
.cmt-meta { font-size: 11px; color: var(--ink-soft); margin-bottom: 3px; }
.cmt-meta b { color: var(--purple); }
.cmt-text { font-size: 13px; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.cmt-empty { font-size: 12px; color: var(--ink-soft); padding: 6px 2px; }
.cmt-add { display: flex; gap: 8px; align-items: flex-end; }
.cmt-add textarea { flex: 1; }
.kc-cmt { color: var(--purple); font-weight: 700; }



/* ============================================================
   CENTRAL DO CLIENTE (portal.html) — cósmico roxo/verde
   ============================================================ */
.portal-body { --lime:#B2E01E; --lime-soft:#c8ee5a; --roxo:#2D0859; --roxo-deep:#12022b; --roxo-ink:#0a0118;
  --roxo-line:#4a1a80; --off:#f3efe6; --mut:#b9a9d6; --mut2:#8f7bb5;
  background:var(--roxo-ink); color:var(--off); min-height:100vh; }
/* fundo cósmico dinâmico */
.pt-bgfx { position:fixed; inset:0; z-index:-3; background:
  radial-gradient(1200px 700px at 78% -5%, #4a127e 0%, rgba(74,18,126,0) 55%),
  radial-gradient(900px 600px at 8% 15%, #2a0a55 0%, rgba(42,10,85,0) 60%),
  radial-gradient(1000px 900px at 50% 115%, #34075f 0%, rgba(52,7,95,0) 55%),
  var(--roxo-ink); animation:ptDrift 24s ease-in-out infinite alternate; }
@keyframes ptDrift { 0%{ background-position:0 0,0 0,0 0,0 0; } 100%{ background-position:40px -30px,-30px 20px,20px 20px,0 0; } }
.pt-bggrid { position:fixed; inset:0; z-index:-2; opacity:.5; pointer-events:none;
  background-image:linear-gradient(rgba(140,90,220,.06) 1px,transparent 1px),linear-gradient(90deg,rgba(140,90,220,.06) 1px,transparent 1px);
  background-size:54px 54px; -webkit-mask-image:radial-gradient(circle at 50% 25%,#000 30%,transparent 85%); mask-image:radial-gradient(circle at 50% 25%,#000 30%,transparent 85%); }
.pt-stars { position:fixed; inset:0; z-index:-1; pointer-events:none; opacity:.7; }
.pt-stars i { position:absolute; border-radius:50%; background:#cbb6ff; animation:ptTw 4s infinite ease-in-out; }
@keyframes ptTw { 0%,100%{ opacity:.15; transform:scale(1); } 50%{ opacity:.95; transform:scale(1.35); } }

#portal { position:relative; z-index:1; max-width:820px; margin:0 auto; padding:0 18px 90px; }
.pt-loading { text-align:center; color:var(--mut); padding:60px 0; }
.pt-muted { color:var(--mut); font-size:13px; }
.pt-muted2 { color:#d7cbef; font-size:13px; line-height:1.5; white-space:pre-wrap; }
.pt-center { text-align:center; padding:70px 20px; }
.pt-center h2 { color:#fff; }
.pt-logo { max-width:150px; margin:0 auto 16px; display:block; filter:brightness(0) invert(1); opacity:.95; }
.pt-eyebrow { font-size:11px; letter-spacing:4px; text-transform:uppercase; color:var(--lime); margin:8px 0 6px; }
.pt-eyebrow2 { font-size:11px; letter-spacing:4px; text-transform:uppercase; color:var(--lime); margin-bottom:8px; }

/* login */
.pt-login { min-height:100vh; display:grid; place-items:center; padding:22px; }
.pt-login-box { background:linear-gradient(180deg,rgba(66,20,120,.5),rgba(30,7,60,.55)); backdrop-filter:blur(12px); -webkit-backdrop-filter:blur(12px);
  border:1px solid rgba(120,70,190,.35); border-radius:24px; box-shadow:0 30px 80px rgba(0,0,0,.55); padding:44px 34px; width:100%; max-width:390px; text-align:center; }
.pt-login-box h1 { font-size:30px; color:#fff; margin-bottom:8px; }
.pt-login-box input { width:100%; margin:16px 0 12px; padding:13px 16px; border:1px solid rgba(178,224,30,.35); border-radius:14px; font-size:15px; text-align:center; background:rgba(255,255,255,.95); color:#241b31; }
.pt-login-box input:focus { outline:none; border-color:var(--lime); box-shadow:0 0 0 3px rgba(178,224,30,.25); }
.pt-err { color:#ff9db0; font-size:13px; margin-bottom:8px; }
.pt-foot { margin-top:20px; font-size:12px; color:var(--mut2); }
.pt-foot b { color:var(--lime-soft); }

/* botões */
.pt-btn { background:linear-gradient(180deg,#c2ee3a,#a6d016); color:#1c0540; border:none; border-radius:13px; padding:12px 20px; font-size:15px; font-weight:800; letter-spacing:.2px; cursor:pointer; box-shadow:0 10px 30px -8px rgba(178,224,30,.5); }
.pt-login-box .pt-btn { width:100%; }
.pt-btn:hover { filter:brightness(1.05); }
.pt-btn.ghost { background:transparent; color:#fff; border:1.5px solid rgba(178,224,30,.45); box-shadow:none; }
.pt-btn.ghost:hover { border-color:var(--lime); background:rgba(178,224,30,.1); }
.pt-btn.sm { padding:9px 16px; font-size:13px; }
.pt-btn:disabled { opacity:.55; cursor:default; }
.pt-x { background:none; border:none; color:var(--mut2); cursor:pointer; font-size:14px; flex:none; }
.pt-x:hover { color:#ff9db0; }

/* shell */
.pt-top { display:flex; align-items:center; justify-content:space-between; padding:22px 4px 8px; }
.pt-brand { display:flex; align-items:center; gap:10px; }
.pt-brand img { height:24px; filter:brightness(0) invert(1); opacity:.9; }
.pt-brand span { font-size:11px; letter-spacing:3px; text-transform:uppercase; color:var(--lime); }
.pt-logout { background:transparent; border:1px solid rgba(255,255,255,.16); border-radius:11px; padding:7px 15px; color:var(--mut); cursor:pointer; font-size:13px; }
.pt-logout:hover { border-color:var(--lime); color:var(--lime-soft); }
.pt-head { display:flex; align-items:center; gap:16px; margin:12px 0 22px; }
.pt-avatar { width:60px; height:60px; border-radius:18px; background:linear-gradient(140deg,#c2ee3a,#8bb614); color:#1c0540; display:grid; place-items:center; font-family:var(--serif); font-size:25px; font-weight:700; flex-shrink:0; box-shadow:0 10px 30px -6px rgba(178,224,30,.4); }
.pt-head h1 { font-size:33px; color:#fff; letter-spacing:-.3px; }
.pt-head .pt-muted { color:#c3b4e0; }

/* tabs */
.pt-tabs { display:flex; gap:6px; overflow-x:auto; padding:5px; margin-bottom:22px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); border-radius:16px; }
.pt-tabs button { background:transparent; border:none; border-radius:11px; padding:10px 15px; font-size:13.5px; color:var(--mut); cursor:pointer; white-space:nowrap; }
.pt-tabs button:hover { color:#fff; }
.pt-tabs button.active { background:linear-gradient(180deg,#c2ee3a,#a6d016); color:#1c0540; font-weight:800; box-shadow:0 6px 18px -6px rgba(178,224,30,.5); }
.pt-intro { color:#e7ddf7; margin-bottom:18px; font-size:15px; }
.pt-intro b { color:var(--lime-soft); }

/* hero + painéis (tema escuro translúcido) */
.pt-hero { background:linear-gradient(180deg,rgba(66,20,120,.45),rgba(30,7,60,.5)); border:1px solid rgba(120,70,190,.3); border-radius:22px; padding:26px 28px; margin-bottom:18px; }
.pt-hero h2 { font-family:var(--serif); font-size:26px; color:#fff; margin-bottom:8px; line-height:1.2; }
.pt-hero p { color:#d7cbef; line-height:1.6; font-size:15px; }
.pt-panel { background:linear-gradient(180deg,rgba(66,20,120,.4),rgba(30,7,60,.45)); border:1px solid rgba(120,70,190,.28); border-radius:20px; padding:18px 20px; margin-bottom:16px; }
.pt-panel-h { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-wrap:wrap; margin-bottom:12px; }
.pt-panel-h h3 { font-family:var(--serif); color:#fff; font-size:18px; }
.pt-note { width:100%; min-height:130px; background:rgba(255,255,255,.06); border:1px solid rgba(178,224,30,.2); border-radius:14px; padding:13px 15px; font-family:inherit; font-size:14px; color:var(--off); line-height:1.6; resize:vertical; }
.pt-note:focus { outline:none; border-color:var(--lime); box-shadow:0 0 0 3px rgba(178,224,30,.15); }
.pt-note::placeholder { color:var(--mut2); }
.pt-edit { min-height:52px; background:#fbf9f4; border:1px solid rgba(120,70,190,.3); border-radius:0 0 12px 12px; padding:12px 14px; font-size:14px; color:#2a2140; line-height:1.6; white-space:pre-wrap; outline:none; }
.pt-edit:focus { border-color:var(--lime); box-shadow:0 0 0 3px rgba(178,224,30,.14); }
.pt-edit:empty:before { content:attr(data-ph); color:#8a7fa0; }
.pt-edit b, .pt-edit strong { color:#1c1330; }
.pt-edit ul, .pt-edit ol { margin:4px 0 4px; padding-left:20px; }
.pt-edit li { margin-bottom:3px; }
/* barra de formatação dos blocos de posicionamento */
.pt-fmt2 { display:flex; gap:6px; background:#efe9f7; border:1px solid rgba(120,70,190,.3); border-bottom:none; border-radius:12px 12px 0 0; padding:6px 8px; }
.pt-fmt2 button { background:#fff; border:1px solid rgba(120,70,190,.25); border-radius:8px; padding:3px 11px; font-size:13px; cursor:pointer; color:#3a2a5a; line-height:1.4; }
.pt-fmt2 button:hover { background:var(--lime,#B2E01E); border-color:var(--lime,#B2E01E); }
.pt-savehint { text-align:right; color:var(--lime-soft); font-size:12px; height:16px; }
.pt-addrow { display:flex; gap:8px; flex-wrap:wrap; }
.pt-addrow input { flex:1; min-width:150px; padding:11px 13px; border:1px solid rgba(120,70,190,.35); border-radius:12px; background:rgba(255,255,255,.9); color:#241b31; font-size:14px; }
.pt-addrow input:focus { outline:none; border-color:var(--lime); }
#ptBody input[type=text], #ptBody input[type=url] { padding:11px 13px; border:1px solid rgba(120,70,190,.35); border-radius:12px; background:rgba(255,255,255,.9); color:#241b31; font-size:14px; }
#ptBody input:focus { outline:none; border-color:var(--lime); }

/* cards de aprovação (claros, pra ler bem) */
.pt-cards { display:flex; flex-direction:column; gap:18px; }
.pt-card { background:#fffdf8; border:1px solid rgba(178,224,30,.3); border-radius:20px; box-shadow:0 18px 46px rgba(0,0,0,.4); padding:20px 22px; color:#241b31; }
.pt-card-head { display:flex; justify-content:space-between; align-items:flex-start; gap:10px; flex-wrap:wrap; margin-bottom:10px; }
.pt-code { font-family:var(--serif); font-size:18px; font-weight:700; color:var(--purple); }
.pt-card .pt-muted { color:#8a7fa0; }
.pt-badge { color:#fff; font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:.3px; padding:3px 9px; border-radius:999px; }
.pt-tema { font-family:var(--serif); font-size:19px; color:var(--purple); margin-bottom:14px; line-height:1.3; }
.pt-art { border-radius:14px; overflow:hidden; margin-bottom:14px; background:#efe9de; border:1px solid #e6ddcd; }
.pt-art img { width:100%; display:block; }
.pt-artlink { display:inline-block; margin-bottom:12px; color:var(--purple); font-weight:600; }
.pt-field { margin-top:12px; }
.pt-lbl { display:flex; align-items:center; gap:6px; font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; color:#8a5f7f; margin-bottom:5px; }
.pt-copy { background:none; border:none; cursor:pointer; font-size:13px; }
.pt-text { font-size:14px; color:#241b31; white-space:pre-wrap; word-break:break-word; line-height:1.6; background:#f7f2ea; border:1px solid #efe6d6; border-radius:12px; padding:11px 13px; }
.pt-hash { color:var(--purple-700); }
.pt-cmts { margin-top:14px; border-left:3px solid var(--lime); padding-left:12px; display:flex; flex-direction:column; gap:8px; }
.pt-cmt { font-size:13px; color:#3a2f4d; } .pt-cmt b { color:var(--purple); }
.pt-actions { display:flex; gap:10px; margin-top:18px; flex-wrap:wrap; }
.pt-actions .pt-btn { flex:1; min-width:150px; }
.pt-changebox { margin-top:14px; }
.pt-changebox textarea { width:100%; min-height:82px; border:1px solid #e0d6ea; border-radius:12px; padding:11px 13px; font-size:14px; font-family:inherit; resize:vertical; background:#fff; }
.pt-changebox textarea:focus { outline:none; border-color:var(--lime); box-shadow:0 0 0 3px rgba(178,224,30,.18); }
.pt-changebox .pt-btn { margin-top:8px; }

/* ideias */
.pt-idea { background:linear-gradient(180deg,rgba(66,20,120,.4),rgba(30,7,60,.45)); border:1px solid rgba(120,70,190,.3); border-radius:16px; padding:14px 16px; }
.pt-idea-h { display:flex; justify-content:space-between; align-items:flex-start; gap:8px; }
.pt-idea-h b { color:#fff; font-size:15px; }
.pt-idealink { display:inline-block; margin-top:6px; color:var(--lime-soft); font-size:13px; }
.pt-idea-meta { margin-top:8px; font-size:11px; color:var(--mut2); }

/* estados / listas */
.pt-empty { text-align:center; padding:54px 20px; color:#d7cbef; }
.pt-empty b { color:#fff; display:block; margin-bottom:4px; font-size:18px; font-family:var(--serif); }
.pt-empty .pt-muted { color:var(--mut); }
.pt-big { font-size:46px; margin-bottom:10px; }
.pt-h3 { font-family:var(--serif); color:var(--lime-soft); font-size:19px; margin:22px 0 12px; }
.pt-links { display:flex; flex-direction:column; gap:9px; }
.pt-linkrow { display:flex; justify-content:space-between; align-items:center; gap:10px; background:rgba(255,255,255,.05); border:1px solid rgba(255,255,255,.1); border-radius:14px; padding:13px 17px; }
.pt-linkrow a { color:#f0eafa; text-decoration:none; flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; }
.pt-linkrow:hover { border-color:var(--lime); background:rgba(178,224,30,.08); }
.pt-linkrow .pt-muted { color:var(--lime-soft); }

/* calendário grade */
.pt-calnav { display:flex; align-items:center; justify-content:center; gap:18px; margin-bottom:18px; font-family:var(--serif); font-size:21px; color:#fff; }
.pt-calnav button { background:rgba(255,255,255,.06); border:1px solid rgba(178,224,30,.35); border-radius:11px; width:36px; height:36px; cursor:pointer; font-size:18px; color:var(--lime-soft); }
.pt-calnav button:hover { background:rgba(178,224,30,.14); }
.pt-cal { background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.1); border-radius:16px; padding:10px; overflow-x:auto; }
.pt-cal-grid { display:grid; grid-template-columns:repeat(7,1fr); gap:5px; min-width:540px; }
.pt-cal-wd { text-align:center; font-size:10px; letter-spacing:1px; text-transform:uppercase; color:var(--lime); padding:4px 0 6px; }
.pt-cal-cell { min-height:76px; background:rgba(255,255,255,.03); border:1px solid rgba(255,255,255,.06); border-radius:10px; padding:5px 6px; }
.pt-cal-cell.empty { background:transparent; border-color:transparent; }
.pt-cal-cell.today { border-color:var(--lime); }
.pt-cal-dnum { font-size:11px; color:#c9b8e6; margin-bottom:4px; }
.pt-chip { display:block; font-size:10px; color:#fff; border-radius:6px; padding:2px 5px; margin-bottom:3px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
@media (max-width:520px){ .pt-head h1{ font-size:26px; } .pt-actions .pt-btn{ min-width:120px; } .pt-addrow input{ min-width:100%; } }

/* ---- ajustes v2: menu esticado, card modal, anotações ---- */
.portal-body { overflow-x: hidden; }
.pt-tabs { overflow: visible; flex-wrap: wrap; }
.pt-tabs button { flex: 1 1 auto; text-align: center; }
.pt-hr { border: none; border-top: 1px solid rgba(255,255,255,.12); margin: 18px 0; }
.pt-lbl2 { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--lime-soft); margin: 16px 0 6px; }

/* anotações estilo comentário */
.pt-addnote { display: flex; flex-direction: column; gap: 8px; }
.pt-who { align-self: flex-start; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(120,70,190,.4); background: rgba(255,255,255,.9); color: #241b31; font-size: 13px; }
.pt-notelist { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
.pt-note-item { background: rgba(255,255,255,.05); border: 1px solid rgba(120,70,190,.3); border-radius: 13px; padding: 11px 14px; }
.pt-note-meta { font-size: 12px; color: var(--mut); margin-bottom: 4px; }
.pt-note-meta b { color: #fff; }
.pt-note-text { color: var(--off); font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }

/* modal do card */
.pt-modal-bg { position: fixed; inset: 0; z-index: 50; background: rgba(10,1,24,.7); backdrop-filter: blur(4px); display: flex; align-items: flex-start; justify-content: center; padding: 24px 14px; overflow-y: auto; }
.pt-modal { width: 100%; max-width: 620px; background: linear-gradient(180deg,#1c0740,#160530); border: 1px solid rgba(120,70,190,.4); border-radius: 22px; box-shadow: 0 30px 90px rgba(0,0,0,.6); overflow: hidden; }
.pt-modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid rgba(255,255,255,.1); }
.pt-modal-head h3 { font-family: var(--serif); color: #fff; font-size: 19px; }
.pt-mclose { background: rgba(255,255,255,.08); border: none; color: #fff; width: 32px; height: 32px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.pt-mclose:hover { background: rgba(255,255,255,.18); }
.pt-modal-body { padding: 18px 20px 24px; }
.pt-modal-tema { font-family: var(--serif); font-size: 20px; color: #fff; line-height: 1.3; }
.pt-etiqs { display: flex; gap: 8px; flex-wrap: wrap; }
.pt-etiq { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.18); color: var(--off); border-radius: 999px; padding: 7px 14px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.pt-etiq:hover { border-color: var(--lime); }
.pt-etiq.on { color: #fff; }
.pt-cmts2 { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pt-cmt2 { background: rgba(255,255,255,.05); border-radius: 11px; padding: 9px 12px; font-size: 13px; color: var(--off); }
.pt-cmt2 b { color: #fff; }
.pt-cmt2 > div { margin-top: 3px; white-space: pre-wrap; word-break: break-word; }

/* logo maior + "Central do cliente" embaixo */
.pt-top { align-items: flex-start; }
.pt-brand { flex-direction: column; align-items: flex-start; gap: 5px; }
.pt-brand img { height: 46px; }
.pt-brand span { font-size: 11px; letter-spacing: 3px; }
.pt-teamtag { background: rgba(178,224,30,.12); border: 1px solid rgba(178,224,30,.4); color: #d7f08a; font-size: 12.5px; border-radius: 12px; padding: 8px 14px; margin: 4px 0 14px; }
.pt-teamtag b { color: #fff; }

/* ---- v3: painel mais largo, fundo sem recortes, fotos no card, meta ---- */
#portal { max-width: 1140px; padding: 0 26px 90px; }
/* fundo fixo e sem costuras (sem animação de posição que criava recortes) */
.pt-bgfx { inset: 0; animation: none;
  background:
    radial-gradient(1300px 900px at 75% -12%, #4a127e 0%, transparent 58%),
    radial-gradient(1100px 900px at 8% 8%, #2a0a55 0%, transparent 60%),
    radial-gradient(1200px 1100px at 50% 118%, #34075f 0%, transparent 58%),
    var(--roxo-ink); }
.pt-bggrid { opacity: .35; -webkit-mask-image: radial-gradient(circle at 50% 18%, #000 50%, transparent 96%); mask-image: radial-gradient(circle at 50% 18%, #000 50%, transparent 96%); }

/* meta do card (horário, linha, função, pilar, funil) */
.pt-meta { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 4px; }
.pt-metarow { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.12); border-radius: 10px; padding: 6px 12px; font-size: 12.5px; color: var(--off); }
.pt-metarow span { color: var(--mut); margin-right: 6px; }
.pt-metarow b { color: #fff; }

/* grade de fotos do card (3 por linha, quebra) */
.pt-imggrid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.pt-imgtile { position: relative; aspect-ratio: 1/1; border-radius: 12px; overflow: hidden; border: 1px solid rgba(255,255,255,.14); cursor: grab; background: #160530; }
.pt-imgtile:active { cursor: grabbing; }
.pt-imgtile img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.pt-imgtile.dragging { opacity: .45; }
.pt-imgdel { position: absolute; top: 4px; right: 4px; background: rgba(0,0,0,.6); border: none; color: #fff; width: 22px; height: 22px; border-radius: 7px; cursor: pointer; font-size: 12px; }
.pt-imgdel:hover { background: #a8394b; }
.pt-modal { max-width: 680px; }
@media (max-width: 560px) { #portal { padding: 0 16px 90px; } .pt-imggrid { grid-template-columns: repeat(3, 1fr); } }

/* ---- header com mais respiro + avatar com foto ---- */
.pt-top { padding: 26px 4px 10px; }
.pt-brand img { height: 58px; }
.pt-brand span { margin-top: 8px; font-size: 12px; letter-spacing: 4px; }
.pt-head { margin: 26px 0 30px; gap: 20px; }
.pt-head h1 { margin-bottom: 4px; }
.pt-avatar { position: relative; border: none; overflow: hidden; padding: 0; }
.pt-avatar img { width: 100%; height: 100%; object-fit: cover; }
.pt-avcam { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 11px; text-align: center; padding: 2px 0; opacity: 0; transition: opacity .12s; }
.pt-avatar:hover .pt-avcam { opacity: 1; }

/* ---- v4: legenda cores calendário, tráfego, copy read-only, comentários edit/del ---- */
.pt-callegend { display: flex; flex-wrap: wrap; gap: 14px; justify-content: center; margin-bottom: 14px; font-size: 12px; color: var(--mut); }
.pt-callegend span { display: inline-flex; align-items: center; gap: 6px; }
.pt-callegend i { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }

/* tráfego pago */
.pt-adgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.pt-adcard { text-align: left; background: linear-gradient(180deg,rgba(66,20,120,.4),rgba(30,7,60,.45)); border: 1px solid rgba(120,70,190,.3); border-radius: 16px; overflow: hidden; cursor: pointer; padding: 0; color: var(--off); }
.pt-adcard:hover { border-color: var(--lime); }
.pt-adthumb { height: 140px; background-size: cover; background-position: center; background-color: #160530; }
.pt-adthumb.noimg { display: grid; place-items: center; font-size: 34px; }
.pt-adinfo { padding: 11px 14px; }
.pt-adinfo b { color: #fff; }

/* copy read-only (cliente) */
.pt-text2 { background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 11px 13px; font-size: 14px; color: var(--off); line-height: 1.6; white-space: pre-wrap; word-break: break-word; }

/* comentários com ações */
.pt-cmt2h { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pt-cmtacts { display: flex; gap: 4px; flex: none; }
.pt-cmtedit, .pt-cmtdel { background: none; border: none; color: var(--mut2); cursor: pointer; font-size: 12px; opacity: .6; }
.pt-cmtedit:hover { opacity: 1; color: var(--lime-soft); }
.pt-cmtdel:hover { opacity: 1; color: #ff9db0; }
.pt-cmttext { margin-top: 3px; white-space: pre-wrap; word-break: break-word; }

/* ---- v5: tarô, lightbox, diário de bordo ---- */
/* lightbox */
.pt-lb { position: fixed; inset: 0; z-index: 80; background: rgba(8,1,20,.9); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.pt-lb img { max-width: 96vw; max-height: 92vh; border-radius: 12px; box-shadow: 0 20px 70px rgba(0,0,0,.7); }
.pt-lb-close { position: fixed; top: 16px; right: 18px; background: rgba(255,255,255,.12); border: none; color: #fff; width: 40px; height: 40px; border-radius: 12px; font-size: 18px; cursor: pointer; }

/* tarô do dia */
.pt-tarot { text-align: center; max-width: 480px; margin: 0 auto; }
.pt-tcard { width: 250px; height: 420px; margin: 14px auto 0; border-radius: 18px; overflow: hidden; cursor: pointer; box-shadow: 0 20px 60px rgba(0,0,0,.5); border: 2px solid rgba(178,224,30,.35); transition: transform .2s; }
.pt-tcard:not(.revealed):hover { transform: translateY(-5px) rotate(-1deg); }
.pt-tcard img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pt-tback { width: 100%; height: 100%; background: radial-gradient(130% 130% at 50% 0%, #4a1d86, #2D0859 60%, #180432); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; }
.pt-tstar { font-size: 60px; color: var(--lime); }
.pt-tlabel { font-family: var(--serif); letter-spacing: 4px; text-transform: uppercase; color: var(--lime-soft); font-size: 12px; }
.pt-tinfo { margin-top: 20px; }
.pt-tinfo h2 { font-family: var(--serif); color: #fff; font-size: 26px; margin-bottom: 10px; }
.pt-tinfo p { color: #d7cbef; line-height: 1.65; font-size: 15px; }
.pt-tafirm { margin: 18px auto 0; max-width: 420px; background: linear-gradient(180deg,rgba(178,224,30,.14),rgba(178,224,30,.04)); border: 1px solid rgba(178,224,30,.34); border-radius: 14px; padding: 14px 18px; }
.pt-tafirm-l { font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--lime); margin-bottom: 6px; }
.pt-tafirm-t { font-family: var(--serif); font-style: italic; color: #fff; font-size: 17px; line-height: 1.5; }

/* diário de bordo (iframe) */
.pt-dashwrap { border-radius: 14px; overflow: hidden; border: 1px solid rgba(255,255,255,.12); background: #0e0424; }
.pt-dashwrap iframe { width: 100%; height: 520px; border: 0; display: block; }

/* ---- agenda ---- */
.pt-cal-add { cursor: pointer; transition: border-color .1s; }
.pt-cal-add:hover { border-color: var(--lime) !important; background: rgba(178,224,30,.06) !important; }
.pt-agev { background: rgba(255,255,255,.05); border: 1px solid rgba(120,70,190,.3); border-radius: 12px; padding: 10px 13px; margin-bottom: 8px; }
.pt-agev-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.pt-agev-h b { color: #fff; font-size: 14px; }

/* ---- POP (procedimento operacional) na página do funcionário ---- */
.pop-body h4 { font-family: var(--sans); font-size: 14px; color: var(--purple); margin: 16px 0 6px; }
.pop-body h4:first-child { margin-top: 0; }
.pop-body p { font-size: 14px; color: var(--ink); line-height: 1.6; margin: 0 0 8px; }
.pop-body ul, .pop-body ol { margin: 4px 0 10px; padding-left: 20px; }
.pop-body li { font-size: 14px; color: var(--ink); line-height: 1.55; margin-bottom: 5px; }
.pop-body b { color: var(--purple-700); }
.pop-editable { outline: none; border: 1px solid var(--purple-100); border-radius: 12px; padding: 12px 14px; min-height: 200px; background: var(--cream-2); }
.pop-editable:focus { border-color: var(--purple-300, #9b7bc4); box-shadow: 0 0 0 3px var(--purple-100); }
.pop-fmt { display: flex; gap: 6px; margin-bottom: 8px; }
.pop-fmt .pfmt { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 12px; cursor: pointer; color: var(--ink); }
.pop-fmt .pfmt:hover { border-color: var(--purple-300, #9b7bc4); background: var(--purple-100); }

/* ---- POP em cards (visão) ---- */
.pop-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.pop-card { background: var(--paper); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-sm); overflow: hidden; }
.pop-card-h { background: var(--purple-100); color: var(--purple); font-weight: 700; font-size: 14px; padding: 11px 16px; }
.pop-card-b { padding: 12px 16px 14px; }
.pop-card-b p { font-size: 13.5px; color: var(--ink); line-height: 1.55; margin: 0 0 8px; }
.pop-card-b ul, .pop-card-b ol { margin: 2px 0 4px; padding-left: 20px; }
.pop-card-b li { font-size: 13.5px; color: var(--ink); line-height: 1.5; margin-bottom: 6px; }
.pop-card-b b { color: var(--purple-700); }
.pop-card-b > *:last-child { margin-bottom: 0; }

/* ---- foto no avatar do funcionário ---- */
.avatar, .team-card .av { overflow: hidden; }
.avatar img, .team-card .av img { width: 100%; height: 100%; object-fit: cover; display: block; }
.avatar-btn { position: relative; border: none; padding: 0; cursor: pointer; font: inherit; color: inherit; }
.avatar-btn .av-cam { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 10px; text-align: center; padding: 1px 0; opacity: 0; transition: opacity .1s; }
.avatar-btn:hover .av-cam { opacity: 1; }

/* ---- links do cliente (Início do portal) ---- */
.pt-linkadd { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.pt-inp { padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(120,70,190,.4); background: rgba(255,255,255,.9); color: #241b31; font-size: 13px; }
.pt-linklist { display: flex; flex-direction: column; gap: 8px; }
.pt-link-row { display: flex; align-items: center; gap: 8px; }
.pt-link { flex: 1; display: flex; align-items: center; gap: 10px; min-width: 0; text-decoration: none; background: rgba(255,255,255,.05); border: 1px solid rgba(120,70,190,.3); border-radius: 12px; padding: 10px 14px; transition: border-color .12s, background .12s; }
.pt-link:hover { border-color: var(--lime, #B2E01E); background: rgba(178,224,30,.06); }
.pt-link-ic { font-size: 18px; flex-shrink: 0; }
.pt-link-name { color: #fff; font-weight: 600; font-size: 14px; flex-shrink: 0; }
.pt-link-url { color: #c9b8e6; font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

/* ---- dados pessoais (Início do portal) ---- */
.pt-dpgrid { display: flex; flex-wrap: wrap; gap: 14px; }
.pt-dpgrid > div { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 5px; }
.pt-dplbl { font-size: 12px; color: #c9b8e6; letter-spacing: .3px; }
.pt-dpgrid b { color: #fff; font-size: 15px; }
.pt-dpgrid input.pt-inp, .pt-dpgrid select.pt-who { width: 100%; }
