:root {
  --bg: #0a0e1a;
  --surface: #131a2c;
  --surface-2: #1b2338;
  --sidebar-bg: #0d1120;
  --border: #242d47;
  --text: #e8ebf3;
  --text-muted: #8b93ab;
  --primary: #2f6fb0;
  --primary-hover: #3d82c9;
  --accent: #4c9fe0;
  --danger: #f87171;
  --danger-bg: rgba(248, 113, 113, 0.12);
  --success: #4ade80;
  --success-bg: rgba(74, 222, 128, 0.12);
  --warning: #f5c451;
  --warning-bg: rgba(245, 196, 81, 0.1);
  --warning-border: rgba(245, 196, 81, 0.35);
  --radius: 10px;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

a { color: inherit; }

/* ---------------------------------------------------------------- shell */
.app-shell {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  width: 220px;
  flex: 0 0 220px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 1rem 0.75rem;
}
.sidebar-brand {
  display: flex;
  justify-content: center;
  padding: 0.5rem 0 1.5rem;
}
.sidebar-brand img { height: 38px; display: block; }

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  flex: 1;
  overflow-y: auto;
}
.sidebar-nav a {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s ease, color 0.15s ease;
}
.sidebar-nav a:hover { background: var(--surface); color: var(--text); }
.sidebar-nav a.active { background: rgba(76, 159, 224, 0.14); color: var(--accent); font-weight: 600; }
.nav-icon { width: 18px; height: 18px; flex-shrink: 0; }

.sidebar-footer {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
  margin-top: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}
.sidebar-account {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex: 1;
  min-width: 0;
  text-decoration: none;
  color: var(--text);
  padding: 0.4rem 0.5rem;
  border-radius: 8px;
  font-size: 0.86rem;
}
.sidebar-account span.name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-account:hover { background: var(--surface); }
.avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.72rem;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar-small { width: 24px; height: 24px; font-size: 0.65rem; }
.sidebar-logout {
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: 0.5rem;
  border-radius: 8px;
  display: flex;
}
.sidebar-logout:hover { background: var(--danger-bg); color: var(--danger); }

.main-area { flex: 1; min-width: 0; }

@media (max-width: 860px) {
  .app-shell { flex-direction: column; }
  .sidebar {
    width: 100%; flex: none; height: auto; position: static;
    flex-direction: row; align-items: center; padding: 0.5rem 0.75rem;
  }
  .sidebar-brand { padding: 0.25rem 0.75rem 0.25rem 0.25rem; }
  .sidebar-nav { flex-direction: row; overflow-x: auto; }
  .sidebar-nav a span:last-child { display: none; }
  .sidebar-footer { border-top: none; margin-top: 0; padding-top: 0; }
  .sidebar-account span.name { display: none; }
}

/* login page */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: linear-gradient(160deg, var(--sidebar-bg) 0%, #101b52 45%, var(--accent) 130%);
}
.login-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 2.25rem 2rem;
  width: 100%;
  max-width: 360px;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.login-logo { height: 42px; margin: 0 auto 0.4rem; display: block; }
.login-card p.muted { text-align: center; }
.login-card .btn { width: 100%; text-align: center; margin-top: 0.3rem; }
.login-card label { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--text-muted); gap: 0.3rem; }
.login-card input {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.55rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
}

.container {
  padding: 1.75rem 2rem 3rem;
}

h1 { font-size: 1.5rem; margin: 0 0 1rem; }
h2 { font-size: 1.1rem; margin: 0 0 0.75rem; color: var(--accent); }

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.muted { color: var(--text-muted); font-size: 0.92rem; }
.actions { display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* stat cards (financeiro) */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0.9rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}
.stat-card.stat-success { border-left-color: var(--success); }
.stat-card.stat-warning { border-left-color: var(--warning); }
.stat-card.stat-danger { border-left-color: var(--danger); }
.stat-label { font-size: 0.78rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; }
.stat-value { font-size: 1.4rem; font-weight: 700; }

/* buttons */
.btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  border: none;
  padding: 0.55rem 1rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-size: 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.05s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--primary-hover); box-shadow: var(--shadow-sm); }
