:root {
  --navy: #0A2540;
  --blue: #2563EB;
  --blue-2: #1D4ED8;
  --cyan: #06B6D4;
  --blue-soft: #EAF3FF;
  --bg: #F3F6FA;
  --surface: rgba(255,255,255,.94);
  --surface-2: #ffffff;
  --ink: #10233b;
  --muted: #6B7280;
  --border: #E5EDF6;
  --ok: #147b48;
  --warn: #9a5600;
  --wait: #6441a5;
  --shadow: 0 18px 40px rgba(10, 37, 64, .08);
  --radius: 20px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(37,99,235,.12), transparent 28%),
    radial-gradient(circle at top right, rgba(6,182,212,.10), transparent 25%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 72%);
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
a { color: inherit; }
.hidden { display: none !important; }

.shell { min-height: 100vh; display: flex; }
.sidebar {
  width: 272px;
  background: rgba(255,255,255,.86);
  border-right: 1px solid rgba(229,237,246,.9);
  backdrop-filter: blur(16px);
  padding: 26px 18px;
  position: fixed;
  inset: 0 auto 0 0;
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 2px 8px 14px;
}
.brand-logo {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  box-shadow: 0 10px 24px rgba(37,99,235,.16);
}
.brand h1 { font-size: 21px; margin: 0; letter-spacing: -.02em; color: var(--navy); }
.brand p { margin: 3px 0 0; color: var(--muted); font-size: 12px; line-height: 1.35; }
.nav { display: grid; gap: 7px; }
.nav button {
  border: 0;
  background: transparent;
  color: #475569;
  padding: 12px 13px;
  border-radius: 14px;
  text-align: left;
  display:flex;
  gap: 11px;
  align-items:center;
  font-weight: 650;
}
.nav button span { color: #7b91ac; }
.nav button:hover, .nav button.active {
  background: linear-gradient(90deg, rgba(37,99,235,.12), rgba(6,182,212,.08));
  color: var(--blue-2);
}
.nav button:hover span, .nav button.active span { color: var(--blue); }
.sidebar-foot {
  margin-top: auto;
  font-size: 12px;
  color: #5b6a7c;
  background: linear-gradient(180deg, rgba(37,99,235,.08), rgba(6,182,212,.06));
  border: 1px solid rgba(37,99,235,.10);
  padding: 14px;
  border-radius: 16px;
  line-height: 1.45;
}

.main {
  flex: 1;
  margin-left: 272px;
  padding: 28px 30px 94px;
  max-width: 1500px;
  width: calc(100% - 272px);
}
.topbar {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:20px;
  margin-bottom:24px;
}
.topbar h2 { margin: 0; font-size: 31px; letter-spacing:-.03em; color: var(--navy); }
.topbar p { margin: 5px 0 0; color:var(--muted); }
.actions { display:flex; gap:10px; align-items:center; }
.btn {
  border:0;
  border-radius:14px;
  padding:11px 15px;
  font-weight:700;
  transition: .18s ease;
}
.btn-primary {
  background: linear-gradient(135deg, var(--blue), var(--cyan));
  color:#fff;
  box-shadow: 0 12px 24px rgba(37,99,235,.22);
}
.btn-primary:hover { transform: translateY(-1px); filter: saturate(1.05); }
.btn-soft { background:var(--blue-soft); color:var(--blue-2); }
.btn-soft:hover { background:#dfeeff; }
.icon-btn {
  border:0;
  background:#eef3f9;
  border-radius:12px;
  width:40px;
  height:40px;
  color:var(--ink);
}

.search {
  background: rgba(255,255,255,.9);
  border:1px solid var(--border);
  border-radius:16px;
  padding:0 13px;
  display:flex;
  align-items:center;
  gap:9px;
  min-width:330px;
  box-shadow:0 10px 28px rgba(10,37,64,.05);
}
.search input { width:100%; border:0; outline:0; padding:12px 0; background:transparent; }

.grid { display:grid; gap:18px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0,1fr)); }
.card {
  background: var(--surface);
  border:1px solid rgba(229,237,246,.9);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:18px;
  backdrop-filter: blur(8px);
}
.card h3 { margin:0 0 13px; font-size:16px; }
.metric { display:flex; flex-direction:column; gap:6px; position: relative; overflow: hidden; }
.metric::after {
  content: "";
  position: absolute;
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(37,99,235,.14), transparent 68%);
  right: -12px;
  top: -12px;
}
.metric-value { font-size:30px; font-weight:800; letter-spacing:-.03em; color: var(--navy); }
.metric-label { color:var(--muted); font-size:13px; }
.metric-foot { margin-top:5px; font-size:12px; color:var(--ok); font-weight:650; }
.section-title { display:flex; justify-content:space-between; align-items:center; margin:26px 0 12px; }
.section-title h3 { margin:0; font-size:17px; color: var(--navy); }
.section-title button { border:0; background:transparent; color:var(--blue); font-weight:700; }

