:root {
  --bg: #f6f8fb;
  --panel: #ffffff;
  --ink: #172033;
  --muted: #64748b;
  --line: #d9e1ea;
  --soft: #edf2f7;
  --primary: #2563eb;
  --primary-soft: #eaf2ff;
  --green: #16a34a;
  --green-soft: #eaf8ef;
  --red: #dc2626;
  --red-soft: #feecec;
  --amber: #b7791f;
  --amber-soft: #fff7df;
  --cyan: #0e7490;
  --cyan-soft: #e7f7fb;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 18% 18%, rgba(37, 99, 235, 0.13), transparent 32%),
    radial-gradient(circle at 80% 12%, rgba(14, 116, 144, 0.12), transparent 28%),
    linear-gradient(120deg, rgba(37, 99, 235, 0.08), rgba(22, 163, 74, 0.08)),
    var(--bg);
}

.auth-shell {
  width: min(1040px, 100%);
  display: grid;
  grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.auth-card {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.auth-brand {
  height: auto;
  margin-bottom: 22px;
  padding: 0;
  border: 0;
}

.auth-card h1 {
  margin: 0;
  font-size: 28px;
  letter-spacing: 0;
}

.auth-card p {
  margin: 8px 0 0;
  color: var(--muted);
}

.auth-form {
  display: grid;
  gap: 13px;
  margin-top: 20px;
}

.password-field {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.password-field .input {
  min-width: 0;
}

.auth-note {
  min-height: 20px;
  font-size: 13px;
}

.auth-visual {
  display: grid;
  gap: 18px;
  align-content: space-between;
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(145deg, #ffffff 0%, #f8fbff 100%);
  box-shadow: var(--shadow);
}

.auth-visual-head h2 {
  max-width: 520px;
  margin: 12px 0 0;
  font-size: 30px;
  line-height: 1.08;
}

.auth-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.auth-metrics div,
.auth-feature-grid div {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.auth-metrics span,
.auth-feature-grid small {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.auth-metrics strong {
  display: block;
  margin-top: 5px;
  font-size: 22px;
}

.auth-chart {
  height: 170px;
  display: flex;
  align-items: end;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(to top, #e5e7eb 1px, transparent 1px) 0 0 / 100% 33%,
    #fff;
}

.auth-chart div {
  flex: 1;
  min-width: 18px;
  border-radius: 7px 7px 3px 3px;
  background: linear-gradient(180deg, #2563eb, #0e7490);
  opacity: 0.86;
}

.auth-feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.auth-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  margin-bottom: 8px;
  border-radius: 7px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 900;
}

.setup-code {
  margin-top: 18px;
  padding: 14px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0f172a;
  color: #e2e8f0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  white-space: pre;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  cursor: pointer;
}

.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 252px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  border-right: 1px solid var(--line);
  background: var(--panel);
}

.brand {
  height: 72px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
}

.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: var(--primary);
  color: white;
  font-weight: 900;
}

.brand strong {
  display: block;
  font-size: 17px;
}

.brand span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.nav {
  flex: 1;
  padding: 16px 12px;
}

.nav button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 11px;
  margin-bottom: 6px;
  padding: 10px 12px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #334155;
  text-align: left;
}

.nav button:hover {
  background: #f1f5f9;
}

.nav button.active {
  background: var(--primary-soft);
  color: var(--primary);
  box-shadow: inset 3px 0 0 var(--primary);
}

.nav-icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  font-size: 13px;
  font-weight: 800;
}

.user-card {
  margin: 12px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.avatar {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dbeafe;
  color: var(--primary);
  font-weight: 800;
}

.user-card strong,
.user-card span {
  display: block;
}

.user-card strong {
  font-size: 14px;
}

.user-card span {
  color: var(--muted);
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 4;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 0 30px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
}

.topbar h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: 0;
}

.topbar p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.notification-wrap {
  position: relative;
}

.bell-button {
  position: relative;
  font-size: 15px;
  line-height: 1;
}

.notif-badge {
  position: absolute;
  top: -7px;
  right: -7px;
  min-width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border: 2px solid white;
  border-radius: 999px;
  background: #ef4444;
  color: white;
  font-size: 10px;
  font-weight: 900;
}

.notification-dropdown {
  position: absolute;
  top: 48px;
  right: 0;
  z-index: 12;
  width: min(360px, calc(100vw - 24px));
  max-height: 420px;
  overflow: auto;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.content {
  padding: 28px 30px 52px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.grid.two {
  grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
}

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.panel,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.02);
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.panel-head h2 {
  margin: 0;
  font-size: 18px;
}

.panel-head p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.kpi {
  padding: 17px;
}

.kpi span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.kpi strong {
  display: block;
  margin-top: 10px;
  font-size: 29px;
  line-height: 1.05;
}

.kpi small {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.btn {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-weight: 750;
  text-decoration: none;
}

.btn:hover {
  background: #f8fafc;
}

.btn.primary {
  border-color: var(--primary);
  background: var(--primary);
  color: white;
}

.btn.green {
  border-color: var(--green);
  background: var(--green);
  color: white;
}

.btn.danger {
  border-color: #fecaca;
  background: var(--red-soft);
  color: #991b1b;
}

.btn.icon {
  width: 40px;
  padding: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 9px;
  border-radius: 999px;
  background: var(--soft);
  color: #475569;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.green {
  background: var(--green-soft);
  color: #166534;
}

.badge.blue {
  background: var(--primary-soft);
  color: #1d4ed8;
}

.badge.red {
  background: var(--red-soft);
  color: #991b1b;
}

.badge.amber {
  background: var(--amber-soft);
  color: #92400e;
}

.badge.cyan {
  background: var(--cyan-soft);
  color: #155e75;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.client-tabs {
  display: flex;
  gap: 4px;
  margin-top: 16px;
  overflow-x: auto;
  border-bottom: 1px solid var(--line);
}

.client-tabs button {
  min-height: 42px;
  padding: 9px 14px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
  white-space: nowrap;
}

.client-tabs button.active {
  border-bottom-color: var(--primary);
  color: var(--primary);
}

.export-actions {
  display: flex;
  gap: 8px;
}

.export-actions .btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.mini-bars {
  height: 220px;
  display: flex;
  align-items: end;
  gap: 14px;
  padding: 18px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.mini-bars div {
  flex: 1;
  display: grid;
  gap: 8px;
  justify-items: center;
}

.mini-bars span {
  width: 22px;
  max-height: 180px;
  min-height: 8px;
  display: block;
  border-radius: 6px 6px 0 0;
  background: var(--primary);
}

.mini-bars small {
  color: var(--muted);
  font-size: 11px;
}

.meeting-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.meeting-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.meeting-list strong,
.meeting-list span {
  display: block;
}

.meeting-list span {
  color: var(--muted);
  font-size: 12px;
}

.meeting-list p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  outline: none;
}

.input,
.select {
  min-height: 40px;
  padding: 8px 11px;
}

.textarea {
  min-height: 108px;
  padding: 10px 11px;
  resize: vertical;
}

.field small {
  color: var(--muted);
  font-size: 12px;
}

.input-with-suffix {
  position: relative;
}

.input-with-suffix .input {
  padding-right: 52px;
}

.input-with-suffix span {
  position: absolute;
  top: 50%;
  right: 12px;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.note {
  margin-top: 14px;
  color: #92400e;
  font-size: 13px;
  font-weight: 750;
}

.filters .input {
  width: min(320px, 100%);
}

.filters .select {
  width: 180px;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

th {
  background: #f8fafc;
  color: #334155;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}

tr:last-child td {
  border-bottom: 0;
}

tbody tr:hover {
  background: #fafcff;
}

.linkish {
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
}

.progress {
  height: 9px;
  overflow: hidden;
  border-radius: 99px;
  background: #e2e8f0;
}

.progress div {
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.project-card {
  padding: 15px;
}

.project-card h3 {
  margin: 0;
  font-size: 16px;
}

.project-card p {
  margin: 6px 0 12px;
  color: var(--muted);
  font-size: 13px;
}

.project-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.timeline {
  display: grid;
  gap: 10px;
}

.step {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: white;
}

.step.pendente {
  border-left-color: #94a3b8;
}

.step.em_andamento {
  border-left-color: var(--primary);
}

.step.concluida {
  border-left-color: var(--green);
}

.step.bloqueada {
  border-left-color: var(--red);
}

.step-num {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 13px;
  font-weight: 900;
}

.step h3 {
  margin: 0;
  font-size: 15px;
}

.step p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.step-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.segmented button {
  min-height: 32px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  padding: 6px 10px;
  color: var(--muted);
  font-weight: 800;
}

.segmented button.active {
  background: var(--primary);
  color: white;
}

.kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(230px, 1fr));
  gap: 14px;
  overflow-x: auto;
  padding-bottom: 4px;
}

.kanban-col {
  min-height: 320px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.kanban-col h3 {
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: #334155;
  font-size: 13px;
  text-transform: uppercase;
}

.kanban-card {
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-top: 3px solid var(--primary);
  border-radius: 8px;
  background: white;
  box-shadow: 0 6px 14px rgba(15, 23, 42, 0.04);
  cursor: grab;
}

.kanban-card strong {
  display: block;
  font-size: 14px;
}

.kanban-card span {
  display: block;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.template-step {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.template-step + .template-step {
  margin-top: 10px;
}

.preview-list {
  display: grid;
  gap: 7px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
  color: var(--muted);
  font-size: 13px;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.result-card {
  padding: 14px;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  background: #ecfdf5;
}

.result-card strong {
  display: block;
  margin-top: 12px;
  color: #065f46;
  font-size: 24px;
  line-height: 1.1;
}

.result-card h3 {
  margin: 8px 0 0;
  font-size: 15px;
}

.result-card p {
  margin: 6px 0 12px;
  color: #166534;
  font-size: 13px;
}

.comment-form {
  display: grid;
  gap: 10px;
  margin-bottom: 16px;
}

.activity-feed {
  position: relative;
  display: grid;
  gap: 12px;
}

.activity-item {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.activity-dot {
  width: 10px;
  height: 10px;
  margin-top: 7px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 0 0 0 4px var(--primary-soft);
}

.activity-item.system .activity-dot {
  background: #94a3b8;
  box-shadow: 0 0 0 4px #f1f5f9;
}

.activity-item > div:last-child {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.activity-item.system > div:last-child {
  background: #f8fafc;
}

.activity-meta {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 12px;
}

.activity-meta strong {
  color: var(--ink);
  font-size: 13px;
}

.activity-item p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.chart {
  height: 300px;
  display: flex;
  align-items: end;
  gap: 16px;
  padding: 20px 10px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.bar-group {
  flex: 1;
  min-width: 54px;
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 9px;
  height: 100%;
  text-align: center;
}

.bars {
  display: flex;
  align-items: end;
  justify-content: center;
  gap: 5px;
}

.bar {
  width: 18px;
  min-height: 6px;
  border-radius: 6px 6px 0 0;
  background: var(--primary);
}

.bar.done {
  background: var(--green);
}

.bar-label {
  color: var(--muted);
  font-size: 12px;
}

.notification-list {
  display: grid;
  gap: 10px;
}

.notification {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.notification.unread {
  background: #f2f7ff;
}

.dot {
  width: 9px;
  height: 9px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--primary);
}

.notification h3 {
  margin: 0;
  font-size: 14px;
}

.notification p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 13px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(15, 23, 42, 0.45);
}

.modal {
  width: min(620px, 100%);
  max-height: min(820px, calc(100vh - 36px));
  overflow: auto;
  padding: 20px;
  border-radius: 8px;
  background: white;
  box-shadow: var(--shadow);
}

.modal-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 13px;
}

.field {
  display: grid;
  gap: 6px;
}

.field.full {
  grid-column: 1 / -1;
}

.field label {
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.empty {
  padding: 26px;
  border: 1px dashed #cbd5e1;
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.whatsapp-preview {
  padding: 14px;
  border: 1px dashed #a7f3d0;
  border-radius: 8px;
  background: #f0fdf4;
  color: #166534;
  white-space: pre-wrap;
}

.skeleton {
  min-height: 86px;
  border-radius: 8px;
  background: linear-gradient(90deg, #e5e7eb, #f3f4f6, #e5e7eb);
  background-size: 200% 100%;
  animation: pulse 1.4s infinite;
}

@keyframes pulse {
  from {
    background-position: 200% 0;
  }
  to {
    background-position: -200% 0;
  }
}

@media (max-width: 980px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual-head h2 {
    font-size: 24px;
  }

  .auth-feature-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app {
    grid-template-columns: 224px minmax(0, 1fr);
  }

  .sidebar {
    position: sticky;
    z-index: 1;
    transform: none;
    transition: none;
  }

  .grid.kpis,
  .grid.four,
  .grid.three,
  .grid.two {
    grid-template-columns: 1fr;
  }

  .benchmark-hero {
    align-items: stretch;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .auth-page {
    padding: 14px;
  }

  .auth-card,
  .auth-visual {
    padding: 20px;
  }

  .auth-metrics,
  .auth-feature-grid {
    grid-template-columns: 1fr;
  }

  .auth-chart {
    height: 130px;
  }

  .topbar {
    height: auto;
    align-items: flex-start;
    padding: 14px;
  }

  .top-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .content {
    padding: 18px 14px 40px;
  }

  .toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .filters .input,
  .filters .select {
    width: 100%;
  }

  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-actions {
    flex-direction: column-reverse;
  }

  .modal-actions .btn {
    width: 100%;
  }

  .step,
  .template-step {
    grid-template-columns: 1fr;
  }

  .step-actions {
    flex-wrap: wrap;
  }
}

/* ClickUp-inspired refinement */
:root {
  --bg: #f7f8fa;
  --panel: #ffffff;
  --ink: #1f2430;
  --muted: #6b7280;
  --line: #e6e9ef;
  --soft: #f2f4f7;
  --primary: #2563eb;
  --primary-soft: #eef4ff;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

body {
  font-size: 14px;
  line-height: 1.38;
}

.app {
  grid-template-columns: 224px minmax(0, 1fr);
}

.brand {
  height: 60px;
  padding: 0 16px;
}

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

.brand strong {
  font-size: 15px;
}

.brand span,
.topbar p,
.panel-head p,
.kpi small,
.notification p {
  font-size: 12px;
}

.nav {
  padding: 10px;
  gap: 3px;
}

.nav button {
  min-height: 36px;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 13px;
}

.nav button.active {
  box-shadow: inset 3px 0 0 var(--primary);
}

.topbar {
  min-height: 60px;
  height: 60px;
  padding: 0 22px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  font-size: 19px;
}

.content {
  padding: 18px 22px 36px;
}

.panel,
.card {
  border-radius: 7px;
  box-shadow: var(--shadow);
}

.panel {
  padding: 16px;
}

.panel-head {
  gap: 12px;
  margin-bottom: 14px;
}

.panel-head h2,
.card h3 {
  font-size: 15px;
}

.grid {
  gap: 12px;
}

.grid.kpis {
  gap: 12px;
}

.kpi {
  min-height: 110px;
  padding: 14px;
}

.kpi strong {
  margin-top: 8px;
  font-size: 26px;
}

.btn {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 750;
  box-shadow: none;
}

.btn.primary,
.btn.green,
.btn.danger {
  box-shadow: none;
}

.btn.danger {
  border-color: #fecaca;
  background: #fff7f7;
  color: #b91c1c;
}

.compact-actions {
  justify-content: flex-end;
}

.badge {
  min-height: 22px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.input,
.select,
.textarea {
  border-radius: 6px;
  border-color: var(--line);
  background: #ffffff;
  font-size: 13px;
}

.input,
.select {
  min-height: 36px;
  padding: 8px 10px;
}

.textarea {
  padding: 10px;
}

.table-wrap {
  border-radius: 7px;
}

th {
  padding: 10px 12px;
  background: #fafbfc;
  font-size: 11px;
  letter-spacing: 0;
}

td {
  padding: 10px 12px;
}

.project-card {
  padding: 14px;
}

.project-meta,
.activity-meta,
.client-tabs button,
.export-actions .btn {
  font-size: 12px;
}

.client-tabs {
  margin-top: 14px;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.client-tabs button {
  border-radius: 5px;
  padding: 8px 10px;
}

.client-tabs button.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.modal {
  border-radius: 8px;
  box-shadow: 0 18px 60px rgba(15, 23, 42, 0.16);
}

.period-filter {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 0 14px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfc;
}

.period-group {
  display: grid;
  gap: 6px;
}

.period-group label {
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
}

.period-group > div {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) 96px;
  gap: 8px;
}

.period-group .select {
  min-width: 0;
}

.insight-list {
  display: grid;
  gap: 10px;
}

.insight-list article {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.insight-list strong {
  display: block;
  margin-bottom: 4px;
  font-size: 13px;
}

.insight-list p,
.source-note {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
}

.source-note {
  margin-top: 12px;
}

.title-link {
  padding: 0;
  color: var(--ink);
  text-align: left;
  font-weight: 800;
}

.title-link:hover {
  color: var(--primary);
  text-decoration: underline;
}

.chart-panel {
  padding: 14px;
  overflow: hidden;
}

.trend-chart {
  min-height: 0;
}

.trend-chart svg {
  width: 100%;
  height: 190px;
  max-height: 190px;
  display: block;
  overflow: hidden;
}

.trend-line {
  fill: none;
  stroke-width: 0.55;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.trend-area {
  stroke: none;
}

.trend-chart circle {
  fill: #ffffff;
  stroke: #2563eb;
  stroke-width: 0.45;
  color: var(--primary);
}

.chart-labels {
  display: flex;
  justify-content: space-between;
  gap: 6px;
  color: var(--muted);
  font-size: 10px;
}

.chart-grid {
  stroke: #e5e7eb;
  stroke-width: 0.18;
}

.chart-axis-line {
  stroke: #94a3b8;
  stroke-width: 0.22;
}

.chart-axis {
  fill: #94a3b8;
  font-size: 2.5px;
}

.chart-value {
  fill: #64748b;
  font-size: 2.15px;
  font-weight: 700;
  text-anchor: middle;
}

.client-score {
  display: grid;
  grid-template-columns: minmax(180px, 260px) 1fr minmax(260px, 1.6fr);
  align-items: center;
  gap: 18px;
}

.client-score h2 {
  margin: 8px 0 4px;
  font-size: 34px;
}

.score-bar {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.score-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.score-good .score-bar span {
  background: var(--green);
}

.score-mid .score-bar span {
  background: var(--amber);
}

.score-bad .score-bar span {
  background: var(--red);
}

.compact-insights {
  gap: 8px;
}

.contact-list,
.contact-steps,
.benchmark-list {
  display: grid;
  gap: 10px;
}

.contact-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.contact-head,
.benchmark-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.contact-card p {
  margin: 8px 0 12px;
  color: var(--muted);
}

.contact-step {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fafbfc;
}

.contact-step label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.contact-step.done span {
  color: var(--muted);
  text-decoration: line-through;
}

.contact-step small,
.benchmark-list span {
  color: var(--muted);
  font-size: 12px;
}

.cost-composition {
  display: grid;
  gap: 14px;
}

.stack-bar {
  display: flex;
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.stack-bar span {
  display: block;
  min-width: 0;
}

.stack-milk {
  background: #38bdf8;
}

.stack-payroll {
  background: #a78bfa;
}

.composition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.composition-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
}

.composition-grid strong {
  display: block;
  font-size: 18px;
}

.composition-grid span,
.health-note {
  color: var(--muted);
  font-size: 12px;
}

.health-note {
  margin: 0;
}

.benchmark-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.benchmark-picker label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 12px;
  font-weight: 800;
}

.executive-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
}

.clean-hero {
  align-items: center;
}

.executive-hero h2 {
  margin: 10px 0 4px;
  font-size: 28px;
}

.executive-hero p {
  max-width: 760px;
  margin: 0;
  color: var(--muted);
}

.score-ring {
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 8px solid #e5e7eb;
  border-radius: 50%;
  background: #fff;
  text-align: center;
}

.score-ring strong {
  display: block;
  font-size: 24px;
}

.score-ring span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.score-ring.score-good {
  border-color: var(--green);
}

.score-ring.score-mid {
  border-color: var(--amber);
}

.score-ring.score-bad {
  border-color: var(--red);
}

.kpi-link {
  width: 100%;
  color: inherit;
  text-align: left;
  cursor: pointer;
}

.kpi-link:hover {
  border-color: #c7d2fe;
  background: #f8fbff;
}

.health-row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.benchmark-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.benchmark-hero h2 {
  max-width: 680px;
  margin: 10px 0 4px;
  font-size: 26px;
}

.benchmark-hero p {
  margin: 0;
  color: var(--muted);
}

.benchmark-score {
  min-width: 150px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  text-align: center;
}

.benchmark-score strong {
  display: block;
  font-size: 28px;
}

.benchmark-score span {
  color: var(--muted);
  font-size: 12px;
}

.benchmark-table table {
  min-width: 720px;
}

.rank-bars,
.health-list {
  display: grid;
  gap: 10px;
}

.rank-row {
  display: grid;
  gap: 6px;
}

.rank-row > div:first-child,
.health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.rank-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.rank-track {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef2f7;
}

.rank-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
}

.health-row {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
  text-align: left;
}

.health-row strong.score-good {
  color: var(--green);
}

.health-row strong.score-mid {
  color: var(--amber);
}

.health-row strong.score-bad {
  color: var(--red);
}

.checkbox-line {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  font-weight: 800;
}

.tasks-kanban {
  display: grid;
  grid-template-columns: repeat(4, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
  overflow-x: auto;
  padding-bottom: 8px;
}

.task-lane {
  min-width: 240px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfc;
}

.task-lane header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
  color: var(--ink);
}

.task-card {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-left: 3px solid var(--line);
  border-radius: 7px;
  background: #fff;
  box-shadow: 0 1px 1px rgba(15, 23, 42, 0.03);
}

.task-card.pendente {
  border-left-color: #94a3b8;
}

.task-card.em_andamento {
  border-left-color: var(--amber);
}

.task-card.concluida {
  border-left-color: var(--green);
}

.task-card.bloqueada {
  border-left-color: var(--red);
}

.task-card-head,
.task-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.task-card-head span:last-child,
.task-meta {
  color: var(--muted);
  font-size: 11px;
}

.task-card p {
  max-height: 54px;
  margin: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 12px;
}

.compact-select {
  min-height: 32px;
  width: 100%;
  font-size: 12px;
}

.icon-segmented button {
  min-width: 38px;
  font-size: 16px;
}

.task-detail {
  display: grid;
  gap: 14px;
}

.task-detail h2 {
  margin: 0;
  font-size: 22px;
}

.task-detail p {
  margin: 0;
  color: var(--muted);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.detail-grid div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fafbfc;
}

.detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 11px;
}

.detail-grid strong {
  display: block;
  margin-top: 3px;
  font-size: 13px;
}
