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

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

/* Tema claro inspirado no Olix (Pixelstrap): Outfit, fundo cinza-azulado, cards brancos arredondados */
:root {
  --bg: #e6eaf3;
  --surface: #ffffff;
  --surface2: #f1f4fa;
  --surface3: #dde3ef;
  --border: #c3cada;
  --border2: #a3adc2;
  --accent: #5e60ce;
  --accent2: #c7c8f2;
  --accent3: #eeeefc;
  --warn: #8a5700;
  --warn-bg: #fff1cc;
  --warn-border: #e8c36a;
  --danger: #c4262c;
  --danger-bg: #fbe1e2;
  --danger-border: #eba3a6;
  --success: #0b6b4b;
  --success-bg: #dcf4ea;
  --success-border: #8fd0b5;
  --blue: #1c5cb8;
  --blue-bg: #dde9fd;
  --blue-border: #9fbff0;
  --text: #1f2a44;
  --text2: #3d4860;
  --text3: #5a647d;
  --text4: #8892a8;
  --mono: 'Outfit', sans-serif;
  --sans: 'Outfit', sans-serif;
  --radius: 8px;
  --radius-lg: 14px;
  --shadow: 0 8px 30px rgba(31, 42, 68, 0.12);
  --shadow-card: 0 2px 10px rgba(31, 42, 68, 0.12);
}

html, body { height: 100%; }
body { background: var(--bg); color: var(--text); font-family: var(--sans); font-size: 14px; line-height: 1.5; }

::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--border2); border-radius: 2px; }

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

/* ── LAYOUT ─────────────────────────────────────────────────────────────── */
.app-shell { display: flex; height: 100vh; overflow: hidden; }

.sidebar {
  width: 240px; min-width: 240px;
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  overflow-y: auto; overflow-x: hidden;
}

.sidebar-logo {
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 11px;
  color: var(--accent);
  letter-spacing: 2px;
  text-transform: uppercase;
  flex-shrink: 0;
}
.sidebar-logo small { display: block; color: var(--text3); font-size: 8px; letter-spacing: 1px; margin-top: 2px; }

.sidebar-section { padding: 10px 0; border-bottom: 1px solid var(--border); }
.sidebar-section:last-child { border-bottom: none; }

.sidebar-label {
  font-family: var(--mono);
  font-size: 8.5px; letter-spacing: 2px;
  color: var(--text3); text-transform: uppercase;
  padding: 4px 20px 6px;
}

.sidebar-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 20px;
  color: var(--text2); font-size: 13px;
  border-left: 2px solid transparent;
  cursor: pointer; transition: all 0.12s;
  text-decoration: none;
}
.sidebar-item:hover { color: var(--text); background: var(--surface2); text-decoration: none; }
.sidebar-item.active { color: var(--accent); border-left-color: var(--accent); background: var(--surface2); }
.sidebar-item .ico { font-size: 12px; width: 16px; text-align: center; }
.sidebar-item .badge {
  margin-left: auto;
  font-family: var(--mono); font-size: 9px;
  padding: 1px 5px; border-radius: 3px;
  background: var(--surface3); border: 1px solid var(--border2);
  color: var(--text3);
}
.sidebar-item.active .badge { background: var(--accent3); border-color: var(--accent2); color: var(--accent); }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  font-family: var(--mono); font-size: 9px; color: var(--text3);
  flex-shrink: 0;
}

.main-area { flex: 1; display: flex; flex-direction: column; overflow: hidden; }

/* ── MONEY VISIBILITY TOGGLE ───────────────────────────────────────────── */
.money-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 12px;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  gap: 4px;
}
.money-toggle:hover {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text);
}
.money-toggle.hidden .money-icon-visible,
.money-toggle:not(.hidden) .money-icon-hidden {
  display: none;
}

.money-value {
  transition: filter 0.2s ease;
}

.money-hidden .money-value {
  filter: blur(8px);
  user-select: none;
}

/* ── SIDEBAR TOGGLE ────────────────────────────────────────────────────── */
.sidebar-toggle {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text2);
  cursor: pointer;
  padding: 6px 10px;
  font-size: 14px;
  transition: all 0.12s;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 12px;
}
.sidebar-toggle:hover {
  background: var(--surface2);
  border-color: var(--border2);
  color: var(--text);
}

.sidebar {
  transition: width 0.2s ease, min-width 0.2s ease, transform 0.2s ease;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 0;
  min-width: 0;
  transform: translateX(-100%);
  border-right: none;
  overflow: hidden;
}

.app-shell.sidebar-collapsed .main-area {
  width: 100%;
}

.topbar {
  height: 52px; min-height: 52px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center;
  padding: 0 24px; gap: 12px;
  flex-shrink: 0;
}
.topbar-info { flex: 1; }
.topbar-title { font-size: 15px; font-weight: 600; }
.topbar-sub { font-family: var(--mono); font-size: 9.5px; color: var(--text3); margin-top: 1px; }
.topbar-actions { display: flex; gap: 8px; align-items: center; }

.page-content { flex: 1; overflow-y: auto; padding: 24px; }

/* ── BREADCRUMB ─────────────────────────────────────────────────────────── */
.breadcrumb { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text3); margin-bottom: 20px; flex-wrap: wrap; }
.breadcrumb a { color: var(--text2); }
.breadcrumb a:hover { color: var(--accent); text-decoration: none; }
.breadcrumb-sep { font-family: var(--mono); font-size: 10px; color: var(--text4); }

/* ── FLASH MESSAGES ─────────────────────────────────────────────────────── */
.flash-stack { position: fixed; top: 16px; right: 16px; z-index: 999; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.flash {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 16px;
  border-radius: var(--radius);
  border: 1px solid;
  font-size: 13px; font-weight: 500;
  pointer-events: all;
  animation: slideIn 0.2s ease;
  min-width: 280px; max-width: 400px;
}
.flash-success { background: var(--success-bg); border-color: var(--success-border); color: var(--success); }
.flash-error   { background: var(--danger-bg);  border-color: var(--danger-border);  color: var(--danger); }
.flash-warning { background: var(--warn-bg);    border-color: var(--warn-border);    color: var(--warn); }
.flash-info    { background: var(--blue-bg);    border-color: var(--blue-border);    color: var(--blue); }
.flash-close { margin-left: auto; cursor: pointer; opacity: 0.6; font-size: 16px; }
.flash-close:hover { opacity: 1; }
@keyframes slideIn { from { opacity:0; transform: translateX(20px); } to { opacity:1; transform: translateX(0); } }

/* ── BUTTONS ────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px;
  font-size: 12px; font-weight: 500; font-family: var(--sans);
  border-radius: var(--radius); border: 1px solid;
  cursor: pointer; transition: all 0.12s;
  text-decoration: none; white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent3); border-color: var(--accent2); color: var(--accent); }
.btn-primary:hover { background: #053d3b; border-color: var(--accent); }
.btn-ghost { background: transparent; border-color: var(--border); color: var(--text2); }
.btn-ghost:hover { border-color: var(--border2); color: var(--text); background: var(--surface2); }
.btn-danger { background: var(--danger-bg); border-color: var(--danger-border); color: var(--danger); }
.btn-danger:hover { background: #2d0a0a; }
.btn-warn { background: var(--warn-bg); border-color: var(--warn-border); color: var(--warn); }
.btn-sm { padding: 5px 10px; font-size: 11px; }
.btn-xs { padding: 3px 8px; font-size: 10px; }
.btn-icon { padding: 6px 8px; }
.btn[disabled], .btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* ── TAGS / BADGES ──────────────────────────────────────────────────────── */
.tag {
  display: inline-flex; align-items: center;
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  padding: 2px 7px; border-radius: 3px;
  text-transform: uppercase; letter-spacing: 0.5px; border: 1px solid;
  white-space: nowrap;
}
.tag-active, .tag-done     { color: var(--success); border-color: var(--success-border); background: var(--success-bg); }
.tag-pending               { color: var(--warn);    border-color: var(--warn-border);    background: var(--warn-bg); }
.tag-closed, .tag-cancelled{ color: var(--text3);   border-color: var(--border);         background: var(--surface2); }
.tag-draft                 { color: var(--blue);    border-color: var(--blue-border);    background: var(--blue-bg); }
.tag-progress              { color: var(--accent);  border-color: var(--accent2);        background: var(--accent3); }
.tag-paused                { color: var(--warn);    border-color: var(--warn-border);    background: var(--warn-bg); }
.tag-high                  { color: var(--danger);  border-color: var(--danger-border);  background: var(--danger-bg); }
.tag-medium                { color: var(--warn);    border-color: var(--warn-border);    background: var(--warn-bg); }
.tag-low                   { color: var(--text3);   border-color: var(--border);         background: var(--surface2); }
.tag-admin                 { color: var(--accent);  border-color: var(--accent2);        background: var(--accent3); }
.tag-manager               { color: var(--blue);    border-color: var(--blue-border);    background: var(--blue-bg); }
.tag-viewer                { color: var(--text3);   border-color: var(--border);         background: var(--surface2); }
.tag-owner                 { color: #7c3aed;        border-color: #a78bfa;               background: #ede9fe; }
.tag-member                { color: var(--blue);    border-color: var(--blue-border);    background: var(--blue-bg); }
/* Requirement types */
.tag-feature               { color: var(--accent);  border-color: var(--accent2);        background: var(--accent3); }
.tag-bug                   { color: var(--danger);  border-color: var(--danger-border);  background: var(--danger-bg); }
.tag-improvement           { color: var(--blue);    border-color: var(--blue-border);    background: var(--blue-bg); }
.tag-task                  { color: var(--text2);   border-color: var(--border);         background: var(--surface2); }
/* Requirement status */
.tag-backlog               { color: var(--text3);   border-color: var(--border);         background: var(--surface2); }
.tag-todo                  { color: var(--blue);    border-color: var(--blue-border);    background: var(--blue-bg); }
.tag-review                { color: var(--warn);    border-color: var(--warn-border);    background: var(--warn-bg); }
/* Priority */
.tag-critical              { color: #fff;           border-color: var(--danger);         background: var(--danger); }
.tag-danger                { color: var(--danger);  border-color: var(--danger-border);  background: var(--danger-bg); }

/* ── CARDS / PANELS ─────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-card);
  border-radius: var(--radius-lg);
  padding: 20px;
}
.card-sm { padding: 14px 16px; }

.panel-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 16px;
}
.panel-title { font-size: 13px; font-weight: 600; color: var(--text2); display: flex; align-items: center; gap: 8px; }

/* ── KPI GRID ───────────────────────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 24px; }
.kpi {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px 20px;
  position: relative; overflow: hidden;
}
.kpi::after {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent2);
}
.kpi-val { font-family: var(--mono); font-size: 26px; font-weight: 600; color: var(--text); line-height: 1; margin-bottom: 6px; }
.kpi-val.accent  { color: var(--accent); }
.kpi-val.success { color: var(--success); }
.kpi-val.warn    { color: var(--warn); }
.kpi-val.danger  { color: var(--danger); }
.kpi-label { font-size: 11px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; }

/* ── CLIENT CARDS GRID ──────────────────────────────────────────────────── */
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.client-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 16px;
  cursor: pointer; transition: border-color 0.12s, transform 0.12s;
  position: relative; overflow: hidden;
  text-decoration: none; display: block; color: var(--text);
}
.client-card::before {
  content: ''; position: absolute;
  top: 0; left: 0; right: 0; height: 2px;
  background: var(--accent2); transition: background 0.12s;
}
.client-card:hover { border-color: var(--border2); transform: translateY(-1px); text-decoration: none; color: var(--text); }
.client-card:hover::before { background: var(--accent); }
.cc-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 10px; }
.cc-name { font-size: 14px; font-weight: 600; }
.cc-segment { font-size: 11px; color: var(--text2); margin-bottom: 10px; }
.cc-contact { font-size: 12px; color: var(--text2); margin-bottom: 12px; }
.cc-health { height: 3px; background: var(--border); border-radius: 2px; margin-bottom: 4px; }
.cc-health-fill { height: 100%; border-radius: 2px; background: var(--accent); }
.cc-health-label { font-family: var(--mono); font-size: 9px; color: var(--text3); margin-bottom: 12px; }
.cc-stats { display: flex; gap: 0; border-top: 1px solid var(--border); padding-top: 12px; }
.cc-stat { flex: 1; text-align: center; }
.cc-stat + .cc-stat { border-left: 1px solid var(--border); }
.cc-stat-val { font-family: var(--mono); font-size: 17px; font-weight: 600; }
.cc-stat-val.accent  { color: var(--accent); }
.cc-stat-val.warn    { color: var(--warn); }
.cc-stat-val.success { color: var(--success); font-size: 11px; }
.cc-stat-label { font-size: 9px; color: var(--text3); text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* ── SEARCH / FILTERS ───────────────────────────────────────────────────── */
.filter-bar {
  display: flex; gap: 10px; align-items: center;
  margin-bottom: 16px; flex-wrap: wrap;
}
.search-wrap { position: relative; flex: 1; min-width: 200px; max-width: 360px; }
.search-wrap .ico { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text3); font-size: 12px; }
.search-input {
  width: 100%; padding: 8px 10px 8px 32px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text); font-size: 13px;
  font-family: var(--sans); outline: none; transition: border-color 0.12s;
}
.search-input:focus { border-color: var(--accent2); }
.search-input::placeholder { color: var(--text3); }

.filter-select {
  padding: 8px 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text2);
  font-size: 12px; font-family: var(--sans); outline: none;
  cursor: pointer; transition: border-color 0.12s;
}
.filter-select:focus { border-color: var(--accent2); }
.filter-select option { background: var(--surface2); }

/* ── TABLE ──────────────────────────────────────────────────────────────── */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.table { width: 100%; border-collapse: collapse; }
.table th {
  background: var(--surface3);
  border-bottom: 1px solid var(--border2);
  padding: 9px 14px;
  font-family: var(--mono); font-size: 11px;
  color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px;
  text-align: left; font-weight: 600; white-space: nowrap;
}
.table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px; vertical-align: middle;
}
.table tr:last-child td { border-bottom: none; }
.table tbody tr { transition: background 0.1s; }
.table tbody tr:hover { background: var(--surface2); }
.table tbody tr.clickable { cursor: pointer; }
.td-primary { font-weight: 500; }
.td-sub { font-size: 11px; color: var(--text2); margin-top: 2px; }
.td-mono { font-family: var(--mono); font-size: 11px; color: var(--text2); }
.td-actions { display: flex; gap: 6px; align-items: center; }
.table-empty { padding: 48px; text-align: center; color: var(--text3); }
.table-empty-ico { font-size: 28px; margin-bottom: 10px; opacity: 0.4; }

/* ── PAGINATION ─────────────────────────────────────────────────────────── */
.pagination {
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 14px;
  background: var(--surface2);
  border-top: 1px solid var(--border);
  font-size: 12px; color: var(--text2);
}
.pag-info { font-family: var(--mono); font-size: 10px; }
.pag-links { display: flex; gap: 4px; }
.pag-link {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 28px; height: 28px; padding: 0 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 3px; font-size: 11px; color: var(--text2);
  text-decoration: none; transition: all 0.1s;
}
.pag-link:hover { border-color: var(--border2); color: var(--text); text-decoration: none; }
.pag-link.active { background: var(--accent3); border-color: var(--accent2); color: var(--accent); }
.pag-link.disabled { opacity: 0.3; pointer-events: none; }

/* ── FORMS ──────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 16px; }
.form-label {
  display: block; margin-bottom: 6px;
  font-family: var(--mono); font-size: 9.5px;
  color: var(--text2); text-transform: uppercase; letter-spacing: 0.5px;
}
.form-label .req { color: var(--danger); margin-left: 2px; }
.form-input, .form-select, .form-textarea {
  width: 100%; padding: 9px 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 13px; font-family: var(--sans);
  outline: none; transition: border-color 0.12s;
}
.form-input:focus, .form-select:focus, .form-textarea:focus { border-color: var(--accent2); }
.form-input::placeholder { color: var(--text3); }
.form-select option { background: var(--surface2); }
.form-textarea { resize: vertical; min-height: 80px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.form-hint { font-size: 11px; color: var(--text3); margin-top: 4px; }
.form-error { font-size: 11px; color: var(--danger); margin-top: 4px; }
.form-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 8px; }
.form-section-title {
  font-family: var(--mono); font-size: 9px; font-weight: 600;
  color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px;
  border-bottom: 1px solid var(--border); padding-bottom: 6px; margin-bottom: 16px;
}

/* ── MODAL ──────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.72);
  display: flex; align-items: center; justify-content: center;
  z-index: 200; backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none;
  transition: opacity 0.15s;
}
.modal-overlay.open { opacity: 1; pointer-events: all; }
.modal {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  width: 540px; max-width: 95vw;
  max-height: 88vh; overflow-y: auto;
  padding: 24px;
  transform: translateY(12px); transition: transform 0.15s;
  box-shadow: var(--shadow);
}
.modal-overlay.open .modal { transform: translateY(0); }
.modal-lg { width: 680px; }
.modal-title {
  font-size: 15px; font-weight: 600;
  margin-bottom: 20px; padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; gap: 8px;
}
.modal-actions {
  display: flex; gap: 8px; justify-content: flex-end;
  margin-top: 20px; padding-top: 16px;
  border-top: 1px solid var(--border);
}

/* ── TABS ───────────────────────────────────────────────────────────────── */
.tabs { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.tab-link {
  padding: 10px 18px;
  font-size: 12px; font-weight: 500; color: var(--text2);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; transition: all 0.12s; white-space: nowrap;
  text-decoration: none; display: inline-flex; align-items: center; gap: 6px;
}
.tab-link:hover { color: var(--text); text-decoration: none; }
.tab-link.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-count {
  font-family: var(--mono); font-size: 9px;
  background: var(--surface2); padding: 1px 5px; border-radius: 3px;
}
.tab-link.active .tab-count { background: var(--accent3); color: var(--accent); }

/* ── DETAIL HEADER ──────────────────────────────────────────────────────── */
.detail-header {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px; margin-bottom: 20px;
}
.dh-title { font-size: 20px; font-weight: 700; margin-bottom: 6px; }
.dh-meta { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--text2); }
.dh-meta-item { display: flex; align-items: center; gap: 5px; }

/* ── MEETING DETAIL ─────────────────────────────────────────────────────── */
.meeting-section { margin-bottom: 24px; }
.meeting-section-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px;
}
.meeting-section-title {
  font-family: var(--mono); font-size: 9px; font-weight: 700;
  color: var(--accent); text-transform: uppercase; letter-spacing: 1.5px;
}
.meeting-items { display: flex; flex-direction: column; gap: 6px; }
.meeting-item {
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
}
.meeting-item-bullet { color: var(--text3); font-size: 12px; margin-top: 1px; flex-shrink: 0; }
.meeting-item-text { font-size: 13px; flex: 1; }
.meeting-item-del { color: var(--text3); cursor: pointer; transition: color 0.1s; flex-shrink: 0; font-size: 13px; background: none; border: none; }
.meeting-item-del:hover { color: var(--danger); }
.meeting-add-form { display: flex; gap: 8px; margin-top: 8px; }
.meeting-add-input {
  flex: 1; padding: 8px 12px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); color: var(--text);
  font-size: 13px; font-family: var(--sans); outline: none;
  transition: border-color 0.12s;
}
.meeting-add-input:focus { border-color: var(--accent2); }
.meeting-add-input::placeholder { color: var(--text3); }

/* ── ATTACHMENT LIST ────────────────────────────────────────────────────── */
.attachment-list { display: flex; flex-direction: column; gap: 6px; }
.attachment-item {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 10px 12px;
}
.attachment-ico { font-size: 18px; flex-shrink: 0; }
.attachment-info { flex: 1; min-width: 0; }
.attachment-name { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.attachment-meta { font-family: var(--mono); font-size: 10px; color: var(--text3); margin-top: 2px; }
.attachment-actions { display: flex; gap: 6px; flex-shrink: 0; }

/* ── CONTRACT CARD ──────────────────────────────────────────────────────── */
.contract-value { font-family: var(--mono); font-size: 18px; font-weight: 600; color: var(--accent); }

/* ── PERMISSIONS GRID ───────────────────────────────────────────────────── */
.perms-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.perm-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 10px;
  background: var(--surface2); border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12px; color: var(--text2); cursor: pointer;
  transition: all 0.1s;
}
.perm-item:hover { border-color: var(--border2); color: var(--text); }
.perm-item input[type=checkbox] { accent-color: var(--accent); width: 14px; height: 14px; flex-shrink: 0; }
.perm-item.checked { background: var(--accent3); border-color: var(--accent2); color: var(--accent); }

/* ── UPLOAD ─────────────────────────────────────────────────────────────── */
.upload-zone {
  border: 2px dashed var(--border2);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  color: var(--text3);
  cursor: pointer;
  transition: all 0.15s;
}
.upload-zone:hover, .upload-zone.drag-over { border-color: var(--accent2); color: var(--accent); background: var(--accent3); }
.upload-zone input[type=file] { display: none; }

/* ── LOGIN ──────────────────────────────────────────────────────────────── */
.login-page {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  background-image: radial-gradient(ellipse at 20% 50%, rgba(14,116,144,0.07) 0%, transparent 60%),
                    radial-gradient(ellipse at 80% 20%, rgba(45,212,191,0.04) 0%, transparent 50%);
}
.login-box {
  width: 380px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 32px;
  box-shadow: var(--shadow);
}
.login-logo {
  text-align: center; margin-bottom: 28px;
  font-family: var(--mono); font-size: 13px;
  color: var(--accent); letter-spacing: 3px; text-transform: uppercase;
}
.login-logo small { display: block; color: var(--text3); font-size: 9px; margin-top: 4px; letter-spacing: 1px; }
.login-title { font-size: 16px; font-weight: 600; margin-bottom: 20px; text-align: center; }

/* ── EMPTY STATE ────────────────────────────────────────────────────────── */
.empty-state { padding: 48px 24px; text-align: center; color: var(--text3); }
.empty-state-ico { font-size: 36px; margin-bottom: 12px; opacity: 0.35; }
.empty-state-title { font-size: 14px; color: var(--text2); margin-bottom: 6px; }
.empty-state-sub { font-size: 12px; }