.timeline { display:grid; gap:11px; }
.event {
  display:grid;
  grid-template-columns:72px 1fr auto;
  gap:12px;
  align-items:center;
  padding:13px 14px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  box-shadow: 0 8px 24px rgba(10,37,64,.04);
}
.event-time { font-weight:800; color:var(--blue-2); }
.event-title { font-weight:750; }
.event-meta { color:var(--muted); font-size:13px; margin-top:3px; }
.event-tag { font-size:11px; background:var(--blue-soft); color:var(--blue-2); padding:6px 9px; border-radius:999px; font-weight:750; }

.list { display:grid; gap:10px; }
.list-row {
  background:#fff;
  border:1px solid var(--border);
  border-radius:16px;
  padding:13px 14px;
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  box-shadow: 0 6px 18px rgba(10,37,64,.04);
}
.list-main { min-width:0; }
.list-title { font-weight:740; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.list-meta { color:var(--muted); font-size:12px; margin-top:4px; }
.status, .chip {
  font-size:11px;
  padding:6px 9px;
  border-radius:999px;
  font-weight:750;
  white-space:nowrap;
}
.status.todo { background:#fff0e2; color:var(--warn); }
.status.wait { background:#f0ecff; color:var(--wait); }
.status.done { background:#e7f7ee; color:var(--ok); }
.status.pipeline, .chip.primary { background:#eaf3ff; color:#1755c7; }
.chip { background:#eef3f8; color:#526179; }
.empty { text-align:center; color:var(--muted); padding:34px 18px; }

.page-head { display:flex; justify-content:space-between; gap:16px; align-items:center; margin-bottom:18px; }
.page-head h2 { margin:0; color: var(--navy); }
.table-wrap {
  background:#fff;
  border:1px solid var(--border);
  border-radius:20px;
  overflow:hidden;
  box-shadow:var(--shadow);
}
table { width:100%; border-collapse:collapse; }
th, td { padding:14px 16px; text-align:left; border-bottom:1px solid var(--border); }
th {
  font-size:12px;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:var(--muted);
  background:#f9fbfd;
}
tr:last-child td { border-bottom:0; }
tbody tr { cursor:pointer; }
tbody tr:hover { background:#f8fbff; }

.client-hero { display:flex; justify-content:space-between; gap:18px; align-items:flex-start; }
.client-hero h2 { margin:0; font-size:28px; color: var(--navy); }
.client-meta { color:var(--muted); margin-top:6px; }
.tabs {
  display:flex;
  gap:6px;
  padding:6px;
  background:#eef3f8;
  border-radius:14px;
  width:max-content;
  max-width:100%;
  overflow:auto;
  margin:18px 0;
}
.tabs button {
  border:0;
  background:transparent;
  padding:9px 12px;
  border-radius:10px;
  color:#526179;
  font-weight:700;
  white-space:nowrap;
}
.tabs button.active { background:#fff; color:var(--blue); box-shadow:0 3px 10px rgba(30,50,80,.08); }
.detail-grid { display:grid; grid-template-columns: 1.15fr .85fr; gap:18px; }
.contact-row { display:flex; gap:12px; align-items:center; padding:12px 0; border-bottom:1px solid var(--border); }
.contact-row:last-child { border-bottom:0; }
.avatar {
  width:42px;
  height:42px;
  border-radius:50%;
  background: linear-gradient(135deg, var(--blue-soft), #d4f6ff);
  color:var(--blue-2);
  display:grid;
  place-items:center;
  font-weight:800;
}
.contact-name { font-weight:750; }
.contact-role { font-size:12px; color:var(--muted); margin-top:2px; }
.project-card {
  border:1px solid var(--border);
  border-radius:17px;
  padding:14px;
  margin-bottom:11px;
  cursor:pointer;
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98));
}
.project-card:hover { background:#f8fbff; }
.project-top { display:flex; justify-content:space-between; gap:12px; }
.project-title { font-weight:800; }
.project-value { color:var(--blue-2); font-weight:800; }
.participants { display:flex; flex-wrap:wrap; gap:7px; margin-top:10px; }

.mobile-nav { display:none; }
.fab { display:none; }

.modal-backdrop {
  position:fixed;
  inset:0;
  background:rgba(10,20,35,.48);
  backdrop-filter:blur(4px);
  z-index:50;
  display:grid;
  place-items:center;
  padding:20px;
}
.modal {
  width:min(720px, 100%);
  max-height:88vh;
  overflow:auto;
  background:#fff;
  border-radius:24px;
  padding:20px;
  box-shadow:0 24px 80px rgba(0,0,0,.25);
}
.modal-head { display:flex; justify-content:space-between; align-items:flex-start; gap:14px; margin-bottom:14px; }
.modal-head h2 { margin:2px 0 0; color: var(--navy); }
.eyebrow { margin:0; text-transform:uppercase; letter-spacing:.08em; color:var(--blue); font-weight:800; font-size:11px; }
.form-grid { display:grid; grid-template-columns:1fr 1fr; gap:13px; }
.field { display:grid; gap:6px; }
.field.full { grid-column:1/-1; }
.field label { font-size:12px; color:#526179; font-weight:700; }
.field input, .field select, .field textarea {
  width:100%;
  border:1px solid var(--border);
  border-radius:13px;
  padding:10px 11px;
  outline:none;
  background:#fff;
}
.field textarea { min-height:105px; resize:vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color:#8dbef3;
  box-shadow:0 0 0 3px #eaf3ff;
}
.form-actions { grid-column:1/-1; display:flex; justify-content:flex-end; gap:9px; margin-top:6px; }

.notice {
  background:#fff8e7;
  border:1px solid #f5dd9d;
  color:#72510a;
  border-radius:14px;
  padding:12px 14px;
  font-size:13px;
  margin-bottom:16px;
}

@media (max-width: 1100px) {
  .grid-4 { grid-template-columns:repeat(2,1fr); }
  .detail-grid { grid-template-columns:1fr; }
}
@media (max-width: 760px) {
  body { background: #f6f8fb; }
  .sidebar { display:none; }
  .main { margin-left:0; width:100%; padding:20px 16px 96px; }
  .topbar { align-items:flex-start; }
  .topbar h2 { font-size:25px; }
  .topbar .search { display:none; }
  .actions .desktop-only { display:none; }
  .grid-4 { grid-template-columns:repeat(2,1fr); gap:11px; }
  .grid-2 { grid-template-columns:1fr; }
  .card { padding:15px; border-radius:18px; box-shadow:0 7px 22px rgba(24,44,78,.06); }
  .metric-value { font-size:24px; }
  .event { grid-template-columns:58px 1fr; }
  .event-tag { grid-column:2; width:max-content; }
  .table-wrap { overflow:auto; }
  table { min-width:760px; }
  .mobile-nav {
    display:grid;
    position:fixed;
    z-index:30;
    bottom:0;
    left:0;
    right:0;
    height:74px;
    background:rgba(255,255,255,.96);
    border-top:1px solid var(--border);
    grid-template-columns:repeat(5,1fr);
    padding:8px 7px calc(8px + env(safe-area-inset-bottom));
    backdrop-filter:blur(16px);
  }
  .mobile-nav button { border:0; background:transparent; color:#6f7d91; font-size:11px; display:grid; place-items:center; gap:2px; }
  .mobile-nav button span { font-size:18px; }
  .mobile-nav button.active { color:var(--blue); font-weight:800; }
  .fab {
    display:grid;
    place-items:center;
    position:fixed;
    z-index:35;
    right:20px;
    bottom:88px;
    width:58px;
    height:58px;
    border-radius:50%;
    background: linear-gradient(135deg, var(--blue), var(--cyan));
    color:#fff;
    border:0;
    box-shadow:0 15px 28px rgba(37,99,235,.35);
    font-size:30px;
  }
  .client-hero { flex-direction:column; }
  .tabs { width:100%; }
  .form-grid { grid-template-columns:1fr; }
  .field.full, .form-actions { grid-column:1; }
}

.toolbar { display:flex; flex-wrap:wrap; gap:10px; align-items:center; }
.stack-right { display:flex; flex-direction:column; align-items:flex-end; gap:8px; }
.mini-btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-2);
}
.mini-btn:hover { background: var(--blue-soft); }
.sync-code {
  margin: 14px 0 16px;
  font-weight: 800;
  font-size: 28px;
  letter-spacing: .08em;
  color: var(--navy);
  background: linear-gradient(90deg, rgba(37,99,235,.09), rgba(6,182,212,.08));
  border: 1px dashed rgba(37,99,235,.32);
  border-radius: 18px;
  padding: 18px;
  text-align: center;
}
.settings-card p { margin-top: 0; }
.more-card { text-align:left; border:1px solid var(--border); }
.btn.danger { background: #fee2e2; color: #991b1b; }
.btn.danger:hover { background: #fecaca; }
@media (max-width:760px){
  .sync-code { font-size: 22px; }
  .toolbar { width: 100%; }
}

.notice-ok { background:#ebf8ef; border-color:#b7e2c0; color:#18653f; }
.status-chip { display:inline-flex; align-items:center; gap:6px; margin-top:8px; padding:5px 9px; border-radius:999px; font-size:11px; font-weight:800; }
.status-chip.ok { background:#e7f7ee; color:#147b48; }
.status-chip.muted { background:#eef3f8; color:#526179; }
.sync-code {
  margin:14px 0 16px;
  font-weight:800;
  font-size:28px;
  letter-spacing:.08em;
  color:var(--navy);
  background:linear-gradient(90deg, rgba(37,99,235,.09), rgba(6,182,212,.08));
  border:1px dashed rgba(37,99,235,.32);
  border-radius:18px;
  padding:18px;
  text-align:center;
}
.qr-wrap { margin-top:16px; display:grid; gap:12px; justify-items:center; }
.qr-img { width:200px; height:200px; border-radius:18px; border:1px solid var(--border); background:#fff; padding:10px; }
.members-list { display:grid; gap:10px; margin-top:12px; }
.member-row { display:flex; justify-content:space-between; gap:12px; align-items:center; padding:12px 14px; border:1px solid var(--border); background:#fff; border-radius:14px; }
.member-row small { color:var(--muted); }
.member-dot { width:10px; height:10px; border-radius:50%; background:#22c55e; box-shadow:0 0 0 4px #dcfce7; }
.inline-input {
  border:1px solid var(--border);
  border-radius:13px;
  padding:10px 11px;
  min-width:220px;
  background:#fff;
}
@media (max-width:760px){
  .sync-code { font-size:22px; }
  .inline-input { width:100%; min-width:0; }
  .qr-img { width:180px; height:180px; }
}

/* Flexible content widths and readable records on every screen. */
html { -webkit-text-size-adjust:100%; }
body { line-height:1.5; }
.sidebar { overflow-y:auto; overflow-wrap:anywhere; }
.main, .main *, .modal, .modal * { min-width:0; }
.main, .modal { overflow-wrap:anywhere; }
.main { max-width:1800px; }
.actions, .page-head, .client-hero, .project-top, .section-title { flex-wrap:wrap; }
.actions { max-width:100%; }
.topbar { align-items:flex-start; }
.topbar>div:first-child { flex:1 1 220px; }
.topbar .actions { flex:0 1 460px; }
.search { min-width:0; flex:1; }
.list-row { flex-wrap:wrap; }
.list-main { flex:1 1 160px; }
.list-title { white-space:normal; overflow:visible; text-overflow:clip; }
.status, .chip, .event-tag { white-space:normal; max-width:100%; }
.status { align-self:flex-start; }
.project-top>div:first-child { flex:1 1 140px; }
.project-value { flex-shrink:0; }
.contact-row>div:not(.avatar) { flex:1; min-width:0; }
.avatar, .member-dot { flex-shrink:0; }
.sync-code { font-size:clamp(16px,2.5vw,25px); overflow-wrap:anywhere; letter-spacing:.04em; }
.record-list { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:16px; }
.record-card { display:flex; flex-direction:column; }
.record-card p { margin:8px 0; }
.record-actions { display:flex; flex-wrap:wrap; gap:8px; margin-top:12px; }
.record-card>.record-actions { margin-top:auto; padding-top:16px; }
.record-title { border:0; background:none; color:var(--blue-2); font-weight:800; font-size:18px; text-align:left; padding:0; line-height:1.4; }
.mini-btn { min-height:40px; white-space:normal; }
.mini-btn.danger { color:#991b1b; background:#fff5f5; border-color:#fecaca; }
.activity-date { font-weight:700; color:var(--blue-2); margin-bottom:8px; }
.activity-card h3 { margin-bottom:6px; }
.activity-card .toolbar { align-items:flex-end; }
.pipeline-board { display:flex; gap:14px; overflow-x:auto; max-width:100%; padding:2px 2px 12px; }
.pipeline-column { flex:0 0 280px; align-self:flex-start; }
.form-error { color:#991b1b; margin:0; }
.form-error:empty { display:none; }
.app-toast { position:fixed; z-index:100; left:50%; transform:translateX(-50%); bottom:24px; width:max-content; max-width:calc(100% - 32px); padding:14px 18px; border-radius:14px; background:#10233b; color:#fff; box-shadow:var(--shadow); overflow-wrap:anywhere; }
button:focus-visible { outline:3px solid #06b6d4; outline-offset:3px; }
.btn:disabled { opacity:.6; cursor:wait; }
@media(max-width:1100px) and (min-width:761px){
  .topbar { flex-wrap:wrap; }
  .topbar .actions { flex:1 1 100%; }
  .record-list { grid-template-columns:1fr; }
}
@media(max-width:760px){
  .main { padding:18px 14px calc(108px + env(safe-area-inset-bottom)); }
  .topbar { gap:8px; margin-bottom:18px; }
  .topbar h2 { font-size:clamp(22px,6vw,28px); line-height:1.2; }
  .topbar .actions { display:none; }
  .topbar p, .client-meta { font-size:14px; }
  .page-head { flex-direction:column; align-items:stretch; gap:12px; }
  .page-head>p { margin:0; }
  .page-head>.btn { align-self:flex-start; }
  .toolbar { gap:8px; }
  .toolbar>.btn { flex:1 1 140px; }
  .record-list { grid-template-columns:minmax(0,1fr); gap:12px; }
  .grid-4 { grid-template-columns:repeat(2,minmax(0,1fr)); }
  .metric-value { font-size:clamp(18px,5.3vw,25px); line-height:1.3; }
  .metric-label, .metric-foot { font-size:12px; }
  .metric { padding:13px; }
  .event { grid-template-columns:55px minmax(0,1fr); }
  .event>.toolbar { grid-column:1/-1; }
  .pipeline-board { flex-direction:column; overflow:visible; }
  .pipeline-column { flex:0 0 auto; width:100%; }
  .client-hero h2 { font-size:23px; line-height:1.3; }
  .client-hero>.actions { width:100%; }
  .client-hero .actions>.btn { flex:1 1 120px; }
  .contact-row { align-items:flex-start; }
  .sync-code { font-size:18px; padding:14px; }
  .mobile-nav { height:auto; min-height:70px; padding-bottom:calc(8px + env(safe-area-inset-bottom)); }
  .mobile-nav button { min-width:0; min-height:46px; }
  .fab { bottom:calc(88px + env(safe-area-inset-bottom)); width:50px; height:50px; right:16px; }
  .modal-backdrop { padding:10px; }
  .modal { padding:16px; border-radius:18px; max-height:calc(100dvh - 20px); }
  .form-grid { grid-template-columns:minmax(0,1fr); }
  .field input, .field select, .field textarea { font-size:16px; max-width:100%; }
  .form-actions { flex-wrap:wrap; }
  .form-actions .btn { flex:1 1 120px; }
  .app-toast { bottom:calc(88px + env(safe-area-inset-bottom)); }
}

.google-import-row{display:flex;gap:12px;align-items:flex-start;overflow-wrap:anywhere}.google-import-row input{width:auto;flex:none;margin-top:5px}.google-import-row span{min-width:0}

.client-search{margin-bottom:20px}.client-search label{display:block;font-weight:600;margin-bottom:8px}.client-search input{flex:1 1 220px;min-width:0;padding:12px;border:1px solid var(--line,#d5dbe5);border-radius:12px;font:inherit}.client-lookup{background:#f4f7fb;padding:14px;border-radius:12px;min-width:0}.client-lookup .card{min-width:0;overflow-wrap:anywhere}.client-lookup dt{font-weight:600}.client-lookup dd{margin:0 0 8px;overflow-wrap:anywhere}.client-lookup a{color:#245ba8;overflow-wrap:anywhere}

/* Início de sessão */
.auth-overlay { position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center; padding: 16px; background: rgba(10,37,64,.45); backdrop-filter: blur(6px); }
.auth-card { width: min(420px, 100%); background: var(--surface-2); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.auth-brand { display: flex; gap: 12px; align-items: center; margin-bottom: 18px; }
.auth-brand h2 { margin: 0; font-size: 22px; color: var(--navy); }
.auth-brand p { margin: 4px 0 0; color: var(--muted); font-size: 13px; line-height: 1.4; }
.auth-form { display: grid; gap: 12px; }
.auth-form label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink); }
.auth-form input { width: 100%; box-sizing: border-box; padding: 12px 14px; border: 1px solid var(--border); border-radius: 12px; font: inherit; font-size: 16px; }
.auth-form .btn { width: 100%; justify-content: center; }
.auth-msg { min-height: 1.2em; margin: 12px 0 0; font-size: 13px; color: var(--muted); }
.auth-msg.auth-error { color: #b42318; }
.auth-skip { display: block; margin: 8px auto 0; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; text-decoration: underline; cursor: pointer; }

/* ---------- V0.8 ---------- */
[hidden] { display: none !important; }
.quick-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 18px; }
.quick-actions .btn { flex: 0 0 auto; }
.quick-visit-btn { font-size: 16px; padding: 14px 20px; }
@media (max-width:760px){ .quick-actions .btn { flex: 1 1 auto; } .quick-visit-btn { flex-basis: 100% !important; } }

.todo-panel h4 { margin: 16px 0 6px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); display: flex; align-items: center; gap: 8px; }
.todo-group:first-of-type h4 { margin-top: 0; }
.todo-late h4 { color: #b42318; }
.todo-count { background: #eef3f8; color: #526179; border-radius: 999px; padding: 1px 8px; font-size: 11px; }
.todo-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.todo-main { flex: 1; min-width: 0; cursor: pointer; }
.todo-main .list-title { overflow-wrap: anywhere; }
.todo-check { flex: 0 0 auto; width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--border); background: #fff; color: transparent; font-weight: 800; cursor: pointer; }
.todo-check:hover, .todo-check:focus-visible { border-color: var(--ok); color: var(--ok); }
.todo-icon { flex: 0 0 32px; text-align: center; color: var(--blue); font-weight: 800; }
.todo-more { border: 0; background: none; color: var(--blue); font-weight: 700; padding: 8px 0; cursor: pointer; }
.due-badge { flex: 0 0 auto; font-size: 11px; font-weight: 800; padding: 4px 9px; border-radius: 999px; white-space: nowrap; }
.due-late { background: #fde8e8; color: #b42318; }
.due-soon { background: #fff0e2; color: var(--warn); }
.due-ok { background: #eef3f8; color: #526179; }

.tender-card .record-title.small { font-size: 14px; padding: 0; }
.tender-deadline { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.status.muted-status { background: #eef3f8; color: #526179; }
.tender-metrics { margin-bottom: 14px; }
.menu-grid .btn { justify-content: center; }

.dictate-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.dictate-btn.recording { background: #fde8e8; color: #b42318; border-color: #f5b5b5; }
.dictate-hint { margin: 4px 0 0; min-height: 0; }
.dictate-hint:empty { display: none; }
.followup .check { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.followup .check input { width: auto; }
.followup-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.followup-row select, .followup-row input { flex: 1 1 160px; }

.report-controls { margin-top: 18px; }
.report-controls .form-grid { margin-bottom: 12px; }
.report-preview { margin-top: 16px; border: 1px solid var(--border); border-radius: 14px; padding: 20px; background: #fff; overflow-x: auto; }
.report { color: #10233b; font-size: 13px; }
.report-head { display: flex; justify-content: space-between; gap: 16px; border-bottom: 2px solid #0A2540; padding-bottom: 12px; margin-bottom: 16px; }
.report h1 { font-size: 20px; margin: 0; color: #0A2540; }
.report-head p { margin: 4px 0 0; color: #6B7280; text-transform: capitalize; }
.report-meta { text-align: right; font-size: 11px; color: #6B7280; }
.report h2 { font-size: 15px; margin: 22px 0 8px; color: #0A2540; }
.report-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 10px; }
.report-kpis div { border: 1px solid #E5EDF6; border-radius: 10px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.report-kpis span { font-size: 11px; color: #6B7280; }
.report-kpis strong { font-size: 20px; color: #0A2540; }
.report-kpis small { font-size: 10px; color: #6B7280; }
.report table { width: 100%; border-collapse: collapse; font-size: 11.5px; }
.report th { text-align: left; background: #F3F6FA; color: #0A2540; padding: 6px 8px; border-bottom: 1px solid #E5EDF6; }
.report td { padding: 6px 8px; border-bottom: 1px solid #E5EDF6; vertical-align: top; overflow-wrap: break-word; word-break: normal; }
.report td:first-child, .report th { white-space: nowrap; }
.report td:nth-child(3) { white-space: nowrap; }
.report-empty { color: #6B7280; font-style: italic; }
@media (max-width:760px){ .report-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } .report-head { flex-direction: column; } .report-meta { text-align: left; } }

#printArea { display: none; }
@media print {
  @page { size: A4; margin: 14mm; }
  body.printing { background: #fff !important; }
  body.printing > *:not(#printArea) { display: none !important; }
  body.printing #printArea { display: block !important; }
  #printArea .report-kpis { grid-template-columns: repeat(4, 1fr); }
  #printArea tr { break-inside: avoid; }
  #printArea h2 { break-after: avoid; }
}

/* ---------- V0.9 Radar ---------- */
.radar-card .project-top h3 { overflow-wrap: anywhere; }
.radar-score { flex: 0 0 auto; min-width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue), var(--cyan)); color: #fff; font-weight: 800; font-size: 14px; }
.radar-facts { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; margin: 8px 0; font-size: 13px; }
.radar-facts span { display: inline-flex; align-items: center; gap: 6px; }
.radar-links { margin-top: 10px; }
.radar-actions { margin-top: 10px; }
.radar-actions .btn { flex: 1 1 auto; justify-content: center; }
.radar-new { box-shadow: 0 0 0 2px var(--blue), var(--shadow); }
.radar-expired { display: flex; align-items: center; gap: 8px; margin: 0 0 14px; font-size: 13px; color: var(--muted); }
.radar-expired input { width: auto; }
.nav-badge { display: inline-block; min-width: 18px; padding: 1px 6px; border-radius: 999px; background: #b42318; color: #fff; font-size: 11px; font-weight: 800; text-align: center; margin-left: 4px; }
.radar-today { margin-bottom: 18px; cursor: pointer; border: 1px solid #cfe0ff; background: linear-gradient(180deg, #f5f9ff, var(--surface-2)); }
#modalForm .check { display: flex; align-items: center; gap: 8px; font-weight: 600; margin: 6px 0; }
#modalForm .check input { width: auto; }
.radar-tabs { flex-wrap: wrap; overflow: visible; }
.radar-tabs button { flex: 0 0 auto; white-space: nowrap; }
.radar-card .project-top { flex-wrap: nowrap !important; align-items: flex-start; gap: 10px; }
.radar-card .project-top h3 { flex: 1 1 auto; min-width: 0; }
