/* ======================================================================
   Simulador de Escala 5x2 — estilos
   ====================================================================== */
:root {
  --bg: #f2f4f9; --panel: #ffffff; --panel2: #f7f8fc; --ink: #172033; --muted: #687189; --line: #e3e7f0; --line2: #edf0f6;
  --accent: #4f5dff; --accent2: #7b4dff; --accent-soft: #eef0ff; --accent-ink: #ffffff;
  --w: #e6ecff; --w-ink: #3a4fd6; --f: #d6f5e3; --f-ink: #10794a; --v: #ffedcc; --v2: #ffe0a6; --v-ink: #a85d06;
  --c: #e9ecf2; --c-ink: #9aa1b2; --h: #f1e6ff; --h-ink: #7a3fd1;
  --err: #e5484d; --err-soft: #fdecec; --warn: #e8960c; --warn-soft: #fff4dd; --info: #3b7cf6; --info-soft: #e9f1ff; --ok: #18a058; --ok-soft: #e3f7ec;
  --shadow: 0 1px 2px rgba(20, 30, 60, .05), 0 6px 20px rgba(20, 30, 60, .06);
  --shadow-lg: 0 18px 50px rgba(20, 30, 60, .22);
  --r: 14px;
  --font: "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1320; --panel: #171c2b; --panel2: #1d2333; --ink: #e8ebf4; --muted: #98a0b6; --line: #2a3145; --line2: #232a3c;
    --accent: #7482ff; --accent2: #9a7bff; --accent-soft: #222a4a;
    --w: #1f2b55; --w-ink: #a9b7ff; --f: #133826; --f-ink: #6fe0a5; --v: #3d2c10; --v2: #4a3512; --v-ink: #ffc56b;
    --c: #20263a; --c-ink: #5d6680; --h: #2d2148; --h-ink: #c9a6ff;
    --err-soft: #3a1b20; --warn-soft: #3a2c12; --info-soft: #172a4d; --ok-soft: #143323;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1320; --panel: #171c2b; --panel2: #1d2333; --ink: #e8ebf4; --muted: #98a0b6; --line: #2a3145; --line2: #232a3c;
  --accent: #7482ff; --accent2: #9a7bff; --accent-soft: #222a4a;
  --w: #1f2b55; --w-ink: #a9b7ff; --f: #133826; --f-ink: #6fe0a5; --v: #3d2c10; --v2: #4a3512; --v-ink: #ffc56b;
  --c: #20263a; --c-ink: #5d6680; --h: #2d2148; --h-ink: #c9a6ff;
  --err-soft: #3a1b20; --warn-soft: #3a2c12; --info-soft: #172a4d; --ok-soft: #143323;
  --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 6px 20px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--ink); font: 14px/1.4 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; }
input, select { font: inherit; color: var(--ink); }
h1, h2, h3 { margin: 0; }

