@import url('https://fonts.googleapis.com/css2?family=Geist:wght@300;400;500;600;700;800&display=swap');

/* ── RESET & BASE ── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg:          #09090b;
  --surface:     #111113;
  --surface2:    #1c1c1f;
  --surface3:    #27272a;
  --border:      rgba(255,255,255,0.08);
  --border2:     rgba(255,255,255,0.16);

  --accent:      #3db88a;
  --accent-d:    #2e9a72;
  --accent-dim:  rgba(61,184,138,0.13);

  --warn:        #f59e0b;
  --danger:      #ef4444;
  --info:        #4f7cff;

  --text:        #fafafa;
  --text2:       #a1a1aa;
  --muted:       #52525b;

  --sidebar-w:   248px;
  --topbar-h:    60px;
  --r:           12px;
  --rs:          8px;
}

/* ── TEMA CLARO ── */
[data-theme="light"] {
  --bg:          #f4f7f5;
  --surface:     #ffffff;
  --surface2:    #eef2ef;
  --surface3:    #e2ebe5;
  --border:      rgba(0,0,0,0.08);
  --border2:     rgba(0,0,0,0.15);

  --accent:      #2a9d6f;
  --accent-d:    #217a58;
  --accent-dim:  rgba(42,157,111,0.10);

  --warn:        #d97706;
  --danger:      #dc2626;
  --info:        #3b5fe2;

  --text:        #0f1f18;
  --text2:       #3d5c4a;
  --muted:       #7a9c89;
}

[data-theme="light"] .task-card {
  background: var(--surface2);
}

[data-theme="light"] .modal-overlay {
  background: rgba(0,0,0,0.45);
}

[data-theme="light"] .proj-card:hover,
[data-theme="light"] .member-card:hover,
[data-theme="light"] .report-card:hover {
  box-shadow: 0 8px 24px rgba(0,0,0,.10);
}

[data-theme="light"] .task-card:hover {
  box-shadow: 0 4px 16px rgba(0,0,0,.10);
}

[data-theme="light"] ::-webkit-scrollbar-thumb {
  background: var(--surface3);
}

[data-theme="light"] .select-field option {
  background: var(--surface);
  color: var(--text);
}

html { font-size: 16px; }

body {
  font-family: 'Geist', sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.5;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

::-webkit-scrollbar { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 99px; }

/* ── LAYOUT ── */
.layout-wrapper { display: flex; min-height: 100vh; }

/* ══ SIDEBAR ══ */
.sidebar {
  width: var(--sidebar-w);
  height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  position: fixed;
  left: 0; top: 0;
  z-index: 200;
  transition: transform .25s cubic-bezier(.4,0,.2,1);
}

.sidebar-logo {
  padding: 20px 18px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 11px;
}

.logo-img { height: 28px; width: auto; object-fit: contain; }

.logo-text {
  font-family: 'Geist', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: .3px;
}

.logo-sub {
  font-size: 11px;
  color: var(--muted);
  font-weight: 400;
  display: block;
  margin-top: 1px;
  letter-spacing: .5px;
}

.sidebar-scroll { flex: 1; overflow-y: auto; padding: 12px 10px; }

.nav-section { margin-bottom: 4px; }

.nav-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  color: var(--muted);
  padding: 8px 10px 6px;
  display: block;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--rs);
  cursor: pointer;
  font-size: 13.5px;
  font-weight: 500;
  color: var(--muted);
  transition: all .14s;
  margin-bottom: 1px;
  position: relative;
  text-decoration: none;
}

.nav-item:hover { background: var(--surface2); color: var(--text); text-decoration: none; }

.nav-item.active {
  background: var(--accent-dim);
  color: var(--accent);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  left: 0; top: 20%;
  height: 60%; width: 3px;
  background: var(--accent);
  border-radius: 0 3px 3px 0;
}

.nav-icon { font-size: 15px; width: 18px; text-align: center; flex-shrink: 0; }

.nav-badge {
  margin-left: auto;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 20px;
  line-height: 1.4;
  background: var(--accent);
}

.sidebar-footer {
  padding: 14px;
  border-top: 1px solid var(--border);
}

.user-pill {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--rs);
  background: var(--surface2);
  border: 1px solid var(--border);
  transition: .14s;
  text-decoration: none;
}

