/* Painel do cliente Tannous. Mesma identidade do site e do painel da equipe: vermelho Tannous, Chakra Petch + Barlow. */
:root {
  --red: #E3004B; --red-d: #C70041; --red-soft: #FDE8EF; --red-ink: #B00038;
  --ink: #222423; --ink-2: #45494A; --ink-3: #5B5F5D;
  --bg: #F4F3F0; --card: #FFFFFF; --line: #E2E1DC; --line-2: #CFCECA;
  --dark: #1A1C1B; --ok: #1F7A4D; --ok-soft: #E3F3EA; --warn: #8A5200; --warn-soft: #FFF2D9; --blue: #24456F; --blue-soft: #E8EEF7;
  --display: 'Chakra Petch', 'Barlow', system-ui, sans-serif;
  --body: 'Barlow', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 15px; line-height: 1.45; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--red); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--ink-3); margin: 0; }
.skip { position: absolute; left: -9999px; top: 8px; z-index: 100; background: #fff; padding: 8px 12px; }
.skip:focus { left: 8px; }

/* botões e campos */
.abtn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border: 0; background: var(--red); color: #fff; font-family: var(--display); font-weight: 600; font-size: 14px; letter-spacing: .02em; cursor: pointer; text-decoration: none; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); white-space: nowrap; }
.abtn:hover { background: var(--red-d); }
.abtn--ghost { background: #E9E8E3; color: var(--ink); }
.abtn--ghost:hover { background: #DEDCD6; }
.abtn--danger { background: var(--red-ink); }
.abtn--sm { min-height: 34px; padding: 0 12px; font-size: 13px; }
.abtn[disabled] { opacity: .55; cursor: progress; }
.linkbtn { border: 0; background: none; padding: 0; color: var(--red-ink); font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 2px; font-size: 14px; }
.iconbtn { width: 40px; height: 40px; flex: none; border: 0; background: #E9E8E3; font-size: 22px; line-height: 1; cursor: pointer; }
.ainput { height: 42px; padding: 0 12px; border: 1px solid var(--line-2); background: #fff; border-radius: 0; min-width: 0; }
.ainput:focus, .afield input:focus, .afield select:focus, .afield textarea:focus { border-color: var(--ink); outline: 2px solid var(--red); outline-offset: 0; }

/* topo */
.top { position: sticky; top: 0; z-index: 30; background: var(--dark); color: #F4F3F0; }
.top__in { display: flex; align-items: center; gap: 8px 24px; padding: 10px 24px; flex-wrap: wrap; max-width: 1280px; margin: 0 auto; }
.top__brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 700; font-size: 18px; min-width: 0; }
.top__brand svg { width: 22px; height: 30px; flex: none; }
.top__brand span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 260px; }
.tabs { display: flex; gap: 4px; flex: 1; overflow-x: auto; }
.tabs a { color: #B7BBB9; padding: 10px 14px; font-family: var(--display); font-weight: 600; font-size: 15px; text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
.tabs a[aria-current=page] { color: #fff; border-bottom-color: var(--red); }
.top__user { display: flex; align-items: center; gap: 10px; }
.top__email { font-size: 13px; color: #B7BBB9; }
.top__lang { height: 34px; background: #2A2D2C; color: #fff; border: 1px solid #444948; padding: 0 8px; }
@media (max-width: 760px) {
  .top__in { padding: 8px 16px; }
  .top__email { display: none; }
  .tabs { order: 3; flex-basis: 100%; }
  .tabs a { padding: 8px 10px; }
}
.viewas { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; padding: 10px 24px; background: var(--warn-soft); color: var(--warn); font-size: 14px; border-bottom: 1px solid #F1DDB0; }
.viewas a { font-weight: 700; }

main { padding: 24px 24px 96px; max-width: 1280px; margin: 0 auto; outline: none; }
body.locked { overflow: hidden; }
@media (max-width: 760px) { .bar__right { width: 100%; } .bar__right input[type=search] { flex: 1 1 100%; } .bar__right select { flex: 1 1 auto; } }
@media (max-width: 760px) { main { padding: 16px 16px 96px; } .viewas { padding: 10px 16px; } }
.bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.bar__left, .bar__right { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.vtitle { margin: 0; font-family: var(--display); font-size: 26px; line-height: 1.15; }
.lead { margin: -6px 0 18px; color: var(--ink-3); max-width: 760px; }
.month { display: inline-flex; align-items: center; background: #fff; border: 1px solid var(--line-2); }
.month button { width: 40px; height: 40px; border: 0; background: none; cursor: pointer; font-size: 18px; }
.month button:hover { background: #F2F1ED; }
.month span { min-width: 150px; text-align: center; font-weight: 600; }
.empty { padding: 36px 24px; text-align: center; color: var(--ink-3); background: #fff; margin: 0; }
.seg { display: inline-flex; flex-wrap: wrap; border: 1px solid var(--line-2); background: #fff; }
.seg button { border: 0; background: none; padding: 9px 12px; cursor: pointer; font-weight: 600; font-size: 14px; }
.seg button[aria-pressed=true] { background: var(--ink); color: #fff; }

/* indicadores */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--card); padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi b { font-family: var(--display); font-size: 32px; line-height: 1.1; }
.kpi span { color: var(--ink-3); font-size: 14px; }
.kpi small { font-size: 13px; color: var(--ink-3); }
.kpi--booked b { color: var(--ok); }
.meter { height: 10px; background: #EFEEEA; margin: 6px 0 2px; overflow: hidden; }
.meter i { display: block; height: 100%; background: var(--ink); }
.meter--over i { background: var(--red); }
.kpi small.over { color: var(--red-ink); font-weight: 600; }

/* listas (linhas que viram cartões no celular) */
.list { background: #fff; display: flex; flex-direction: column; }
.list__head, .row { display: grid; gap: 4px 16px; align-items: center; padding: 12px 16px; }
.list__head { font-family: var(--display); font-weight: 600; font-size: 13px; color: var(--ink-3); border-bottom: 1px solid var(--line); background: #FAFAF8; }
.row { border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; width: 100%; cursor: pointer; font-size: 14px; }
.row:hover { background: #FBF7F8; }
.row:last-child { border-bottom: 0; }
.row__main { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.row__sub { color: var(--ink-3); font-size: 13px; overflow-wrap: anywhere; }
.list--calls .list__head, .list--calls .row { grid-template-columns: 150px minmax(0, 1.2fr) 80px 170px minmax(0, 2fr); }
.list--contacts .list__head, .list--contacts .row { grid-template-columns: minmax(0, 1.4fr) 140px minmax(0, 1fr) minmax(0, 1fr) 170px 100px 130px; }
.list--clients .list__head, .list--clients .row { grid-template-columns: minmax(0, 2fr) 110px 150px 80px 110px; }
.cell-label { display: none; }
@media (max-width: 900px) {
  .list__head { display: none; }
  .list--calls .row, .list--contacts .row, .list--clients .row { grid-template-columns: 1fr 1fr; }
  .row > * { min-width: 0; }
  .row .wide { grid-column: 1 / -1; }
  .cell-label { display: block; font-size: 12px; color: var(--ink-3); }
}
.tag { display: inline-block; padding: 2px 8px; font-size: 12px; font-weight: 600; background: #EFEEEA; color: var(--ink-2); white-space: nowrap; }
.tag--booked, .tag--won { background: var(--ok-soft); color: var(--ok); }
.tag--new { background: var(--red-soft); color: var(--red-ink); }
.tag--contacted { background: var(--blue-soft); color: var(--blue); }
.tag--lost { background: #E4E3DE; color: var(--ink-3); }
.tag--src { background: var(--blue-soft); color: var(--blue); }
.tag--paused { background: var(--warn-soft); color: var(--warn); }
.tag--cancelled { background: #E4E3DE; color: var(--ink-3); }
.tag--active { background: var(--ok-soft); color: var(--ok); }
.more { display: inline-block; margin-top: 12px; font-weight: 600; color: var(--red-ink); }
.section-title { margin: 0 0 10px; font-family: var(--display); font-size: 18px; }

/* ficha lateral */
.drawer { position: fixed; inset: 0; z-index: 50; }
.drawer__shade { position: absolute; inset: 0; background: rgba(20,22,21,.45); }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(600px, 100%); background: var(--bg); display: flex; flex-direction: column; box-shadow: -8px 0 24px rgba(0,0,0,.2); }
.drawer__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 18px 20px; background: #fff; border-bottom: 1px solid var(--line); }
.drawer__head h2 { margin: 0; font-family: var(--display); font-size: 22px; overflow-wrap: anywhere; }
.drawer__body { overflow-y: auto; padding: 16px 20px 40px; display: flex; flex-direction: column; gap: 16px; }
.panel { background: #fff; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.panel h3 { margin: 0; font-family: var(--display); font-size: 16px; }
.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 14px; font-size: 14px; margin: 0; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.transcript { white-space: pre-wrap; margin: 0; font-size: 14px; line-height: 1.55; max-height: 420px; overflow-y: auto; background: #FAFAF8; padding: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.afield { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.afield > label { font-weight: 600; font-size: 13px; }
.afield input, .afield select, .afield textarea { border: 1px solid var(--line-2); background: #fff; padding: 8px 10px; border-radius: 0; width: 100%; }
.afield input, .afield select { height: 42px; }
.afield textarea { min-height: 96px; resize: vertical; }
.afield .help { color: var(--ink-3); font-size: 12px; }
.formerr { color: var(--red-ink); font-weight: 600; margin: 0; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: space-between; align-items: center; }
.minicalls { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.minicalls button { width: 100%; text-align: left; border: 1px solid var(--line); background: #FAFAF8; padding: 10px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 2px; }

/* área da equipe */
.panel-stack { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.cols2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 400px) { .cols2 { grid-template-columns: 1fr; } }
.items { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.items li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.items li:last-child { border-bottom: 0; }
.items li > div { min-width: 0; overflow-wrap: anywhere; }
.inline-form { display: flex; flex-wrap: wrap; gap: 8px; align-items: flex-end; }
.inline-form .afield { flex: 1 1 160px; }
.danger { border-left: 4px solid var(--red-ink); }
.audit { list-style: none; margin: 0; padding: 0; font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.audit time { color: var(--ink-3); margin-right: 8px; }
code { font-size: 13px; background: #F2F1ED; padding: 1px 4px; overflow-wrap: anywhere; }

/* janela de confirmação e aviso */
.modal { position: fixed; inset: 0; z-index: 60; background: rgba(20,22,21,.5); display: grid; place-items: center; padding: 16px; }
.modal__box { background: #fff; padding: 22px; width: min(460px, 100%); display: flex; flex-direction: column; gap: 14px; }
.modal__box p { margin: 0; color: var(--ink-2); }
.modal__actions { display: flex; justify-content: flex-end; flex-wrap: wrap; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 70; background: var(--dark); color: #fff; padding: 12px 18px; font-weight: 600; max-width: calc(100% - 32px); }
.toast--err { background: var(--red-ink); }

/* entrar */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login__box { background: #fff; padding: 32px 28px 24px; width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; gap: 12px; text-align: center; clip-path: polygon(18px 0, 100% 0, 100% calc(100% - 18px), calc(100% - 18px) 100%, 0 100%, 0 18px); }
.login__mark { width: 40px; height: 54px; }
.login__box h1 { margin: 0; font-family: var(--display); font-size: 25px; line-height: 1.2; }
.login__form { width: 100%; display: flex; flex-direction: column; gap: 8px; text-align: left; margin-top: 6px; }
.login__form label { font-weight: 600; font-size: 14px; }
.login__form input { height: 46px; border: 1px solid var(--line-2); padding: 0 12px; font-size: 16px; }
.login__form input:focus { border-color: var(--ink); outline: 2px solid var(--red); outline-offset: 0; }
.login__form .abtn { min-height: 46px; margin-top: 4px; }
.login__code { letter-spacing: 8px; font-family: var(--display); font-size: 22px !important; text-align: center; }
.login__sent { margin: 0 0 4px; color: var(--ink-2); font-size: 14px; }
.login__links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; margin-top: 6px; }
.login__msg { color: var(--red-ink); font-weight: 600; margin: 0; }
.login__note { color: var(--ok); font-weight: 600; margin: 0; }
.login__foot { margin: 8px 0 0; font-size: 12px; color: var(--ink-3); }
.langs { align-self: flex-end; display: inline-flex; border: 1px solid var(--line-2); }
.langs button { border: 0; background: none; padding: 5px 9px; font-size: 12px; font-weight: 700; cursor: pointer; }
.langs button[aria-pressed=true] { background: var(--ink); color: #fff; }