/* ---------------- autenticação ---------------- */
body.auth-mode { overflow: hidden; }
.auth-screen { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100vh; }
.auth-art { position: relative; padding: 48px; display: flex; flex-direction: column; gap: 36px; color: #fff; overflow: hidden;
  background: radial-gradient(900px 500px at 15% 10%, color-mix(in srgb, var(--accent2) 85%, transparent), transparent 60%),
              radial-gradient(700px 500px at 90% 90%, color-mix(in srgb, #13b5a3 60%, transparent), transparent 65%),
              linear-gradient(150deg, #2a2f66, #4f5dff 55%, #7b4dff); }
.auth-art::after { content: ""; position: absolute; inset: 0; opacity: .25;
  background-image: radial-gradient(rgba(255,255,255,.6) 1px, transparent 1px); background-size: 22px 22px; mask-image: linear-gradient(120deg, #000, transparent 70%); }
.auth-brand { display: flex; align-items: center; gap: 14px; position: relative; z-index: 1; }
.auth-back { position: absolute; top: 18px; left: 20px; z-index: 2; color: rgba(255,255,255,.78); text-decoration: none; font-size: 12px; font-weight: 600; padding: 6px 9px; border-radius: 8px; }
.auth-back:hover { background: rgba(255,255,255,.14); color: #fff; }
.auth-brand .logo { width: 48px; height: 48px; font-size: 16px; background: rgba(255,255,255,.16); box-shadow: none; border: 1px solid rgba(255,255,255,.35); }
.auth-brand h1 { font-size: 20px; letter-spacing: -.3px; }
.auth-brand p { margin: 2px 0 0; font-size: 12.5px; opacity: .8; }
.auth-pitch { position: relative; z-index: 1; max-width: 460px; margin-top: 8vh; }
.auth-pitch h2 { font-size: clamp(24px, 2.6vw, 34px); line-height: 1.18; letter-spacing: -.7px; }
.auth-pitch ul { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.auth-pitch li { display: flex; align-items: center; gap: 11px; font-size: 14px; opacity: .95; }
.auth-pitch li span { width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2); font-size: 16px; flex: none; }
.auth-foot { position: relative; z-index: 1; margin-top: auto; font-size: 11.5px; opacity: .7; max-width: 460px; }
.auth-foot a { color: #fff; font-weight: 600; text-underline-offset: 2px; }
.auth-panel { display: grid; place-items: center; padding: 32px; background: var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 18px; padding: 26px; box-shadow: var(--shadow-lg); animation: fadeUp .45s both; }
.auth-tabs { display: flex; gap: 4px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; margin-bottom: 20px; }
.auth-tabs button { flex: 1; border: 0; background: transparent; border-radius: 9px; padding: 9px; font-weight: 700; font-size: 13px; color: var(--muted); transition: all .2s; }
.auth-tabs button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 5px rgba(20,30,60,.12); }
.auth-form { display: flex; flex-direction: column; gap: 14px; }
.auth-form label { display: flex; flex-direction: column; gap: 6px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.auth-form input { border: 1px solid var(--line); border-radius: 11px; padding: 11px 12px; background: var(--panel); font-size: 14px; color: var(--ink); }
.auth-form input:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 1px; border-color: var(--accent); }
.auth-form small.hint { font-weight: 500; }
.auth-error { margin: 0; padding: 9px 12px; border-radius: 10px; background: var(--err-soft); color: var(--err); font-size: 12.5px; font-weight: 600; }
.auth-note { margin: 0; text-align: center; font-size: 11.5px; color: var(--muted); }
.auth-legal { margin: 16px 0 0; text-align: center; }
.auth-legal button { border: 0; background: transparent; padding: 2px 4px; font-size: 11.5px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; border-radius: 6px; }
.auth-legal button:hover { color: var(--accent); }
.legal-note { margin: 2px 0 0; padding: 10px 11px; border-radius: 11px; background: var(--warn-soft); border: 1px solid color-mix(in srgb, var(--warn) 30%, var(--line)); color: var(--muted); font-size: 11.5px; line-height: 1.45; }
.legal-note b { color: var(--ink); }
.legal-note button { border: 0; background: none; padding: 0; color: var(--accent); font-weight: 700; font-size: inherit; text-decoration: underline; text-underline-offset: 2px; }
.legal-note a { color: var(--accent); font-weight: 700; }
.auth-form .btn { margin-top: 2px; padding: 11px; }

/* ---------------- usuário no topo ---------------- */
.userbox { position: relative; display: flex; align-items: center; gap: 8px; }
.userchip { display: flex; align-items: center; gap: 9px; border: 1px solid var(--line); background: var(--panel); border-radius: 12px; padding: 5px 10px 5px 6px; transition: border-color .2s, box-shadow .2s; }
.userchip:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); }
.userchip .avatar { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-size: 11.5px; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); flex: none; }
.userchip-txt { display: flex; flex-direction: column; line-height: 1.15; text-align: left; min-width: 0; max-width: 150px; }
.userchip-txt b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip-txt small { font-size: 10.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userchip .caret { font-size: 10px; color: var(--muted); }
.user-menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 220px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 40; animation: fadeUp .16s both; }
.user-menu-head { padding: 8px 10px 10px; border-bottom: 1px solid var(--line2); margin-bottom: 4px; display: flex; flex-direction: column; gap: 2px; }
.user-menu-head b { font-size: 13px; }
.user-menu-head small { font-size: 11.5px; color: var(--muted); }
.user-menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 9px 10px; border-radius: 8px; font-size: 13px; font-weight: 600; }
.user-menu button:hover { background: var(--accent-soft); }
.user-menu button.danger { color: var(--err); }
.user-menu button.danger:hover { background: var(--err-soft); }
.user-menu-link { display: block; padding: 9px 10px; border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: none; }
.user-menu-link:hover { background: var(--accent-soft); color: var(--accent); }
.sync-state { font-size: 11.5px; font-weight: 700; padding: 4px 9px; border-radius: 20px; border: 1px solid var(--line); color: var(--muted); background: var(--panel); white-space: nowrap; }
.sync-state[data-state="saving"] { color: var(--info); border-color: color-mix(in srgb, var(--info) 35%, var(--line)); background: var(--info-soft); }
.sync-state[data-state="dirty"] { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); }

/* ---------------- modais e tabelas ---------------- */
.modal-backdrop { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; padding: 24px; background: rgba(11, 16, 30, .55); backdrop-filter: blur(3px); opacity: 0; transition: opacity .18s; }
.modal-backdrop.show { opacity: 1; }
.modal { width: min(560px, 100%); max-height: min(86vh, 900px); display: flex; flex-direction: column; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; box-shadow: var(--shadow-lg); transform: translateY(12px) scale(.985); transition: transform .2s cubic-bezier(.3,1.3,.5,1); overflow: hidden; }
.modal.wide { width: min(920px, 100%); }
.modal-backdrop.show .modal { transform: none; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.modal-head h2 { font-size: 16px; }
.modal-head p { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }
.modal-body { padding: 18px 20px 22px; overflow-y: auto; display: flex; flex-direction: column; gap: 14px; }
.muted { color: var(--muted); }
.sub { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; }
.notice { margin: 0; padding: 10px 12px; border-radius: 10px; background: var(--info-soft); color: var(--info); font-size: 12.5px; }
.conflict-text { margin: 0; font-size: 13px; }
.conflict-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.usage { background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 11px 13px; display: flex; flex-direction: column; gap: 3px; }
.usage small { font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); font-weight: 700; }
.usage b { font-size: 16px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.tbl th { text-align: left; font-size: 10.5px; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); padding: 7px 9px; border-bottom: 1px solid var(--line); }
table.tbl td { padding: 9px; border-bottom: 1px solid var(--line2); vertical-align: middle; }
table.tbl td.right { text-align: right; }
table.tbl select { padding: 5px 7px; font-size: 12.5px; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 20px; background: var(--panel2); border: 1px solid var(--line); color: var(--muted); }
.badge.admin { background: var(--accent-soft); color: var(--accent); border-color: transparent; }
.inline-form { display: flex; flex-direction: column; gap: 10px; border-top: 1px dashed var(--line); padding-top: 14px; }
.inline-form h3 { font-size: 13px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.form-row.three { grid-template-columns: repeat(3, 1fr); }
.inline-form label { display: flex; flex-direction: column; gap: 5px; font-size: 12px; font-weight: 600; color: var(--muted); }
.inline-form label.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 600; }
.inline-form input, .inline-form select { border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; background: var(--panel); font-size: 13px; color: var(--ink); }
.form-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.platform-tabs { margin-bottom: 4px; }
.platform-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------------- planos e assinatura ---------------- */
.interval-picker { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 4px; }
.interval-picker button { border: 0; background: transparent; border-radius: 9px; padding: 8px 6px; display: flex; flex-direction: column; gap: 1px; color: var(--muted); transition: all .2s; }
.interval-picker button b { font-size: 12.5px; }
.interval-picker button small { font-size: 10.5px; font-weight: 700; }
.interval-picker button.on { background: var(--panel); color: var(--ink); box-shadow: 0 1px 5px rgba(20,30,60,.12); }
.interval-picker button.on small { color: var(--ok); }
/* Cinco planos: três por linha e as sobras centralizadas na última linha.
   Flex (e não grid) porque o grid alinha a última linha à esquerda. */
.plan-grid { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.plan-grid > .plan-card { flex: 0 1 calc((100% - 20px) / 3); min-width: 190px; }
.plan-card { border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; background: var(--panel); transition: border-color .2s, box-shadow .2s, transform .2s; }
.plan-card:hover { border-color: color-mix(in srgb, var(--accent) 35%, var(--line)); box-shadow: var(--shadow); transform: translateY(-2px); }
.plan-card.current { border-color: var(--accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 18%, transparent); }
.plan-head { display: flex; flex-direction: column; gap: 2px; }
.plan-head h3 { font-size: 13.5px; }
.plan-range { font-size: 11px; color: var(--muted); font-weight: 600; }
.plan-price { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.plan-price b { font-size: 22px; letter-spacing: -.6px; }
.plan-price small { font-size: 10.5px; color: var(--muted); }
.plan-desc { margin: 0; font-size: 11.5px; color: var(--muted); min-height: 28px; }
.plan-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 5px; font-size: 11.5px; }
.plan-features li { display: flex; gap: 6px; align-items: flex-start; }
.plan-features li::before { content: "✓"; color: var(--ok); font-weight: 800; flex: none; }
.plan-cta { margin-top: auto; padding-top: 6px; }
.plan-cta .btn { width: 100%; }
.plan-current { display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent); background: var(--accent-soft); padding: 5px 10px; border-radius: 20px; }
.plan-note { font-size: 11px; color: var(--muted); }
.subscription-status { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 11px 13px; border-radius: 12px; background: var(--ok-soft); border: 1px solid color-mix(in srgb, var(--ok) 25%, transparent); }
.subscription-status b { font-size: 13px; display: block; }
.subscription-status small { font-size: 11.5px; color: var(--muted); }
@media (max-width: 900px) {
  .auth-screen { grid-template-columns: 1fr; }
  .auth-art { display: none; }
  .form-row, .form-row.three { grid-template-columns: 1fr; }
}

/* ---------------- topo ---------------- */
.topbar { height: 64px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; background: var(--panel); border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.brand { display: flex; align-items: center; gap: 12px; }
.logo { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 14px; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 6px 16px color-mix(in srgb, var(--accent) 40%, transparent); }
.brand h1 { font-size: 17px; letter-spacing: -.2px; }
.law-badge { margin: 2px 0 0; font-size: 12px; color: var(--muted); }
.law-badge b { color: var(--accent); font-weight: 600; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.sep { width: 1px; height: 24px; background: var(--line); margin: 0 4px; }

.btn { border: 1px solid var(--line); background: var(--panel); padding: 8px 14px; border-radius: 10px; font-weight: 600; font-size: 13px; transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; white-space: nowrap; text-decoration: none; display: inline-block; }
.btn:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); box-shadow: var(--shadow); transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-color: transparent; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.btn.primary:hover { box-shadow: 0 8px 22px color-mix(in srgb, var(--accent) 45%, transparent); }
.btn.ghost { background: transparent; }
.btn.small { padding: 6px 10px; font-size: 12px; }
.btn.full { width: 100%; }
.btn.danger { color: var(--err); }
.btn:disabled { opacity: .45; pointer-events: none; }
.icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: var(--panel); font-size: 17px; display: grid; place-items: center; transition: background .2s, transform .15s; }
.icon-btn:hover { background: var(--accent-soft); }
.icon-btn:disabled { opacity: .35; pointer-events: none; }

/* ---------------- layout ---------------- */
.layout { display: grid; grid-template-columns: 290px minmax(0, 1fr) 350px; height: calc(100vh - 64px); }
.sidebar, .insights { overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 14px; }
.sidebar { border-right: 1px solid var(--line); background: var(--panel2); }
.insights { border-left: 1px solid var(--line); background: var(--panel2); }
.main { overflow: hidden; display: flex; flex-direction: column; padding: 14px 18px 18px; min-width: 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.card h2 { font-size: 12px; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin-bottom: 12px; font-weight: 700; }

/* ---------------- formulário ---------------- */
.field { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.field.col { flex-direction: column; align-items: stretch; }
.lbl { font-weight: 600; font-size: 13px; }
.lbl b { color: var(--accent); }
#empLimit { display: block; font-size: 10.5px; font-weight: 700; color: var(--muted); margin-top: 1px; }
.hint { color: var(--muted); font-size: 11.5px; }
.stepper { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: var(--panel); }
.stepper button { width: 30px; height: 32px; border: 0; background: transparent; font-size: 16px; transition: background .15s; }
.stepper button:hover { background: var(--accent-soft); color: var(--accent); }
.stepper input { width: 44px; height: 32px; border: 0; text-align: center; font-weight: 700; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
input[type=time], input[type=month], input[type=date], input[type=number], select { border: 1px solid var(--line); border-radius: 10px; padding: 7px 9px; background: var(--panel); width: 100%; min-width: 0; }
input:focus, select:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 1px; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.mini { display: flex; flex-direction: column; gap: 3px; }
.mini small { color: var(--muted); font-size: 11px; }
.range { width: 100%; accent-color: var(--accent); margin: -4px 0 12px; }
.field .range { margin: 4px 0 2px; }
.chips { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.chips button { border: 1px solid var(--line); background: var(--panel); border-radius: 9px; padding: 7px 0; font-size: 11.5px; font-weight: 700; color: var(--muted); transition: all .2s cubic-bezier(.3, 1.4, .5, 1); }
.chips button.on { background: var(--accent); border-color: var(--accent); color: #fff; transform: translateY(-1px); box-shadow: 0 4px 10px color-mix(in srgb, var(--accent) 35%, transparent); }
.seg { display: flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { flex: 1; border: 0; background: transparent; border-radius: 7px; padding: 6px 8px; font-size: 12px; font-weight: 600; color: var(--muted); transition: background .2s, color .2s, box-shadow .2s; white-space: nowrap; }
.seg button.on { background: var(--panel); color: var(--accent); box-shadow: 0 1px 4px rgba(0, 0, 0, .1); }
.seg.small button { padding: 4px 8px; font-size: 11.5px; }
.toggle { display: flex; align-items: center; gap: 10px; font-size: 12.5px; margin: 8px 0; cursor: pointer; user-select: none; }
.toggle input { display: none; }
.toggle .sw { width: 34px; height: 20px; border-radius: 20px; background: var(--line); position: relative; flex: none; transition: background .2s; }
.toggle .sw::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1); }
.toggle input:checked + .sw { background: var(--accent); }
.toggle input:checked + .sw::after { transform: translateX(14px); }

.vac-add { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-bottom: 8px; }
.vac-add select { grid-column: 1 / -1; }
.vac-add #vacLen { width: 100%; }
.vac-list { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.vac-item { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 10px; background: var(--v); color: var(--v-ink); font-size: 12px; animation: fadeUp .3s both; }
.vac-item .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ec); flex: none; }
.vac-item b { color: var(--ink); font-weight: 600; }
.vac-item span { flex: 1; }
.vac-item button { border: 0; background: transparent; color: var(--v-ink); font-size: 14px; padding: 0 2px; opacity: .7; }
.vac-item button:hover { opacity: 1; }
.vac-empty { color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }

/* ---------------- abas ---------------- */
.tabs { display: flex; gap: 4px; position: relative; border-bottom: 1px solid var(--line); margin-bottom: 12px; flex: none; }
.tabs button { border: 0; background: transparent; padding: 10px 14px; font-weight: 600; color: var(--muted); transition: color .2s; }
.tabs button.active { color: var(--ink); }
.tab-ink { position: absolute; bottom: -1px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: left .35s cubic-bezier(.3, 1.3, .5, 1), width .35s cubic-bezier(.3, 1.3, .5, 1); }
.view { display: none; flex: 1; min-height: 0; flex-direction: column; }
.view.active { display: flex; animation: viewIn .35s both; }
@keyframes viewIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; flex: none; }
.tools { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 2px; box-shadow: var(--shadow); }
.tools button { border: 0; background: transparent; padding: 7px 11px; border-radius: 9px; font-weight: 600; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; transition: background .2s, color .2s; }
.tools button:hover { color: var(--ink); }
.tools button.active { background: var(--accent-soft); color: var(--accent); }
.legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: flex; align-items: center; gap: 5px; }
i[class^="sw-"] { width: 13px; height: 13px; border-radius: 4px; display: inline-block; flex: none; }
.sw-W { background: var(--w); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--w-ink) 30%, transparent); }
.sw-F { background: var(--f); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--f-ink) 30%, transparent); }
.sw-V { background: repeating-linear-gradient(135deg, var(--v) 0 3px, var(--v2) 3px 6px); }
.sw-C { background: repeating-linear-gradient(45deg, var(--c) 0 2px, transparent 2px 4px); box-shadow: inset 0 0 0 1px var(--line); }
.sw-H { background: var(--h); }
.hint-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); color: var(--ink); padding: 8px 12px; border-radius: 12px; font-size: 12.5px; margin-bottom: 10px; animation: fadeUp .4s both; flex: none; }
.hint-bar button { border: 0; background: transparent; color: var(--muted); }
.hint-bar.hide { display: none; }