.user-pill:hover { border-color: var(--border2); text-decoration: none; }

.avatar {
  width: 32px; height: 32px;
  border-radius: 50%;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent-d));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
}

.avatar-lg {
  width: 56px; height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-d));
  margin: 0 auto 11px;
}

.user-info .user-name { font-size: 13px; font-weight: 600; color: var(--text); }
.user-info .user-role { font-size: 11px; color: var(--muted); }

/* ══ MAIN ══ */
.main-content {
  margin-left: var(--sidebar-w);
  flex: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ── TOPBAR ── */
.topbar {
  height: var(--topbar-h);
  padding: 0 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
  position: sticky;
  top: 0;
  z-index: 100;
  gap: 12px;
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.page-title {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 17px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── CONTENT ── */
.content { flex: 1; padding: 22px; overflow-x: hidden; }

/* ── CARDS ── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.card-title {
  font-family: 'Geist', sans-serif;
  font-weight: 700;
  font-size: 14px;
}

/* ── BUTTONS ── */
.btn {
  padding: 8px 16px;
  border-radius: var(--rs);
  border: none;
  cursor: pointer;
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 600;
  transition: all .14s;
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-decoration: none;
}

.btn-primary {
  background: var(--accent);
  color: #fff;
}
.btn-primary:hover {
  background: var(--accent-d);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(61,184,138,.28);
  text-decoration: none;
  color: #fff;
}

.btn-ghost {
  background: var(--surface2);
  color: var(--text2);
  border: 1px solid var(--border);
}
.btn-ghost:hover {
  border-color: var(--border2);
  color: var(--text);
  text-decoration: none;
}

.btn-danger {
  background: rgba(239,68,68,.15);
  color: var(--danger);
  border: 1px solid rgba(239,68,68,.2);
}
.btn-danger:hover {
  background: rgba(239,68,68,.25);
  text-decoration: none;
}

.btn-sm { padding: 6px 12px; font-size: 12px; }

.btn-success-flash {
  background: var(--accent) !important;
  color: #fff !important;
  border-color: var(--accent) !important;
}

/* ── FORMS ── */
.field-group { margin-bottom: 16px; }

.field-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 7px;
  display: block;
}

.input-field,
.select-field,
textarea.input-field {
  width: 100%;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--rs);
  padding: 10px 13px;
  color: var(--text);
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  transition: .14s;
  appearance: none;
}

.input-field:focus,
.select-field:focus,
textarea.input-field:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(61,184,138,.12);
}

textarea.input-field { resize: vertical; min-height: 80px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row.three { grid-template-columns: 1fr 1fr 1fr; }

/* ── BADGES ── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 99px;
}

/* Status */
.badge-active    { background: var(--accent-dim); color: var(--accent); }
.badge-paused    { background: rgba(245,158,11,.15); color: var(--warn); }
.badge-completed { background: rgba(61,184,138,.15); color: var(--accent); }
.badge-cancelled { background: rgba(239,68,68,.15); color: var(--danger); }
.badge-backlog   { background: rgba(107,114,128,.15); color: #9ca3af; }
.badge-todo      { background: rgba(79,124,255,.15); color: var(--info); }
.badge-doing     { background: var(--accent-dim); color: var(--accent); }
.badge-review    { background: rgba(245,158,11,.15); color: var(--warn); }
.badge-done      { background: rgba(61,184,138,.15); color: var(--accent); }

/* Prioridade */
.badge-low      { background: rgba(107,114,128,.15); color: #9ca3af; }
.badge-medium   { background: rgba(79,124,255,.15); color: var(--info); }
.badge-high     { background: rgba(245,158,11,.15); color: var(--warn); }
.badge-critical { background: rgba(239,68,68,.15); color: var(--danger); }

/* AI Sessions */
.badge-pending     { background: rgba(107,114,128,.15); color: #9ca3af; }
.badge-in_progress { background: var(--accent-dim); color: var(--accent); }
.badge-no_response { background: rgba(239,68,68,.15); color: var(--danger); }

/* Role */
.badge-admin   { background: rgba(239,68,68,.15); color: var(--danger); }
.badge-manager { background: rgba(245,158,11,.15); color: var(--warn); }
.badge-member  { background: rgba(107,114,128,.15); color: #9ca3af; }

/* ── PROGRESS BAR ── */
.progress-bar { height: 4px; background: var(--surface3); border-radius: 99px; overflow: hidden; }
.progress-fill { height: 100%; border-radius: 99px; background: var(--accent); transition: width .4s; }

/* ── DASHBOARD STATS ── */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 22px;
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  position: relative;
  overflow: hidden;
}

.stat-card::after {
  content: '';
  position: absolute;
  top: -16px; right: -16px;
  width: 72px; height: 72px;
  border-radius: 50%;
  opacity: .07;
}

.stat-card.cg::after { background: var(--accent); }
.stat-card.cb::after { background: var(--info); }
.stat-card.cw::after { background: var(--warn); }
.stat-card.cd::after { background: var(--danger); }

.stat-icon { font-size: 20px; margin-bottom: 10px; }
.stat-val  { font-family: 'Geist', sans-serif; font-size: 30px; font-weight: 800; line-height: 1; margin-bottom: 3px; }
.stat-lbl  { font-size: 12px; color: var(--muted); }

/* ── DASHBOARD GRID ── */
.dash-grid {
  display: grid;
  grid-template-columns: 1fr 310px;
  gap: 18px;
}

/* ── PROJECT ROWS ── */
.project-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: .14s;
}
.project-row:last-child { border-bottom: none; }
.project-row:hover { padding-left: 4px; }

.proj-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--accent); }
.proj-info { flex: 1; min-width: 0; }
.proj-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-bottom: 2px; }
.proj-meta { font-size: 11px; color: var(--muted); }
.proj-prog { width: 90px; flex-shrink: 0; }
.proj-pct  { font-size: 11px; color: var(--muted); text-align: right; margin-bottom: 4px; }

