/* ---------- tipografia (manual Pêndulo, ed. 01 — nov/2026) ----------
 * Newsreader: marca, títulos, números de destaque e citações (Regular · Itálico · Medium · SemiBold).
 * Inter: interface, legendas, dados, botões e campos (Regular · Medium · SemiBold · CAIXA ALTA ESPAÇADA).
 * Hierarquia: título Newsreader 44 · linha fina em itálico 22 · texto Inter 16 / 1,6 · fios de 1px azul separam seções.
 * As duas vêm do Google Fonts (link no index.html).
 */

/* ---------- cores do manual da marca ----------
 * Névoa #E7E7E7 (60%) · Azul #0052AE (25%) · Tinta #0A2D5A (texto, substitui o preto) · Verde #2BA001 (acento)
 * O verde aparece pouco e no lugar da "massa do pêndulo": ponto de chegada, nunca fundo.
 */
:root {
  --azul: #0052AE;
  --azul-2: #0A4A9C;
  --verde: #2BA001;
  --nevoa: #E7E7E7;
  --profundo: #0A2D5A; /* "Tinta" no manual */

  --bg: var(--nevoa);
  --surface: #F6F6F6;
  --surface-2: #EEF0F3;
  --ink: var(--profundo);
  --ink-2: #34506F;
  --muted: #6E819B;
  --line: #D6DBE2;
  --accent: var(--azul);
  --accent-ink: #ffffff;
  --accent-soft: #DCE7F5;
  --ok: #24860A;
  --ok-soft: #E1F0D8;
  --warn: #A86A0B;
  --warn-soft: #F6EBD6;
  --danger: #B13A35;
  --danger-soft: #F5E1DF;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(10, 45, 90, .05), 0 6px 18px rgba(10, 45, 90, .05);
  --f-display: "Newsreader", Georgia, "Times New Roman", serif;
  --f-detail: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --f-text: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --sidebar: 236px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--f-text);
  background: var(--bg);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent); }
h1, h2, h3 { margin: 0; font-family: var(--f-display); font-weight: 500; letter-spacing: -.01em; line-height: 1.08; }
h1 { font-size: 44px; color: var(--azul); }
h2 { font-size: 22px; color: var(--profundo); }
h3 { font-size: 18px; }
code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12.5px; background: var(--surface-2); padding: 1px 5px; border-radius: 5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }
/* caixa alta espaçada (Inter) */
.caps { font-family: var(--f-detail); font-weight: 600; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: var(--sidebar);
  background: var(--azul);
  color: #E7EEF8;
  padding: 22px 14px 16px;
  position: fixed; inset: 0 auto 0 0;
  display: flex; flex-direction: column; gap: 3px;
  overflow: hidden;
}
.brand-icon { display: block; height: 56px; width: auto; margin: 4px 0 26px 12px; }
.nav-item {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; border-radius: 10px;
  color: inherit; text-decoration: none;
  font-family: var(--f-detail); font-size: 14.5px; font-weight: 500;
  position: relative; z-index: 1;
}
.nav-item svg { width: 18px; height: 18px; opacity: .85; flex: none; }
.nav-item:hover { background: rgba(255,255,255,.08); }
.nav-item.active { background: rgba(255,255,255,.15); color: #fff; }
.nav-item.active::before { content: ""; position: absolute; left: -14px; top: 9px; bottom: 9px; width: 3px; background: var(--verde); border-radius: 0 3px 3px 0; }
.nav-item .badge { margin-left: auto; background: #fff; color: var(--azul); font-size: 11.5px; padding: 1px 7px; border-radius: 99px; font-weight: 600; font-family: var(--f-detail); }
.sidebar-foot { margin-top: auto; padding: 12px 12px 0; font-size: 12px; color: rgba(231,238,248,.62); border-top: 1px solid rgba(255,255,255,.14); font-family: var(--f-detail); position: relative; z-index: 1; }
.sidebar-foot .who { color: #fff; font-size: 13.5px; font-weight: 500; margin-bottom: 2px; word-break: break-all; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar); padding: 32px 34px 60px; max-width: calc(1200px + var(--sidebar)); }
/* cabeçalho de página: título + linha fina em itálico, fechado por um fio azul de 1px */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--azul); flex-wrap: wrap; }
.page-head .sub { color: var(--ink-2); margin-top: 6px; font-family: var(--f-display); font-style: italic; font-size: 20px; line-height: 1.3; }

.bottom-nav { display: none; }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); min-width: 0; }
.card-pad { padding: 20px 22px; }
.card-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px 6px; gap: 10px; flex-wrap: wrap; }
.card-head a { font-family: var(--f-detail); font-size: 13px; font-weight: 600; text-decoration: none; }
.table-wrap { overflow-x: auto; }

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 18px; }
.kpi { padding: 16px 18px 16px; cursor: pointer; transition: transform .12s ease, box-shadow .12s ease; position: relative; overflow: hidden; }
.kpi:hover { transform: translateY(-1px); box-shadow: 0 8px 24px rgba(10,45,90,.09); }
.kpi.feature { background: var(--azul); border-color: var(--azul); color: #fff; }
.kpi.feature .label, .kpi.feature .hint { color: rgba(255,255,255,.78); }
.kpi.feature .value { color: #fff; }
.kpi.feature::after { content: ""; position: absolute; left: 18px; right: 18px; bottom: 10px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--verde) var(--prog, 40%), rgba(255,255,255,.25) var(--prog, 40%)); }
.kpi .label { font-family: var(--f-detail); font-weight: 600; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }
.kpi .value { font-family: var(--f-display); font-weight: 500; font-size: 38px; line-height: 1.05; margin-top: 8px; color: var(--azul); letter-spacing: -.015em; font-variant-numeric: lining-nums; }
.kpi .hint { font-size: 13px; color: var(--ink-2); margin-top: 4px; font-family: var(--f-detail); }
.kpi .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }

.grid-2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; }
.stack { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------- lists ---------- */
.list { list-style: none; margin: 0; padding: 6px 8px 10px; }
.row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; }
.row.click { cursor: pointer; }
.row.click:hover { background: var(--surface-2); }
.row + .row { border-top: 1px solid var(--line); }
.row .time { font-family: var(--f-display); font-weight: 500; font-size: 19px; color: var(--azul); width: 52px; flex: none; font-variant-numeric: lining-nums tabular-nums; }
.row .main-txt { flex: 1; min-width: 0; }
.row .title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .meta { font-size: 13px; color: var(--muted); font-family: var(--f-detail); }
.row .actions { display: flex; gap: 6px; flex: none; align-items: center; }
.avatar {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: grid; place-items: center; font-family: var(--f-display); font-weight: 500; font-size: 15px;
  background: var(--accent-soft); color: var(--azul);
}
.empty { padding: 26px 20px; text-align: center; color: var(--muted); font-size: 17px; font-family: var(--f-display); font-style: italic; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 99px; font-size: 10.5px; font-family: var(--f-detail); font-weight: 600; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.pill.agendada { background: var(--accent-soft); color: var(--azul); }
.pill.confirmada { background: var(--ok-soft); color: var(--ok); }
.pill.realizada { background: #DDE3EC; color: var(--profundo); }
.pill.falta { background: var(--danger-soft); color: var(--danger); }
.pill.cancelada { background: #E4E4E4; color: #7a7a7a; text-decoration: line-through; }
.pill.pago { background: var(--ok-soft); color: var(--ok); }
.pill.pendente { background: var(--warn-soft); color: var(--warn); }
.pill.isento { background: #E4E4E4; color: #7a7a7a; }
.pill.pacote { background: var(--accent-soft); color: var(--azul); }
.pill.atrasado { background: var(--danger-soft); color: var(--danger); }
.pill.breve { background: var(--warn-soft); color: var(--warn); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.neutral { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); }

/* ---------- pacotes ---------- */
.pkg { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; background: var(--surface); display: flex; flex-direction: column; gap: 8px; }
.pkg-top { display: flex; align-items: center; gap: 10px; justify-content: space-between; flex-wrap: wrap; }
.pkg-name { font-family: var(--f-display); font-weight: 500; font-size: 19px; color: var(--azul); line-height: 1.1; }
.meter { height: 6px; background: var(--surface-2); border-radius: 6px; overflow: hidden; display: flex; }
.meter > i { display: block; height: 100%; background: var(--azul); }
.meter > i.sched { background: #9DB8DD; }
.pkg-meta { display: flex; gap: 12px; font-size: 13px; color: var(--muted); font-family: var(--f-detail); flex-wrap: wrap; }
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; padding: 8px 16px 18px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  border: 1px solid var(--line); background: var(--surface); color: var(--profundo);
  padding: 8px 14px; border-radius: var(--radius-sm); cursor: pointer;
  text-decoration: none; white-space: nowrap; font-family: var(--f-detail); font-size: 14px; font-weight: 500;
}
.btn:hover { background: #fff; border-color: #C3CBD6; }
.btn svg { width: 15px; height: 15px; }
.btn.primary { background: var(--azul); border-color: var(--azul); color: #fff; }
.btn.primary:hover { background: var(--azul-2); }
.btn.danger { color: var(--danger); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; }
.btn.icon { padding: 6px; width: 32px; height: 32px; }
.btn.wa { background: #E6F3DE; border-color: #C9E5B8; color: #1F7307; }
.btn.wa:hover { background: #D9EDCD; }
.btn:disabled { opacity: .5; cursor: default; }

.toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 7px; cursor: pointer; font-family: var(--f-detail); font-size: 13px; font-weight: 500; color: var(--ink-2); }
.seg button.on { background: var(--azul); color: #fff; }

/* ---------- agenda ---------- */
.week-head { display: flex; align-items: center; gap: 10px; }
.week-label { font-family: var(--f-display); font-weight: 500; font-size: 21px; color: var(--profundo); min-width: 200px; text-align: center; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); min-height: 230px; display: flex; flex-direction: column; }
.day.today { border-color: var(--azul); box-shadow: 0 0 0 1px var(--azul) inset; }
.day-h { padding: 10px 12px 8px; display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--line); }
.day-h .dw { font-family: var(--f-detail); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.day-h .dn { font-family: var(--f-display); font-weight: 500; font-size: 26px; line-height: 1; color: var(--profundo); font-variant-numeric: lining-nums; }
.day.today .dn { color: var(--azul); }
.day-b { padding: 8px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.day-add { margin-top: auto; border: 1px dashed var(--line); background: none; border-radius: 8px; padding: 5px; color: var(--muted); cursor: pointer; font-family: var(--f-detail); font-size: 12.5px; font-weight: 500; }
.day-add:hover { color: var(--azul); border-color: var(--azul); }
.slot { border-radius: 9px; padding: 7px 9px; cursor: pointer; border-left: 3px solid var(--azul); background: var(--accent-soft); }
.slot:hover { filter: brightness(.98); }
.slot .t { font-family: var(--f-display); font-weight: 600; font-size: 15px; line-height: 1.1; color: var(--azul); font-variant-numeric: lining-nums; }
.slot .n { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.slot.confirmada { border-color: var(--verde); background: var(--ok-soft); }
.slot.realizada { border-color: var(--profundo); background: #DDE3EC; }
.slot.falta { border-color: var(--danger); background: var(--danger-soft); }
.slot.cancelada { border-color: #bbb; background: #ECECEC; opacity: .7; }
.slot.cancelada .n { text-decoration: line-through; }
.slot .pay { float: right; font-family: var(--f-detail); font-size: 10.5px; font-weight: 700; letter-spacing: .04em; color: var(--warn); }
.slot .pay.pk { color: var(--azul); }

/* ---------- forms / modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10, 45, 90, .42); display: grid; place-items: center; z-index: 50; padding: 16px; animation: fade .12s ease; }
.modal { background: var(--surface); border-radius: 18px; width: min(540px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: 0 20px 60px rgba(10,45,90,.3); }
.modal-h { display: flex; align-items: center; justify-content: space-between; padding: 20px 22px 4px; }
.modal-h h2 { font-size: 28px; color: var(--azul); }
.modal-b { padding: 12px 22px 8px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 14px 22px 20px; display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.modal-f .left { margin-right: auto; }
@keyframes fade { from { opacity: 0; } }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-family: var(--f-detail); font-weight: 600; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-2); }
.field .help { font-size: 12.5px; color: var(--muted); }
.input, select.input, textarea.input { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 9px 11px; background: #fff; width: 100%; color: var(--profundo); }
textarea.input { resize: vertical; min-height: 84px; }
.input:focus { outline: 2px solid var(--accent-soft); border-color: var(--azul); }
.row-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.row-fields.three { grid-template-columns: 1fr 1fr 1fr; }
.check { display: flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; flex-wrap: wrap; }
.check input[type="checkbox"] { accent-color: var(--azul); width: 16px; height: 16px; }
.wa-box { background: var(--surface-2); border: 1px solid var(--line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; }
.wa-box .lbl { font-family: var(--f-detail); font-weight: 600; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .12em; }

/* ---------- table ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th { text-align: left; font-family: var(--f-detail); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: var(--surface-2); }
.num { font-variant-numeric: tabular-nums; }
.right { text-align: right; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-side { background: var(--azul); color: #E7EEF8; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.login-side .brand-icon { margin: 0; height: 76px; width: auto; align-self: flex-start; }
.login-side h1 { color: #fff; font-size: 58px; line-height: 1.02; max-width: 520px; }
.login-side .lede { margin: 14px 0 0; font-family: var(--f-display); font-style: italic; font-size: 22px; line-height: 1.3; color: rgba(255,255,255,.82); max-width: 460px; }
.login-side ul { padding: 0; list-style: none; display: grid; gap: 12px; margin: 30px 0 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.22); max-width: 460px; }
.login-side li { display: flex; gap: 10px; align-items: flex-start; }
.login-side li svg { width: 18px; height: 18px; color: #8FE06B; flex: none; margin-top: 2px; }
.login-side .tag { font-family: var(--f-detail); font-weight: 600; font-size: 11.5px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-bottom: 16px; }
.login-form { display: grid; place-items: center; padding: 32px 20px; }
.login-card { width: min(400px, 100%); display: flex; flex-direction: column; gap: 16px; }
.demo-note { background: var(--warn-soft); color: #74490A; border-radius: 10px; padding: 10px 12px; font-size: 13px; }

.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: var(--profundo); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; font-weight: 500; font-family: var(--f-detail); z-index: 60; box-shadow: 0 8px 30px rgba(0,0,0,.25); animation: fade .15s ease; }
.banner { background: var(--warn-soft); color: #74490A; border: 1px solid #EBD6AE; border-radius: 12px; padding: 10px 14px; font-size: 13.5px; margin-bottom: 18px; }


/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .days { grid-template-columns: 1fr; }
  .day { min-height: 0; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 18px 16px 96px; }
  h1 { font-size: 34px; }
  .page-head .sub { font-size: 18px; }
  body { overflow-x: hidden; }
  .bottom-nav {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: var(--surface); border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    justify-content: space-around;
  }
  .bottom-nav a { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11px; font-weight: 500; color: var(--muted); text-decoration: none; padding: 4px 6px; position: relative; font-family: var(--f-detail); }
  .bottom-nav a svg { width: 21px; height: 21px; }
  .bottom-nav a.active { color: var(--azul); }
  .bottom-nav .badge { position: absolute; top: 0; right: 4px; background: var(--azul); color: #fff; font-size: 10px; font-weight: 600; padding: 0 5px; border-radius: 99px; }
  .mobile-icon { display: block !important; height: 40px; width: 40px; border-radius: 10px; margin-bottom: 16px; }
  .login-wrap { grid-template-columns: 1fr; }
  .login-side { padding: 28px 22px; }
  .login-side .brand-icon { height: 56px; }
  .login-side h1 { font-size: 36px; margin-top: 18px; }
  .login-side .lede { font-size: 18px; }
  .login-side .hide-m { display: none; }
  .row-fields, .row-fields.three { grid-template-columns: 1fr; }
  .table .hide-m { display: none; }
  .table td, .table th { padding: 10px 12px; }
  .week-label { min-width: 0; }
  .kpi { padding: 14px 14px 16px; }
  .kpi .value { font-size: 24px; letter-spacing: -.02em; }
  .kpi.feature::after { left: 14px; right: 14px; }
  .kpis { gap: 10px; }
  .row { flex-wrap: wrap; row-gap: 8px; padding: 10px 6px; }
  .row .actions { flex-wrap: wrap; margin-left: auto; justify-content: flex-end; }
  .row .main-txt { flex-basis: 120px; }
  .page-head .toolbar { width: 100%; }
  .page-head .toolbar .input { flex: 1; width: auto !important; }
}
.mobile-icon { display: none; }