/* ---------------- grade do mês ---------------- */
.grid-wrap { flex: 1; min-height: 0; overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); position: relative; }
table.grid { border-collapse: separate; border-spacing: 0; user-select: none; }
.grid th, .grid td { padding: 0; }
.grid thead th { position: sticky; top: 0; z-index: 3; background: var(--panel); border-bottom: 1px solid var(--line); }
.grid tfoot td, .grid tfoot th { position: sticky; bottom: 0; z-index: 3; background: var(--panel); border-top: 1px solid var(--line); }
.grid .corner, .grid th.emp { position: sticky; left: 0; z-index: 4; background: var(--panel); border-right: 1px solid var(--line); }
.grid .corner { z-index: 6; text-align: left; padding: 8px 12px; min-width: 190px; }
.grid .corner div { font-weight: 700; }
.grid .corner small { color: var(--muted); font-weight: 500; }
.grid tfoot th.emp { z-index: 6; }
.dh { width: 36px; min-width: 36px; height: 50px; font-weight: 600; cursor: pointer; position: relative; transition: background .2s; }
.dh .wd { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .3px; }
.dh .dn { display: block; font-size: 14px; }
.dh.we .wd { color: var(--accent); }
.dh.out { opacity: .4; }
.dh.closed .dn { color: var(--c-ink); }
.dh.sel { background: var(--accent-soft); }
.dh.sel .dn { color: var(--accent); }
.dh .hdot { position: absolute; top: 5px; right: 5px; width: 6px; height: 6px; border-radius: 50%; background: var(--h-ink); }
.wkh { width: 52px; min-width: 52px; font-size: 10.5px; color: var(--muted); font-weight: 700; border-left: 1px solid var(--line2); }
.grid th.emp { text-align: left; padding: 4px 10px 4px 12px; font-weight: 500; }
.grid tbody tr { animation: rowIn .4s both; }
@keyframes rowIn { from { opacity: 0; transform: translateX(-10px); } to { opacity: 1; transform: none; } }
.grid tbody tr:hover th.emp { background: var(--panel2); }
.emp { display: table-cell; }
.emp .inner { display: flex; align-items: center; gap: 9px; }
.emp .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--ec); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ec) 22%, transparent); flex: none; }
.emp .et { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.emp .nm { font-weight: 600; font-size: 13px; outline: none; border-radius: 5px; padding: 0 3px; margin: 0 -3px; cursor: text; white-space: nowrap; }
.emp .nm:focus { background: var(--accent-soft); box-shadow: 0 0 0 2px var(--accent); }
.emp .sub { color: var(--muted); font-size: 11px; white-space: nowrap; }
td.cell { width: 36px; min-width: 36px; height: 36px; transition: background .2s; }
td.cell.sel { background: color-mix(in srgb, var(--accent-soft) 70%, transparent); }
td.cell.out { opacity: .45; }
.c { height: 30px; margin: 3px 2px; border-radius: 8px; display: grid; place-items: center; font-size: 10.5px; font-weight: 700; cursor: grab; position: relative;
  transition: background .3s, color .3s, transform .18s cubic-bezier(.3, 1.5, .5, 1), box-shadow .2s, opacity .2s, margin .2s, border-radius .2s; }
.c:hover { transform: translateY(-2px); box-shadow: 0 4px 10px rgba(20, 30, 60, .12); z-index: 1; }
.c:active { cursor: grabbing; }
.s-W { background: var(--w); color: var(--w-ink); }
.s-F { background: var(--f); color: var(--f-ink); }
.s-V { background: repeating-linear-gradient(135deg, var(--v) 0 5px, var(--v2) 5px 10px); color: var(--v-ink); font-size: 12px; }
.s-V.vl { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.s-V.vr { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.s-V.vl:hover, .s-V.vr:hover { transform: none; box-shadow: none; }
.s-C { background: repeating-linear-gradient(45deg, var(--c) 0 3px, transparent 3px 7px); color: var(--c-ink); cursor: not-allowed; }
.s-C:hover, .s-H:hover { transform: none; box-shadow: none; }
.s-H { background: var(--h); color: var(--h-ink); cursor: not-allowed; }
.c.ov::after { content: ""; position: absolute; top: 3px; right: 3px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent2); }
.c.fl-error { box-shadow: inset 0 0 0 2px var(--err); }
.c.fl-error::before { content: "!"; position: absolute; top: -5px; right: -4px; width: 14px; height: 14px; border-radius: 50%; background: var(--err); color: #fff; font-size: 9.5px; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--panel); animation: blink 1.6s infinite; }
.c.fl-warn { box-shadow: inset 0 0 0 2px var(--warn); }
@keyframes blink { 50% { transform: scale(1.18); } }
.c.pop { animation: pop .5s cubic-bezier(.3, 1.6, .5, 1) both; animation-delay: var(--d, 0ms); }
@keyframes pop { 0% { transform: scale(.4); opacity: .2; } 70% { transform: scale(1.12); opacity: 1; } 100% { transform: scale(1); } }
.c.pulse { animation: pulse 1.2s ease-out 2; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 70%, transparent); } 100% { box-shadow: 0 0 0 14px transparent; } }
.c.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-4px); } 40%, 80% { transform: translateX(4px); } }