/* ── PROJECTS GRID ── */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.proj-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  cursor: pointer;
  transition: all .16s;
  text-decoration: none;
  display: block;
  color: inherit;
}

.proj-card:hover {
  border-color: rgba(61,184,138,.35);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(0,0,0,.3);
  text-decoration: none;
  color: inherit;
}

.proj-card-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  margin-bottom: 13px;
  background: var(--accent-dim);
}

.proj-card-title  { font-family: 'Geist', sans-serif; font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.proj-card-client { font-size: 12px; color: var(--muted); margin-bottom: 13px; }

.proj-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  gap: 8px;
}

/* ── KANBAN ── */
.kanban-wrap { overflow-x: auto; padding-bottom: 8px; }

.kanban-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(210px, 1fr));
  gap: 12px;
  min-width: 1050px;
}

.k-col {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 13px;
  min-height: 200px;
}

.k-col-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.k-col-tr   { display: flex; align-items: center; gap: 7px; }
.k-dot      { width: 8px; height: 8px; border-radius: 50%; }
.k-col-title { font-size: 13px; font-weight: 600; }
.k-count    {
  font-size: 11px;
  color: var(--muted);
  background: var(--surface2);
  padding: 2px 7px;
  border-radius: 20px;
}

.task-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 9px;
  cursor: grab;
  transition: all .15s;
}

.task-card:last-child { margin-bottom: 0; }

.task-card:hover {
  border-color: rgba(61,184,138,.35);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,.3);
}

.task-card.dragging {
  opacity: .5;
  cursor: grabbing;
}

.k-col.drag-over {
  border-color: var(--accent);
  background: var(--accent-dim);
}

.task-title { font-size: 12.5px; font-weight: 500; line-height: 1.45; margin: 7px 0 10px; }
.task-foot  { display: flex; align-items: center; justify-content: space-between; }

.av-xs {
  width: 22px; height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--accent), var(--accent-d));
  color: #fff;
  flex-shrink: 0;
}

.task-due      { font-size: 10.5px; color: var(--muted); }
.task-due.late { color: var(--danger); }

.k-add-btn {
  width: 100%;
  padding: 8px;
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: var(--rs);
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  transition: .14s;
  margin-top: 8px;
}
.k-add-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-dim); }

/* ── TEAM ── */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.member-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 20px;
  text-align: center;
  transition: all .16s;
}

.member-card:hover {
  border-color: rgba(61,184,138,.35);
  transform: translateY(-2px);
}