.btn:active { transform: translateY(1px); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover { background: #242d47; }
.btn-danger { background: var(--danger); color: #2a0a0a; }
.btn-small { padding: 0.32rem 0.7rem; font-size: 0.82rem; }

/* flash messages */
.flash-list { margin-bottom: 1rem; }
.flash { padding: 0.6rem 0.9rem; border-radius: var(--radius); margin-bottom: 0.5rem; font-size: 0.9rem; }
.flash-success { background: var(--success-bg); color: var(--success); }
.flash-error { background: var(--danger-bg); color: var(--danger); }

/* alerts */
.alerts { margin-bottom: 1.5rem; display: flex; flex-direction: column; gap: 0.5rem; }
.alert { padding: 0.65rem 0.9rem; border-radius: var(--radius); font-size: 0.9rem; }
.alert a { margin-left: 0.5rem; color: var(--accent); }
.alert-warning { background: var(--warning-bg); border: 1px solid var(--warning-border); color: var(--warning); }
.alert-danger { background: var(--danger-bg); border: 1px solid rgba(248, 113, 113, 0.35); color: var(--danger); }

/* kanban */
.kanban {
  display: flex;
  gap: 1rem;
  overflow-x: auto;
  padding-bottom: 1rem;
}
.kanban-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  min-width: 250px;
  flex: 0 0 250px;
  padding: 0.75rem;
}
.kanban-col h3 {
  font-size: 0.85rem;
  color: var(--text);
  margin: 0 0 0.6rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.kanban-col h3 .label { display: flex; align-items: center; gap: 0.5rem; }
.stage-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.kanban-col:nth-of-type(6n+1) .stage-dot { background: #4c9fe0; }
.kanban-col:nth-of-type(6n+2) .stage-dot { background: #34d399; }
.kanban-col:nth-of-type(6n+3) .stage-dot { background: #c084fc; }
.kanban-col:nth-of-type(6n+4) .stage-dot { background: #f5c451; }
.kanban-col:nth-of-type(6n+5) .stage-dot { background: #fb923c; }
.kanban-col:nth-of-type(6n+6) .stage-dot { background: #f472b6; }
.kanban-col:nth-of-type(6n+1) { border-top: 3px solid #4c9fe0; }
.kanban-col:nth-of-type(6n+2) { border-top: 3px solid #34d399; }
.kanban-col:nth-of-type(6n+3) { border-top: 3px solid #c084fc; }
.kanban-col:nth-of-type(6n+4) { border-top: 3px solid #f5c451; }
.kanban-col:nth-of-type(6n+5) { border-top: 3px solid #fb923c; }
.kanban-col:nth-of-type(6n+6) { border-top: 3px solid #f472b6; }
.count {
  background: var(--surface-2);
  border-radius: 999px;
  padding: 0.05rem 0.55rem;
  font-size: 0.75rem;
  color: var(--text-muted);
}
.kanban-cards { display: flex; flex-direction: column; gap: 0.5rem; }
.kanban-card {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  text-decoration: none;
  color: var(--text);
  font-size: 0.85rem;
}
.kanban-card:hover { border-color: var(--accent); box-shadow: var(--shadow-sm); }
.kanban-card { cursor: grab; }
.kanban-card.dragging { opacity: 0.4; cursor: grabbing; }
.kanban-cards { min-height: 40px; border-radius: 6px; transition: background 0.1s ease; }
.kanban-cards.drag-over { background: rgba(76, 159, 224, 0.1); outline: 2px dashed var(--accent); outline-offset: -2px; }
.kanban-card-body { min-width: 0; flex: 1; }
.kanban-card-body strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kanban-card-meta { display: flex; align-items: center; gap: 0.4rem; color: var(--text-muted); font-size: 0.78rem; margin-top: 0.15rem; }
.empty { color: var(--text-muted); font-size: 0.82rem; font-style: italic; }

/* cards */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1.1rem;
}

.details { display: grid; grid-template-columns: max-content 1fr; gap: 0.3rem 1rem; margin: 0; }
.details dt { color: var(--text-muted); font-size: 0.85rem; }
.details dd { margin: 0; font-size: 0.92rem; }
.notes { margin-top: 0.75rem; font-size: 0.9rem; white-space: pre-wrap; }

/* forms */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.9rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem;
  max-width: 780px;
}
.form-grid label { display: flex; flex-direction: column; font-size: 0.85rem; color: var(--text-muted); gap: 0.3rem; min-width: 0; }
.form-grid label.full { grid-column: 1 / -1; }
.form-grid input, .form-grid select, .form-grid textarea {
  font-family: inherit;
  font-size: 0.92rem;
  padding: 0.5rem 0.6rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.form-grid select {
  text-overflow: ellipsis;
  overflow: hidden;
  white-space: nowrap;
}
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus,
.login-card input:focus, .inline-form input:focus, .inline-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(76, 159, 224, 0.18);
}
.form-grid .actions { grid-column: 1 / -1; display: flex; gap: 0.6rem; margin-top: 0.4rem; }
.form-section-title {
  grid-column: 1 / -1;
  color: var(--accent);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 700;
  border-top: 1px solid var(--border);
  padding-top: 0.9rem;
  margin-top: 0.2rem;
}
.form-grid > .form-section-title:first-child { border-top: none; padding-top: 0; margin-top: 0; }

.inline-form { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; margin: 0.5rem 0; }
.inline-form select, .inline-form input[type=text] {
  padding: 0.45rem 0.6rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; font-size: 0.88rem; color: var(--text);
  max-width: 100%;
}
.inline-form select { text-overflow: ellipsis; overflow: hidden; }

/* tables */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.table th, .table td { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.table th { background: var(--sidebar-bg); color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.03em; }
.table.small th, .table.small td { padding: 0.4rem 0.6rem; font-size: 0.83rem; }
.table tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: var(--surface-2); }
.row-overdue { background: var(--danger-bg); }

.badge { display: inline-block; background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; padding: 0.1rem 0.6rem; font-size: 0.75rem; margin-left: 0.5rem; color: var(--text-muted); }
.badge-danger { background: var(--danger-bg); border-color: rgba(248, 113, 113, 0.35); color: var(--danger); }
.badge-warning { background: var(--warning-bg); border-color: var(--warning-border); color: var(--warning); }
.badge-success { background: var(--success-bg); border-color: rgba(74, 222, 128, 0.35); color: var(--success); }

.contract-block { border-top: 1px solid var(--border); padding-top: 1rem; margin-top: 1rem; }
.contract-block:first-child { border-top: none; margin-top: 0; padding-top: 0; }
.contract-head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.5rem; }

.history { margin-top: 0.75rem; font-size: 0.85rem; }
.history ul { margin: 0.5rem 0 0; padding-left: 1.2rem; color: var(--text-muted); }

/* grid de cards (clientes, imóveis, corretores) */
.item-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1rem;
}
.item-card {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s ease, transform 0.05s ease;
}
.item-card:hover { border-color: var(--accent); }
.item-card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem; }
.item-card-title { font-weight: 700; font-size: 0.98rem; line-height: 1.3; }
.item-card-sub { color: var(--text-muted); font-size: 0.85rem; }
.item-card-meta { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.2rem; }
.item-card-icon {
  width: 38px; height: 38px; border-radius: 8px; flex-shrink: 0;
  background: var(--surface-2); display: flex; align-items: center; justify-content: center; color: var(--accent);
}
.item-card-icon svg { width: 20px; height: 20px; }
.item-card-actions { display: flex; gap: 0.5rem; margin-top: 0.4rem; }

/* agenda (calendário mensal) */
.calendar { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-sm); overflow: hidden; }
.calendar-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); background: var(--sidebar-bg); }
.calendar-weekday { padding: 0.5rem 0.4rem; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.03em; color: var(--text-muted); text-align: center; }
.calendar-week { display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-day {
  min-height: 110px;
  border-top: 1px solid var(--border);
  border-right: 1px solid var(--border);
  padding: 0.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  overflow: hidden;
}
.calendar-week .calendar-day:last-child { border-right: none; }
.calendar-day-out { background: var(--bg); }
.calendar-day-out .calendar-day-num { color: var(--text-muted); }
.calendar-day-today { background: rgba(76, 159, 224, 0.08); }
.calendar-day-num { font-size: 0.82rem; font-weight: 600; }
.calendar-day-today .calendar-day-num {
  background: var(--accent); color: white; border-radius: 50%;
  width: 22px; height: 22px; display: flex; align-items: center; justify-content: center;
}
.calendar-event {
  display: block;
  background: rgba(76, 159, 224, 0.16);
  color: var(--accent);
  border-radius: 5px;
  padding: 0.15rem 0.4rem;
  font-size: 0.72rem;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.calendar-event:hover { background: rgba(76, 159, 224, 0.3); }
.calendar-event-overdue { background: var(--danger-bg); color: var(--danger); }
.calendar-event-overdue:hover { background: rgba(248, 113, 113, 0.28); }
.calendar-event-pause { background: var(--warning-bg); color: var(--warning); font-weight: 600; }
.calendar-event-pause:hover { background: rgba(245, 196, 81, 0.28); }

@media (max-width: 860px) {
  .calendar-day { min-height: 70px; font-size: 0.8rem; }
  .calendar-event { font-size: 0.65rem; }
}

/* news radar */
.news-list { display: flex; flex-direction: column; gap: 0.6rem; }
.news-item {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0.8rem 1rem;
  text-decoration: none;
  color: var(--text);
}
.news-item:hover { border-color: var(--accent); }
.news-item strong { font-size: 0.95rem; font-weight: 600; }

/* sinal de acompanhamento do cliente (agenda, home dash, cards) */
.follow-verde { background: var(--success-bg); color: var(--success); border-color: rgba(74, 222, 128, 0.35); }
.follow-amarelo { background: var(--warning-bg); color: var(--warning); border-color: var(--warning-border); }
.follow-laranja { background: rgba(251, 146, 60, 0.14); color: #fb923c; border-color: rgba(251, 146, 60, 0.4); }
.follow-vermelho { background: var(--danger-bg); color: var(--danger); border-color: rgba(248, 113, 113, 0.35); }
.calendar-event.follow-verde:hover { background: rgba(74, 222, 128, 0.28); }
.calendar-event.follow-amarelo:hover { background: rgba(245, 196, 81, 0.28); }
.calendar-event.follow-laranja:hover { background: rgba(251, 146, 60, 0.28); }
.calendar-event.follow-vermelho:hover { background: rgba(248, 113, 113, 0.28); }
.calendar-event-past { opacity: 0.55; }
.swatch.follow-verde { background: var(--success); }
.swatch.follow-amarelo { background: var(--warning); }
.swatch.follow-laranja { background: #fb923c; }
.swatch.follow-vermelho { background: var(--danger); }
.swatch-pause { background: var(--warning); opacity: 0.6; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 0.45rem; vertical-align: 1px; }
.dot.follow-verde { background: var(--success); }
.dot.follow-amarelo { background: var(--warning); }
.dot.follow-laranja { background: #fb923c; }
.dot.follow-vermelho { background: var(--danger); }
.follow-counts { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.follow-counts .badge { margin-left: 0; }

/* integrações */
.steps { margin: 0.6rem 0 0.4rem; padding-left: 1.3rem; font-size: 0.88rem; display: flex; flex-direction: column; gap: 0.35rem; }
.steps a { color: var(--accent); }
code.copy { background: var(--surface-2); border: 1px solid var(--border); border-radius: 5px; padding: 0.15rem 0.4rem; font-size: 0.82rem; word-break: break-all; user-select: all; }
.prompt-box { width: 100%; font-family: inherit; font-size: 0.85rem; background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 6px; padding: 0.7rem; }
.card-highlight { border-color: var(--accent); }

/* conteúdo & criativos */
.progress { height: 6px; background: var(--surface-2); border-radius: 3px; overflow: hidden; }
.progress > div { height: 100%; background: var(--success); }
details.card > summary { cursor: pointer; color: var(--accent); }
.week-board { display: grid; grid-template-columns: repeat(7, minmax(150px, 1fr)); gap: 0.6rem; overflow-x: auto; }
.week-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 0.6rem; min-height: 140px; display: flex; flex-direction: column; gap: 0.5rem; }
.week-col-today { border-color: var(--accent); }
.week-col h3 { font-size: 0.85rem; margin: 0 0 0.2rem; display: flex; justify-content: space-between; }
.content-card { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--text-muted); border-radius: 8px; padding: 0.5rem; display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.82rem; }
.content-card strong a { text-decoration: none; }
.content-card strong a:hover { text-decoration: underline; }
.content-card select { width: 100%; font-size: 0.78rem; padding: 0.25rem; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 5px; }
.content-card .muted { font-size: 0.75rem; }
.content-card-tags { display: flex; flex-wrap: wrap; gap: 0.25rem; }
.content-card-tags .badge { margin-left: 0; }
.content-planejado { border-left-color: var(--text-muted); }
.content-gravado { border-left-color: var(--warning); }
.content-editado { border-left-color: var(--accent); }
.content-postado { border-left-color: var(--success); }
.badge-profile-command { color: var(--accent); border-color: rgba(76, 159, 224, 0.4); }
.badge-profile-joao { color: #c084fc; border-color: rgba(192, 132, 252, 0.4); }
@media (max-width: 860px) {
  .week-board { grid-template-columns: 1fr; }
  .week-col { min-height: 0; }
}

/* dashboards (seletor de mês, barras, grade de cards) */
.month-nav { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }
.month-nav-label { font-weight: 600; min-width: 9rem; text-align: center; }
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 1rem; align-items: start; }
.dash-grid .card { margin-bottom: 0; }
.dash-grid + .card { margin-top: 1.1rem; }
.bar { height: 6px; border-radius: 3px; min-width: 2px; margin: 2px 0; }
.bar-contratado { background: var(--accent); }
.bar-recebido { background: var(--success); }
.legend { display: flex; gap: 1rem; font-size: 0.8rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.swatch { display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 0.35rem; vertical-align: -1px; }
.swatch-contratado { background: var(--accent); }
.swatch-recebido { background: var(--success); }
.row-selected { background: rgba(76, 159, 224, 0.1); }
.card .table { box-shadow: none; }

@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .card { overflow-x: auto; }
}