/* arrasto */
body.dragging, body.dragging * { cursor: grabbing !important; }
td.src .c { opacity: .3; transform: scale(.85); }
td.cand-good .c, td.cand-ok .c { box-shadow: 0 0 0 2px var(--ok), 0 0 14px color-mix(in srgb, var(--ok) 45%, transparent); animation: breathe 1.3s ease-in-out infinite; }
td.cand-good .c::after { content: "★"; position: absolute; top: -6px; right: -4px; font-size: 10px; color: var(--ok); background: var(--panel); border-radius: 50%; width: 13px; height: 13px; display: grid; place-items: center; }
td.cand-warn .c { box-shadow: 0 0 0 2px color-mix(in srgb, var(--warn) 70%, transparent); }
td.cand-bad .c { opacity: .35; filter: grayscale(.6); }
@keyframes breathe { 50% { box-shadow: 0 0 0 3px var(--ok), 0 0 20px color-mix(in srgb, var(--ok) 60%, transparent); } }
td.drop .c { transform: scale(1.18); z-index: 2; }
td.drop.cand-bad .c { opacity: .8; filter: none; box-shadow: 0 0 0 2px var(--err); }
td.pv-F .c { background: var(--f) !important; color: var(--f-ink) !important; transform: scale(1.06); }
td.pv-W .c { background: var(--w) !important; color: var(--w-ink) !important; transform: scale(1.06); }
td.pv-V .c { background: repeating-linear-gradient(135deg, var(--v) 0 5px, var(--v2) 5px 10px) !important; box-shadow: inset 0 0 0 2px var(--v-ink); }
td.pv-X .c { opacity: .35; transform: scale(.85); }
.ghost { position: fixed; left: 0; top: 0; pointer-events: none; z-index: 100; padding: 8px 12px; border-radius: 12px; background: var(--panel); box-shadow: var(--shadow-lg); font-weight: 700; font-size: 12.5px; opacity: 0; transform: scale(.7) rotate(-6deg); transition: opacity .15s, transform .2s cubic-bezier(.3, 1.6, .5, 1); display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); }
.ghost.show { opacity: 1; transform: scale(1) rotate(-3deg); }
.ghost .chip { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; font-size: 11px; }
.tip { position: fixed; left: 0; top: 0; z-index: 101; pointer-events: none; max-width: 300px; background: #121a2e; color: #fff; font-size: 12px; line-height: 1.45; padding: 9px 11px; border-radius: 11px; box-shadow: var(--shadow-lg); opacity: 0; transform: translateY(4px); transition: opacity .15s, transform .15s; }
.tip.show { opacity: 1; transform: none; }
.tip .t-ok { color: #6ee7a6; } .tip .t-warn { color: #ffd27a; } .tip .t-bad { color: #ff9b9e; }
.tip b { font-weight: 700; }

/* semana */
td.wk { width: 52px; min-width: 52px; text-align: center; font-size: 11px; border-left: 1px solid var(--line2); color: var(--muted); }
td.wk b { display: block; color: var(--ink); font-size: 11.5px; }
td.wk.over b { color: var(--err); }
td.wk .pips { display: flex; gap: 2px; justify-content: center; margin-top: 2px; }
td.wk .pips i { width: 5px; height: 5px; border-radius: 50%; background: var(--f-ink); opacity: .7; }
td.wk.short .pips i { background: var(--err); }

/* rodapé de cobertura */
.grid tfoot th.emp { padding: 8px 12px; font-weight: 700; font-size: 12px; }
.grid tfoot th.emp small { display: block; color: var(--muted); font-weight: 500; }
td.fc { text-align: center; height: 56px; vertical-align: bottom; padding-bottom: 6px; cursor: pointer; }
td.fc .fbar { height: 26px; width: 12px; margin: 0 auto 3px; border-radius: 4px; background: var(--line2); display: flex; align-items: flex-end; overflow: hidden; }
td.fc .fbar i { display: block; width: 100%; border-radius: 4px; background: var(--ok); transition: height .45s cubic-bezier(.3, 1.4, .5, 1), background .3s; }
td.fc span { font-size: 11.5px; font-weight: 700; }
td.fc.tight .fbar i { background: var(--warn); }
td.fc.low .fbar i { background: var(--err); }
td.fc.low span { color: var(--err); }
td.fc.closed span { color: var(--c-ink); }
td.fc.out { opacity: .4; }
td.fc.sel { background: var(--accent-soft); }

/* ---------------- dia / linha do tempo ---------------- */
.day-strip { display: flex; gap: 4px; overflow-x: auto; padding: 2px 2px 10px; flex: none; scrollbar-width: thin; }
.day-strip button { flex: none; width: 44px; border: 1px solid var(--line); background: var(--panel); border-radius: 11px; padding: 5px 0 6px; display: flex; flex-direction: column; align-items: center; gap: 1px; transition: all .2s cubic-bezier(.3, 1.4, .5, 1); }
.day-strip button small { font-size: 9.5px; color: var(--muted); text-transform: uppercase; font-weight: 700; }
.day-strip button b { font-size: 14px; }
.day-strip button i { width: 6px; height: 6px; border-radius: 50%; background: var(--ok); }
.day-strip button i.low { background: var(--err); } .day-strip button i.tight { background: var(--warn); } .day-strip button i.closed { background: var(--line); }
.day-strip button.on { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; transform: translateY(-2px); box-shadow: 0 6px 14px color-mix(in srgb, var(--accent) 35%, transparent); }
.day-strip button.on small { color: #fffc; }
.day-strip button:hover:not(.on) { border-color: var(--accent); }
.day-title { font-size: 16px; font-weight: 700; }
.day-title small { color: var(--muted); font-weight: 500; font-size: 12.5px; margin-left: 6px; }
.day-actions { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.tl-card { padding: 10px 14px 12px; overflow: auto; flex: 1; min-height: 0; }
.timeline { position: relative; user-select: none; }
.tl-ruler { display: grid; grid-template-columns: 170px 1fr; height: 26px; position: sticky; top: 0; background: var(--panel); z-index: 3; }
.tl-ruler .ticks { position: relative; border-bottom: 1px solid var(--line); }
.tl-ruler .ticks span { position: absolute; bottom: 4px; transform: translateX(-50%); font-size: 10.5px; color: var(--muted); font-weight: 600; }
.trow { display: grid; grid-template-columns: 170px 1fr; height: 46px; align-items: center; animation: fadeUp .35s both; }
.trow + .trow { border-top: 1px dashed var(--line2); }
.tlabel { display: flex; align-items: center; gap: 8px; padding-right: 10px; min-width: 0; }
.tlabel .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ec); flex: none; }
.tlabel div { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.tlabel b { font-size: 12.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tlabel small { font-size: 11px; color: var(--muted); }
.track { position: relative; height: 100%; }
.track .band { position: absolute; top: 0; bottom: 0; background: color-mix(in srgb, var(--accent-soft) 70%, transparent); border-left: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent); border-right: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent); }
.track .hl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line2); }
.bar { position: absolute; top: 8px; height: 30px; border-radius: 10px; background: color-mix(in srgb, var(--ec) 20%, var(--panel)); border: 1.5px solid var(--ec); cursor: grab; display: flex; align-items: center; justify-content: space-between; padding: 0 8px; font-size: 11px; font-weight: 700; color: var(--ink);
  transition: left .35s cubic-bezier(.3, 1.3, .5, 1), box-shadow .2s, transform .2s; box-shadow: 0 2px 6px rgba(20, 30, 60, .08); z-index: 1; }