/* ── CONFIRM DIALOG ─────────────────────────────────────────────────────── */
.confirm-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.8);
  display: flex; align-items: center; justify-content: center;
  z-index: 300; backdrop-filter: blur(4px);
  opacity: 0; pointer-events: none; transition: opacity 0.15s;
}
.confirm-overlay.open { opacity: 1; pointer-events: all; }
.confirm-box {
  background: var(--surface);
  border: 1px solid var(--danger-border);
  border-radius: var(--radius-lg);
  padding: 24px; width: 360px;
  box-shadow: var(--shadow);
  transform: scale(0.96); transition: transform 0.15s;
}
.confirm-overlay.open .confirm-box { transform: scale(1); }
.confirm-title { font-size: 15px; font-weight: 600; margin-bottom: 8px; color: var(--danger); }
.confirm-body  { font-size: 13px; color: var(--text2); margin-bottom: 20px; }
.confirm-actions { display: flex; gap: 8px; justify-content: flex-end; }

/* ── MISC ───────────────────────────────────────────────────────────────── */
.sep-v { width: 1px; background: var(--border); align-self: stretch; }
.mono { font-family: var(--mono); }
.text-muted { color: var(--text2); }
.text-dim { color: var(--text3); }
.text-accent { color: var(--accent); }
.text-danger { color: var(--danger); }
.text-success { color: var(--success); }
.text-warn { color: var(--warn); }
.text-right { text-align: right; }
.mt-8  { margin-top: 8px; }
.mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.gap-8 { gap: 8px; }
.flex  { display: flex; }
.flex-1 { flex: 1; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.w-full { width: 100%; }
hr.divider { border: none; border-top: 1px solid var(--border); margin: 20px 0; }

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

/* ── NOTIFICATIONS ─────────────────────────────────────────────────────── */
.notif-wrapper {
  position: relative;
}
.notif-bell {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 6px 10px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all 0.12s;
}
.notif-bell:hover {
  background: var(--surface2);
  border-color: var(--border2);
}
.notif-icon {
  font-size: 14px;
}
.notif-badge {
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 8px;
  min-width: 16px;
  text-align: center;
}
.notif-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 360px;
  max-height: 480px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  display: none;
  flex-direction: column;
  z-index: 100;
  overflow: hidden;
}
.notif-dropdown.open {
  display: flex;
}
.notif-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
}
.notif-header-actions {
  display: flex;
  gap: 4px;
}
.notif-action-btn {
  background: var(--accent3);
  border: 1px solid var(--accent2);
  color: var(--accent);
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius);
  cursor: pointer;
  transition: all 0.12s;
}
.notif-action-btn:hover {
  background: var(--accent2);
}
.notif-delete-all {
  background: var(--danger-bg);
  border-color: var(--danger-bg);
  color: var(--danger);
}
.notif-delete-all:hover {
  background: var(--danger);
  color: #fff;
}
.notif-list {
  flex: 1;
  overflow-y: auto;
  max-height: 400px;
}
.notif-item {
  display: flex;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
  text-decoration: none;
  color: var(--text);
}
.notif-item:hover {
  background: var(--surface2);
  text-decoration: none;
}
.notif-item.unread {
  background: var(--accent3);
  border-left: 3px solid var(--accent);
}
.notif-item.unread:hover {
  background: #053d3b;
}
.notif-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  flex-shrink: 0;
}
.notif-content {
  flex: 1;
  min-width: 0;
}
.notif-title {
  font-size: 12px;
  font-weight: 500;
  margin-bottom: 2px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-msg {
  font-size: 11px;
  color: var(--text2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.notif-time {
  font-size: 9px;
  color: var(--text3);
  margin-top: 4px;
  font-family: var(--mono);
}
.notif-empty {
  padding: 32px;
  text-align: center;
  color: var(--text3);
  font-size: 12px;
}
.notif-item-del {
  background: none;
  border: none;
  color: var(--text3);
  cursor: pointer;
  font-size: 12px;
  padding: 4px;
  opacity: 0;
  transition: opacity 0.12s, color 0.12s;
}
.notif-item:hover .notif-item-del { opacity: 1; }
.notif-item-del:hover { color: var(--danger); }


/* ── TEMA OLIX: ajustes de componentes ─────────────────────────────────── */
body { font-size: 14px; letter-spacing: .01em; }
::-webkit-scrollbar-thumb { background: var(--border2); }
a:hover { text-decoration: none; opacity: .85; }

.sidebar { width: 260px; min-width: 260px; box-shadow: var(--shadow-card); border-right: none; z-index: 5; }
.sidebar-logo {
  font-family: var(--sans); font-size: 20px; font-weight: 700; letter-spacing: 0;
  text-transform: none; color: var(--text); padding: 22px 24px 18px; border-bottom: none;
}
.sidebar-logo span { color: var(--accent); opacity: 1 !important; }
.sidebar-logo small { font-size: 11px; font-weight: 400; letter-spacing: 0; color: var(--text3); margin-top: 2px; }
.sidebar-section { border-bottom: none; padding: 6px 14px; }
.sidebar-label { font-size: 12px; letter-spacing: 0; text-transform: none; font-weight: 600; color: var(--text3); padding: 10px 12px 6px; }
.sidebar-item { padding: 10px 12px; border-left: none; border-radius: 10px; font-size: 14px; font-weight: 500; gap: 12px; margin-bottom: 2px; }
.sidebar-item:hover { background: var(--surface2); color: var(--accent); }
.sidebar-item.active { background: var(--accent3); color: var(--accent); }
.sidebar-item .ico { font-size: 15px; width: 20px; }
.sidebar-item .badge { font-size: 11px; border-radius: 20px; padding: 1px 8px; background: var(--accent3); border-color: transparent; color: var(--accent); }
.sidebar-item.active .badge { background: var(--accent); color: #fff; }
.sidebar-footer { font-family: var(--sans); font-size: 13px; color: var(--text); border-top: 1px solid var(--border); padding: 16px 24px; }
.sidebar-footer a { font-size: 12px !important; }

.topbar { height: 64px; min-height: 64px; box-shadow: var(--shadow-card); border-bottom: none; padding: 0 28px; z-index: 4; }
.topbar-title { font-size: 18px; font-weight: 600; }
.topbar-sub { font-family: var(--sans); font-size: 12px; text-transform: none; }
.page-content { padding: 28px; }

.sidebar-toggle, .money-toggle, .notif-bell { background: var(--surface2); border-color: transparent; border-radius: 10px; }
.sidebar-toggle:hover, .money-toggle:hover, .notif-bell:hover { background: var(--accent3); border-color: transparent; color: var(--accent); }

.card, .kpi, .client-card, .table-wrap, .detail-header { border: none; box-shadow: var(--shadow-card); }
.card { padding: 24px; }
.kpi { padding: 20px 22px; }
.kpi::after { display: none; }
.kpi-val { font-size: 28px; font-weight: 600; }
.kpi-label, .cc-stat-label { font-size: 13px; text-transform: none; letter-spacing: 0; }
.client-card::before { height: 3px; background: var(--accent2); }
.client-card:hover { box-shadow: 0 8px 28px rgba(94, 96, 206, .14); }
.client-card:hover::before { background: var(--accent); }
.cc-health { background: var(--surface3); }

.panel-title { font-size: 15px; color: var(--text); font-weight: 600; }

.btn { padding: 9px 16px; font-size: 13px; font-weight: 500; border-radius: 8px; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn-primary:hover { background: #4d4fb8; border-color: #4d4fb8; }
.btn-ghost { background: var(--surface); border-color: var(--border2); }
.btn-ghost:hover { background: var(--accent3); border-color: var(--accent2); color: var(--accent); }
.btn-danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn-danger:hover { background: #c93a3f; }
.btn-warn { background: var(--warn-bg); }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn-xs { padding: 3px 9px; font-size: 11px; }

.tag { font-family: var(--sans); font-size: 11px; font-weight: 500; text-transform: capitalize; letter-spacing: 0; border-radius: 20px; padding: 3px 10px; border-color: transparent; }
.tag-owner { background: #ede9fe; border-color: transparent; }

.search-input, .filter-select, .form-input, .form-select, .form-textarea, .meeting-add-input {
  background: var(--surface); border-color: var(--border2); border-radius: 8px;
}
.search-input:focus, .filter-select:focus, .form-input:focus, .form-select:focus, .form-textarea:focus, .meeting-add-input:focus {
  border-color: var(--accent); box-shadow: 0 0 0 3px rgba(94, 96, 206, .15);
}
.form-label { font-family: var(--sans); font-size: 13px; font-weight: 500; text-transform: none; letter-spacing: 0; color: var(--text); }
.form-section-title, .meeting-section-title { font-family: var(--sans); font-size: 14px; letter-spacing: 0; text-transform: none; font-weight: 600; }

.table th { background: var(--surface2); font-family: var(--sans); font-size: 12px; font-weight: 600; text-transform: none; letter-spacing: 0; color: var(--text2); padding: 12px 16px; }
.table td { padding: 14px 16px; border-bottom-color: var(--border); }
.table tbody tr:hover { background: var(--surface2); }
.pagination { background: var(--surface); }
.pag-link { border-radius: 8px; }

.tabs { border-bottom-color: var(--border); }
.tab-link { font-size: 14px; padding: 12px 20px; }
.tab-count { border-radius: 20px; padding: 1px 8px; font-size: 11px; }

.modal-overlay, .confirm-overlay { background: rgba(31, 42, 68, .45); }
.modal { border: none; border-radius: 16px; }
.confirm-box { border: none; border-top: 4px solid var(--danger); }
.meeting-item, .attachment-item, .perm-item { background: var(--surface2); border-color: transparent; border-radius: 10px; }
.perm-item.checked { background: var(--accent3); border-color: var(--accent2); }

.flash { border-radius: 10px; box-shadow: var(--shadow); }

.login-page { background: linear-gradient(135deg, #dcdcf7 0%, #e6eaf3 55%, #dde9fd 100%); }
.login-box { border: none; border-radius: 16px; padding: 40px 36px; }
.login-logo { font-family: var(--sans); font-size: 24px; font-weight: 700; letter-spacing: 0; text-transform: none; }
.login-logo small { font-size: 12px; letter-spacing: 0; font-weight: 400; }

.notif-dropdown { border: none; border-radius: 14px; }
.notif-action-btn { background: var(--accent3); border-color: transparent; }
.notif-action-btn:hover { background: var(--accent); color: #fff; }
.notif-delete-all { background: var(--danger-bg); border-color: transparent; }
.notif-item.unread { background: var(--accent3); }
.notif-item.unread:hover { background: #e3e3fa; }
.notif-time { font-family: var(--sans); font-size: 11px; }

/* ── SIDEBAR ESCURA ────────────────────────────────────────────────────── */
.sidebar { background: #1b2236; box-shadow: none; }
.sidebar-logo { color: #fff; }
.sidebar-logo small, .sidebar-label { color: #8e99b8; }
.sidebar-logo span { color: #8f91f0; }
.sidebar-item { color: #b4bdd3; }
.sidebar-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.sidebar-item.active { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(94,96,206,.4); }
.sidebar-item .badge { background: rgba(255,255,255,.1); color: #d5dbee; }
.sidebar-item.active .badge { background: rgba(255,255,255,.25); color: #fff; }
.sidebar-footer { color: #e4e8f4; border-top-color: rgba(255,255,255,.08); }
.sidebar-footer a { color: #7d88a6 !important; }
.sidebar-footer a:hover { color: #fff !important; }
.sidebar-footer .tag { background: rgba(255,255,255,.1); color: #d5dbee; }

/* Seções "Espaço" (dropdown) e "Áreas" (botão +) */
.sidebar-select-wrap { padding: 0 12px 4px; }
.sidebar-select {
  width: 100%; padding: 9px 12px; border-radius: 10px;
  background: rgba(255,255,255,.06); color: #d5dbee;
  border: 1px solid rgba(255,255,255,.1);
  font-family: var(--sans); font-size: 13px; cursor: pointer;
}
.sidebar-select:disabled { cursor: not-allowed; opacity: .7; }
.sidebar-select option { color: #1b2236; }
.sidebar-label-row { display: flex; align-items: center; justify-content: space-between; }
.sidebar-add-btn {
  width: 24px; height: 24px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(255,255,255,.12); border-radius: 7px; background: rgba(255,255,255,.06);
  color: #b4bdd3; cursor: pointer;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.sidebar-add-btn:hover { background: var(--accent); border-color: var(--accent); color: #fff; transform: scale(1.06); }
.sidebar-add-btn:focus-visible { outline: 2px solid #8f91f0; outline-offset: 2px; }
.sidebar-add-btn svg { display: block; }
.sidebar-area { cursor: default; }
.sidebar-empty { padding: 6px 12px; font-size: 12px; color: #7d88a6; font-style: italic; }

/* ─── Portal do cliente: chamados ─── */
.portal-toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.portal-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.portal-page-title { font-size: 20px; font-weight: 700; color: var(--text); }
.portal-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; color: var(--text2); font-size: 13px; margin-top: 8px; }
.portal-msg { padding: 12px 0; border-bottom: 1px solid var(--border); }
.portal-msg:last-child { border-bottom: none; }
.portal-msg-head { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--text3); margin-bottom: 6px; }
.portal-msg-author { font-weight: 600; color: var(--text2); }
.portal-msg-body { overflow-wrap: anywhere; font-size: 14px; color: var(--text); }
/* mensagens de chamados com formatação básica */
.rt p { margin: 0 0 8px; } .rt p:last-child, .rt ul:last-child { margin-bottom: 0; }
.rt ul { margin: 0 0 8px; padding-left: 20px; }
.rt code { font-family: var(--mono, monospace); font-size: .92em; padding: 1px 5px; border-radius: 4px; background: var(--surface3); border: 1px solid var(--border); }
.rt a { color: var(--accent); text-decoration: underline; }
.fmt-bar { display: flex; gap: 4px; margin-bottom: 4px; align-items: center; flex-wrap: wrap; }
.fmt-bar .btn { min-width: 32px; }
.fmt-bar small { color: var(--text3); margin-left: 6px; }
.portal-msg-status { font-size: 13px; color: var(--text2); font-style: italic; }
.portal-files { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.portal-section { margin-top: 16px; }
@media (max-width: 700px) {
  .portal-header { padding: 0 12px !important; gap: 8px !important; }
  .portal-company { display: none; }
  .portal-main { padding: 16px 12px !important; }
  .portal-toolbar { flex-direction: column; align-items: stretch; }
  .portal-toolbar .btn { justify-content: center; }
  .portal-form .form-row { grid-template-columns: 1fr; }
  .portal-table thead { display: none; }
  .portal-table, .portal-table tbody, .portal-table tr, .portal-table td { display: block; width: 100%; }
  .portal-table tr { padding: 10px 0; border-bottom: 1px solid var(--border); }
  .portal-table td { border: none !important; padding: 2px 0 !important; }
}

/* ── Chamados (equipe) ── */
.tk-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(240px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .tk-layout { grid-template-columns: 1fr; } }
.tk-scroll { overflow-x: auto; }
.tk-msg { padding: 10px 12px; border: 1px solid var(--border); border-radius: 6px; margin-bottom: 10px; background: var(--surface); }
.tk-msg.tk-internal { background: var(--warn-bg); border-color: var(--warn-border); border-left: 4px solid var(--warn); }
.tk-msg-head { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 6px; }
.tk-time { color: var(--text3); font-size: 11px; margin-left: auto; }
.tk-event { font-size: 12px; color: var(--text2); padding: 4px 0 8px; display: flex; gap: 6px; flex-wrap: wrap; }
.tk-event-error { color: var(--danger); }
.tk-dl { display: grid; grid-template-columns: auto 1fr; gap: 6px 12px; margin: 0; }
.tk-dl dt { color: var(--text3); }
.tk-dl dd { margin: 0; }
.tk-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.tk-weekdays { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.tk-weekdays label { display: inline-flex; align-items: center; gap: 6px; }
.tk-minutes { width: 110px; }
.tk-inline { display: inline; margin: 0; }
/* painel de SLA */
.tk-section { margin-bottom: 16px; }
.tk-h { margin: 0 0 12px; }
.tk-note { margin: 0 0 12px; font-size: 12px; color: var(--text3); }
.tk-muted { color: var(--text3); }
.tk-bad { color: var(--danger); font-weight: 600; }
.tk-nowrap { white-space: nowrap; }
.tk-pct { display: flex; align-items: center; gap: 8px; min-width: 120px; }
.tk-pct > span { min-width: 38px; font-family: var(--mono); }
.tk-pct-bar { flex: 1; min-width: 60px; }
.tk-fill-ok { background: var(--success); }
.tk-fill-warn { background: var(--warn); }
.tk-fill-bad { background: var(--danger); }

/* ── Grids utilitários (substituem grids inline) ── */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }

/* Backdrop do menu lateral (só aparece no mobile) */
.sidebar-backdrop { display: none; }

/* ── Dispositivos de toque: ações reveladas por hover ficam visíveis ── */
@media (hover: none) {
  .task-actions, .notif-item-del { opacity: 1 !important; }
  .client-card:hover { transform: none; }
}

/* ── Tablet ── */
@media (max-width: 1024px) {
  .grid-5 { grid-template-columns: repeat(3, 1fr); }
  .topbar { padding: 0 18px; }
  .page-content { padding: 20px; }
}

/* ── Mobile ── */
@media (max-width: 768px) {
  html, body { height: auto; min-height: 100%; overflow-x: hidden; }
  body { font-size: 15px; }

  /* Menu lateral vira gaveta off-canvas */
  .app-shell { height: 100vh; height: 100dvh; }
  .sidebar {
    position: fixed; top: 0; bottom: 0; left: 0;
    width: 280px; max-width: 85vw; min-width: 0;
    transform: translateX(-100%);
    z-index: 250;
    transition: transform .22s ease;
    padding-bottom: env(safe-area-inset-bottom);
  }
  /* no mobile "sidebar-collapsed" = fechado; "sidebar-open" = aberto */
  .app-shell.sidebar-collapsed .sidebar { width: 280px; min-width: 0; transform: translateX(-100%); border-right: none; overflow-y: auto; }
  .app-shell.sidebar-open .sidebar,
  .app-shell.sidebar-open.sidebar-collapsed .sidebar { transform: translateX(0); box-shadow: var(--shadow); }
  .sidebar-backdrop {
    display: block; position: fixed; inset: 0; z-index: 240;
    background: rgba(31, 42, 68, .5);
    opacity: 0; pointer-events: none; transition: opacity .2s;
  }
  .app-shell.sidebar-open .sidebar-backdrop { opacity: 1; pointer-events: all; }
  .sidebar-item { padding: 13px 12px; }
  .main-area { width: 100%; min-width: 0; }

  /* Topbar compacta */
  .topbar { height: 56px; min-height: 56px; padding: 0 12px; gap: 8px; }
  .sidebar-toggle { margin-right: 4px; padding: 8px 12px; }
  .topbar-info { min-width: 0; }
  .topbar-title { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .topbar-sub { display: none; }
  .topbar-actions { gap: 6px; flex-shrink: 0; }
  .topbar-actions .btn { padding: 8px 10px; }
  .page-content { padding: 14px 12px calc(20px + env(safe-area-inset-bottom)); -webkit-overflow-scrolling: touch; }

  /* Notificações ocupam a largura da tela */
  .notif-wrapper { position: static; }
  .notif-dropdown { position: fixed; top: 60px; left: 8px; right: 8px; width: auto; max-height: calc(100dvh - 76px); }
  .notif-list { max-height: calc(100dvh - 140px); }

  /* Flash */
  .flash-stack { left: 8px; right: 8px; top: 8px; }
  .flash { min-width: 0; max-width: none; }

  /* Alvos de toque e inputs (16px evita zoom automático no iOS) */
  .btn { padding: 10px 14px; min-height: 40px; }
  .btn-sm { min-height: 36px; }
  .btn-xs { min-height: 32px; padding: 5px 10px; }
  .form-input, .form-select, .form-textarea, .search-input, .filter-select, .meeting-add-input { font-size: 16px; padding-top: 10px; padding-bottom: 10px; }
  .search-input { padding-left: 32px; }

  /* Grids e formulários */
  .form-row, .form-row-3, .perms-grid, .grid-3 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  .kpi-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 16px; }
  .kpi { padding: 14px; }
  .kpi-val { font-size: 22px; }
  .client-grid { grid-template-columns: 1fr; }
  .card { padding: 16px; }
  .card-sm { padding: 12px; }
  .form-actions { flex-wrap: wrap; }
  .tk-minutes { width: 100%; }

  /* Filtros empilham */
  .filter-bar { align-items: stretch; }
  .filter-bar > *, .filter-bar .form-group { flex: 1 1 100%; min-width: 0 !important; max-width: none; width: 100% !important; }
  .search-wrap { max-width: none; min-width: 0; }

  /* Cabeçalhos de detalhe / painéis */
  .detail-header { padding: 14px; }
  .dh-title { font-size: 17px; }
  .dh-meta { gap: 8px 12px; }
  .panel-header { flex-wrap: wrap; gap: 8px; }

  /* Tabelas: rolagem horizontal dentro do cartão */
  .table-wrap, .tk-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table { min-width: 560px; }
  .table th, .table td { padding: 10px 12px; }
  .td-actions { flex-wrap: wrap; }

  /* Paginação */
  .pagination { flex-direction: column; gap: 8px; align-items: stretch; text-align: center; }
  .pag-links { flex-wrap: wrap; justify-content: center; }

  /* Abas rolam na horizontal */
  .tabs { overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tab-link { padding: 12px 14px; flex-shrink: 0; }

  /* Modais viram folha inferior */
  .modal-overlay { align-items: flex-end; }
  .modal, .modal-lg {
    width: 100%; max-width: 100%; max-height: 92dvh;
    padding: 18px 16px calc(18px + env(safe-area-inset-bottom));
    border-radius: 16px 16px 0 0;
  }
  .modal-actions { flex-wrap: wrap; }
  .modal-actions .btn { flex: 1; justify-content: center; }
  .confirm-box { width: calc(100% - 32px); max-width: 360px; }

  /* Itens de reunião / anexos */
  .meeting-item-header { flex-wrap: wrap; }
  .meeting-item-right { flex-wrap: wrap; }
  .meeting-add-form, .meeting-add-next-step { flex-wrap: wrap; }
  .attachment-item { flex-wrap: wrap; }
  .attachment-actions { width: 100%; }

  /* Chamados (equipe) */
  .tk-dl { grid-template-columns: 1fr; gap: 2px; }
  .tk-dl dd { margin-bottom: 8px; }
  .tk-time { margin-left: 0; }

  /* Login */
  .login-box { width: calc(100% - 24px); max-width: 380px; padding: 28px 20px; }
}

@media (max-width: 480px) {
  .grid-5 { grid-template-columns: 1fr 1fr; }
  .kpi-val { font-size: 20px; }
  .btn { white-space: normal; }
}

/* ── Modal "Nova área": visualização e prévia de colunas ─────────────────── */
.area-views { display: flex; flex-wrap: wrap; gap: 6px; }
.area-view-opt { position: relative; cursor: pointer; }
.area-view-opt input { position: absolute; opacity: 0; pointer-events: none; }
.area-view-opt span {
  display: inline-block; padding: 7px 14px; border-radius: 8px;
  border: 1px solid var(--border2); background: var(--surface);
  font-size: 13px; color: var(--text2); transition: all .12s;
}
.area-view-opt:hover span { border-color: var(--accent); color: var(--accent); }
.area-view-opt input:checked + span { background: var(--accent); border-color: var(--accent); color: #fff; }
.area-view-opt input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }

.area-preview {
  display: flex; gap: 8px; overflow-x: auto; padding: 10px;
  background: var(--surface2); border-radius: 10px;
}
.area-preview-col {
  flex: 0 0 auto; min-width: 104px; min-height: 64px; padding: 8px 10px;
  background: var(--surface); border-radius: 8px; border-top: 3px solid var(--accent);
  font-size: 12px; font-weight: 600; color: var(--text); cursor: default;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.area-preview-col[data-kind="entrada"]   { border-top-color: #8e99b8; }
.area-preview-col[data-kind="andamento"] { border-top-color: var(--accent); }
.area-preview-col[data-kind="bloqueado"] { border-top-color: #e0a030; }
.area-preview-col[data-kind="concluido"] { border-top-color: #2fa36b; }
.area-preview-summary { margin: 8px 0 0; font-size: 12px; color: var(--text3); }

/* ── Área: cabeçalho, menu ⋯ e abas ──────────────────────────────────────── */
.area-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 16px; }
.area-head-title { display: flex; align-items: center; gap: 6px; min-width: 0; }
.area-head-title h1 { font-size: 22px; font-weight: 700; color: var(--text); margin: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.area-menu { position: relative; }
.area-menu-btn {
  width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 8px; background: transparent; color: var(--text3); cursor: pointer; transition: all .12s;
}
.area-menu-btn:hover, .area-menu.open .area-menu-btn { background: var(--surface2); color: var(--text); }
.area-menu-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.area-menu-list {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 50; min-width: 190px; padding: 6px;
  background: var(--surface); border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.18), 0 0 0 1px rgba(15,23,42,.06);
}
.area-menu.open .area-menu-list { display: block; }
.area-menu-list form { margin: 0; }
.area-menu-list a, .area-menu-list button {
  display: block; width: 100%; text-align: left; padding: 8px 10px; border: none; border-radius: 6px; background: none;
  font: 500 13px var(--sans); color: var(--text); cursor: pointer; text-decoration: none;
}
.area-menu-list a:hover, .area-menu-list button:hover { background: var(--surface2); text-decoration: none; }
.area-menu-list .danger { color: var(--danger); }
.area-menu-list .danger:hover { background: var(--danger-bg); }

.view-tabs { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface2); border-radius: 10px; }
.view-tab { padding: 6px 14px; border-radius: 8px; font-size: 13px; font-weight: 500; color: var(--text2); text-decoration: none; white-space: nowrap; }
.view-tab:hover { color: var(--text); text-decoration: none; }
.view-tab.active { background: var(--surface); color: var(--accent); box-shadow: 0 1px 3px rgba(15,23,42,.12); }
.view-tab small { font-size: 10px; color: var(--text3); }

/* barra lateral: ⋯ aparece ao passar o mouse */
.sidebar-area-row { position: relative; display: flex; align-items: center; }
.sidebar-area-row .sidebar-item { flex: 1; min-width: 0; padding-right: 36px; }
.sidebar-area-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-area-menu { position: absolute; right: 4px; top: 0; bottom: 0; display: flex; align-items: center; }   /* sem transform: ele isolava o menu e as linhas de baixo ficavam por cima */
.sidebar-area-menu .area-menu-btn { width: 26px; height: 26px; color: #8e99b8; opacity: 0; }
.sidebar-area-row:hover .area-menu-btn, .sidebar-area-menu.open .area-menu-btn, .sidebar-area-menu .area-menu-btn:focus-visible { opacity: 1; }
.sidebar-area-menu .area-menu-btn:hover, .sidebar-area-menu.open .area-menu-btn { background: rgba(255,255,255,.1); color: #fff; }
.sidebar-area-menu .area-menu-list { left: auto; right: 0; }
.sidebar-inactive-link {
  display: block; width: 100%; margin-top: 4px; padding: 6px 12px; border: none; background: none; text-align: left;
  font: 12px var(--sans); color: #7d88a6; cursor: pointer; border-radius: 8px;
}
.sidebar-inactive-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.inactive-list { list-style: none; margin: 0; padding: 0; }
.inactive-list li { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.inactive-list form { margin: 0; }
.form-hint { font-size: 12px; color: var(--text3); margin: 4px 0 0; }

/* cores por tipo de coluna */
[data-kind="entrada"]   { --kind: #8590a2; }
[data-kind="andamento"] { --kind: #5e60ce; }
[data-kind="bloqueado"] { --kind: #e2a03f; }
[data-kind="concluido"] { --kind: #22a06b; }
.kb-col-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--kind, var(--accent)); flex: 0 0 auto; }

/* ── Área: Kanban (estilo quadro de listas) ──────────────────────────────── */
.kb-board {
  display: flex; gap: 12px; align-items: flex-start; overflow-x: auto;
  padding: 16px; border-radius: 14px; min-height: calc(100vh - 220px);
  background: linear-gradient(135deg, #5e60ce 0%, #4f7cdb 55%, #3fa1d8 100%);
}
.kb-col {
  flex: 0 0 272px; display: flex; flex-direction: column; max-height: calc(100vh - 250px);
  background: #f1f2f4; border-radius: 12px; box-shadow: 0 1px 1px rgba(9,30,66,.25);
  transition: background .12s, box-shadow .12s;
}
.kb-col.drop-target { background: #e4e6ea; box-shadow: 0 0 0 2px #fff, 0 1px 1px rgba(9,30,66,.25); }
.kb-col-header { display: flex; align-items: center; gap: 8px; padding: 12px 10px 8px 14px; }
.kb-col-name { font-size: 14px; font-weight: 600; color: #172b4d; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kb-count { font-size: 12px; font-weight: 600; color: #44546f; background: rgba(9,30,66,.08); border-radius: 20px; padding: 0 8px; line-height: 20px; }
.kb-add {
  margin-left: auto; width: 28px; height: 28px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 8px; background: transparent; color: #44546f; cursor: pointer; transition: background .12s;
}
.kb-add:hover { background: rgba(9,30,66,.1); color: #172b4d; }
.kb-add:focus-visible, .kb-add-footer:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.kb-cards { display: flex; flex-direction: column; gap: 8px; padding: 2px 8px 4px; overflow-y: auto; min-height: 8px; }
.kb-card {
  background: #fff; border-radius: 8px; padding: 8px 12px 10px; cursor: pointer;
  box-shadow: 0 1px 1px rgba(9,30,66,.25), 0 0 1px rgba(9,30,66,.31);
  transition: box-shadow .12s, transform .12s;
}
.kb-card:hover { box-shadow: 0 0 0 2px #388bff, 0 1px 1px rgba(9,30,66,.25); }
.kb-card:focus-visible { outline: none; box-shadow: 0 0 0 2px #388bff; }
.kb-card.dragging { opacity: .6; transform: rotate(3deg); box-shadow: 0 8px 16px rgba(9,30,66,.3); }
.kb-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.kb-label { display: inline-block; font-size: 11px; font-weight: 600; line-height: 16px; padding: 0 8px; border-radius: 4px; background: #dcdfe4; color: #44546f; }
.kb-label.prio-critical { background: #c9372c; color: #fff; }
.kb-label.prio-high     { background: #fedec8; color: #a54800; }
.kb-label.prio-medium   { background: #f8e6a0; color: #7f5f01; }
.kb-label.prio-low      { background: #baf3db; color: #216e4e; }
.kb-label.type-bug         { background: #ffd5d2; color: #ae2e24; }
.kb-label.type-feature     { background: #dfd8fd; color: #5e4db2; }
.kb-label.type-improvement { background: #cce0ff; color: #0055cc; }
.kb-label.type-task        { background: #dcdfe4; color: #44546f; }
.kb-card-title { font-size: 14px; color: #172b4d; line-height: 20px; word-break: break-word; }
.kb-badges { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; margin-top: 6px; }
.badge-plain, .badge-due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #626f86; line-height: 20px; }
.badge-due { padding: 0 6px; border-radius: 4px; }
.badge-due.late { background: #c9372c; color: #fff; }
.badge-due.soon { background: #f5cd47; color: #533f04; }
.badge-due.done { background: #1f845a; color: #fff; }
.kb-add-footer {
  display: flex; align-items: center; gap: 6px; margin: 4px 8px 8px; padding: 8px 8px; border: none; border-radius: 8px;
  background: transparent; font: 500 14px var(--sans); color: #44546f; cursor: pointer; text-align: left;
}
.kb-add-footer:hover { background: rgba(9,30,66,.1); color: #172b4d; }
.area-soon { max-width: 560px; }
.area-soon-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
.area-soon p { color: var(--text2); margin-bottom: 16px; }
.task-delete-btn { margin-right: auto; }
.task-delete-btn[hidden] { display: none; }
@media (max-width: 768px) {
  .kb-col { flex-basis: 85vw; }
  .kb-board { padding: 10px; border-radius: 10px; }
}

/* ── Área: Tabela ────────────────────────────────────────────────────────── */
.area-table-wrap { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-card); overflow-x: auto; }
.area-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.area-table th { text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 600; color: var(--text3); border-bottom: 1px solid var(--border); white-space: nowrap; }
.area-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text); vertical-align: middle; }
.at-group td { background: var(--surface2); font-weight: 700; box-shadow: inset 4px 0 0 var(--kind); }
.at-group .kb-count { margin-left: 4px; }
.at-add { float: right; border: none; background: none; font: 500 12px var(--sans); color: var(--accent); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.at-add:hover { background: var(--accent3); }
.area-table tr.at-row.kb-card { box-shadow: none; border-radius: 0; background: transparent; display: table-row; padding: 0; }
.area-table tr.at-row:hover td { background: #f6f7fb; }
.area-table tr.at-row:focus-visible td { background: var(--accent3); }
.at-title { font-weight: 500; }
.at-empty td { color: var(--text3); font-style: italic; }

/* ── Área: Gantt ─────────────────────────────────────────────────────────── */
.gantt { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-card); overflow-x: auto; padding-bottom: 8px; }
.gantt-head, .gantt-row { display: grid; grid-template-columns: 240px minmax(560px, 1fr); }
.gantt-head { border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--surface); z-index: 2; }
.gantt-label-col { padding: 8px 14px; font-size: 13px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; border-right: 1px solid var(--border); }
.gantt-head .gantt-label-col { font-size: 12px; font-weight: 600; color: var(--text3); }
.gantt-timeline { position: relative; min-height: 34px; }
.gantt-tick { position: absolute; top: 9px; font-size: 11px; color: var(--text3); padding-left: 4px; white-space: nowrap; }
.gantt-grid { position: absolute; top: 0; bottom: 0; border-left: 1px dashed var(--border); }
.gantt-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid #c9372c; z-index: 1; }
.gantt-group { padding: 8px 14px; font-size: 12px; font-weight: 700; color: var(--text); background: var(--surface2); display: flex; align-items: center; gap: 8px; box-shadow: inset 4px 0 0 var(--kind); }
.gantt-row { border-bottom: 1px solid var(--border); }
.gantt-bar.kb-card {
  position: absolute; top: 6px; height: 22px; min-width: 10px; padding: 0 8px; border: none; border-radius: 6px;
  background: var(--kind, var(--accent)); color: #fff; font: 600 12px var(--sans); text-align: left;
  overflow: hidden; white-space: nowrap; text-overflow: ellipsis; z-index: 2; box-shadow: 0 1px 2px rgba(9,30,66,.3);
}
.gantt-bar.kb-card:hover { box-shadow: 0 0 0 2px #388bff; }
.gantt-bar span { pointer-events: none; }
.gantt-undated { margin-top: 16px; background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-card); padding: 12px 14px; }
.gantt-undated-title { font-size: 12px; font-weight: 700; color: var(--text3); margin-bottom: 8px; }
.gantt-undated-item.kb-card { display: flex; align-items: center; gap: 8px; width: 100%; margin-bottom: 6px; border: none; font: 14px var(--sans); text-align: left; }
.gantt-undated-item small { color: var(--text3); }

/* ── Modal "Nova área": maior + prévias por visualização ─────────────────── */
.modal-xl { width: 860px; }
.area-preview { min-height: 190px; align-items: flex-start; }
.area-preview--kanban .area-preview-col { min-width: 120px; display: flex; flex-direction: column; gap: 6px; }
.pv-col-name { margin-bottom: 2px; }
.pv-card { height: 18px; border-radius: 5px; background: var(--surface2); }
.area-preview--tabela, .area-preview--gantt, .area-preview--calendario { display: block; }
.area-preview [data-kind="entrada"]   { --kind: #8e99b8; }
.area-preview [data-kind="andamento"] { --kind: var(--accent); }
.area-preview [data-kind="bloqueado"] { --kind: #e0a030; }
.area-preview [data-kind="concluido"] { --kind: #2fa36b; }
.pv-table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: 8px; overflow: hidden; font-size: 12px; }
.pv-table th { text-align: left; padding: 6px 10px; color: var(--text3); font-weight: 600; border-bottom: 1px solid var(--border); }
.pv-table td { padding: 6px 10px; border-bottom: 1px solid var(--border); }
.pv-group td { font-weight: 700; color: var(--text); background: var(--surface2); box-shadow: inset 3px 0 0 var(--kind); }
.pv-bar-ph { display: block; height: 8px; width: 70%; border-radius: 4px; background: var(--surface2); }
.pv-gantt { display: flex; flex-direction: column; gap: 6px; background: var(--surface); border-radius: 8px; padding: 10px; }
.pv-gantt-row { display: grid; grid-template-columns: 150px 1fr; align-items: center; gap: 10px; font-size: 12px; }
.pv-gantt-label { color: var(--text); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pv-gantt-track { position: relative; height: 16px; border-radius: 4px;
  background: repeating-linear-gradient(90deg, var(--surface2) 0 1px, transparent 1px 10%); }
.pv-gantt-bar { position: absolute; top: 2px; height: 12px; border-radius: 4px; background: var(--kind); }
.pv-cal { background: var(--surface); border-radius: 8px; padding: 10px; }
.pv-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.pv-cal-dow { font-size: 11px; font-weight: 600; color: var(--text3); text-align: center; }
.pv-cal-day { height: 28px; border-radius: 4px; background: var(--surface2); position: relative; }
.pv-cal-num { position: absolute; top: 2px; left: 4px; font-size: 10px; color: var(--text3); }
.pv-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--kind); }
.pv-cal-day .pv-dot { position: absolute; bottom: 4px; right: 4px; }
.pv-legend { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--text2); }
.pv-legend-item { display: inline-flex; align-items: center; gap: 5px; }
.area-view-note { margin: 6px 0 0; font-size: 12px; color: var(--warn); }

/* seta antes do nome da área na barra lateral */
.sidebar-area-ico {
  display: inline-flex; align-items: center; justify-content: center;
  width: 22px; height: 22px; border-radius: 6px;
  background: rgba(143,145,240,.16); color: #8f91f0;
  transition: transform .18s ease, background .18s ease, color .18s ease;
}
.sidebar-area-ico svg { display: block; }
.sidebar-area:hover .sidebar-area-ico { transform: translateX(2px); background: rgba(143,145,240,.28); color: #fff; }
.sidebar-area.active .sidebar-area-ico { background: rgba(255,255,255,.22); color: #fff; }

/* ── Modal "Nova área" em duas colunas (fluxo | visualização) ────────────── */
#modal-new-area .modal-xl { width: 1040px; max-width: 95vw; padding: 0; overflow: hidden; max-height: 90vh; }
.na-form { position: relative; display: flex; flex-direction: column; max-height: 90vh; }
.na-close {
  position: absolute; top: 14px; right: 14px; z-index: 2; width: 32px; height: 32px; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 8px;
  background: transparent; color: var(--text3); cursor: pointer;
}
.na-close:hover { background: var(--surface2); color: var(--text); }
.na-body { display: grid; grid-template-columns: 330px 1fr; flex: 1; min-height: 0; overflow-y: auto; }
.na-left { padding: 28px 24px; background: var(--surface2); border-right: 1px solid var(--border); }
.na-right { padding: 28px 28px 20px; min-width: 0; }
.na-title { font-size: 20px; font-weight: 700; color: var(--text); margin: 0 0 14px; }
.na-name { font-size: 15px; padding: 11px 14px; border-radius: 10px; border: 2px solid var(--border2); background: var(--surface); }
.na-name:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent3); outline: none; }
.na-section-label { margin: 24px 0 10px; font-size: 13px; font-weight: 600; color: var(--text2); }
.na-flows { display: flex; flex-direction: column; gap: 8px; }
.na-flow {
  position: relative; display: flex; gap: 12px; padding: 12px 14px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; transition: border-color .12s, box-shadow .12s;
}
.na-flow:hover { border-color: var(--accent2); }
.na-flow input, .na-view input { position: absolute; opacity: 0; pointer-events: none; }
.na-radio {
  flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; border-radius: 50%;
  border: 2px solid var(--border2); background: var(--surface); transition: all .12s;
}
.na-flow input:checked ~ .na-radio { border-color: var(--accent); box-shadow: inset 0 0 0 4px var(--surface); background: var(--accent); }
.na-flow:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent3); }
.na-flow input:focus-visible ~ .na-radio { outline: 2px solid var(--accent); outline-offset: 2px; }
.na-flow-text { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.na-flow-name { font-size: 14px; font-weight: 600; color: var(--text); }
.na-flow-name small { font-size: 11px; font-weight: 500; color: var(--text3); margin-left: 4px; }
.na-flow-desc { font-size: 12px; line-height: 1.45; color: var(--text2); }

.na-h3 { font-size: 15px; font-weight: 700; color: var(--text); margin: 0 0 12px; padding-right: 36px; }
.na-h3 + .area-preview { margin-top: 0; }
.na-views { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 24px; }
.na-view {
  position: relative; display: flex; min-height: 92px; cursor: pointer; overflow: hidden;
  background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; transition: border-color .12s, box-shadow .12s;
}
.na-view:hover { border-color: var(--accent2); }
.na-view:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent3); }
.na-view:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.na-view-art { flex: 0 0 124px; display: flex; align-items: center; justify-content: center; background: var(--accent3); }
.na-view-art svg { width: 108px; height: 72px; }
.na-art-tabela     { background: #e3f5ec; }
.na-art-gantt      { background: #e6f0ff; }
.na-art-calendario { background: #f3ecff; }
.na-view-art .a1 { fill: #fff; }
.na-view-art .a2 { fill: var(--accent); }
.na-view-art .a3 { fill: #22a06b; }
.na-view-art .a4 { fill: #e2a03f; }
.na-view-art .a5 { fill: #c9cfdb; }
.na-art-gantt .a3 { fill: #388bff; }
.na-art-calendario .a3 { fill: #8b5cf6; }
.na-view-art .grid { stroke: #c9cfdb; stroke-width: 1.5; stroke-dasharray: 3 3; fill: none; }
.na-view-art .link { stroke: #388bff; stroke-width: 1.5; fill: none; }
.na-view-text { display: flex; flex-direction: column; justify-content: center; gap: 4px; padding: 12px 14px; min-width: 0; }
.na-view-name { font-size: 14px; font-weight: 600; color: var(--text); }
.na-view-desc { font-size: 12px; line-height: 1.45; color: var(--text2); }
.na-soon { font-size: 10px; font-weight: 600; color: var(--warn); background: var(--warn-bg); border-radius: 10px; padding: 1px 6px; margin-left: 4px; }

.na-footer { display: flex; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface); }
@media (max-width: 860px) {
  .na-body { grid-template-columns: 1fr; }
  .na-left { border-right: none; border-bottom: 1px solid var(--border); }
  .na-views { grid-template-columns: 1fr; }
}

/* ── Barras de rolagem maiores ───────────────────────────────────────────── */
::-webkit-scrollbar { width: 12px; height: 12px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: #c3c9d6; border-radius: 10px;
  border: 3px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: #9aa3b5; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-corner { background: transparent; }
html { scrollbar-width: auto; scrollbar-color: #c3c9d6 transparent; }

/* quadro Kanban: barra horizontal grande e clara sobre o degradê */
.kb-board { scrollbar-color: rgba(255,255,255,.7) rgba(255,255,255,.18); }
.kb-board::-webkit-scrollbar { height: 16px; }
.kb-board::-webkit-scrollbar-track { background: rgba(255,255,255,.18); border-radius: 10px; margin: 0 16px; }
.kb-board::-webkit-scrollbar-thumb { background: rgba(255,255,255,.7); border: 4px solid transparent; background-clip: padding-box; }
.kb-board::-webkit-scrollbar-thumb:hover { background: #fff; border: 4px solid transparent; background-clip: padding-box; }

/* barra lateral escura */
.sidebar { scrollbar-color: rgba(255,255,255,.25) transparent; }
.sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.22); border: 3px solid transparent; background-clip: padding-box; }
.sidebar::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,.4); border: 3px solid transparent; background-clip: padding-box; }

/* coluna "Cancelado" */
[data-kind="cancelado"] { --kind: #c9372c; }
.area-preview [data-kind="cancelado"] { --kind: #c9372c; }
.area-preview-col[data-kind="cancelado"] { border-top-color: #c9372c; }
.kb-col[data-kind="cancelado"] { background: #ebecf0; }
.kb-col[data-kind="cancelado"] .kb-card { opacity: .75; }
.kb-col[data-kind="cancelado"] .kb-card-title { text-decoration: line-through; color: #626f86; }
.badge-due.cancelled { background: #dcdfe4; color: #626f86; text-decoration: line-through; }

/* ── Modal de tarefa (estilo Planner, em seções) ─────────────────────────── */
.modal.tm { width: 780px; max-width: 95vw; padding: 0; overflow: hidden; max-height: 92vh; }
.tm-form { display: flex; flex-direction: column; max-height: 92vh; }
.tm-header { padding: 16px 24px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
.tm-header-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.tm-crumb { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; color: var(--text3); }
.tm-close {
  width: 32px; height: 32px; padding: 0; display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 8px; background: transparent; color: var(--text3); cursor: pointer;
}
.tm-close:hover { background: var(--surface2); color: var(--text); }
.tm-title {
  width: 100%; border: 2px solid transparent; border-radius: 8px; padding: 6px 8px; margin-left: -8px;
  font: 600 20px var(--sans); color: var(--text); background: transparent;
}
.tm-title:hover { background: var(--surface2); }
.tm-title:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 4px var(--accent3); }
.tm-title::placeholder { color: var(--text3); font-weight: 500; }
.tm-body { flex: 1; min-height: 0; overflow-y: auto; padding: 4px 24px 8px; background: var(--surface); }
.tm-section { padding: 18px 0; border-bottom: 1px solid var(--border); }
.tm-section:last-child { border-bottom: none; }
.tm-section-title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 12px;
  font-size: 13px; font-weight: 700; color: var(--text);
}
.tm-section-title::before { content: ""; width: 4px; height: 14px; border-radius: 2px; background: var(--accent); }
.tm-grid { display: grid; gap: 12px; }
.tm-grid-3 { grid-template-columns: repeat(3, 1fr); }
.tm-grid-4 { grid-template-columns: repeat(4, 1fr); }
.tm-field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.tm-section > .tm-field + .tm-field { margin-top: 12px; }
.tm-label { font-size: 12px; font-weight: 600; color: var(--text2); }
.tm-field .form-input, .tm-field .form-select, .tm-field .form-textarea { width: 100%; }
.tm-links { display: flex; flex-direction: column; gap: 8px; }
.tm-links:empty { display: none; }
.tm-link-row { display: grid; grid-template-columns: 20px 1fr 1.4fr 30px 30px; align-items: center; gap: 8px; }
.tm-link-ico { color: var(--text3); }
.tm-link-open, .tm-link-remove {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center; padding: 0;
  border: none; border-radius: 8px; background: transparent; color: var(--text3); cursor: pointer;
}
.tm-link-open[hidden] { display: inline-flex; visibility: hidden; }
.tm-link-open:hover { background: var(--accent3); color: var(--accent); }
.tm-link-remove:hover { background: var(--danger-bg); color: var(--danger); }
.tm-add-link {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px; padding: 7px 12px;
  border: 1px dashed var(--border2); border-radius: 8px; background: transparent;
  font: 500 13px var(--sans); color: var(--accent); cursor: pointer;
}
.tm-add-link:hover { border-color: var(--accent); background: var(--accent3); }
.tm-footer { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 24px; border-top: 1px solid var(--border); background: var(--surface2); }
.at-links { max-width: 220px; }
.at-links a { display: inline-block; max-width: 100%; margin-right: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
@media (max-width: 720px) {
  .tm-grid-3, .tm-grid-4 { grid-template-columns: 1fr 1fr; }
  .tm-link-row { grid-template-columns: 1fr 30px 30px; }
  .tm-link-row .tm-link-ico { display: none; }
  .tm-link-row input[name="link_label"] { grid-column: 1 / -1; }
}

/* histórico da tarefa */
.tm-events { list-style: none; margin: 0; padding: 0 0 0 14px; border-left: 2px solid var(--border); display: flex; flex-direction: column; gap: 12px; max-height: 260px; overflow-y: auto; }
.tm-event { position: relative; padding-left: 8px; }
.tm-event::before { content: ""; position: absolute; left: -21px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--surface); }
.tm-event--created::before { background: #22a06b; }
.tm-event--moved::before { background: #388bff; }
.tm-event-head { display: flex; align-items: baseline; gap: 8px; font-size: 12px; }
.tm-event-head strong { color: var(--text); font-weight: 600; }
.tm-event-head time { color: var(--text3); }
.tm-event-text { font-size: 13px; color: var(--text2); margin-top: 2px; word-break: break-word; }

/* cliente da tarefa */
.tm-field-client { margin-bottom: 12px; }
.tm-hint { font-size: 12px; color: var(--danger); }
.kb-client { display: flex; align-items: center; gap: 5px; margin-top: 4px; font-size: 12px; color: #626f86; }
.kb-client svg { flex: 0 0 auto; }

/* ── Pessoas (responsáveis / seguidores) ─────────────────────────────────── */
.tm-grid-2 { grid-template-columns: 1fr 1fr; }
.tm-label-hint { font-weight: 400; color: var(--text3); }
.tm-people {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px; min-height: 42px; padding: 5px 6px;
  border: 1px solid var(--border2); border-radius: 10px; background: var(--surface);
}
.tm-people:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent3); }
.tm-chips { display: contents; }
.tm-chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 2px;
  border-radius: 20px; background: var(--accent3); font-size: 12px; font-weight: 500; color: var(--text);
}
.tm-chip .kb-avatar { width: 22px; height: 22px; font-size: 10px; margin: 0; }
.tm-chip-remove {
  width: 18px; height: 18px; padding: 0; border: none; border-radius: 50%; background: transparent;
  font-size: 14px; line-height: 1; color: var(--text3); cursor: pointer;
}
.tm-chip-remove:hover { background: var(--danger-bg); color: var(--danger); }
.tm-people-add {
  flex: 1; min-width: 150px; border: none; background: transparent; padding: 6px 4px;
  font: 500 13px var(--sans); color: var(--accent); cursor: pointer; outline: none;
}

/* avatares (cartão, tabela, chips) */
.kb-avatars { display: inline-flex; margin-left: auto; }
.kb-avatar {
  display: inline-flex; align-items: center; justify-content: center; width: 24px; height: 24px;
  border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 700;
  box-shadow: 0 0 0 2px #fff; letter-spacing: .3px;
}
.kb-avatars .kb-avatar + .kb-avatar { margin-left: -6px; }
.kb-avatar:nth-child(3n+2) { background: #22a06b; }
.kb-avatar:nth-child(3n+3) { background: #e2a03f; }
.kb-avatar-more { background: #8590a2 !important; }
.kb-badges { width: 100%; }

/* ── Checklist ───────────────────────────────────────────────────────────── */
.badge-check { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: #626f86; line-height: 20px; padding: 0 4px; border-radius: 4px; }
.badge-check.complete { background: #1f845a; color: #fff; }
.tm-check-progress { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; font-size: 12px; font-weight: 600; color: var(--text2); }
.tm-check-bar { flex: 1; height: 6px; border-radius: 6px; background: var(--surface2); overflow: hidden; }
.tm-check-bar span { display: block; height: 100%; width: 0; background: #22a06b; border-radius: 6px; transition: width .2s; }
.tm-checklist { display: flex; flex-direction: column; gap: 6px; }
.tm-checklist:empty { display: none; }
.tm-check-row { display: grid; grid-template-columns: 22px 1fr 30px; align-items: center; gap: 8px; }
.tm-check-box { width: 18px; height: 18px; accent-color: #22a06b; cursor: pointer; }
.tm-check-row.done .tm-check-text { text-decoration: line-through; color: var(--text3); }
.tm-check-text { border-color: transparent; background: transparent; }
.tm-check-text:hover { background: var(--surface2); }
.tm-check-text:focus { border-color: var(--accent); background: var(--surface); }
@media (max-width: 720px) { .tm-grid-2 { grid-template-columns: 1fr; } }

/* ── Solicitante e comentários ───────────────────────────────────────────── */
.tm-field-requester { margin-bottom: 12px; max-width: 50%; }
.tm-comments { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 10px; max-height: 280px; overflow-y: auto; }
.tm-comments:empty { display: none; }
.tm-comment { background: var(--surface2); border-radius: 10px; padding: 10px 12px; }
.tm-comment-body { font-size: 13px; color: var(--text); margin-top: 4px; white-space: pre-wrap; word-break: break-word; }
.tm-comment-edit { margin-left: auto; border: none; background: none; font: 500 11px var(--sans); color: var(--text3); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.tm-comment-edit:hover { color: var(--accent); background: var(--accent3); }
.tm-comment-editbox { margin-top: 6px; }
.tm-comment-editbox .form-textarea { width: 100%; background: var(--surface); }
.tm-comment-new { display: flex; gap: 10px; align-items: flex-start; }
.tm-comment-new > .kb-avatar { flex: 0 0 auto; width: 30px; height: 30px; font-size: 11px; margin-top: 2px; }
.tm-comment-input { flex: 1; min-width: 0; }
.tm-comment-input .form-textarea { width: 100%; }
.tm-comment-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.tm-comment-error { font-size: 12px; color: var(--danger); margin-right: auto; }
@media (max-width: 720px) { .tm-field-requester { max-width: none; } }

/* ── Tarefa priorizada ───────────────────────────────────────────────────── */
.kb-card { position: relative; }
.kb-card.prioritized { box-shadow: 0 0 0 2px #c9372c, 0 2px 6px rgba(201,55,44,.25); }
.kb-card.prioritized:hover { box-shadow: 0 0 0 2px #ae2e24, 0 2px 8px rgba(201,55,44,.35); }
.kb-prio-banner {
  display: inline-flex; align-items: center; gap: 4px; margin-bottom: 6px; padding: 1px 8px;
  border-radius: 4px; background: #c9372c; color: #fff; font-size: 11px; font-weight: 700;
}
.kb-prio-banner svg { width: 11px; height: 11px; }
.kb-flag {
  position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; padding: 0; z-index: 1;
  display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 6px;
  background: rgba(255,255,255,.9); color: #8590a2; cursor: pointer; opacity: 0; transition: opacity .12s, background .12s, color .12s;
}
.kb-card:hover .kb-flag, .kb-card:focus-within .kb-flag, .kb-flag:focus-visible { opacity: 1; }
.kb-flag:hover { background: #ffeceb; color: #c9372c; }
.kb-flag.on { opacity: 1; color: #c9372c; background: #ffeceb; }
.kb-flag.on:hover { background: #fff; color: #8590a2; }
.kb-card .kb-labels { padding-right: 28px; }
.area-table tr.at-row.prioritized td:first-child { box-shadow: inset 3px 0 0 #c9372c; }
.area-table tr.at-row.prioritized td { background: #fff5f4; }
.at-flag { display: inline-flex; color: #c9372c; vertical-align: -2px; }
.gantt-bar.kb-card.prioritized { box-shadow: 0 0 0 2px #c9372c, 0 1px 2px rgba(9,30,66,.3); }

.tm-title-row { display: flex; align-items: center; gap: 10px; }
.tm-title-row .tm-title { flex: 1; min-width: 0; }
.tm-prioritize {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 1px solid var(--border2); border-radius: 8px; background: var(--surface);
  font: 600 13px var(--sans); color: var(--text2); cursor: pointer; transition: all .12s;
}
.tm-prioritize:hover { border-color: #c9372c; color: #c9372c; }
.tm-prioritize.on { background: #c9372c; border-color: #c9372c; color: #fff; }
.tm-prio-reason { margin-top: 10px; padding: 10px 12px; border-radius: 10px; background: #fff5f4; border: 1px solid #ffd5d2; }
.prio-modal { width: 460px; }
.prio-modal-ico { display: inline-flex; color: #c9372c; }
.prio-modal-task { margin: -8px 0 12px; font-size: 13px; font-weight: 600; color: var(--text2); }

/* ── Migrar tarefa ───────────────────────────────────────────────────────── */
.tm-migrate-btn { display: inline-flex; align-items: center; gap: 6px; }
.tm-migrate-btn[hidden] { display: none; }
.tm-footer .tm-migrate-btn { margin-right: auto; }
.tm-footer:has(.tm-migrate-btn) .task-delete-btn { margin-right: 0; }
.migrate-modal { width: 560px; }
.migrate-modal .modal-title svg { color: var(--accent); }
.migrate-reason { margin-top: 12px; }

/* ── Aprovações ──────────────────────────────────────────────────────────── */
[data-kind="aprovacao"] { --kind: #8f7ee7; }
.area-preview-col[data-kind="aprovacao"] { border-top-color: #8f7ee7; }
.tm-approval {
  flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px;
  border: 1px solid var(--border2); border-radius: 8px; background: var(--surface);
  font: 600 13px var(--sans); color: var(--text2); cursor: pointer; transition: all .12s; white-space: nowrap;
}
.tm-approval[hidden] { display: none; }
.tm-approval:hover { border-color: #8f7ee7; color: #6e5dc6; }
.tm-approval.pending { background: #f1edff; border-color: #8f7ee7; color: #5e4db2; }
.kb-approval-pending {
  display: inline-flex; margin-bottom: 6px; padding: 1px 8px; border-radius: 4px;
  background: #f1edff; color: #5e4db2; font-size: 11px; font-weight: 600;
}
.approval-modal { width: 520px; }
.approval-ico { display: inline-flex; color: #8f7ee7; }
.approval-note { margin-top: 12px; }
.approval-status { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 13px; color: var(--text2); margin-bottom: 10px; }
#approval-decide-form .form-textarea { width: 100%; }
.approval-history { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border); }
.approval-history .tm-label { display: block; margin-bottom: 10px; }

/* página Aprovações */
.ap-tabs { margin-bottom: 16px; }
.ap-list { display: flex; flex-direction: column; gap: 12px; max-width: 900px; }
.ap-card { background: var(--surface); border-radius: 12px; box-shadow: var(--shadow-card); padding: 14px 18px; border-left: 4px solid #8f7ee7; }
.ap-card.ap-approved { border-left-color: #22a06b; }
.ap-card.ap-rejected { border-left-color: #c9372c; }
.ap-card.ap-cancelled { border-left-color: #8590a2; }
.ap-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.ap-title { font-size: 15px; font-weight: 600; color: var(--text); }
.ap-title:hover { color: var(--accent); }
.ap-area { font-size: 12px; color: var(--text3); }
.ap-status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 700; }
.ap-status-pending { background: #f1edff; color: #5e4db2; }
.ap-status-approved { background: #dcfff1; color: #216e4e; }
.ap-status-rejected { background: #ffeceb; color: #ae2e24; }
.ap-status-cancelled { background: #f1f2f4; color: #626f86; }
.ap-meta { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 8px; font-size: 12px; color: var(--text2); }
.ap-meta strong { color: var(--text3); font-weight: 600; }
.ap-note { margin: 8px 0 0; font-size: 13px; color: var(--text); white-space: pre-wrap; }
.ap-decide { margin-top: 12px; }
.ap-decide .form-textarea { width: 100%; }
.ap-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 8px; }
.ap-approve { background: #1f845a; border-color: #1f845a; }
.ap-approve:hover { background: #216e4e; border-color: #216e4e; }

/* ── Cartão compacto + tarefa travada ────────────────────────────────────── */
.kb-label-prioritized { display: inline-flex; align-items: center; gap: 3px; background: #c9372c; color: #fff; }
.kb-label-prioritized svg { width: 10px; height: 10px; }
.kb-lock { font-size: 11px; line-height: 16px; margin-left: auto; }
.kb-card.locked { cursor: pointer; background: #fbfaff; }
.kb-card.locked:not(.prioritized) { box-shadow: 0 0 0 1px #d6ccfb, 0 1px 1px rgba(9,30,66,.15); }
.tm-locked {
  display: flex; align-items: center; gap: 8px; padding: 10px 24px;
  background: #f1edff; color: #5e4db2; font-size: 13px; font-weight: 600; border-bottom: 1px solid #e0d8ff;
}
.tm-locked[hidden] { display: none; }
.tm-form.is-locked .tm-title:disabled { color: var(--text); -webkit-text-fill-color: var(--text); opacity: 1; }
.tm-form.is-locked .tm-body input:disabled,
.tm-form.is-locked .tm-body select:disabled,
.tm-form.is-locked .tm-body textarea:disabled { background: var(--surface2); color: var(--text2); cursor: not-allowed; opacity: 1; }
.tm-form.is-locked .tm-add-link:disabled, .tm-form.is-locked .tm-link-remove:disabled,
.tm-form.is-locked .tm-chip-remove:disabled, .tm-form.is-locked .tm-prioritize:disabled { opacity: .45; cursor: not-allowed; }
.tm-form.is-locked .tm-people-add { display: none; }

/* ── Kanban em tela cheia: quadro ocupa a altura restante e a barra horizontal
      fica no rodapé da janela; cada coluna rola sozinha na vertical ───────── */
.page-content:has(> .kb-board) {
  display: flex; flex-direction: column; overflow: hidden;
  padding: 20px 20px 10px;
}
.page-content:has(> .kb-board) > .area-head { flex: 0 0 auto; margin-bottom: 12px; }
.page-content:has(> .kb-board) > .kb-board {
  flex: 1 1 auto; min-height: 0; height: auto;
  align-items: stretch;           /* colunas com a altura toda do quadro */
  padding-bottom: 12px;
}
.page-content:has(> .kb-board) .kb-col { flex-basis: 290px; max-height: 100%; align-self: stretch; }
.page-content:has(> .kb-board) .kb-cards { flex: 1 1 auto; }
@media (max-width: 768px) {
  .page-content:has(> .kb-board) { padding: 12px 10px calc(8px + env(safe-area-inset-bottom)); }
  .page-content:has(> .kb-board) .kb-col { flex-basis: 85vw; }
}

/* ── Editor de texto com formatação (Contexto / Descrição Técnica) ───────── */
.re-wrap { border: 1px solid var(--border2); border-radius: 10px; background: var(--surface); overflow: visible; }
.re-wrap:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent3); }
.re-toolbar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 2px; padding: 5px 6px;
  border-bottom: 1px solid var(--border); background: var(--surface2); border-radius: 10px 10px 0 0;
}
.re-btn {
  min-width: 30px; height: 30px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center;
  border: none; border-radius: 6px; background: transparent; color: var(--text2); cursor: pointer; font-size: 14px;
}
.re-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.re-btn:hover { background: var(--surface); color: var(--text); }
.re-btn.active { background: var(--accent3); color: var(--accent); }
.re-btn:disabled, .re-heading:disabled { opacity: .4; cursor: not-allowed; }
.re-heading {
  height: 30px; border: none; border-radius: 6px; background: transparent; padding: 0 6px;
  font: 600 13px var(--sans); color: var(--text2); cursor: pointer;
}
.re-heading:hover { background: var(--surface); }
.re-sep { width: 1px; height: 18px; background: var(--border2); margin: 0 4px; }
.re-color-a { font-weight: 700; border-bottom: 3px solid #c9372c; line-height: 1; padding-bottom: 1px; }
.re-dropdown { position: relative; display: inline-flex; }
.re-menu {
  display: none; position: absolute; top: calc(100% + 4px); left: 0; z-index: 30; padding: 6px;
  background: var(--surface); border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.18), 0 0 0 1px rgba(15,23,42,.06);
}
.re-dropdown.open .re-menu { display: grid; }
.re-colors { grid-template-columns: repeat(4, 24px); gap: 6px; }
.re-swatch { width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--surface); box-shadow: 0 0 0 1px var(--border2); cursor: pointer; padding: 0; }
.re-swatch:hover { box-shadow: 0 0 0 2px var(--accent); }
.re-tables { gap: 2px; min-width: 90px; }
.re-tables button { border: none; background: none; padding: 6px 10px; border-radius: 6px; font: 13px var(--sans); color: var(--text); cursor: pointer; text-align: left; }
.re-tables button:hover { background: var(--surface2); }
.re-area {
  min-height: 110px; max-height: 360px; overflow-y: auto; padding: 10px 12px;
  font-size: 14px; line-height: 1.55; color: var(--text); outline: none; word-break: break-word;
}
.re-area:empty::before { content: attr(data-placeholder); color: var(--text3); pointer-events: none; }
.re-wrap.is-disabled .re-area { background: var(--surface2); color: var(--text2); cursor: default; }
.re-status { font-size: 12px; color: var(--text3); padding: 0 12px; }
.re-status:empty { display: none; }
.re-status.error { color: var(--danger); padding-bottom: 6px; }
.re-area > :first-child { margin-top: 0; }
.re-area p { margin: 0 0 6px; }
.re-area h1 { font-size: 20px; margin: 10px 0 6px; }
.re-area h2 { font-size: 17px; margin: 10px 0 6px; }
.re-area h3 { font-size: 15px; margin: 8px 0 4px; }
.re-area ul, .re-area ol { margin: 0 0 6px; padding-left: 22px; }
.re-area blockquote { margin: 0 0 6px 18px; padding-left: 10px; border-left: 3px solid var(--border2); color: var(--text2); }
.re-area a { color: var(--accent); text-decoration: underline; }
.re-area img { max-width: 100%; height: auto; border-radius: 6px; margin: 4px 0; display: block; }
.re-area table { border-collapse: collapse; margin: 6px 0; width: 100%; }
.re-area th, .re-area td { border: 1px solid var(--border2); padding: 5px 8px; min-width: 40px; vertical-align: top; }
.re-area th { background: var(--surface2); font-weight: 600; }
.re-area ul[data-checklist="true"] { list-style: none; padding-left: 4px; }
.re-area ul[data-checklist="true"] > li { position: relative; padding-left: 26px; }
.re-area ul[data-checklist="true"] > li::before {
  content: ""; position: absolute; left: 0; top: 3px; width: 16px; height: 16px; border-radius: 4px;
  border: 2px solid var(--border2); background: var(--surface); cursor: pointer; box-sizing: border-box;
}
.re-area ul[data-checklist="true"] > li[data-checked="true"]::before {
  background: #22a06b; border-color: #22a06b;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5 9-10'/%3E%3C/svg%3E");
  background-size: 12px; background-position: center; background-repeat: no-repeat;
}
.re-area ul[data-checklist="true"] > li[data-checked="true"] { color: var(--text3); text-decoration: line-through; }

/* ── Comentários estilo chat ─────────────────────────────────────────────── */
.tm-chat {
  list-style: none; margin: 0 0 12px; padding: 12px; display: flex; flex-direction: column; gap: 2px;
  max-height: 340px; overflow-y: auto; border-radius: 12px;
  background: #efeae2 linear-gradient(0deg, rgba(255,255,255,.35), rgba(255,255,255,.35));
}
.tm-chat:empty { display: none; }
.tm-day { align-self: center; margin: 8px 0 6px; }
.tm-day span { display: inline-block; padding: 3px 10px; border-radius: 8px; background: rgba(255,255,255,.9); font-size: 11px; font-weight: 600; color: #54656f; box-shadow: 0 1px 1px rgba(11,20,26,.08); }
.tm-msg { display: flex; align-items: flex-end; gap: 6px; max-width: 82%; margin-top: 8px; }
.tm-msg.cont { margin-top: 2px; }
.tm-msg.theirs { align-self: flex-start; }
.tm-msg.mine { align-self: flex-end; flex-direction: row-reverse; }
.tm-msg-avatar { flex: 0 0 auto; width: 28px; height: 28px; font-size: 10px; box-shadow: none; }
.tm-msg-avatar.ghost { visibility: hidden; }
.tm-bubble {
  position: relative; min-width: 80px; padding: 6px 10px 4px; border-radius: 10px;
  font-size: 14px; line-height: 1.4; box-shadow: 0 1px 1px rgba(11,20,26,.13); word-break: break-word;
}
.tm-msg.theirs .tm-bubble { background: #fff; color: #111b21; border-top-left-radius: 2px; }
.tm-msg.mine .tm-bubble { background: #d9fdd3; color: #111b21; border-top-right-radius: 2px; }
.tm-msg.theirs.cont .tm-bubble { border-top-left-radius: 10px; }
.tm-msg.mine.cont .tm-bubble { border-top-right-radius: 10px; }
.tm-msg-author { font-size: 12px; font-weight: 700; color: var(--accent); margin-bottom: 2px; }
.tm-msg-text { white-space: pre-wrap; }
.tm-mention { color: #0c66e4; font-weight: 600; background: rgba(12,102,228,.08); border-radius: 4px; padding: 0 2px; }
.tm-msg.mine .tm-mention { background: rgba(12,102,228,.12); }
.tm-msg-meta { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 2px; font-size: 11px; color: #667781; }
.tm-msg .tm-comment-edit { margin: 0; padding: 0 4px; font-size: 11px; color: #667781; opacity: 0; transition: opacity .12s; }
.tm-msg:hover .tm-comment-edit, .tm-msg .tm-comment-edit:focus-visible { opacity: 1; }
.tm-msg .tm-comment-editbox { min-width: 260px; }
.tm-comment-input { position: relative; }
.tm-mention-menu {
  position: absolute; bottom: calc(100% + 4px); left: 0; z-index: 40; min-width: 240px; max-width: 100%;
  padding: 4px; background: var(--surface); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,23,42,.18), 0 0 0 1px rgba(15,23,42,.06);
}
.tm-mention-menu[hidden] { display: none; }
.tm-comment-editbox { position: relative; }
.tm-comment-editbox .tm-mention-menu { bottom: auto; top: calc(100% - 34px); }
.tm-mention-opt {
  display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border: none; border-radius: 6px;
  background: none; font: 500 13px var(--sans); color: var(--text); cursor: pointer; text-align: left;
}
.tm-mention-opt .kb-avatar { width: 24px; height: 24px; font-size: 10px; box-shadow: none; }
.tm-mention-opt.active, .tm-mention-opt:hover { background: var(--accent3); }

/* ── Chat de comentários no tema do site (substitui as cores do estilo anterior) ── */
.tm-chat { background: var(--surface2); border: 1px solid var(--border); }
.tm-day span { background: var(--surface); color: var(--text3); box-shadow: 0 1px 2px rgba(15,23,42,.08); }
.tm-bubble { box-shadow: 0 1px 2px rgba(15,23,42,.08); border-radius: 14px; }
.tm-msg.theirs .tm-bubble { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-top-left-radius: 4px; }
.tm-msg.mine .tm-bubble { background: var(--accent); color: #fff; border-top-right-radius: 4px; }
.tm-msg.theirs.cont .tm-bubble { border-top-left-radius: 14px; }
.tm-msg.mine.cont .tm-bubble { border-top-right-radius: 14px; }
.tm-msg-author { color: var(--accent); }
.tm-msg-meta { color: var(--text3); }
.tm-msg.mine .tm-msg-meta { color: rgba(255,255,255,.78); }
.tm-mention { color: var(--accent); background: var(--accent3); }
.tm-msg.mine .tm-mention { color: #fff; background: rgba(255,255,255,.22); }
.tm-msg .tm-comment-edit { color: var(--text3); }
.tm-msg.mine .tm-comment-edit { color: rgba(255,255,255,.85); }
.tm-msg.mine .tm-comment-edit:hover { color: #fff; background: rgba(255,255,255,.18); }
.tm-msg.mine .tm-comment-editbox .form-textarea { color: var(--text); }
.tm-msg.mine .tm-comment-editbox .tm-comment-error { color: #ffe1de; }
.tm-msg-avatar { background: var(--accent); }

/* ── Dependências entre tarefas ──────────────────────────────────────────── */
.kb-blocked { display: inline-block; font-size: 11px; font-weight: 600; line-height: 16px; padding: 0 8px; border-radius: 4px; background: #fff4e5; color: #a54800; }
.tm-deps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tm-dep {
  display: grid; grid-template-columns: 10px 1fr auto 26px; align-items: center; gap: 8px;
  padding: 6px 8px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
}
.tm-dep-dot { width: 10px; height: 10px; border-radius: 50%; background: #e2a03f; }
.tm-dep.done .tm-dep-dot { background: #22a06b; }
.tm-dep-info { display: flex; flex-direction: column; min-width: 0; }
.tm-dep-info strong { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-dep.done .tm-dep-info strong { text-decoration: line-through; color: var(--text3); }
.tm-dep-info small { font-size: 11px; color: var(--text3); }
.tm-dep-type { font-size: 11px; font-weight: 600; color: var(--accent); background: var(--accent3); border-radius: 10px; padding: 1px 8px; white-space: nowrap; }
.tm-dep .tm-dep-remove { width: 26px; height: 26px; font-size: 16px; }
.tm-dep-empty { font-size: 12px; color: var(--text3); font-style: italic; padding: 4px 2px; }
.tm-dep-add { display: grid; grid-template-columns: 190px 1fr; gap: 8px; margin-top: 12px; }
.tm-dep-search-wrap { position: relative; }
.tm-dep-search-wrap .form-input { width: 100%; }
.tm-dep-results {
  position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 40; max-height: 240px; overflow-y: auto; padding: 4px;
  background: var(--surface); border-radius: 10px; box-shadow: 0 8px 24px rgba(15,23,42,.18), 0 0 0 1px rgba(15,23,42,.06);
}
.tm-dep-results[hidden] { display: none; }
.tm-dep-result { display: flex; flex-direction: column; align-items: flex-start; width: 100%; padding: 6px 10px; border: none; border-radius: 6px; background: none; cursor: pointer; text-align: left; }
.tm-dep-result:hover { background: var(--accent3); }
.tm-dep-result strong { font-size: 13px; color: var(--text); }
.tm-dep-result small { font-size: 11px; color: var(--text3); }
.tm-dep-noresult { padding: 8px 10px; font-size: 12px; color: var(--text3); }
.gantt { position: relative; }
.gantt-deps { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 1; overflow: visible; }
.gantt-dep { fill: none; stroke: #8590a2; stroke-width: 1.6; }
.gantt-deps marker path { fill: #8590a2; }
.gantt-ext-dep { color: #a54800; cursor: help; }
@media (max-width: 720px) { .tm-dep-add { grid-template-columns: 1fr; } }

/* tipo no modal de desativados */
.inactive-kind { font-size: 11px; color: var(--text3); background: var(--surface2); border-radius: 10px; padding: 1px 8px; margin-left: 6px; }

/* origem da tarefa (automática) */
.kb-label.origin-tarefa  { background: #dfd8fd; color: #5e4db2; }
.kb-label.origin-projeto { background: #cce0ff; color: #0055cc; }
.tm-origin {
  display: flex; align-items: center; height: 38px; padding: 0 12px; border-radius: 8px;
  background: var(--surface2); border: 1px dashed var(--border2); font-size: 13px; font-weight: 600; color: var(--text2);
  cursor: help;
}

/* ── Blueprints ──────────────────────────────────────────────────────────── */
.sidebar-select:not(:disabled) { opacity: 1; }
.bp-hint { margin: -4px 0 14px; font-size: 13px; color: var(--text3); }
.bp-table td { vertical-align: middle; }
.bp-num { width: 70px; font-family: var(--mono); font-size: 12px; color: var(--text3); white-space: nowrap; }
.bp-name { padding-left: calc(14px + var(--depth, 0) * 22px) !important; }
.bp-row.depth-0 .bp-name-btn { font-weight: 700; }
.bp-row.depth-0 td { background: #fafbfd; }
.bp-caret, .bp-caret-space { display: inline-flex; width: 20px; height: 20px; vertical-align: middle; }
.bp-caret { align-items: center; justify-content: center; border: none; background: none; border-radius: 4px; color: var(--text3); cursor: pointer; padding: 0; font-size: 12px; }
.bp-caret:hover { background: var(--surface2); color: var(--text); }
.bp-name-btn { border: none; background: none; padding: 2px 4px; font: 500 13px var(--sans); color: var(--text); cursor: pointer; text-align: left; border-radius: 4px; }
.bp-name-btn:hover { color: var(--accent); background: var(--accent3); }
.bp-status { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.bp-status-nao_iniciado { background: #f1f2f4; color: #44546f; }
.bp-status-em_andamento { background: #e9e9fb; color: #5e60ce; }
.bp-status-concluido { background: #dcfff1; color: #216e4e; }
.bp-status-cancelado { background: #ffeceb; color: #ae2e24; }
.bp-pred { font-size: 12px; color: var(--text2); }
.bp-actions-col { width: 1%; }
.bp-actions { white-space: nowrap; text-align: right; }
.bp-actions form { display: inline; margin: 0; }
.bp-act {
  width: 26px; height: 26px; padding: 0; border: none; border-radius: 6px; background: transparent;
  color: var(--text3); cursor: pointer; font-size: 14px; opacity: .55; transition: opacity .12s, background .12s;
}
.bp-row:hover .bp-act, .bp-act:focus-visible { opacity: 1; }
.bp-act:hover { background: var(--surface2); color: var(--text); }
.bp-act.danger:hover { background: var(--danger-bg); color: var(--danger); }
.bp-parent-info { margin: -6px 0 12px; font-size: 13px; color: var(--accent); font-weight: 600; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ── Blueprint: modal de criação (mesmo layout do modal de área) ─────────── */
#modal-new-blueprint .modal-xl { width: 900px; max-width: 95vw; padding: 0; overflow: hidden; max-height: 90vh; }
.na-left-hint { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: var(--text3); }

/* ── Blueprint: tabela estilo Wrike (edição direto nas células) ──────────── */
.bp-grid-wrap { background: var(--surface); border: 1px solid #dfe1e6; border-radius: 10px; overflow: auto; max-height: calc(100vh - 230px); }
.bp-grid { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; }
.bp-grid thead th {
  position: sticky; top: 0; z-index: 2; background: #f7f8f9; text-align: left; white-space: nowrap;
  padding: 8px 10px; font-size: 12px; font-weight: 600; color: #626f86;
  border-bottom: 1px solid #dfe1e6; border-right: 1px solid #ebecf0;
}
.bp-grid thead th:last-child { border-right: none; }
.bp-grid td { padding: 0 6px; height: 36px; border-bottom: 1px solid #ebecf0; border-right: 1px solid #f1f2f4; vertical-align: middle; }
.bp-grid td:last-child { border-right: none; }
.bp-grid .bp-row:hover td { background: #f7f8fb; }
.bp-grid .bp-row.depth-0 td { background: #fcfcfd; }
.bp-grid .bp-row.depth-0:hover td { background: #f4f5f8; }
.bp-grid .bp-num { width: 64px; padding-left: 12px; font-family: var(--mono); font-size: 11px; color: #8590a2; white-space: nowrap; }
.bp-grid .bp-name { min-width: 280px; padding-left: calc(8px + var(--depth, 0) * 20px) !important; white-space: nowrap; }
.bp-grid .bp-name .bp-caret, .bp-grid .bp-name .bp-caret-space { margin-right: 2px; }

/* células editáveis: parecem texto, viram campo ao focar */
.bp-cell {
  width: 100%; height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 4px;
  background: transparent; font: 13px var(--sans); color: #172b4d; outline: none;
}
.bp-cell:hover { border-color: #dfe1e6; background: #fff; }
.bp-cell:focus { border-color: var(--accent); background: #fff; box-shadow: 0 0 0 2px var(--accent3); }
.bp-cell-name { width: calc(100% - 26px); font-weight: 500; }
.bp-row.depth-0 .bp-cell-name { font-weight: 700; }
select.bp-cell { cursor: pointer; appearance: none; -webkit-appearance: none; padding-right: 18px;
  background-image: linear-gradient(45deg, transparent 50%, #8590a2 50%), linear-gradient(135deg, #8590a2 50%, transparent 50%);
  background-position: calc(100% - 9px) 12px, calc(100% - 5px) 12px; background-size: 4px 4px; background-repeat: no-repeat; }
select.bp-cell:not(:hover):not(:focus) { background-image: none; }
.bp-cell-select { min-width: 130px; }
.bp-status-select { width: auto; min-width: 120px; font-size: 12px; font-weight: 600; border-radius: 12px; height: 24px; }
.bp-status-select.bp-status-nao_iniciado { background-color: #f1f2f4; color: #44546f; }
.bp-status-select.bp-status-em_andamento { background-color: #e9e9fb; color: #5e60ce; }
.bp-status-select.bp-status-concluido { background-color: #dcfff1; color: #216e4e; }
.bp-status-select.bp-status-cancelado { background-color: #ffeceb; color: #ae2e24; }
.bp-day { display: inline-flex; align-items: center; gap: 2px; font-size: 12px; color: #8590a2; white-space: nowrap; }
.bp-cell-day { width: 64px; text-align: left; }
.bp-cell-saving { opacity: .6; }
.bp-cell-saved { box-shadow: 0 0 0 2px #baf3db !important; border-color: #22a06b !important; }
.bp-cell-error { box-shadow: 0 0 0 2px #ffd5d2 !important; border-color: var(--danger) !important; }
.bp-author { white-space: nowrap; }
.bp-author .kb-avatar { width: 22px; height: 22px; font-size: 9px; box-shadow: none; vertical-align: middle; }
.bp-author-name { margin-left: 6px; font-size: 12px; color: #626f86; }
.bp-grid .bp-actions { white-space: nowrap; text-align: right; padding-right: 8px; }

/* linha de criação */
.bp-add-row td { background: #fff !important; border-bottom: none; }
.bp-add-row .bp-num { color: var(--accent); font-weight: 700; }
.bp-add-input {
  width: 100%; height: 30px; padding: 0 8px; border: 1px dashed transparent; border-radius: 4px;
  background: transparent; font: 13px var(--sans); color: #172b4d; outline: none;
}
.bp-add-input::placeholder { color: #8590a2; }
.bp-add-input:hover { border-color: #dfe1e6; }
.bp-add-input:focus { border: 1px solid var(--accent); box-shadow: 0 0 0 2px var(--accent3); background: #fff; }
.bp-sub-add-row td { background: #fbfbff !important; }
.bp-error { margin: 0; padding: 0 12px; font-size: 12px; color: var(--danger); }
.bp-error:empty { display: none; }
.bp-error:not(:empty) { padding: 8px 12px; }

/* ── Blueprint: Gantt em dias relativos ──────────────────────────────────── */
.bp-gantt { position: relative; background: var(--surface); border: 1px solid #dfe1e6; border-radius: 10px; overflow: auto; max-height: calc(100vh - 230px); }
.bp-g-head, .bp-g-row { display: grid; grid-template-columns: 300px minmax(640px, 1fr); }
.bp-g-head { position: sticky; top: 0; z-index: 3; background: #f7f8f9; border-bottom: 1px solid #dfe1e6; }
.bp-g-label { padding: 0 12px 0 calc(12px + var(--depth, 0) * 18px); display: flex; align-items: center; gap: 6px; height: 34px;
  font-size: 13px; color: #172b4d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; border-right: 1px solid #dfe1e6; }
.bp-g-head .bp-g-label { font-size: 12px; font-weight: 600; color: #626f86; }
.bp-g-row.depth-0 .bp-g-label { font-weight: 700; }
.bp-g-num { font-family: var(--mono); font-size: 11px; color: #8590a2; font-weight: 400; }
.bp-g-track { position: relative; height: 34px; }
.bp-g-row { border-bottom: 1px solid #f1f2f4; }
.bp-g-row:hover { background: #f7f8fb; }
.bp-g-tick { position: absolute; top: 10px; padding-left: 4px; font-size: 11px; color: #8590a2; white-space: nowrap; }
.bp-g-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid #f1f2f4; }
.bp-gbar {
  position: absolute; top: 7px; height: 20px; min-width: 8px; padding: 0 8px; border-radius: 4px; z-index: 2;
  font-size: 11px; font-weight: 600; line-height: 20px; color: #fff; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  background: #8590a2; box-shadow: 0 1px 1px rgba(9,30,66,.2);
}
.bp-gbar-nao_iniciado { background: #8590a2; }
.bp-gbar-em_andamento { background: #5e60ce; }
.bp-gbar-concluido { background: #22a06b; }
.bp-gbar-cancelado { background: #c9372c; opacity: .75; }
.bp-gbar.parent { height: 10px; top: 12px; border-radius: 2px; color: transparent; }
.bp-g-empty { padding: 24px; text-align: center; color: var(--text3); font-size: 13px; }
.bp-g-deps { position: absolute; top: 0; left: 0; pointer-events: none; z-index: 1; overflow: visible; }
.bp-g-dep { fill: none; stroke: #8590a2; stroke-width: 1.5; }
.bp-g-deps marker path { fill: #8590a2; }

/* ── Blueprint: abrir etapa, dependências na tabela e painel lateral ─────── */
.bp-num-btn { border: none; background: none; padding: 2px 4px; border-radius: 4px; font: 11px var(--mono); color: #8590a2; cursor: pointer; }
.bp-num-btn:hover { background: var(--accent3); color: var(--accent); }
.bp-open {
  width: 22px; height: 22px; padding: 0; vertical-align: middle; border: none; border-radius: 4px;
  background: transparent; color: #8590a2; cursor: pointer; opacity: 0; transition: opacity .12s;
}
.bp-row:hover .bp-open, .bp-open:focus-visible { opacity: 1; }
.bp-open:hover { background: var(--accent3); color: var(--accent); }
.bp-cell-name { width: calc(100% - 50px); }
.bp-deps-cell { min-width: 120px; }
.bp-deps-btn { display: flex; flex-wrap: wrap; gap: 4px; width: 100%; min-height: 28px; align-items: center; padding: 2px 4px;
  border: 1px solid transparent; border-radius: 4px; background: none; cursor: pointer; text-align: left; }
.bp-deps-btn:hover { border-color: #dfe1e6; background: #fff; }
.bp-dep-chip { font: 600 11px var(--mono); color: #5e60ce; background: #e9e9fb; border-radius: 10px; padding: 1px 7px; white-space: nowrap; }
.bp-dep-none { color: #8590a2; font-size: 12px; }

.bp-drawer-backdrop { position: fixed; inset: 0; background: rgba(9,30,66,.18); z-index: 150; }
.bp-drawer-backdrop[hidden] { display: none; }
.bp-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 160; width: 560px; max-width: 100vw;
  background: var(--surface); box-shadow: -8px 0 32px rgba(9,30,66,.18);
  transform: translateX(100%); transition: transform .22s ease; visibility: hidden;
}
.bp-drawer.open { transform: translateX(0); visibility: visible; }
.bp-d-form { display: flex; flex-direction: column; height: 100%; }
.bp-d-head { padding: 14px 22px 12px; border-bottom: 1px solid var(--border); }
.bp-d-top { display: flex; align-items: center; gap: 10px; margin-bottom: 6px; }
.bp-d-number { font: 600 12px var(--mono); color: var(--text3); }
.bp-d-saved { margin-left: auto; font-size: 12px; color: #1f845a; font-weight: 600; }
.bp-d-saved.error { color: var(--danger); }
.bp-d-body { flex: 1; overflow-y: auto; padding: 0 22px 20px; }
.bp-d-author { margin: 10px 0 0; font-size: 12px; color: var(--text3); }
.bp-d-author strong { color: var(--text2); }
.bp-d-desc-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; margin-top: 8px; }
.bp-d-desc-actions .tm-comment-error { margin-right: auto; }
#bp-d-deps .tm-dep-add { grid-template-columns: 170px 1fr; }
@media (max-width: 720px) { .bp-drawer { width: 100vw; } }

/* nome da etapa abre o painel lateral */
.bp-grid .bp-name-btn {
  max-width: calc(100% - 26px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: middle;
  height: 28px; padding: 0 6px; border: 1px solid transparent; border-radius: 4px;
  font: 500 13px var(--sans); color: #172b4d; background: none; cursor: pointer; text-align: left;
}
.bp-grid .bp-row.depth-0 .bp-name-btn { font-weight: 700; }
.bp-grid .bp-name-btn:hover { color: var(--accent); background: var(--accent3); text-decoration: underline; text-underline-offset: 2px; }
.bp-grid .bp-name-btn:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent3); }

/* ── Blueprint: arrastar etapas ──────────────────────────────────────────── */
.bp-grip {
  display: inline-flex; align-items: center; justify-content: center; width: 14px; height: 22px; margin-right: 2px;
  vertical-align: middle; font-size: 12px; letter-spacing: -2px; color: #b3b9c4; cursor: grab; user-select: none;
  opacity: 0; transition: opacity .12s;
}
.bp-row:hover .bp-grip { opacity: 1; }
.bp-grip:active { cursor: grabbing; }
.bp-row.dragging td { opacity: .45; }
.bp-row.drop-before td { box-shadow: inset 0 2px 0 var(--accent); }
.bp-row.drop-after td { box-shadow: inset 0 -2px 0 var(--accent); }
.bp-row.drop-inside td { background: var(--accent3) !important; }
.bp-row.drop-inside .bp-name { box-shadow: inset 3px 0 0 var(--accent); }

/* ── Blueprint: Gantt com rolagem horizontal (28px por dia) ──────────────── */
.bp-gantt { overflow: auto; }
.bp-gantt-scroll { width: max-content; min-width: 100%; }
.bp-gantt-scroll .bp-g-head,
.bp-gantt-scroll .bp-g-row { grid-template-columns: 300px calc(var(--days, 28) * 28px); }
.bp-gantt-scroll .bp-g-label { position: sticky; left: 0; z-index: 2; background: var(--surface); }
.bp-gantt-scroll .bp-g-head .bp-g-label { background: #f7f8f9; z-index: 4; }
.bp-gantt-scroll .bp-g-row:hover .bp-g-label { background: #f7f8fb; }
.bp-gantt-scroll .bp-g-head { position: sticky; top: 0; z-index: 3; }

/* ── Painel da etapa no estilo do modal de criação (mais largo, 2 colunas) ── */
.bp-drawer { width: 880px; }
.bp-d-form { position: relative; }
.bp-d-layout { display: grid; grid-template-columns: 300px 1fr; height: 100%; min-height: 0; }
.bp-d-side {
  display: flex; flex-direction: column; gap: 4px; padding: 28px 22px; overflow-y: auto;
  background: var(--surface2); border-right: 1px solid var(--border);
}
.bp-d-number { font: 700 11px var(--mono); letter-spacing: .6px; color: var(--accent); }
.bp-d-title {
  width: 100%; resize: none; margin: 4px 0 2px; padding: 8px 10px; border: 2px solid transparent; border-radius: 10px;
  background: transparent; font: 700 19px/1.3 var(--sans); color: var(--text); overflow: hidden;
}
.bp-d-title:hover { background: var(--surface); border-color: var(--border2); }
.bp-d-title:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent3); }
.bp-d-side .bp-d-saved { margin: 0 0 4px 2px; min-height: 16px; }
.bp-d-side .na-section-label { margin-top: 14px; }
.bp-d-fields { display: flex; flex-direction: column; gap: 12px; }
.bp-d-fields .form-select, .bp-d-fields .form-input { background: var(--surface); }
.bp-d-side .bp-d-author { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border); font-size: 13px; }
.bp-d-side .bp-d-author strong { color: var(--text); font-weight: 600; }
.bp-d-main { display: flex; flex-direction: column; gap: 16px; padding: 28px 28px 24px; overflow-y: auto; }
.bp-d-card { background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; padding: 16px 18px; }
.bp-d-card .na-h3 { margin-bottom: 12px; }
.bp-drawer .na-close { top: 12px; right: 12px; z-index: 3; }
@media (max-width: 900px) {
  .bp-drawer { width: 100vw; }
  .bp-d-layout { grid-template-columns: 1fr; height: auto; }
  .bp-d-form { overflow-y: auto; }
  .bp-d-side { border-right: none; border-bottom: 1px solid var(--border); }
}

/* ── Blueprint: Gráfico de resumo ────────────────────────────────────────── */
.bp-sim {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 24px; margin-bottom: 16px; padding: 16px 20px;
  background: var(--surface); border: 1px solid var(--border2); border-radius: 12px;
}
.bp-sim .tm-field { min-width: 220px; }
.bp-sim-result { display: flex; flex-direction: column; gap: 2px; }
.bp-sim-label { font-size: 12px; font-weight: 600; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; }
.bp-sim-date { font-size: 28px; font-weight: 700; color: var(--text); line-height: 1.1; font-variant-numeric: tabular-nums; }
.bp-sim-sub { font-size: 12px; color: var(--text2); }
.bp-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.bp-kpi { display: flex; flex-direction: column; gap: 2px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; }
.bp-kpi-label { font-size: 12px; font-weight: 600; color: var(--text3); }
.bp-kpi strong { font-size: 24px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.bp-kpi-sub { font-size: 12px; color: var(--text3); }
.bp-kpi.warn strong { color: #a54800; }
.bp-charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
.bp-chart { background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; padding: 16px 18px; min-width: 0; }
.bp-chart-wide { margin-bottom: 8px; }
.bp-chart-title { margin: 0 0 12px; font-size: 14px; font-weight: 700; color: var(--text); }
.bp-chart-title small { font-weight: 400; color: var(--text3); }
.bp-chart-empty { margin: 0; font-size: 13px; color: var(--text3); }
.bp-hbars { display: flex; flex-direction: column; gap: 8px; }
.bp-hbar-row { display: grid; grid-template-columns: minmax(0, 40%) 1fr 34px; align-items: center; gap: 10px; padding: 2px 0; border-radius: 6px; }
.bp-hbar-row:hover { background: var(--surface2); }
.bp-hbar-label { font-size: 12px; color: var(--text2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bp-hbar-track { position: relative; height: 12px; }
.bp-sbar { position: absolute; left: 0; top: 0; bottom: 0; min-width: 2px; border-radius: 0 4px 4px 0; background: var(--accent); }
.bp-sbar[data-kind="nao_iniciado"] { background: #8590a2; }
.bp-sbar[data-kind="em_andamento"] { background: #5e60ce; }
.bp-sbar[data-kind="concluido"] { background: #22a06b; }
.bp-sbar[data-kind="cancelado"] { background: #c9372c; }
.bp-hbar-value { font-size: 12px; font-weight: 600; color: var(--text); text-align: right; font-variant-numeric: tabular-nums; }
.bp-gantt-dated { max-height: 520px; border: none; border-top: 1px solid var(--border); border-radius: 0; margin: 0 -18px -16px; }
.bp-gantt-dated .bp-dbar { color: #fff; font-variant-numeric: tabular-nums; }
.bp-g-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid #c9372c; z-index: 1; }
@media (max-width: 1100px) { .bp-charts { grid-template-columns: 1fr; } .bp-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Blueprint: duração e início calculado ───────────────────────────────── */
.bp-cell-locked { color: #626f86 !important; background: transparent !important; border-color: transparent !important; cursor: not-allowed; }
.bp-auto { margin-left: 2px; font-size: 11px; color: #a54800; }
.bp-d-dates { grid-template-columns: repeat(3, 1fr); }
.bp-d-side .bp-d-dates { grid-template-columns: 1fr 1fr 1fr; gap: 8px; }
.bp-d-locked { margin: 6px 0 0; font-size: 12px; color: #a54800; }
.bp-d-lag { width: 80px; }
#bp-d-deps .tm-dep-add { grid-template-columns: 160px 80px 1fr; }
.tm-dep-type.editable { cursor: pointer; }
.tm-dep-type.editable:hover { box-shadow: 0 0 0 1px var(--accent); }

/* simulação: botão Simular + 5 indicadores */
.bp-sim-btn { align-self: flex-end; height: 38px; }
.bp-sim .bp-sim-result { margin-left: 8px; }
.bp-kpis-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 1100px) { .bp-kpis-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Blueprint › Resumo: painel estilo Power BI ──────────────────────────── */
.bp-kpi { position: relative; overflow: hidden; padding-left: 20px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.bp-kpi::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--kpi, var(--accent)); }
.bp-kpi strong small { font-size: 13px; font-weight: 600; color: var(--text3); }
.bp-dash-row { display: grid; gap: 12px; margin-bottom: 12px; }
.bp-dash-2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.bp-dash-1-1 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.bp-dash-1 { grid-template-columns: minmax(0, 1fr); }
.bp-chart { box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.bp-chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 14px; }
.bp-chart-head .bp-chart-title { margin: 0; }
.bp-chart-title small { display: block; margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--text3); }

/* dica ao passar o mouse */
.bp-tip {
  position: absolute; left: 50%; transform: translate(-50%, -12px); z-index: 5; white-space: nowrap; pointer-events: none;
  padding: 6px 10px; border-radius: 8px; background: #172b4d; color: #fff; font-size: 12px; line-height: 1.4;
  box-shadow: 0 4px 12px rgba(9,30,66,.25); opacity: 0; transition: opacity .1s;
}

/* curva S */
.bp-scurve { display: grid; grid-template-columns: 40px 1fr; grid-template-rows: 220px 22px; }
.bp-sc-y { position: relative; }
.bp-sc-y span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--text3); font-variant-numeric: tabular-nums; }
.bp-sc-plot { position: relative; border-left: 1px solid var(--border2); border-bottom: 1px solid var(--border2); }
.bp-sc-plot svg { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bp-sc-grid { position: absolute; left: 0; right: 0; border-top: 1px dashed #ebecf0; }
.bp-sc-area { fill: #257de0; opacity: .12; }
.bp-sc-line { fill: none; stroke: #257de0; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.bp-sc-hit { position: absolute; top: 0; bottom: 0; width: 16px; margin-left: -8px; outline: none; }
.bp-sc-dot {
  position: absolute; left: 50%; width: 9px; height: 9px; margin: 0 0 -4.5px -4.5px; border-radius: 50%;
  background: #257de0; box-shadow: 0 0 0 2px #fff; opacity: 0; transition: opacity .1s;
}
.bp-sc-hit:hover .bp-sc-dot, .bp-sc-hit:focus .bp-sc-dot, .bp-sc-hit:hover .bp-tip, .bp-sc-hit:focus .bp-tip { opacity: 1; }
.bp-sc-hit:hover::before { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 1px solid #b3b9c4; }
.bp-sc-x { position: relative; grid-column: 2; }
.bp-sc-x span { position: absolute; top: 6px; transform: translateX(-50%); font-size: 11px; color: var(--text3); white-space: nowrap; }
.bp-sc-x span:first-child { transform: none; }
.bp-sc-x span:last-child { transform: translateX(-100%); }

/* rosca */
.bp-donut-wrap { display: flex; flex-direction: column; align-items: center; gap: 14px; }
.bp-donut { width: 170px; height: 170px; }
.bp-donut-bg { fill: none; stroke: #f1f2f4; stroke-width: 6; }
.bp-donut-seg { fill: none; stroke-width: 6; cursor: pointer; transition: stroke-width .12s; }
.bp-donut-seg:hover { stroke-width: 7.5; }
.bp-donut-total { text-anchor: middle; font: 700 7px var(--sans); fill: var(--text); }
.bp-donut-caption { text-anchor: middle; font: 400 3px var(--sans); fill: var(--text3); }
.bp-legend { list-style: none; margin: 0; padding: 0; width: 100%; display: flex; flex-direction: column; gap: 6px; }
.bp-legend li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 8px; font-size: 12px; color: var(--text2); }
.bp-swatch { width: 12px; height: 12px; border-radius: 3px; }
.bp-legend-name { line-height: 1.3; }
.bp-legend-val { font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }

/* duração por fase: nome completo em cima, barra embaixo */
.bp-phases { display: flex; flex-direction: column; gap: 12px; }
.bp-phase-top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 5px; }
.bp-phase-name { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.3; }
.bp-phase-meta { flex: 0 0 auto; font-size: 11px; color: var(--text3); white-space: nowrap; font-variant-numeric: tabular-nums; }
.bp-phase-track { position: relative; height: 12px; border-radius: 6px; background: #f1f2f4; }
.bp-phase-bar { position: absolute; top: 0; bottom: 0; min-width: 4px; border-radius: 6px; }

/* colunas por mês */
.bp-cols { display: flex; align-items: flex-end; gap: 4px; height: 240px; padding-top: 18px; overflow-x: auto; }
.bp-col { position: relative; flex: 1 0 26px; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; outline: none; }
.bp-col-bar { width: 70%; min-height: 2px; border-radius: 4px 4px 0 0; background: #257de0; transition: background .1s; }
.bp-col:hover .bp-col-bar, .bp-col:focus .bp-col-bar { background: #1a5fb4; }
.bp-col-val { font-size: 11px; font-weight: 700; color: var(--text); margin-bottom: 3px; font-variant-numeric: tabular-nums; min-height: 14px; }
.bp-col-label { margin-top: 6px; font-size: 10px; color: var(--text3); white-space: nowrap; }
.bp-hbar-row { grid-template-columns: minmax(120px, 30%) 1fr 34px; }
.bp-hbar-label { white-space: normal; overflow: visible; }
@media (max-width: 1100px) { .bp-dash-2-1, .bp-dash-1-1 { grid-template-columns: 1fr; } }

/* explicação de dias úteis */
.bp-explain { margin-bottom: 16px; background: #f4f8ff; border: 1px solid #cce0ff; border-radius: 12px; }
.bp-explain summary { display: flex; align-items: center; gap: 8px; padding: 10px 16px; cursor: pointer; font-size: 13px; font-weight: 700; color: #0c4a9e; list-style: none; }
.bp-explain summary::-webkit-details-marker { display: none; }
.bp-explain summary::after { content: "▾"; margin-left: auto; color: #0c66e4; transition: transform .15s; }
.bp-explain:not([open]) summary::after { transform: rotate(-90deg); }
.bp-explain-ico { display: inline-flex; align-items: center; justify-content: center; width: 18px; height: 18px; border-radius: 50%; background: #0c66e4; color: #fff; font: 700 11px/1 var(--sans); font-style: italic; }
.bp-explain-body { padding: 0 16px 12px 42px; font-size: 13px; line-height: 1.55; color: #172b4d; }
.bp-explain-body p { margin: 0 0 6px; }
.bp-explain-body ul { margin: 0; padding-left: 18px; }
.bp-explain-body li { margin-bottom: 3px; }
.bp-explain-body a { color: #0c66e4; font-weight: 600; }

/* responsável pela área */
.na-responsible { background: var(--surface); }
.area-owner { display: inline-flex; align-items: center; gap: 8px; margin-left: 10px; padding: 3px 12px 3px 3px; border-radius: 20px; background: var(--surface2); }
.area-owner .kb-avatar { width: 26px; height: 26px; font-size: 10px; box-shadow: none; }
.area-owner-text { display: flex; flex-direction: column; line-height: 1.15; font-size: 13px; font-weight: 600; color: var(--text); }
.area-owner-text small { font-size: 10px; font-weight: 500; color: var(--text3); text-transform: uppercase; letter-spacing: .4px; }

/* ── Editor de colunas / fluxo em branco ─────────────────────────────────── */
.kb-add-col {
  flex: 0 0 260px; align-self: flex-start; display: flex; align-items: center; gap: 8px; padding: 12px 14px;
  border: none; border-radius: 12px; background: rgba(255,255,255,.22); color: #fff;
  font: 600 14px var(--sans); cursor: pointer; text-align: left; transition: background .12s;
}
.kb-add-col:hover { background: rgba(255,255,255,.34); }
.col-hint { margin: -8px 0 14px; }
.col-list { list-style: none; margin: 0 0 14px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.col-row { display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid var(--border2); border-radius: 10px; }
.col-row form { margin: 0; }
.col-edit { display: grid; grid-template-columns: 1fr 190px auto; gap: 6px; flex: 1; }
.col-act { width: 28px; height: 28px; padding: 0; border: none; border-radius: 6px; background: transparent; color: var(--text3); cursor: pointer; font-size: 14px; }
.col-act:hover:not(:disabled) { background: var(--surface2); color: var(--text); }
.col-act.danger:hover:not(:disabled) { background: var(--danger-bg); color: var(--danger); }
.col-act:disabled { opacity: .3; cursor: not-allowed; }
.col-empty { padding: 14px; text-align: center; color: var(--text3); font-size: 13px; border: 1px dashed var(--border2); border-radius: 10px; }
.col-add { display: grid; grid-template-columns: 1fr 190px auto; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.area-preview-empty { padding: 30px 16px; text-align: center; color: var(--text3); font-size: 13px; border: 1px dashed var(--border2); border-radius: 8px; width: 100%; }
@media (max-width: 720px) { .col-edit, .col-add { grid-template-columns: 1fr; } }

/* criar área a partir do blueprint */
.bp-new-area-modal { width: 460px; z-index: 210; }
#modal-bp-new-area { z-index: 220; }

/* ── Planner › Projetos ──────────────────────────────────────────────────── */
.pp-blueprints { max-height: 420px; overflow-y: auto; padding: 2px; }
.pp-client { margin-left: 10px; padding: 3px 12px; border-radius: 20px; background: var(--surface2); font-size: 13px; font-weight: 600; color: var(--text2); }
.pp-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pp-kpi-text { font-size: 18px !important; line-height: 1.25; }
.pp-grid td { height: 36px; padding: 0 10px; }
.pp-name { font-size: 13px; color: #172b4d; }
.bp-row.depth-0 .pp-name { font-weight: 700; }
.pp-date { white-space: nowrap; font-variant-numeric: tabular-nums; color: var(--text2); font-size: 13px; }

/* projeto: células de data + nomes da barra lateral sem corte */
.pp-cell-date { width: 140px; }
.sidebar-area-name { white-space: normal; overflow: visible; text-overflow: clip; line-height: 1.25;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; }
.sidebar-area-row .sidebar-item { align-items: flex-start; }
.sidebar-area-row .sidebar-area-ico { margin-top: 1px; }

/* ── Painel da etapa: título e datas ajustados ───────────────────────────── */
.bp-d-side > * { min-width: 0; }
.bp-d-title {
  box-sizing: border-box; display: block; width: 100%; max-width: 100%; margin: 6px 0 2px;
  padding: 6px 8px; border-width: 1px; border-radius: 8px;
  font: 700 16px/1.35 var(--sans); min-height: 36px; overflow: hidden; word-break: break-word;
}
.bp-d-title:focus { box-shadow: 0 0 0 3px var(--accent3); }
.bp-d-fields .form-select, .bp-d-fields .form-input { box-sizing: border-box; width: 100%; min-width: 0; }
.bp-d-side .bp-d-dates { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; align-items: end; }
.bp-d-dates .tm-field { justify-content: flex-end; }
.bp-d-fields .tm-label { display: flex; flex-direction: column; line-height: 1.2; }
.bp-d-fields .tm-label small { font-size: 10px; font-weight: 500; color: var(--text3); }
.bp-d-dates .form-input { padding-left: 8px; padding-right: 4px; text-align: center; }
.bp-d-fields .tm-grid-2 { align-items: end; }

/* ── Pastas (estilo Wrike): período calculado pelas subetapas ────────────── */
.bp-folder-ico { color: #626f86; vertical-align: middle; margin: 0 2px 0 2px; flex: 0 0 auto; }
.bp-task-ico { color: #8590a2; vertical-align: middle; margin: 0 2px 0 2px; flex: 0 0 auto; }
.bp-row:has(.bp-folder-ico) .bp-name-btn { font-weight: 700; }
.bp-rollup { display: inline-block; padding: 0 6px; font-size: 12px; font-weight: 600; color: #44546f; white-space: nowrap; font-variant-numeric: tabular-nums; }
.bp-rollup-empty { display: block; height: 1px; }
.bp-d-folder-note { color: #44546f; }
.bp-d-fields select:disabled, .bp-d-fields input:disabled { background: var(--surface2); color: var(--text2); cursor: not-allowed; }

/* projeto: início editável + Gantt clicável */
.pp-start-form { display: flex; align-items: center; gap: 6px; margin: 4px 0 2px; }
.pp-start-form .form-input { height: 32px; padding: 0 8px; font-size: 14px; font-weight: 700; width: 150px; }
.bp-gbar[data-gantt-open], .bp-g-open { cursor: pointer; }
.bp-gbar[data-gantt-open]:hover, .bp-gbar[data-gantt-open]:focus-visible { box-shadow: 0 0 0 2px #388bff; outline: none; }
.bp-g-open:hover { color: var(--accent); text-decoration: underline; }

/* projeto → tarefa na área */
.pp-area-link { margin-left: 4px; font-size: 13px; text-decoration: none; vertical-align: middle; }
.pp-area-link:hover { filter: brightness(.8); }
.pp-d-area-task { gap: 6px; }
.pp-area-task-link { display: inline-block; padding: 6px 10px; border-radius: 8px; background: var(--accent3); color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; word-break: break-word; }
.pp-area-task-link:hover { background: var(--accent); color: #fff; }
.pp-area-task-empty { font-size: 12px; color: var(--text3); line-height: 1.4; }

/* ── Projeto: iniciar, linha de base e nova previsão ─────────────────────── */
.pp-kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pp-start-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 4px 0 2px; }
.pp-start-actions form { margin: 0; }
.pp-start-btn { background: #1f845a; border-color: #1f845a; }
.pp-start-btn:hover { background: #216e4e; border-color: #216e4e; }
.pp-started { font-size: 12px; font-weight: 600; color: #1f845a; }
.pp-frozen { font-size: 10px; font-weight: 600; color: var(--text3); margin-left: 4px; }
.pp-forecast.late strong { color: #c9372c; }
.pp-forecast.early strong { color: #1f845a; }
.pp-excluded td { opacity: .55; }
.pp-excluded .bp-name-btn { text-decoration: line-through; }
.bp-status-nao_considerar, .bp-status-select.bp-status-nao_considerar { background-color: #f1f2f4; color: #8590a2; text-decoration: line-through; }
.bp-gbar-nao_considerar { background: #c1c7d0 !important; opacity: .6; }
.pp-new-badge { margin-left: 4px; padding: 0 6px; border-radius: 8px; background: #e9f2ff; color: #0c66e4; font-size: 10px; font-weight: 700; text-transform: uppercase; vertical-align: middle; }
.pp-sub { opacity: 0; margin-left: 2px; vertical-align: middle; }
.bp-row:hover .pp-sub { opacity: .8; }
@media (max-width: 1100px) { .pp-kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── Projeto: Kanban ─────────────────────────────────────────────────────── */
.pk-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 12px; }
.pk-toolbar-label { font-size: 13px; font-weight: 600; color: var(--text2); }
.pk-hint { font-size: 12px; color: var(--text3); }
.pk-board { display: flex; gap: 12px; align-items: flex-start; overflow-x: auto; padding: 14px; border-radius: 14px;
  background: linear-gradient(135deg, #5e60ce 0%, #4f7cdb 55%, #3fa1d8 100%); min-height: 420px; }
.pk-col { flex: 0 0 290px; display: flex; flex-direction: column; max-height: calc(100vh - 300px);
  background: #f1f2f4; border-radius: 12px; box-shadow: 0 1px 1px rgba(9,30,66,.25); }
.pk-col.drop-target { background: #e4e6ea; box-shadow: 0 0 0 2px #fff; }
.pk-col-head { display: flex; align-items: center; gap: 8px; padding: 12px 14px 8px; border-top: 3px solid var(--kind, transparent); border-radius: 12px 12px 0 0; }
.pk-col[data-kind="nao_iniciado"] { --kind: #8590a2; }
.pk-col[data-kind="em_andamento"] { --kind: #5e60ce; }
.pk-col[data-kind="concluido"] { --kind: #22a06b; }
.pk-col[data-kind="cancelado"] { --kind: #c9372c; }
.pk-col[data-kind="nao_considerar"] { --kind: #c1c7d0; }
.pk-col-name { font-size: 14px; font-weight: 600; color: #172b4d; line-height: 1.3; }
.pk-cards { display: flex; flex-direction: column; gap: 8px; padding: 2px 8px 10px; overflow-y: auto; min-height: 40px; }
.pk-card { background: #fff; border-radius: 8px; padding: 8px 12px 10px; cursor: pointer;
  box-shadow: 0 1px 1px rgba(9,30,66,.25), 0 0 1px rgba(9,30,66,.31); }
.pk-draggable .pk-card { cursor: grab; }
.pk-card:hover, .pk-card:focus-visible { box-shadow: 0 0 0 2px #388bff; outline: none; }
.pk-card.dragging { opacity: .6; transform: rotate(3deg); }
.pk-path { font: 11px var(--mono); color: #8590a2; margin-bottom: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pk-title { font-size: 14px; color: #172b4d; line-height: 1.35; word-break: break-word; }
.pk-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-top: 6px; }
.pk-area { font-size: 11px; font-weight: 600; color: #44546f; background: #dcdfe4; border-radius: 4px; padding: 0 6px; }
.pk-empty { margin: 4px 6px; font-size: 12px; color: #8590a2; font-style: italic; }
.pk-groups { padding: 2px; }

/* ── Configurações (engrenagem no rodapé da barra lateral) ───────────────── */
.sidebar-footer-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-gear { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 8px;
  color: #8e99b8 !important; transition: background .12s, color .12s, transform .2s; }
.sidebar-gear:hover, .sidebar-gear.active { background: rgba(255,255,255,.1); color: #fff !important; }
.sidebar-gear:hover svg { transform: rotate(45deg); transition: transform .3s; }
.st-wrap { max-width: 760px; margin: 24px auto; }
.st-title { margin: 0 0 4px; font-size: 24px; font-weight: 700; color: var(--text); }
.st-sub { margin: 0 0 20px; color: var(--text3); font-size: 14px; }
.st-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.st-card { display: flex; align-items: center; gap: 14px; padding: 18px; background: var(--surface); border: 1px solid var(--border2);
  border-radius: 14px; text-decoration: none; box-shadow: 0 1px 2px rgba(15,23,42,.05); transition: border-color .12s, box-shadow .12s, transform .12s; }
.st-card:hover { border-color: var(--accent); box-shadow: 0 4px 14px rgba(94,96,206,.15); transform: translateY(-1px); text-decoration: none; }
.st-ico { flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center; width: 46px; height: 46px; border-radius: 12px;
  color: var(--c); background: color-mix(in srgb, var(--c) 12%, white); }
.st-text { display: flex; flex-direction: column; gap: 3px; flex: 1; min-width: 0; }
.st-text strong { font-size: 16px; color: var(--text); }
.st-text small { font-size: 12px; color: var(--text3); }
.st-arrow { color: var(--text3); font-size: 18px; }
.st-card:hover .st-arrow { color: var(--accent); }

/* dependências em uma linha só: 2 etiquetas + "+N" (evita linha mais alta) */
.bp-deps-btn { flex-wrap: nowrap; overflow: hidden; white-space: nowrap; }
.bp-dep-more { font: 700 11px var(--sans); color: #44546f; background: #dcdfe4; border-radius: 10px; padding: 1px 7px; white-space: nowrap; }

/* barra lateral: seções Projetos/Áreas recolhíveis */
.sidebar-collapse { display: inline-flex; align-items: center; gap: 6px; padding: 2px 4px 2px 0; border: none; background: none;
  font: inherit; color: inherit; cursor: pointer; border-radius: 6px; }
.sidebar-collapse:hover { color: #fff; }
.sidebar-collapse:focus-visible { outline: 2px solid #8f91f0; outline-offset: 2px; }
.sidebar-collapse svg { transition: transform .15s; }
.sidebar-collapse.collapsed svg { transform: rotate(-90deg); }
.sidebar-section-body[hidden] { display: none; }

/* rodapé de identificação */
.brand-footer { margin-top: 12px; padding-top: 10px; border-top: 1px solid rgba(255,255,255,.08); font-size: 10px; line-height: 1.4; color: #7d88a6; }
.brand-footer-login { position: fixed; left: 0; right: 0; bottom: 14px; margin: 0; padding: 0; border: none; text-align: center; color: var(--text3); font-size: 11px; }
.portal-brand span { color: var(--accent); }

/* Configurações: abas e Gerenciar plano */
.st-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border2); margin: 8px 0 18px; }
.st-tab { padding: 9px 14px; font-size: 14px; font-weight: 600; color: var(--text3); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.st-tab:hover { color: var(--text); text-decoration: none; }
.st-tab.active { color: var(--accent); border-bottom-color: var(--accent); }
.st-demo { background: #fff8e6; border: 1px solid #f5d98b; color: #6b4e00; border-radius: 10px; padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.st-panel { background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; }
.st-panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.st-panel-head h2 { margin: 0; font-size: 16px; font-weight: 700; color: var(--text); }
.st-status { font-size: 12px; font-weight: 700; color: #1f7a3d; background: #e3f5e9; border-radius: 999px; padding: 3px 10px; }
.st-plan, .st-card-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.st-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); }
.st-plan-name { font-size: 22px; font-weight: 800; color: var(--text); margin: 2px 0; }
.st-plan-price { font-size: 16px; font-weight: 700; color: var(--accent); }
.st-plan-price small { font-weight: 500; color: var(--text3); }
.st-price-old { font-size: 13px; font-weight: 500; color: var(--text3); margin-right: 4px; }
.st-promo { display: inline-block; margin-top: 4px; font-size: 11px; font-weight: 600; color: #1a7f37; background: #e6f6ea; border-radius: 999px; padding: 2px 8px; }
.st-card-row.st-disabled { opacity: .45; filter: grayscale(1); pointer-events: none; user-select: none; }
.st-facts { display: flex; gap: 24px; margin: 0; flex-wrap: wrap; }
.st-facts dt { font-size: 11px; color: var(--text3); }
.st-facts dd { margin: 2px 0 0; font-size: 14px; font-weight: 600; color: var(--text); }
.st-features { margin: 14px 0 0; padding: 0; list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 6px; }
.st-features li { font-size: 13px; color: var(--text2, var(--text)); }
.st-features li::before { content: "✓"; color: #1f7a3d; font-weight: 700; margin-right: 6px; }
.st-actions { display: flex; gap: 8px; margin-top: 16px; }
.st-cc { width: 260px; height: 150px; border-radius: 14px; padding: 16px 18px; color: #fff; display: flex; flex-direction: column; justify-content: space-between;
  background: linear-gradient(135deg, #3b3fb5, #6a4ce2 60%, #8f6cf0); box-shadow: 0 8px 20px rgba(80,60,200,.25); }
.st-cc-brand { font-weight: 800; font-style: italic; font-size: 18px; align-self: flex-end; }
.st-cc-num { font-family: var(--mono, monospace); font-size: 16px; letter-spacing: .08em; }
.st-cc-foot { display: flex; justify-content: space-between; font-size: 11px; opacity: .9; text-transform: uppercase; }
.st-hint { font-size: 12px; color: var(--text3); margin: 12px 0 0; }
.st-storage-top { display: flex; justify-content: space-between; align-items: baseline; font-size: 14px; color: var(--text); margin-bottom: 8px; }
.st-storage-pct { font-weight: 700; }
.st-bar { height: 10px; border-radius: 999px; background: #e7e9f0; overflow: hidden; }
.st-bar-fill { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.st-bar-fill.st-warning { background: #d98a00; } .st-bar-fill.st-critical { background: #d1352b; }
.st-storage-pct.st-warning, .st-hint.st-warning { color: #a86a00; } .st-storage-pct.st-critical, .st-hint.st-critical { color: #c0281e; }
.st-breakdown { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 13px; }
.st-breakdown th { text-align: left; font-size: 11px; color: var(--text3); font-weight: 700; padding: 6px 0; border-bottom: 1px solid var(--border2); }
.st-breakdown td { padding: 7px 0; border-bottom: 1px solid var(--border2); color: var(--text); }
.st-breakdown th:last-child, .st-breakdown td:last-child { text-align: right; }

/* Configurações: comparação de planos */
.st-tiers { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.st-tier { position: relative; border: 1px solid var(--border2); border-radius: 12px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.st-tier.current { border: 2px solid var(--accent); background: color-mix(in srgb, var(--accent) 5%, white); }
.st-tier-name { font-size: 18px; font-weight: 800; color: var(--text); }
.st-tier .st-features { grid-template-columns: 1fr; margin: 6px 0 10px; }
.st-tier .btn { margin-top: auto; }
.st-tier-badge { position: absolute; top: -10px; right: 12px; background: var(--accent); color: #fff; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 10px; }

/* Menu de apps ao lado do logo */
.sidebar-logo { position: relative; }
.sidebar-logo-row { display: flex; align-items: center; gap: 4px; }
.apps-btn { margin-left: auto; display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; border: none;
  border-radius: 8px; background: none; color: #8e99b8; cursor: pointer; }
.apps-btn:hover, .apps-btn[aria-expanded="true"] { background: rgba(255,255,255,.1); color: #fff; }
.apps-btn:focus-visible { outline: 2px solid #8f91f0; outline-offset: 2px; }
.apps-menu { position: absolute; top: 100%; left: 8px; right: 8px; z-index: 60; margin-top: 6px; padding: 12px; background: #fff;
  border: 1px solid #dfe3ec; border-radius: 12px; box-shadow: 0 12px 30px rgba(15,23,42,.25); color: #172b4d; letter-spacing: 0; }
.apps-menu[hidden] { display: none; }
.apps-menu-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 13px; }
.apps-menu-head em { font-style: normal; font-size: 10px; color: #6b778c; }
.apps-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.apps-tile { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 6px; border-radius: 10px; text-align: center;
  background: #f4f5f7; cursor: not-allowed; opacity: .55; filter: grayscale(1); user-select: none; }
.apps-tile-ico { display: inline-flex; align-items: center; justify-content: center; width: 36px; height: 36px; border-radius: 10px;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, white); }
.apps-tile strong { font-size: 12px; color: #172b4d; }
.apps-tile small { font-size: 9px; line-height: 1.2; color: #6b778c; margin: 0; letter-spacing: 0; }

/* ícone de apps maior e em destaque */
.apps-btn { width: 38px; height: 38px; border-radius: 10px; color: #c9cbff;
  background: rgba(143,145,240,.18); border: 1px solid rgba(143,145,240,.45); transition: background .12s, transform .12s, box-shadow .12s; }
.apps-btn svg { width: 22px; height: 22px; }
.apps-btn:hover, .apps-btn[aria-expanded="true"] { background: #6a6ce8; border-color: #8f91f0; color: #fff;
  box-shadow: 0 4px 12px rgba(106,108,232,.45); transform: translateY(-1px); }

/* Configurações: Gerenciar assinaturas */
.st-app-row { display: flex; align-items: center; gap: 14px; }
.st-app-ico { width: 44px; height: 44px; flex: 0 0 auto; }
.st-app-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.st-app-text strong { font-size: 15px; color: var(--text); }
.st-app-text small { font-size: 12px; color: var(--text3); }
.st-apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; }
.st-app-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border2); border-radius: 12px; }
.st-app-card .btn { margin-top: auto; }

/* Tarefas: Minhas tarefas */
.mt-count { margin-left: 8px; font-size: 12px; font-weight: 500; color: var(--text3); }
.mt-table td { vertical-align: middle; }
.mt-title { font-weight: 600; color: var(--text); }
.mt-kind { display: inline-block; margin-left: 6px; font-size: 10px; font-weight: 700; color: var(--text3); background: #eef0f4; border-radius: 4px; padding: 1px 6px; }
.mt-prio { color: #d98a00; }
.mt-status { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; background: #eef0f4; color: #44546f; }
.mt-st-andamento { background: #e4ecfd; color: #1d4fb8; }
.mt-st-bloqueado { background: #fde8e7; color: #b42318; }
.mt-st-aprovacao { background: #fff3d6; color: #8a5a00; }
.mt-st-concluido { background: #e3f5e9; color: #1f7a3d; }
.mt-st-cancelado { background: #eef0f4; color: #6b778c; text-decoration: line-through; }
.mt-late { font-size: 11px; font-weight: 700; color: #c0281e; }
.mt-muted { color: var(--text3); }
.mt-closed td { opacity: .6; }

/* Dashboard: projetos em andamento */
.pip { margin-bottom: 20px; }
.pip-count { margin-left: 6px; font-size: 12px; font-weight: 700; color: var(--text3); background: #eef0f4; border-radius: 999px; padding: 1px 8px; }
.pip-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.pip-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border2); border-left: 4px solid #1f9d55;
  border-radius: 12px; background: var(--surface); text-decoration: none; color: var(--text); transition: box-shadow .12s, transform .12s; }
.pip-card:hover { box-shadow: 0 6px 16px rgba(15,23,42,.10); transform: translateY(-1px); text-decoration: none; }
.pip-card.pip-warn { border-left-color: #d98a00; } .pip-card.pip-late { border-left-color: #d1352b; }
.pip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.pip-name { display: flex; flex-direction: column; min-width: 0; }
.pip-name strong { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pip-name small { font-size: 12px; color: var(--text3); }
.pip-chip { flex: 0 0 auto; font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.pip-chip.ok { background: #e3f5e9; color: #1f7a3d; } .pip-chip.warn { background: #fff3d6; color: #8a5a00; } .pip-chip.late { background: #fde8e7; color: #b42318; }
.pip-progress { display: flex; align-items: center; gap: 10px; }
.pip-bar { flex: 1; height: 8px; border-radius: 999px; background: #e7e9f0; overflow: hidden; }
.pip-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.pip-pct { font-weight: 800; font-size: 14px; min-width: 38px; text-align: right; }
.pip-sub { font-size: 12px; color: var(--text3); margin-top: -6px; }
.pip-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; }
.pip-facts dt { font-size: 10px; text-transform: uppercase; letter-spacing: .03em; color: var(--text3); }
.pip-facts dd { margin: 2px 0 0; font-size: 13px; font-weight: 600; }
.pip-facts dd span { display: block; font-size: 11px; }
.pip-red { color: #c0281e; } .pip-green { color: #1f7a3d; }
.pip-foot { display: flex; flex-direction: column; gap: 3px; font-size: 12px; padding-top: 8px; border-top: 1px solid var(--border2); }
.pip-label { font-size: 10px; font-weight: 700; text-transform: uppercase; color: var(--text3); margin-right: 4px; }
.pip-empty-hint { font-size: 12px; color: var(--text3); margin-top: 4px; }

/* Formulários das áreas */
.area-forms-btn { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; }
.af-wrap { max-width: 900px; margin: 0 auto; }
.af-back { display: inline-block; margin-bottom: 10px; font-size: 13px; color: var(--text3); }
.af-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.af-title { margin: 0; font-size: 22px; } .af-sub { margin: 4px 0 0; color: var(--text3); font-size: 13px; max-width: 520px; }
.af-new { display: flex; gap: 8px; } .af-new .form-input { width: 240px; }
.af-list { display: flex; flex-direction: column; gap: 8px; }
.af-item { display: flex; align-items: center; gap: 12px; padding: 14px 16px; background: var(--surface); border: 1px solid var(--border2); border-radius: 12px; }
.af-item-main { flex: 1; min-width: 0; } .af-item-title { font-weight: 700; font-size: 15px; color: var(--text); }
.af-item-meta { font-size: 12px; color: var(--text3); margin-top: 2px; }
.af-chip { font-size: 11px; font-weight: 700; border-radius: 999px; padding: 2px 9px; }
.af-chip.on { background: #e3f5e9; color: #1f7a3d; } .af-chip.off { background: #eef0f4; color: #6b778c; }
.af-del { color: #c0281e; }
.af-empty { text-align: center; padding: 28px; } .af-empty-title { font-weight: 700; margin-bottom: 6px; } .af-empty p { color: var(--text3); font-size: 13px; margin: 0; }
.af-panel { background: var(--surface); border: 1px solid var(--border2); border-radius: 14px; padding: 18px 20px; margin-bottom: 16px; display: flex; flex-direction: column; gap: 8px; }
.af-panel-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.af-panel-head h2 { margin: 0; font-size: 16px; } .af-hint { font-size: 12px; color: var(--text3); }
.af-big { font-size: 16px; font-weight: 600; }
.af-switch { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-top: 4px; }
.af-fields { display: flex; flex-direction: column; gap: 8px; }
.af-field { display: flex; gap: 10px; align-items: flex-start; padding: 10px; border: 1px solid var(--border2); border-radius: 10px; background: #fafbfc; }
.af-field-grip { color: var(--text3); padding-top: 8px; user-select: none; }
.af-field-body { flex: 1; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.af-field-line { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.af-field-label { flex: 1; min-width: 200px; } .af-field-kind { width: 160px; }
.af-req { display: flex; align-items: center; gap: 4px; font-size: 12px; white-space: nowrap; }
.af-field-tools { display: flex; gap: 2px; }
.af-tool { width: 28px; height: 28px; border: none; background: none; border-radius: 6px; cursor: pointer; color: var(--text3); }
.af-tool:hover { background: #eef0f4; color: var(--text); } .af-tool.danger:hover { background: #fde8e7; color: #c0281e; }
.af-add { align-self: flex-start; }
.af-actions { display: flex; justify-content: flex-end; gap: 8px; }
.tk-area { display: inline-block; font-size: 11px; font-weight: 700; color: #1d4fb8; background: #e4ecfd; border-radius: 4px; padding: 1px 6px; text-decoration: none; }
.tk-area-line { font-size: 13px; color: var(--text3); margin-bottom: 8px; }
/* portal */
.pf-intro { color: var(--text3); font-size: 14px; }
.pf-group { margin-top: 18px; } .pf-area { font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--text3); margin: 0 0 8px; }
.pf-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.pf-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); transition: box-shadow .12s; }
.pf-card:hover { box-shadow: 0 6px 16px rgba(15,23,42,.10); text-decoration: none; }
.pf-card span { font-size: 13px; color: var(--text3); } .pf-card em { font-style: normal; font-size: 13px; color: var(--accent); font-weight: 600; margin-top: auto; }
.pf-area-tag { display: inline-block; font-size: 11px; font-weight: 700; color: #1d4fb8; background: #e4ecfd; border-radius: 4px; padding: 2px 8px; margin-bottom: 8px; }
.pf-desc { white-space: pre-line; color: var(--text2, var(--text)); }
.pf-errors { background: #fde8e7; border: 1px solid #f4b4ae; color: #8a1c13; border-radius: 10px; padding: 10px 14px; margin-bottom: 14px; font-size: 13px; }
.pf-errors ul { margin: 6px 0 0; padding-left: 18px; }

/* Modal da tarefa: anexos */
.tm-attachments { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tm-attach { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border: 1px solid var(--border2); border-radius: 8px; background: #fff; }
.tm-attach-thumb { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 6px; background: #eef0f4; color: #44546f; display: inline-flex;
  align-items: center; justify-content: center; font: 800 10px var(--sans); text-decoration: none; overflow: hidden; }
.tm-attach-thumb img { width: 100%; height: 100%; object-fit: cover; }
.tm-attach-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.tm-attach-info a { font-size: 13px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tm-attach-info small { font-size: 11px; color: var(--text3); }
.tm-attach-drop { display: flex; align-items: center; gap: 10px; padding: 12px; border: 2px dashed #c9cfdb; border-radius: 10px; cursor: pointer;
  color: var(--text3); transition: border-color .12s, background .12s; }
.tm-attach-drop:hover, .tm-attach-drop.over, .tm-attach-drop:focus-within { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 6%, white); color: var(--text); }
.tm-attach-drop.busy { opacity: .6; pointer-events: none; }
.tm-attach-drop span { display: flex; flex-direction: column; font-size: 13px; }
.tm-attach-drop strong { color: var(--accent); }
.tm-attach-drop small { font-size: 11px; color: var(--text3); }

/* Formulário público (/f/<token>) e link no editor */
.pub-body { background: #f4f5f9; min-height: 100vh; }
.pub-wrap { max-width: 680px; margin: 0 auto; padding: 32px 16px; }
.pub-card { background: #fff; border: 1px solid #e3e6ee; border-radius: 16px; padding: 24px; box-shadow: 0 4px 18px rgba(15,23,42,.06); }
.pub-title { font-size: 22px; margin: 4px 0 8px; color: #172b4d; }
.pub-hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.pub-sent { text-align: center; }
.pub-sent-ico { width: 56px; height: 56px; margin: 0 auto 8px; border-radius: 50%; background: #e3f5e9; color: #1f7a3d;
  display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 800; }
.pub-sent p { color: #44546f; }
.pub-foot { text-align: center; font-size: 11px; color: #8a94a8; margin-top: 18px; }
.af-link { display: flex; gap: 6px; align-items: center; }
.af-link-input { flex: 1; font-family: var(--mono, monospace); font-size: 12px; background: #f7f8fa; }
.af-link.compact { margin-top: 8px; } .af-link.compact .btn { padding: 4px 10px; font-size: 12px; }
.af-newlink { align-self: flex-start; font-size: 12px; }

/* anexos: o input de arquivo cobre a área tracejada (invisível). Fora dela, o foco rolava o modal inteiro. */
.tm-attach-drop { position: relative; }
.tm-attach-input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; font-size: 0; }

/* menu de apps: app atual (CLM) ativo */
.apps-tile.active { position: relative; opacity: 1; filter: none; cursor: pointer; background: color-mix(in srgb, #5e60ce 10%, white);
  outline: 2px solid #5e60ce; outline-offset: -2px; text-decoration: none; }
.apps-tile.active:hover { background: color-mix(in srgb, #5e60ce 16%, white); }
.apps-tile-badge { position: absolute; top: 4px; right: 4px; font-style: normal; font-size: 8px; font-weight: 800; text-transform: uppercase;
  color: #fff; background: #1f9d55; border-radius: 999px; padding: 1px 5px; }

/* menu de apps: mais largo, flutuando sobre a página (a barra lateral corta o que passa dela) */
.apps-menu { position: fixed; top: 0; left: 0; right: auto; width: min(420px, calc(100vw - 24px)); margin-top: 0; padding: 16px;
  font: 400 13px var(--sans); text-transform: none; letter-spacing: 0; z-index: 1000; }
.apps-menu-head { display: flex; flex-direction: column; align-items: flex-start; gap: 2px; margin-bottom: 12px; }
.apps-menu-head strong { font-size: 15px; font-weight: 700; color: #172b4d; line-height: 1.2; }
.apps-menu-head span { font-size: 12px; font-weight: 400; color: #6b778c; line-height: 1.3; }
.apps-grid { grid-template-columns: repeat(4, 1fr); gap: 10px; }
.apps-tile { padding: 12px 6px; }
.apps-tile strong { font-size: 12px; line-height: 1.2; }
.apps-tile small { font-size: 10px; }
@media (max-width: 480px) { .apps-grid { grid-template-columns: repeat(2, 1fr); } }

/* ── Área: Tabela (visual novo, grupos recolhíveis) ─────────────────────── */
.at-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 10px; }
.at-toolbar-info { font-size: 12px; color: var(--text3); }
.at-toolbar-actions { display: flex; gap: 6px; }
.at-tool { display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px; border: 1px solid var(--border2); border-radius: 8px;
  background: var(--surface); font: 600 12px var(--sans); color: var(--text2, var(--text)); cursor: pointer; }
.at-tool:hover { border-color: var(--accent); color: var(--accent); }
.area-table-wrap { border-radius: 14px; border: 1px solid var(--border2); box-shadow: 0 1px 3px rgba(15,23,42,.06); max-height: calc(100vh - 230px); overflow: auto; }
.area-table { border-collapse: separate; border-spacing: 0; }
.area-table thead th { position: sticky; top: 0; z-index: 2; background: #f7f8fb; padding: 11px 14px; font-size: 11px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .04em; color: #6b778c; border-bottom: 1px solid var(--border2); }
.area-table .at-th-title { min-width: 260px; }
.area-table td { padding: 11px 14px; border-bottom: 1px solid #eef0f4; }
.at-group td { padding: 0; background: #fbfbfd; box-shadow: inset 4px 0 0 var(--kind); border-bottom: 1px solid var(--border2); }
.at-tbody + .at-tbody .at-group td { border-top: 8px solid var(--surface); }
.at-group-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 14px 8px 12px; }
.at-collapse { display: inline-flex; align-items: center; gap: 8px; border: none; background: none; padding: 4px 6px; border-radius: 8px;
  font: 700 13px var(--sans); color: var(--text); cursor: pointer; }
.at-collapse:hover { background: #eef0f6; }
.at-collapse:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
.at-chev { color: var(--text3); transition: transform .15s; }
.at-tbody.collapsed .at-chev { transform: rotate(-90deg); }
.at-count { min-width: 22px; padding: 1px 8px; border-radius: 999px; background: #e9ebf2; font-size: 11px; font-weight: 700; color: #44546f; text-align: center; }
.at-tbody.collapsed tr:not(.at-group) { display: none; }
.at-tbody.collapsed .at-group td { border-bottom-color: transparent; }
.at-add { float: none; display: inline-flex; align-items: center; gap: 4px; padding: 4px 9px; border-radius: 7px; font-weight: 600; }
.area-table tr.at-row td { transition: background .1s; }
.area-table tr.at-row:hover td { background: #f5f6fb; }
.area-table tr.at-row { cursor: pointer; }
.at-title-wrap { display: flex; align-items: center; gap: 6px; }
.at-title-text { font-weight: 600; color: var(--text); }
.at-meta { display: flex; gap: 10px; margin-top: 4px; }
.at-meta-item { display: inline-flex; align-items: center; gap: 3px; font-size: 11px; font-weight: 600; color: #6b778c; }
.at-meta-item.done { color: #1f7a3d; }
.at-client { display: inline-block; max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; }
.at-date { white-space: nowrap; color: #44546f; font-variant-numeric: tabular-nums; }
.at-muted { color: #b3bac5; }
.at-empty td { padding: 14px; text-align: center; font-style: normal; font-size: 12px; color: var(--text3); }

/* ── Área: Tabela — visual enxuto (v2) ───────────────────────────────────── */
.at-toolbar { margin-bottom: 12px; }
.at-toolbar-info { font-size: 13px; color: var(--text3); } .at-toolbar-info strong { color: var(--text); }
.at-tool { padding: 6px 12px; font-weight: 500; color: var(--text3); border-color: transparent; background: transparent; }
.at-tool:hover { background: var(--surface); border-color: var(--border2); color: var(--text); }
.area-table-wrap { background: var(--surface); border: 1px solid #e6e8ef; border-radius: 14px; box-shadow: none; overflow: auto; max-height: calc(100vh - 220px); }
.area-table { width: 100%; font-size: 13px; }
.area-table thead th { background: var(--surface); font-size: 11px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #8a94a6;
  padding: 12px 16px; border-bottom: 1px solid #eceef3; }
.area-table .at-th-title { width: 46%; min-width: 280px; }
.area-table td { padding: 12px 16px; border-bottom: 1px solid #f1f2f6; vertical-align: middle; }
/* cabeçalho de grupo: leve, sem fundo pesado */
.at-group td { padding: 0; background: var(--surface); box-shadow: none; border-bottom: 1px solid #f1f2f6; }
.at-tbody + .at-tbody .at-group td { border-top: none; }
.at-group-bar { padding: 14px 12px 8px 10px; }
.at-collapse { gap: 8px; font-size: 13px; font-weight: 700; }
.at-collapse .kb-col-dot { width: 9px; height: 9px; }
.at-count { background: transparent; padding: 0; min-width: 0; font-weight: 600; color: #8a94a6; }
.at-group-late { font-size: 11px; font-weight: 600; color: #c0281e; background: #fdecea; border-radius: 999px; padding: 1px 8px; }
.at-group-empty { font-size: 12px; font-weight: 400; color: #a3abba; }
.at-add { width: 28px; height: 28px; padding: 0; justify-content: center; border-radius: 8px; color: #8a94a6; opacity: 0; transition: opacity .12s; }
.at-group:hover .at-add, .at-add:focus-visible, .at-tbody:has(tr:not(.at-group)) .at-group .at-add:hover { opacity: 1; }
.at-add:hover { background: var(--accent3); color: var(--accent); }
@media (hover: none) { .at-add { opacity: 1; } }
/* linhas */
.area-table tr.at-row td:first-child { padding-left: 34px; }
.area-table tr.at-row.prioritized td { background: transparent; }
.area-table tr.at-row:hover td { background: #f8f9fc; }
.area-table tr.at-row.is-closed .at-title-text { color: #8a94a6; }
.at-title-text { font-weight: 500; font-size: 14px; color: #172b4d; }
.at-flag { color: #e5484d; }
.at-sub { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 3px; font-size: 12px; color: #8a94a6; }
.at-sub span { display: inline-flex; align-items: center; gap: 3px; }
.at-origin { font-weight: 600; color: #6a4ce2; }
.at-due { display: block; font-weight: 600; color: #44546f; white-space: nowrap; }
.at-due.late { color: #d1352b; } .at-due.soon { color: #c26a00; } .at-due.near { color: #44546f; } .at-due.done { color: #1f7a3d; font-weight: 500; }
.at-due-date { display: block; font-size: 11px; color: #a3abba; margin-top: 1px; font-variant-numeric: tabular-nums; }
.at-prio { display: inline-flex; align-items: center; gap: 7px; font-weight: 500; color: #44546f; white-space: nowrap; }
.at-prio i { width: 8px; height: 8px; border-radius: 50%; background: #a3abba; }
.at-prio-critical i { background: #e5484d; box-shadow: 0 0 0 3px #fdecea; } .at-prio-critical { color: #c0281e; font-weight: 600; }
.at-prio-high i { background: #f08c00; } .at-prio-medium i { background: #3b82f6; } .at-prio-low i { background: #a3abba; }
.at-progress { display: flex; align-items: center; gap: 8px; min-width: 110px; }
.at-progress-bar { flex: 1; height: 6px; border-radius: 999px; background: #eceef3; overflow: hidden; }
.at-progress-bar span { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.at-progress-bar span.full { background: #1f9d55; }
.at-progress-num { font-size: 11px; font-weight: 600; color: #8a94a6; font-variant-numeric: tabular-nums; }
.at-muted { color: #b8bfcc; font-size: 12px; }
.area-table .at-th-title { width: 40%; }
.area-table th:last-child, .area-table td:last-child { width: 150px; padding-right: 20px; }
.at-progress { min-width: 0; }
.at-progress-bar { min-width: 60px; }

/* formulários: desabilitar link */
.af-link-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.af-disable-link { color: #c0281e; font-size: 12px; }
.af-disable-link:hover { border-color: #c0281e; background: #fdecea; }
.af-link-off { font-size: 13px; color: #8a5a00; background: #fff8e6; border: 1px solid #f5d98b; border-radius: 10px; padding: 10px 12px; }
.af-link-off-tag { color: #a86a00; margin-top: 6px; }

/* Área: Walk | Sprint */
.area-head-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.area-head-title .mode-tabs { margin-left: 4px; flex-shrink: 0; }

/* Área: filtro das tarefas (Walk e Sprint) */
.flt { position: relative; }
.flt-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border: none; border-radius: 10px;
  background: var(--surface2); color: var(--text2); font: 500 13px var(--sans); cursor: pointer; }
.flt-btn:hover { color: var(--text); }
.flt-btn.on { background: var(--surface); color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent) inset; }
.flt-count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--accent); color: #fff;
  font-size: 11px; font-weight: 700; line-height: 18px; text-align: center; }
.flt-count[hidden] { display: none; }
.flt-panel { position: fixed; top: 0; left: 0; z-index: 60; width: 320px; max-width: calc(100vw - 24px);
  display: flex; flex-direction: column; gap: 12px; padding: 14px; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; box-shadow: 0 12px 32px rgba(15,23,42,.16); }
.flt-panel[hidden] { display: none; }
.flt-head { display: flex; align-items: center; justify-content: space-between; font-size: 14px; color: var(--text); }
.flt-clear { border: none; background: none; padding: 2px 4px; color: var(--accent); font: 600 12px var(--sans); cursor: pointer; }
.flt-clear:hover { text-decoration: underline; }
.flt-field { display: flex; flex-direction: column; gap: 6px; margin: 0; padding: 0; border: none; min-width: 0; }
.flt-label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--text3); padding: 0; }
.flt-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.flt-chip { position: relative; cursor: pointer; }
.flt-chip input { position: absolute; opacity: 0; pointer-events: none; }
.flt-chip span { display: inline-block; padding: 5px 10px; border: 1px solid var(--border); border-radius: 999px; font-size: 12px; color: var(--text2); background: var(--surface); }
.flt-chip input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, white); color: var(--accent); font-weight: 600; }
.flt-chip input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.flt-result { margin: 0; font-size: 12px; color: var(--text3); min-height: 1em; }
.flt-banner { display: flex; align-items: center; gap: 10px; margin: 0 0 12px; padding: 8px 12px; border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 8%, white); color: var(--text); font-size: 13px; }
.flt-banner[hidden] { display: none; }
.kb-card[hidden], .gantt-row[hidden], .at-row[hidden], .gantt-undated-item[hidden] { display: none !important; }
.flt-panel { max-height: min(640px, calc(100vh - 160px)); overflow-y: auto; overscroll-behavior: contain; width: 360px; }
.flt-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.flt-checks { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--text2); }
.flt-check { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.flt-check input { accent-color: var(--accent); width: 15px; height: 15px; }

/* Tarefa atrasada (Walk e Sprint): Kanban, Tabela e Gantt */
.kb-card.is-late { box-shadow: inset 3px 0 0 #d93025, 0 1px 2px rgba(15,23,42,.06); }
.kb-label-late { display: inline-flex; align-items: center; gap: 4px; background: #fdecea; color: #b3261e; font-weight: 700; }
.at-row.is-late > td:first-child { box-shadow: inset 3px 0 0 #d93025; }
.gantt-bar.is-late { outline: 2px solid #d93025; outline-offset: 1px; }
.gantt-late { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; width: 16px; height: 16px; margin-right: 4px;
  border-radius: 50%; background: #d93025; color: #fff; font-size: 11px; font-weight: 800; }
.gantt-late-tag { margin-left: 6px; padding: 1px 6px; border-radius: 6px; background: #fdecea; color: #b3261e; font-size: 11px; font-weight: 700; white-space: nowrap; }

/* Configurações › Licenças de usuário */
.st-tier-license { margin: 4px 0 12px; font-size: 13px; color: var(--text2); }
.st-tier-license small { color: var(--text3); }
.st-lic { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 24px; margin-top: 14px; }
.st-lic-field, .st-lic-total { display: flex; flex-direction: column; gap: 6px; }
.st-lic-stepper { display: inline-flex; align-items: center; gap: 6px; }
.st-lic-stepper .form-input { width: 72px; text-align: center; }
.st-lic-step { width: 34px; height: 34px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface);
  font: 600 16px var(--sans); color: var(--text); cursor: pointer; }
.st-lic-step:hover { border-color: var(--accent); color: var(--accent); }
.st-lic-total strong { font-size: 22px; color: var(--text); }
.st-lic-limit { color: var(--text3); }
.st-lic-amount { white-space: nowrap; }

/* Projeto: atrasos (borda à esquerda) e coluna Término */
.pp-grid tr.pp-late > td:first-child { box-shadow: inset 4px 0 0 #c9372c; }
.pp-grid tr.pp-late-done > td:first-child { box-shadow: inset 4px 0 0 #e2a03f; }
.pp-grid tr.pp-late .bp-num-btn { color: #c9372c; }
.pp-done-cell { white-space: nowrap; }
.pp-late-tag { display: inline-block; margin-left: 6px; padding: 1px 6px; border-radius: 999px; font-size: 11px; font-weight: 600;
  background: #fde8e6; color: #ae2e24; }
.pp-late-tag.done { background: #fdf0d8; color: #8a5a00; }

/* Projeto finalizado */
.pp-finished-banner { margin: 0 0 14px; padding: 10px 14px; border-radius: 10px; background: #e3fcef; color: #164b35;
  border: 1px solid #baf3db; font-size: 14px; }

/* Menu ⋯ aberto fica por cima do que vem depois (linhas da barra lateral, cards do cabeçalho) */
.area-menu.open { z-index: 60; }
.sidebar-area-row:has(.area-menu.open), .area-head:has(.area-menu.open), .area-head-title:has(.area-menu.open) { position: relative; z-index: 40; }
.area-menu-list { isolation: isolate; }

/* Nomes da barra lateral: até 2 linhas, cortadas com reticências; ícone não encolhe */
.sidebar-area-row .sidebar-area-ico { flex-shrink: 0; }
.sidebar-area-row .sidebar-area-name { flex: 1; min-width: 0; overflow: hidden; }

/* ── Login: tela dividida (formulário à esquerda, painel ilustrado à direita) ── */
.lg-body { margin: 0; background: var(--surface); }
.lg-split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); min-height: 100vh; }
.lg-form-side { display: flex; flex-direction: column; padding: 32px 48px 20px; }
.lg-logo { font: 700 22px var(--sans); color: var(--text); }
.lg-logo span { color: var(--accent); margin-left: .22em; }
.lg-form-wrap { flex: 1; width: 100%; max-width: 400px; margin: 0 auto; display: flex; flex-direction: column; justify-content: center; }
.lg-title { margin: 0 0 8px; font: 700 34px/1.15 var(--sans); color: var(--text); letter-spacing: -.01em; }
.lg-sub { margin: 0 0 30px; font-size: 16px; color: var(--text3); }
.lg-form { display: flex; flex-direction: column; gap: 18px; }
.lg-field { display: flex; flex-direction: column; gap: 6px; }
.lg-label { font-size: 14px; font-weight: 600; color: var(--text2); }
.lg-input { width: 100%; box-sizing: border-box; height: 46px; padding: 0 14px; border: 1px solid var(--border); border-radius: 8px;
  font: 400 15px var(--sans); color: var(--text); background: var(--surface); transition: border-color .12s, box-shadow .12s; }
.lg-input::placeholder { color: var(--text4); }
.lg-input:hover { border-color: var(--border2); }
.lg-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent3); }
.lg-pass { position: relative; display: block; }
.lg-pass .lg-input { padding-right: 46px; }
.lg-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: none;
  border-radius: 6px; background: none; color: var(--text3); cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.lg-eye:hover, .lg-eye[aria-pressed="true"] { color: var(--accent); background: var(--accent3); }
.lg-submit { -webkit-appearance: none; appearance: none; margin-top: 6px; height: 48px; border: none; border-radius: 8px; background: var(--accent); color: #fff;
  font: 600 16px var(--sans); cursor: pointer; transition: background .12s, transform .06s; }
.lg-submit:hover { background: #4e50b8; }
.lg-submit:active { transform: translateY(1px); }
.lg-submit:focus-visible { outline: 3px solid var(--accent2); outline-offset: 2px; }
.lg-small { margin: 22px 0 0; font-size: 13px; color: var(--text3); text-align: center; }
.lg-footer { position: static; margin-top: 24px; text-align: center; color: var(--text4); }

.lg-art-side { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; padding: 48px;
  background: radial-gradient(circle at 85% 10%, rgba(94,96,206,.55), transparent 45%),
              radial-gradient(circle at 10% 95%, rgba(37,125,224,.35), transparent 45%), #1b2236; }
.lg-art { width: 100%; max-width: 560px; color: #fff; }
.lg-art-title { margin: 0 0 10px; font: 700 30px/1.2 var(--sans); }
.lg-art-sub { margin: 0 0 28px; font-size: 15px; color: #b9c1d9; }
.lg-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.lg-col { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); border-radius: 12px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.lg-col-head { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: #dfe4f2; }
.lg-col-head i { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.lg-col-head b { margin-left: auto; font-weight: 600; color: #8e99b8; }
.lg-card { display: flex; flex-direction: column; gap: 4px; padding: 10px; border-radius: 9px; background: #fff; color: var(--text);
  box-shadow: 0 6px 18px rgba(0,0,0,.25); }
.lg-card strong { font-size: 12.5px; line-height: 1.3; }
.lg-card em { font-style: normal; font-size: 11px; color: var(--text3); }
.lg-card-late { box-shadow: inset 3px 0 0 #c9372c, 0 6px 18px rgba(0,0,0,.25); }
.lg-card-done strong { color: var(--text3); }
.lg-chip { align-self: flex-start; padding: 1px 7px; border-radius: 999px; font-size: 10.5px; font-weight: 600;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, #fff); }
.lg-progress { height: 5px; border-radius: 3px; background: var(--surface2); overflow: hidden; }
.lg-progress span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
.lg-gantt { margin-top: 14px; padding: 12px 14px; border-radius: 12px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1);
  display: flex; flex-direction: column; gap: 9px; }
.lg-gantt-row { display: grid; grid-template-columns: 96px 1fr; align-items: center; gap: 10px; font-size: 12px; color: #cfd5e6; }
.lg-gantt-row i { position: relative; display: block; height: 10px; border-radius: 5px; background: rgba(255,255,255,.08); }
.lg-gantt-row i::after { content: ""; position: absolute; left: var(--l); width: var(--w); top: 0; bottom: 0; border-radius: 5px; background: var(--c); }

@media (max-width: 900px) {
  .lg-split { grid-template-columns: 1fr; }
  .lg-art-side { display: none; }
  .lg-form-side { padding: 24px 20px 16px; }
  .lg-title { font-size: 28px; }
}

/* Foto de perfil */
.kb-avatar.has-photo { padding: 0; overflow: hidden; background: #fff !important; }
.kb-avatar.has-photo img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.sidebar-me { display: inline-flex; align-items: center; gap: 8px; min-width: 0; padding: 2px 6px 2px 2px; border: none; border-radius: 999px;
  background: none; color: inherit; font: inherit; cursor: pointer; text-align: left; }
.sidebar-me:hover { background: rgba(255,255,255,.08); }
.sidebar-me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-me-avatar { width: 30px; height: 30px; font-size: 11px; box-shadow: none; flex-shrink: 0; }
.mp-body { display: flex; gap: 18px; align-items: flex-start; }
.mp-avatar { width: 88px; height: 88px; font-size: 28px; box-shadow: none; flex-shrink: 0; }
.mp-hint { margin: 0 0 12px; font-size: 13px; color: var(--text3); }
.mp-form { display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.up-user { display: flex; align-items: center; gap: 12px; }
.up-photo-form, .up-remove-form { margin: 0; }
.up-photo { position: relative; display: inline-block; cursor: pointer; border-radius: 50%; }
.up-avatar { width: 38px; height: 38px; font-size: 13px; box-shadow: none; }
.up-photo-edit { position: absolute; right: -3px; bottom: -3px; width: 18px; height: 18px; border-radius: 50%; background: var(--surface);
  box-shadow: 0 0 0 1px var(--border); font-size: 10px; display: flex; align-items: center; justify-content: center; color: var(--text2); }
.up-photo:hover .up-avatar, .up-photo:focus-within .up-avatar { outline: 2px solid var(--accent); outline-offset: 2px; }
.up-remove { padding: 0; border: none; background: none; font: 12px var(--sans); color: var(--danger); cursor: pointer; }