.member-name { font-family: 'Geist', sans-serif; font-weight: 700; font-size: 14px; margin-bottom: 3px; }
.member-role-lbl { font-size: 12px; color: var(--muted); margin-bottom: 10px; }

/* ── TABLE ── */
.table-wrap { overflow-x: auto; }

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}

.table th {
  text-align: left;
  padding: 10px 14px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}

.table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}

.table tr:last-child td { border-bottom: none; }
.table tr:hover td { background: var(--surface2); }

/* ── AI CONFIG ── */
.ai-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.ai-status-box {
  text-align: center;
  padding: 22px 16px;
  background: linear-gradient(135deg, rgba(61,184,138,.07), rgba(45,212,170,.05));
  border: 1px solid rgba(61,184,138,.18);
  border-radius: 10px;
  margin-bottom: 16px;
}

.ai-status-box .icon { font-size: 38px; margin-bottom: 8px; }
.ai-status-box .lbl  { font-family: 'Geist', sans-serif; font-weight: 700; font-size: 17px; color: var(--accent); }
.ai-status-box .sub  { font-size: 12px; color: var(--muted); margin-top: 3px; }

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 15px;
  background: var(--surface2);
  border-radius: var(--rs);
  border: 1px solid var(--border);
  margin-bottom: 10px;
}

.tr-title { font-size: 13.5px; font-weight: 500; }
.tr-sub   { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

.toggle { position: relative; width: 44px; height: 24px; cursor: pointer; flex-shrink: 0; }
.toggle input { opacity: 0; width: 0; height: 0; position: absolute; }
.toggle-track {
  position: absolute; inset: 0;
  background: var(--surface3);
  border-radius: 99px;
  border: 1px solid var(--border);
  transition: .2s;
}
.toggle input:checked + .toggle-track { background: var(--accent); border-color: var(--accent); }
.toggle-thumb {
  position: absolute; top: 3px; left: 3px;
  width: 16px; height: 16px;
  background: #fff;
  border-radius: 50%;
  transition: .2s;
  pointer-events: none;
  z-index: 1;
}
.toggle input:checked ~ .toggle-thumb { left: 23px; }

.days-row { display: flex; gap: 7px; flex-wrap: wrap; }

.day-btn {
  width: 42px; height: 42px;
  border-radius: var(--rs);
  border: 1px solid var(--border);
  background: var(--surface2);
  cursor: pointer;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  transition: .14s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.day-btn.on,
.day-btn.active { background: var(--accent-dim); border-color: var(--accent); color: var(--accent); }

/* ── REPORTS ── */
.reports-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }

.report-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 18px;
  transition: all .16s;
}

.report-card:hover {
  border-color: rgba(61,184,138,.35);
  transform: translateY(-2px);
}

/* ── MODAL ── */
.modal-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  z-index: 500;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.modal-overlay.is-open { display: flex; }

.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--r);
  padding: 24px;
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  overflow-y: auto;
  animation: fadeUp .18s ease;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.modal-title { font-family: 'Geist', sans-serif; font-weight: 700; font-size: 16px; }

.modal-close {
  width: 32px; height: 32px;
  border-radius: 6px;
  background: var(--surface2);
  border: 1px solid var(--border);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: var(--muted);
}
.modal-close:hover { color: var(--text); }

/* ── FLASH MESSAGES ── */
.flash {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: var(--rs);
  font-size: 13.5px;
  font-weight: 500;
  margin-bottom: 18px;
  animation: fadeUp .2s ease;
}

.flash-success { background: rgba(61,184,138,.12); border: 1px solid rgba(61,184,138,.25); color: var(--accent); }
.flash-error   { background: rgba(239,68,68,.12); border: 1px solid rgba(239,68,68,.25); color: var(--danger); }

/* ── AUTH ── */
.auth-body {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  background: var(--bg);
  flex-direction: column;
  padding: 20px;
}

.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
}

.auth-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-bottom: 28px;
}

.auth-brand {
  font-family: 'Geist', sans-serif;
  font-size: 22px;
  font-weight: 800;
  color: var(--accent);
}

.auth-logo img { height: 32px; }

.auth-title {
  font-family: 'Geist', sans-serif;
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 6px;
}

.auth-sub { font-size: 13px; color: var(--muted); margin-bottom: 24px; }