.bar:hover { box-shadow: 0 6px 16px rgba(20, 30, 60, .16); transform: translateY(-1px); }
.bar.drag { transition: none; cursor: grabbing; box-shadow: var(--shadow-lg); transform: translateY(-2px) scale(1.02); z-index: 5; }
.bar.bad { border-color: var(--err); background: var(--err-soft); }
.bar .t { pointer-events: none; position: relative; z-index: 1; text-shadow: 0 0 3px var(--panel); }
.lunch { position: absolute; top: 3px; bottom: 3px; border-radius: 7px; background: repeating-linear-gradient(-45deg, color-mix(in srgb, var(--warn) 85%, #fff) 0 4px, var(--warn) 4px 8px); cursor: ew-resize; display: grid; place-items: center; font-size: 12px; transition: left .35s cubic-bezier(.3, 1.3, .5, 1), transform .15s; z-index: 2; box-shadow: 0 1px 4px rgba(0, 0, 0, .15); }
.lunch:hover { transform: scaleY(1.12); }
.lunch.drag { transition: none; transform: scaleY(1.18); }
.trow.off .tlabel { opacity: .55; }
.trow.off .track .offtxt { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 8px; }
.offtxt.F { background: var(--f); color: var(--f-ink); } .offtxt.V { background: var(--v); color: var(--v-ink); } .offtxt.C, .offtxt.H { background: var(--c); color: var(--c-ink); }
.tl-sep { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; padding: 10px 0 4px; }
.cov-head { display: flex; justify-content: space-between; align-items: baseline; margin: 14px 0 4px; font-size: 12.5px; }
.readout { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
.coverage { display: grid; grid-template-columns: 170px 1fr; }
.coverage svg { width: 100%; display: block; overflow: visible; }
.coverage .cov-legend { font-size: 11px; color: var(--muted); padding-top: 10px; line-height: 1.6; }
.coverage .cov-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 5px; }
.day-suggest { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; flex: none; max-height: 180px; overflow: auto; }
.empty-day { padding: 40px; text-align: center; color: var(--muted); }

/* ---------------- resumo ---------------- */
#view-summary { overflow: auto; gap: 14px; }
.sum-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
.kpi { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); animation: fadeUp .4s both; }
.kpi small { color: var(--muted); font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .4px; }
.kpi b { display: block; font-size: 24px; margin-top: 4px; letter-spacing: -.5px; }
.kpi span { font-size: 11.5px; color: var(--muted); }
table.sum { width: 100%; border-collapse: collapse; font-size: 13px; }
table.sum th { text-align: left; font-size: 11px; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); }
table.sum td { padding: 8px 10px; border-bottom: 1px solid var(--line2); }
table.sum td.num, table.sum th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.sum .dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; }
.hbar { height: 6px; border-radius: 6px; background: var(--line2); overflow: hidden; width: 90px; display: inline-block; vertical-align: middle; margin-left: 8px; }
.hbar i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); border-radius: 6px; }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 10px; }
.rule { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); }
.rule h3 { font-size: 13.5px; margin-bottom: 6px; display: flex; align-items: center; gap: 8px; }
.rule p { margin: 0; color: var(--muted); font-size: 12.5px; }
.rule .tag { font-size: 10.5px; color: var(--accent); background: var(--accent-soft); padding: 2px 7px; border-radius: 6px; font-weight: 700; display: inline-block; margin-top: 8px; }
.disclaimer { font-size: 11.5px; color: var(--muted); padding: 4px 2px 10px; }
.disclaimer a { color: var(--accent); font-weight: 600; }
.disclaimer-box { border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--line)); background: var(--warn-soft); border-radius: 12px; padding: 14px 16px; }
.disclaimer-box .disclaimer-lead { margin: 0 0 8px; font-size: 13.5px; }
.disclaimer-box ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 8px; font-size: 12.5px; line-height: 1.5; }
.disclaimer-box li::marker { color: var(--warn); }
.disclaimer-accept { display: flex; align-items: flex-start; gap: 9px; font-size: 12.5px; font-weight: 600; cursor: pointer; }
.disclaimer-accept input { margin-top: 2px; accent-color: var(--accent); width: 16px; height: 16px; flex: none; }

/* ---------------- sugestões ---------------- */
.score-card { display: grid; grid-template-columns: 96px 1fr; gap: 14px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 14px; box-shadow: var(--shadow); position: relative; }
.ring { width: 96px; height: 96px; transform: rotate(-90deg); grid-row: 1; grid-column: 1; }
.ring circle { fill: none; stroke-width: 10; }
.ring-bg { stroke: var(--line2); }
.ring-fg { stroke: var(--ok); stroke-linecap: round; stroke-dasharray: 314.16; stroke-dashoffset: 314.16; transition: stroke-dashoffset .9s cubic-bezier(.3, 1.2, .4, 1), stroke .4s; }
.score-txt { grid-row: 1; grid-column: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-txt b { font-size: 26px; letter-spacing: -1px; line-height: 1; }
.score-txt small { font-size: 9.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; margin-top: 3px; }
.score-label { font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.counts { display: flex; flex-wrap: wrap; gap: 6px; }
.counts span { font-size: 11.5px; font-weight: 700; padding: 3px 8px; border-radius: 20px; }
.counts .e { background: var(--err-soft); color: var(--err); } .counts .w { background: var(--warn-soft); color: var(--warn); } .counts .i { background: var(--info-soft); color: var(--info); } .counts .o { background: var(--ok-soft); color: var(--ok); }
.filters { display: flex; gap: 4px; flex-wrap: wrap; }
.filters button { border: 1px solid var(--line); background: var(--panel); border-radius: 20px; padding: 4px 11px; font-size: 12px; font-weight: 600; color: var(--muted); transition: all .2s; }
.filters button.active { background: var(--ink); color: var(--panel); border-color: var(--ink); }
.issues { display: flex; flex-direction: column; gap: 8px; }
.issue { display: grid; grid-template-columns: 26px 1fr; gap: 10px; padding: 11px 12px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); position: relative; overflow: hidden; transition: transform .2s, box-shadow .2s; }
.issue::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--info); }
.issue.lvl-error::before { background: var(--err); } .issue.lvl-warn::before { background: var(--warn); }
.issue.enter { animation: fadeUp .4s both; animation-delay: var(--d, 0ms); }
.issue.leaving { animation: leave .35s forwards; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes leave { to { opacity: 0; transform: translateX(30px); height: 0; padding: 0; margin: 0; } }
.issue .ic { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--info-soft); color: var(--info); }
.issue.lvl-error .ic { background: var(--err-soft); color: var(--err); } .issue.lvl-warn .ic { background: var(--warn-soft); color: var(--warn); }
.issue .t { font-weight: 700; font-size: 12.8px; line-height: 1.3; }
.issue .d { color: var(--muted); font-size: 12px; margin-top: 3px; }
.issue .meta { display: flex; align-items: center; justify-content: space-between; gap: 6px; margin-top: 8px; flex-wrap: wrap; }
.issue .rule-tag { font-size: 10.5px; color: var(--muted); background: var(--panel2); border: 1px solid var(--line); padding: 1px 7px; border-radius: 6px; }
.issue .acts { display: flex; gap: 5px; }
.issue .acts button { border: 1px solid var(--line); background: var(--panel); border-radius: 8px; padding: 4px 9px; font-size: 11.5px; font-weight: 700; transition: all .15s; }
.issue .acts button.fix { background: var(--accent); color: #fff; border-color: transparent; }
.issue .acts button.fix:hover { filter: brightness(1.1); transform: translateY(-1px); }
.issue .acts button.see:hover { border-color: var(--accent); color: var(--accent); }
.issue .daychips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.issue .daychips button { border: 0; background: var(--warn-soft); color: var(--warn); font-size: 10.5px; font-weight: 700; border-radius: 6px; padding: 2px 6px; }
.group-h { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase; letter-spacing: .6px; margin: 6px 2px 0; }
.all-good { text-align: center; padding: 26px 10px; color: var(--muted); animation: fadeUp .4s both; }
.all-good b { display: block; font-size: 40px; margin-bottom: 6px; animation: pop .6s cubic-bezier(.3, 1.6, .5, 1) both; }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 200; pointer-events: none; }
.toast { background: #121a2e; color: #fff; padding: 10px 16px; border-radius: 12px; font-size: 13px; font-weight: 600; box-shadow: var(--shadow-lg); animation: toastIn .35s cubic-bezier(.3, 1.5, .5, 1) both; display: flex; align-items: center; gap: 8px; }
.toast.ok::before { content: "✓"; color: #6ee7a6; font-weight: 800; }
.toast.out { animation: toastOut .3s forwards; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.9); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(10px) scale(.95); } }