.auth-footer { font-size: 12px; color: var(--muted); margin-top: 20px; }

/* ── EMPTY STATE ── */
.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--muted);
}
.empty-state .icon { font-size: 48px; margin-bottom: 16px; }
.empty-state h3 { font-family: 'Geist', sans-serif; font-size: 16px; color: var(--text2); margin-bottom: 8px; }
.empty-state p  { font-size: 13px; }

/* ── PAGE HEADER ── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-header h2 {
  font-family: 'Geist', sans-serif;
  font-size: 20px;
  font-weight: 700;
}

.page-header .sub { font-size: 12px; color: var(--muted); margin-top: 2px; }

/* ── SECTION HEADER ── */
.section-title {
  font-family: 'Geist', sans-serif;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  color: var(--text2);
}

/* ── UTILS ── */
.flex       { display: flex; }
.items-center { align-items: center; }
.gap-2      { gap: 8px; }
.gap-3      { gap: 12px; }
.mt-4       { margin-top: 16px; }
.mb-4       { margin-bottom: 16px; }
.text-muted { color: var(--muted); font-size: 12px; }
.text-sm    { font-size: 12px; }
.font-syne  { font-family: 'Geist', sans-serif; }
.fw-700     { font-weight: 700; }

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(7px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .sidebar { transform: translateX(calc(-1 * var(--sidebar-w))); }
  .sidebar.open { transform: translateX(0); }
  .main-content { margin-left: 0; }
  .stats-grid { grid-template-columns: repeat(2, 1fr); }
  .dash-grid { grid-template-columns: 1fr; }
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
  .team-grid { grid-template-columns: repeat(2, 1fr); }
  .ai-grid { grid-template-columns: 1fr; }
  .reports-grid { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .projects-grid { grid-template-columns: 1fr; }
  .team-grid { grid-template-columns: 1fr; }
}

/* ── Quill Rich Text Editor ── */
.ql-toolbar.ql-snow {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: var(--rs) var(--rs) 0 0;
  padding: 6px 8px;
}
.ql-container.ql-snow {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 0 0 var(--rs) var(--rs);
  font-family: 'Geist', sans-serif;
  font-size: 14px;
  color: var(--text);
  min-height: 100px;
}
.ql-editor {
  min-height: 100px;
  padding: 10px 14px;
  line-height: 1.6;
}
.ql-editor.ql-blank::before {
  color: var(--muted);
  font-style: normal;
}
.ql-snow .ql-stroke { stroke: var(--text2); }
.ql-snow .ql-fill  { fill:   var(--text2); }
.ql-snow .ql-picker { color: var(--text2); }
.ql-snow .ql-picker-options {
  background: var(--surface2);
  border-color: var(--border);
  border-radius: var(--rs);
}
.ql-snow.ql-toolbar button:hover .ql-stroke,
.ql-snow .ql-toolbar button:hover .ql-stroke,
.ql-snow.ql-toolbar button.ql-active .ql-stroke,
.ql-snow .ql-toolbar button.ql-active .ql-stroke { stroke: var(--accent); }
.ql-snow.ql-toolbar button:hover .ql-fill,
.ql-snow .ql-toolbar button.ql-active .ql-fill   { fill: var(--accent); }
.ql-snow .ql-picker-label:hover,
.ql-snow .ql-picker-label.ql-active              { color: var(--accent); }
.ql-editor p, .ql-editor li { color: var(--text); }
.ql-editor h1, .ql-editor h2, .ql-editor h3 { color: var(--text); font-family: 'Geist', sans-serif; }
.ql-editor a { color: var(--accent); }
.ql-editor blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--text2);
  margin: 8px 0;
}
/* modo readonly */
.ql-container.ql-disabled .ql-editor { cursor: default; }
.ql-container.ql-disabled { opacity: .75; }
/* conteúdo html renderizado fora do editor */
.rich-content p    { margin: 0 0 8px; line-height: 1.7; }
.rich-content ul,
.rich-content ol   { padding-left: 20px; margin-bottom: 8px; }
.rich-content a    { color: var(--accent); }
.rich-content strong { font-weight: 600; }
.rich-content blockquote {
  border-left: 3px solid var(--accent);
  padding-left: 12px;
  color: var(--text2);
  margin: 8px 0;
}