/* ---------------- responsivo ---------------- */
@media (max-width: 1360px) {
  .layout { grid-template-columns: 270px minmax(0, 1fr); grid-template-rows: minmax(0, 1fr) auto; }
  .insights { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); max-height: 38vh; display: grid; grid-template-columns: 300px 1fr; align-content: start; }
  .insights .score-card, .insights #fixAllBtn, .insights .filters { grid-column: 1; }
  .insights .issues { grid-column: 2; grid-row: 1 / span 4; }
}
@media (max-width: 860px) {
  body { overflow: auto; }
  .layout { display: flex; flex-direction: column; height: auto; }
  .main { min-height: 80vh; padding: 12px; }
  .insights { display: flex; max-height: none; }
  .top-actions .btn:not(.primary) { display: none; }
  .brand h1 { font-size: 15px; }
}

/* ---------------- impressão ---------------- */
@media print {
  body { overflow: visible; background: #fff; }
  .topbar .top-actions, .sidebar, .insights, .tabs, .toolbar, .hint-bar { display: none !important; }
  .layout { display: block; height: auto; }
  .main { overflow: visible; padding: 0; }
  .grid-wrap { overflow: visible; border: 0; box-shadow: none; }
  .view { display: none !important; } #view-month { display: block !important; }
  .grid thead th, .grid tfoot td, .grid .corner, .grid th.emp { position: static; }
  .c { margin: 1px; height: 22px; }
}

/* ======================================================================
   Landing page (public/index.html)
   ====================================================================== */
body.landing { overflow-x: hidden; overflow-y: auto; height: auto; background: var(--bg); }
.lp-top { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 14px clamp(16px, 4vw, 56px); background: color-mix(in srgb, var(--panel) 85%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.lp-top .brand { text-decoration: none; color: inherit; }
.lp-nav { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.lp-nav a { color: var(--muted); text-decoration: none; font-size: 13px; font-weight: 600; padding: 8px 10px; border-radius: 9px; }
.lp-nav a:hover { color: var(--ink); background: var(--accent-soft); }
.lp-nav a.btn { color: var(--ink); }
.lp-nav a.btn.primary { color: #fff; padding: 8px 14px; }

.lp-main { display: flex; flex-direction: column; gap: clamp(48px, 8vw, 96px); padding: clamp(32px, 6vw, 72px) clamp(16px, 4vw, 56px); max-width: 1180px; margin: 0 auto; }
.lp-main h2 { font-size: clamp(25px, 3.4vw, 40px); line-height: 1.12; letter-spacing: -.9px; }

.lp-hero { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(24px, 4vw, 56px); align-items: center; }
.lp-kicker { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: var(--accent); background: var(--accent-soft); padding: 5px 11px; border-radius: 20px; margin-bottom: 16px; }
.lp-hero-copy h2 { font-size: clamp(29px, 4.2vw, 48px); line-height: 1.08; letter-spacing: -1.4px; }
.lp-lead { font-size: 15.5px; line-height: 1.6; color: var(--muted); margin: 18px 0 26px; max-width: 560px; }
.lp-cta { display: flex; gap: 10px; flex-wrap: wrap; }
.lp-cta .btn.lg { padding: 13px 22px; font-size: 14px; border-radius: 12px; }
.lp-hint { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

.lp-hero-art { position: relative; }
.lp-mock { background: var(--panel); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 16px; transform: rotate(-1.4deg); animation: fadeUp .6s both; }
.lp-mock-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 12.5px; margin-bottom: 12px; }
.lp-mock-head span { color: var(--muted); font-size: 11.5px; }
.lp-mock-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.lp-mock-grid i { display: block; aspect-ratio: 1; border-radius: 5px; background: var(--w); animation: fadeUp .5s both; }
.lp-mock-grid i:nth-child(7n+1) { background: var(--line2); }
.lp-mock-grid i.rest { background: var(--f); }
.lp-mock-grid i:nth-child(3n) { animation-delay: .08s; }
.lp-mock-grid i:nth-child(3n+1) { animation-delay: .16s; }
.lp-mock-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 12px; color: var(--muted); }
.lp-mock-foot b { color: var(--ok); font-size: 15px; }

.lp-values { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.lp-values article { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); }
.lp-values article > span { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 11px; background: var(--accent-soft); font-size: 18px; margin-bottom: 12px; }
.lp-values h3 { font-size: 14.5px; margin-bottom: 7px; }
.lp-values p { margin: 0; font-size: 12.8px; line-height: 1.55; color: var(--muted); }

.lp-how h2 { text-align: center; margin-bottom: 28px; }
.lp-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; counter-reset: step; }
.lp-steps li { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 8px; }
.lp-steps b { font-size: 14px; }
.lp-steps span { font-size: 12.8px; line-height: 1.55; color: var(--muted); }

.lp-pricing-head { text-align: center; max-width: 640px; margin: 0 auto 24px; }
.lp-pricing-head p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 12px 0 18px; }
.lp-intervals { max-width: 420px; margin: 0 auto; }
.lp-plan-grid { gap: 14px; max-width: 1020px; margin: 0 auto; }
.lp-plan-grid > .plan-card { flex-basis: calc((100% - 28px) / 3); min-width: 215px; }
.lp-plan-grid .plan-card { padding: 18px; }
.lp-plan-grid .plan-card.featured { border-color: color-mix(in srgb, var(--accent) 40%, var(--line)); box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent); }
.lp-fine { text-align: center; font-size: 11.5px; color: var(--muted); margin: 18px 0 0; }

.lp-faq h2 { text-align: center; margin-bottom: 24px; }
.lp-faq details { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; box-shadow: var(--shadow); }
.lp-faq summary { cursor: pointer; font-weight: 700; font-size: 13.5px; }
.lp-faq details p { margin: 10px 0 0; color: var(--muted); font-size: 12.8px; line-height: 1.6; }
.lp-faq details p a { color: var(--accent); font-weight: 600; }

.lp-foot { border-top: 1px solid var(--line); background: var(--panel); padding: 26px clamp(16px, 4vw, 56px); display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; }
.lp-foot p { margin: 0; font-size: 12px; color: var(--muted); max-width: 720px; line-height: 1.55; }
.lp-foot b { color: var(--ink); }
.lp-foot-links { font-weight: 700; }
.lp-foot-links a { color: var(--accent); text-decoration: none; }

@media (max-width: 900px) {
  .lp-hero { grid-template-columns: 1fr; }
  .lp-hero-art { order: -1; max-width: 420px; }
  .lp-mock { transform: none; }
}
@media (max-width: 620px) {
  .lp-nav a:not(.btn) { display: none; }
  .lp-main { gap: 44px; }
}

/* ---------------- tutorial (Driver.js) ---------------- */
.escala-tour.driver-popover { background: var(--panel); color: var(--ink); border-radius: 14px; box-shadow: var(--shadow-lg); max-width: 330px; }
.escala-tour .driver-popover-title { font: 800 14.5px/1.3 var(--font); color: var(--ink); }
.escala-tour .driver-popover-description { font-size: 12.8px; line-height: 1.55; color: var(--muted); }
.escala-tour .driver-popover-progress-text { font-size: 11px; font-weight: 700; color: var(--muted); }
.escala-tour .driver-popover-navigation-btns button { border: 1px solid var(--line); background: var(--panel); color: var(--ink); border-radius: 9px; padding: 6px 12px; font-size: 12px; font-weight: 700; text-shadow: none; }
.escala-tour .driver-popover-navigation-btns button:hover { background: var(--accent-soft); color: var(--accent); }
.escala-tour .driver-popover-next-btn { background: linear-gradient(135deg, var(--accent), var(--accent2)); border-color: transparent; color: #fff; }
.escala-tour .driver-popover-next-btn:hover { color: #fff; filter: brightness(1.06); background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.escala-tour .driver-popover-close-btn { color: var(--muted); }
.escala-tour .driver-popover-close-btn:hover { color: var(--err); }
.escala-tour .driver-popover-arrow-side-left.driver-popover-arrow { border-left-color: var(--panel); }
.escala-tour .driver-popover-arrow-side-right.driver-popover-arrow { border-right-color: var(--panel); }
.escala-tour .driver-popover-arrow-side-top.driver-popover-arrow { border-top-color: var(--panel); }
.escala-tour .driver-popover-arrow-side-bottom.driver-popover-arrow { border-bottom-color: var(--panel); }

/* ---------------- recuperação de senha ---------------- */
.auth-form-title { font-size: 17px; letter-spacing: -.3px; }
.auth-form-lead { margin: -4px 0 2px; font-size: 12.5px; line-height: 1.5; color: var(--muted); }
.auth-ok { margin: 0; padding: 9px 12px; border-radius: 10px; background: var(--ok-soft); color: var(--ok); font-size: 12.5px; font-weight: 600; }
.link-btn { border: 0; background: transparent; padding: 4px; font-size: 12px; font-weight: 600; color: var(--muted); text-decoration: underline; text-underline-offset: 2px; border-radius: 6px; align-self: center; }
.link-btn:hover { color: var(--accent); }

/* ---------------- lote de funcionários ---------------- */
.small-btn { padding: 6px 10px; font-size: 12px; margin: -4px 0 12px; }
.inline-form textarea { border: 1px solid var(--line); border-radius: 10px; padding: 9px 10px; background: var(--panel); color: var(--ink); font: 13px/1.5 var(--font); resize: vertical; min-height: 120px; }
.inline-form textarea:focus { outline: 2px solid color-mix(in srgb, var(--accent) 40%, transparent); outline-offset: 1px; }
