@import url("https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,300;0,400;0,500;0,600;0,700;0,800;1,400;1,600&display=swap");
/* ==== CONCILIO KANBAN — design system do protótipo (theme+board+modal) ==== */
/* ============================================================
   CONCILIO KANBAN — Design System
   Corporativo sóbrio + SaaS premium · compacto · light/dark
   ============================================================ */

:root {
  /* Brand */
  --brand: #c52027;
  --brand-strong: #a81a20;
  --brand-fg: #ffffff;
  --brand-tint: rgba(197, 32, 39, 0.09);
  --brand-tint-strong: rgba(197, 32, 39, 0.16);

  /* Typography */
  --font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --fs-display: 19px;
  --fs-h1: 16px;
  --fs-body: 13px;
  --fs-sm: 12px;
  --fs-xs: 11px;
  --fs-micro: 10px;
  --type-scale: 1;        /* tweakable */

  /* Radius (tweakable) */
  --radius: 10px;
  --radius-sm: 7px;
  --radius-lg: 14px;

  /* Density (tweakable) — compacto por padrão */
  --card-pad: 9px 10px;
  --col-gap: 12px;
  --card-gap: 7px;
  --col-width: 286px;

  /* Shadow (tweakable) */
  --shadow-card: 0 1px 2px rgba(16, 22, 33, 0.06), 0 1px 1px rgba(16, 22, 33, 0.04);
  --shadow-card-hover: 0 4px 14px rgba(16, 22, 33, 0.12), 0 2px 4px rgba(16, 22, 33, 0.06);
  --shadow-pop: 0 12px 40px rgba(13, 16, 22, 0.18), 0 2px 8px rgba(13, 16, 22, 0.08);
  --shadow-nav: 0 1px 0 var(--border);

  /* Priority ramp 1→5 */
  --prio-1: #98a0b0;
  --prio-2: #3b73e8;
  --prio-3: #e0962f;
  --prio-4: #ed6a2c;
  --prio-5: #c52027;

  /* Status */
  --ok: #1f9d63;
  --ok-tint: rgba(31, 157, 99, 0.12);
  --warn: #d98a16;
  --warn-tint: rgba(217, 138, 22, 0.14);
  --late: #d6353b;
  --late-tint: rgba(214, 53, 59, 0.12);

  transition: background-color 0.25s ease, color 0.25s ease;
}

/* ---------- LIGHT ---------- */
:root,
[data-theme="light"] {
  --bg: #f4f5f7;
  --bg-grad-1: #f6f7f9;
  --bg-grad-2: #eef0f3;
  --surface: #ffffff;
  --surface-2: #f7f8fa;
  --surface-3: #eef0f3;
  --border: #e5e8ed;
  --border-strong: #d2d7df;
  --text: #161a20;
  --text-2: #444b56;
  --muted: #727a87;
  --faint: #9aa2b0;
  --overlay: rgba(20, 24, 31, 0.42);
}

/* ---------- DARK ---------- */
[data-theme="dark"] {
  --brand: #e2474e;
  --brand-strong: #c52027;
  --brand-tint: rgba(226, 71, 78, 0.13);
  --brand-tint-strong: rgba(226, 71, 78, 0.22);

  --bg: #0c0e12;
  --bg-grad-1: #0e1116;
  --bg-grad-2: #0a0c10;
  --surface: #161a21;
  --surface-2: #11151b;
  --surface-3: #1d222b;
  --border: #252b34;
  --border-strong: #353c47;
  --text: #e8eaef;
  --text-2: #b6bcc7;
  --muted: #828b98;
  --faint: #5e6675;
  --overlay: rgba(4, 6, 9, 0.62);

  --shadow-card: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow-card-hover: 0 6px 20px rgba(0, 0, 0, 0.5);
  --shadow-pop: 0 16px 50px rgba(0, 0, 0, 0.6);
  --prio-1: #79828f;
}

/* ---------- Brand intensity (tweakable) ---------- */
[data-brand="discreta"] {
  --nav-bg: var(--surface);
  --nav-fg: var(--text);
  --nav-border: var(--border);
}
[data-brand="equilibrada"] {
  --nav-bg: var(--surface);
  --nav-fg: var(--text);
  --nav-border: var(--border);
}
[data-brand="forte"] {
  --nav-bg: var(--brand);
  --nav-fg: #ffffff;
  --nav-border: var(--brand-strong);
}

/* ============================================================
   Base
   ============================================================ */
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: calc(var(--fs-body) * var(--type-scale));
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(120% 80% at 50% -10%, var(--bg-grad-1), var(--bg-grad-2));
  background-attachment: fixed;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  letter-spacing: -0.006em;
}
#root { height: 100%; }

::selection { background: var(--brand-tint-strong); }

button { font-family: inherit; cursor: pointer; }

/* Scrollbars */
*::-webkit-scrollbar { height: 10px; width: 10px; }
*::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: 99px;
  border: 3px solid transparent;
  background-clip: padding-box;
}
*::-webkit-scrollbar-thumb:hover { background: var(--faint); background-clip: padding-box; }
*::-webkit-scrollbar-track { background: transparent; }

/* Utility text */
.eyebrow {
  font-size: calc(var(--fs-micro) * var(--type-scale));
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.app-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
/* ============================================================
   CONCILIO KANBAN — Components
   ============================================================ */

/* ---------- Top navbar ---------- */
.kc-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  height: 52px;
  padding: 0 16px;
  background: var(--nav-bg, var(--surface));
  color: var(--nav-fg, var(--text));
  border-bottom: 1px solid var(--nav-border, var(--border));
  flex: 0 0 auto;
  z-index: 30;
  position: relative;
}
.kc-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding-right: 6px;
}
.kc-symbol { display: inline-flex; align-items: center; flex: 0 0 auto; }
.kc-symbol .kc-sym-img { height: 100%; width: auto; display: block; }
.kc-symbol .kc-sym-dark { display: none; }
[data-theme="dark"] .kc-symbol .kc-sym-light { display: none; }
[data-theme="dark"] .kc-symbol .kc-sym-dark { display: block; }
[data-brand="forte"] .kc-symbol .kc-sym-light { display: none; }
[data-brand="forte"] .kc-symbol .kc-sym-dark { display: block; }
.kc-brand-word {
  font-weight: 800;
  font-size: calc(16px * var(--type-scale));
  letter-spacing: -0.02em;
  line-height: 1;
}
.kc-nav-links { display: flex; align-items: center; gap: 2px; }
.kc-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 11px;
  border-radius: var(--radius-sm);
  font-size: calc(var(--fs-body) * var(--type-scale));
  font-weight: 600;
  color: var(--nav-fg, var(--text-2));
  opacity: 0.72;
  text-decoration: none;
  border: none;
  background: transparent;
  position: relative;
  transition: background 0.15s, opacity 0.15s;
}
.kc-nav-link:hover { opacity: 1; background: color-mix(in srgb, currentColor 9%, transparent); }
.kc-nav-link.active { opacity: 1; }
.kc-nav-link.active::after {
  content: "";
  position: absolute;
  left: 11px; right: 11px; bottom: -11px;
  height: 2px;
  border-radius: 2px;
  background: var(--brand);
}
[data-brand="forte"] .kc-nav-link.active::after { background: #fff; }
.kc-nav-link .bi { font-size: 14px; }
.kc-nav-badge {
  position: absolute;
  top: 0px; right: 2px;
  min-width: 15px; height: 15px;
  padding: 0 4px;
  font-size: 9px;
  font-weight: 700;
  line-height: 15px;
  text-align: center;
  border-radius: 99px;
  background: var(--brand);
  color: #fff;
}
[data-brand="forte"] .kc-nav-badge { background: #fff; color: var(--brand); }
.kc-nav-spacer { flex: 1; }

.kc-icon-btn {
  width: 32px; height: 32px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: transparent;
  color: var(--nav-fg, var(--text-2));
  opacity: 0.8;
  font-size: 15px;
  transition: background 0.15s, opacity 0.15s, border-color 0.15s;
}
.kc-icon-btn:hover { opacity: 1; background: color-mix(in srgb, currentColor 10%, transparent); }

.kc-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  font-size: 10.5px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.16);
}
.kc-avatar-sm { width: 20px; height: 20px; font-size: 9px; }
.kc-avatar-lg { width: 30px; height: 30px; font-size: 12px; }

/* user chip in nav */
.kc-user {
  display: flex; align-items: center; gap: 8px;
  padding: 4px 6px 4px 4px;
  border-radius: 99px;
  border: 1px solid var(--nav-border, var(--border));
  background: color-mix(in srgb, var(--nav-fg, var(--text)) 4%, transparent);
}
.kc-user-name { font-size: var(--fs-sm); font-weight: 600; }
[data-brand="forte"] .kc-user { border-color: rgba(255,255,255,0.25); }

/* ---------- Board header ---------- */
.kc-board-header {
  flex: 0 0 auto;
  padding: 13px 18px 12px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 20;
}
.kc-bh-top { display: flex; align-items: center; gap: 12px; }
.kc-bh-title-wrap { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.kc-bh-accent {
  width: 4px; height: 30px; border-radius: 3px;
  background: var(--brand);
  flex: 0 0 auto;
  align-self: center;
}
.kc-bh-title {
  font-size: calc(var(--fs-display) * var(--type-scale));
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0;
  white-space: nowrap;
}
.kc-bh-desc {
  font-size: var(--fs-sm);
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kc-count-pill {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-3);
  padding: 3px 8px;
  border-radius: 99px;
  white-space: nowrap;
}
.kc-bh-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }

/* members stack */
.kc-members { display: flex; align-items: center; }
.kc-members .kc-avatar { margin-left: -7px; box-shadow: 0 0 0 2px var(--surface), inset 0 0 0 1px rgba(255,255,255,0.16); }
.kc-members .kc-avatar:first-child { margin-left: 0; }
.kc-members-more {
  margin-left: -7px;
  background: var(--surface-3) !important;
  color: var(--text-2) !important;
  box-shadow: 0 0 0 2px var(--surface);
  font-size: 9px;
}

/* segmented control (view switch) */
.kc-seg {
  display: inline-flex;
  padding: 2px;
  gap: 2px;
  background: var(--surface-3);
  border-radius: var(--radius-sm);
}
.kc-seg button {
  display: inline-flex; align-items: center; gap: 6px;
  border: none; background: transparent;
  padding: 5px 10px;
  border-radius: calc(var(--radius-sm) - 2px);
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--muted);
  transition: all 0.15s;
}
.kc-seg button .bi { font-size: 13px; }
.kc-seg button:hover { color: var(--text); }
.kc-seg button.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow-card);
}

/* generic button */
.kc-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font-size: var(--fs-sm);
  font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}
.kc-btn:hover { border-color: var(--faint); background: var(--surface-2); }
.kc-btn .bi { font-size: 13px; }
.kc-btn-primary {
  background: var(--brand); border-color: var(--brand); color: #fff;
}
.kc-btn-primary:hover { background: var(--brand-strong); border-color: var(--brand-strong); }
.kc-btn-ghost { border-color: transparent; background: transparent; color: var(--text-2); }
.kc-btn-ghost:hover { background: var(--surface-3); border-color: transparent; }
.kc-btn-sm { padding: 5px 9px; font-size: var(--fs-xs); }
.kc-btn-icon-only { padding: 7px; }
.kc-btn .kc-dot-active {
  width: 6px; height: 6px; border-radius: 50%; background: var(--brand);
}

/* filter chips row */
.kc-filterbar {
  display: flex; align-items: center; gap: 8px;
  margin-top: 11px;
  flex-wrap: wrap;
}
.kc-search {
  display: flex; align-items: center; gap: 7px;
  padding: 6px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  min-width: 220px;
}
.kc-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.kc-search .bi { color: var(--muted); font-size: 13px; }
.kc-search input {
  border: none; background: transparent; outline: none;
  font: inherit; color: var(--text); width: 100%;
  font-size: var(--fs-sm);
}
.kc-select {
  appearance: none;
  padding: 6px 28px 6px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='10' viewBox='0 0 10 10'%3E%3Cpath d='M2 4l3 3 3-3' fill='none' stroke='%23888' stroke-width='1.4' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat right 9px center;
  font: inherit; font-size: var(--fs-sm); font-weight: 600;
  color: var(--text-2);
}
.kc-select:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }

/* ---------- Board canvas ---------- */
.kc-board {
  flex: 1 1 auto;
  display: flex;
  gap: var(--col-gap);
  padding: 16px 18px 20px;
  overflow-x: auto;
  overflow-y: hidden;
  align-items: flex-start;
}

/* ---------- Column ---------- */
.kc-col {
  flex: 0 0 var(--col-width);
  width: var(--col-width);
  max-height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  min-height: 0;
}
.kc-col.kc-col-over { border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint); }
.kc-col-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 11px 9px;
  position: relative;
}
.kc-col-head::before {
  content: "";
  position: absolute; left: 11px; top: 0; width: 26px; height: 3px;
  border-radius: 0 0 3px 3px;
  background: var(--col-accent, var(--faint));
}
.kc-col-name {
  font-size: var(--fs-sm);
  font-weight: 700;
  letter-spacing: -0.01em;
  text-transform: none;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kc-col-count {
  font-size: var(--fs-xs);
  font-weight: 700;
  color: var(--muted);
  background: var(--surface-3);
  padding: 1px 7px;
  border-radius: 99px;
}
.kc-col-count.wip-warn { color: var(--warn); background: var(--warn-tint); }
.kc-col-count.wip-full { color: var(--late); background: var(--late-tint); }
.kc-col-head .kc-col-actions { margin-left: auto; display: flex; gap: 2px; }
.kc-col-wip {
  height: 2px; margin: 0 11px 4px;
  background: var(--surface-3); border-radius: 2px; overflow: hidden;
}
.kc-col-wip > div { height: 100%; background: var(--ok); border-radius: 2px; transition: width 0.3s; }
.kc-col-wip.wip-warn > div { background: var(--warn); }
.kc-col-wip.wip-full > div { background: var(--late); }

.kc-col-cards {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4px 8px 8px;
  display: flex;
  flex-direction: column;
  gap: var(--card-gap);
  min-height: 36px;
}
.kc-col-drop-hint {
  border: 1.5px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--faint);
  font-size: var(--fs-xs);
  font-weight: 600;
  text-align: center;
  padding: 14px 8px;
}
.kc-add-card {
  margin: 0 8px 8px;
  display: flex; align-items: center; gap: 7px;
  padding: 7px 9px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border-strong);
  color: var(--muted);
  font-size: var(--fs-sm);
  font-weight: 600;
  background: transparent;
  transition: all 0.15s;
  white-space: nowrap;
}
.kc-add-card:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-tint); }
.kc-add-card input {
  border: none; background: transparent; outline: none; font: inherit;
  font-size: var(--fs-sm); color: var(--text); width: 100%;
}

.kc-col-add {
  flex: 0 0 var(--col-width);
  width: var(--col-width);
}
.kc-col-add button {
  width: 100%;
  display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px;
  border-radius: var(--radius);
  border: 1px dashed var(--border-strong);
  background: transparent;
  color: var(--muted);
  font-size: var(--fs-sm); font-weight: 600;
  transition: all 0.15s;
  white-space: nowrap;
}
.kc-col-add button:hover { color: var(--text); border-color: var(--faint); background: var(--surface-2); }

/* ---------- Card chip ---------- */
.kc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-card);
  cursor: pointer;
  overflow: hidden;
  transition: box-shadow 0.16s, border-color 0.16s, transform 0.16s;
  position: relative;
}
.kc-card:hover { box-shadow: var(--shadow-card-hover); border-color: var(--border-strong); transform: translateY(-1px); }
.kc-card.dragging { opacity: 0.5; }
.kc-card.kc-card-done { opacity: 0.72; }
.kc-card-cover { height: 5px; }
.kc-card-body { padding: var(--card-pad); }

/* style variants (tweakable) */
[data-cardstyle="accent-left"] .kc-card { display: flex; }
[data-cardstyle="accent-left"] .kc-card-cover { height: auto; width: 4px; flex: 0 0 4px; }
[data-cardstyle="accent-left"] .kc-card-body { flex: 1; }
[data-cardstyle="minimal"] .kc-card { box-shadow: none; }
[data-cardstyle="minimal"] .kc-card:hover { box-shadow: var(--shadow-card); }
[data-cardstyle="minimal"] .kc-card-cover { display: none; }

.kc-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.kc-tag {
  display: inline-flex; align-items: center;
  font-size: var(--fs-micro);
  font-weight: 700;
  letter-spacing: 0.02em;
  padding: 2px 7px;
  border-radius: 99px;
  color: #fff;
  line-height: 1.4;
  white-space: nowrap;
}
.kc-card-titlerow { display: flex; align-items: flex-start; gap: 7px; }
.kc-prio-dot {
  width: 8px; height: 8px; border-radius: 50%;
  flex: 0 0 auto; margin-top: 4px;
  box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 0%, transparent);
}
.kc-card-title {
  font-size: calc(var(--fs-body) * var(--type-scale));
  font-weight: 600;
  line-height: 1.34;
  color: var(--text);
  letter-spacing: -0.008em;
}
.kc-card-done .kc-card-title { text-decoration: line-through; color: var(--muted); }

.kc-card-meta {
  display: flex; flex-wrap: wrap; align-items: center; gap: 5px 8px;
  margin-top: 9px;
}
.kc-meta-spacer { flex: 1; }
.kc-badge {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--muted);
  line-height: 1;
}
.kc-badge .bi { font-size: 12px; }
.kc-badge-pill {
  padding: 3px 7px;
  border-radius: 99px;
  background: var(--surface-3);
}
.kc-badge-due { color: var(--text-2); background: var(--surface-3); padding: 3px 7px; border-radius: 99px; }
.kc-badge-soon { color: var(--warn); background: var(--warn-tint); padding: 3px 7px; border-radius: 99px; }
.kc-badge-late { color: var(--late); background: var(--late-tint); padding: 3px 7px; border-radius: 99px; }
.kc-badge-done { color: var(--ok); background: var(--ok-tint); padding: 3px 7px; border-radius: 99px; }
.kc-badge-warn { color: var(--warn); background: var(--warn-tint); padding: 3px 7px; border-radius: 99px; }
.kc-badge-check.done { color: var(--ok); }

/* ---------- Lista (tabela) ---------- */
.kc-table { width: 100%; border-collapse: collapse; font-size: var(--fs-body); }
.kc-table thead th {
  text-align: left;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 10px 14px;
  background: var(--surface-2);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0;
}
.kc-table tbody td { padding: 10px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); }
.kc-table tbody tr:last-child td { border-bottom: none; }
.kc-trow { cursor: pointer; transition: background 0.12s; }
.kc-trow:hover { background: var(--surface-2); }

/* brand as button */
.kc-brand {
  display: flex; align-items: center; gap: 9px;
  padding: 4px 6px 4px 2px;
  border: none; background: transparent; color: inherit;
  border-radius: var(--radius-sm);
  transition: background 0.15s;
}
.kc-brand:hover { background: color-mix(in srgb, var(--nav-fg, var(--text)) 8%, transparent); }

/* back button in board header */
.kc-back-btn {
  width: 30px; height: 30px; flex: 0 0 auto;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: 16px;
  transition: all 0.15s;
}
.kc-back-btn:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-tint); }

/* ---------- Boards grid (tela de entrada) ---------- */
.kc-boards-wrap {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 0 0 48px;
}
.kc-boards-inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 30px 28px 0;
}
.kc-boards-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 22px; gap: 16px; flex-wrap: wrap;
}
.kc-boards-title {
  font-size: calc(28px * var(--type-scale));
  font-weight: 800; letter-spacing: -0.025em;
  margin: 4px 0 0;
}
.kc-boards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: 16px;
}
.kc-board-card {
  display: flex; flex-direction: column;
  text-align: left;
  text-decoration: none; /* é um <a>; sem isso todo o texto do card herda o sublinhado de link */
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 0.16s, border-color 0.16s, transform 0.16s;
  padding: 0;
  min-height: 168px;
}
.kc-board-card:hover {
  box-shadow: var(--shadow-card-hover);
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.kc-board-card-bar { height: 4px; background: var(--bc, var(--brand)); }
.kc-board-card-body { padding: 15px 16px 12px; flex: 1; }
.kc-board-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 11px; }
.kc-board-dot { width: 9px; height: 9px; border-radius: 50%; }
.kc-board-card-name {
  font-size: calc(15px * var(--type-scale));
  font-weight: 700; letter-spacing: -0.015em;
  margin: 0 0 5px; line-height: 1.3; color: var(--text);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; /* título longo não estoura a altura do card nem desalinha o grid */
}
.kc-board-card-desc {
  font-size: var(--fs-sm); color: var(--muted); margin: 0; line-height: 1.45;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.kc-board-card-foot {
  display: flex; align-items: center; gap: 9px;
  padding: 11px 16px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.kc-board-card-foot .kc-members { margin-left: 2px; }
.kc-board-updated { margin-left: auto; font-size: var(--fs-xs); color: var(--faint); white-space: nowrap; }
.kc-board-card.is-archived { opacity: 0.72; min-height: 120px; }
.kc-board-card.is-archived:hover { opacity: 1; }

.kc-role {
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 2px 8px; border-radius: 99px;
}
.kc-role-owner { background: var(--brand-tint); color: var(--brand); }
.kc-role-editor { background: rgba(47,111,176,0.14); color: #2f6fb0; }
.kc-role-viewer { background: var(--surface-3); color: var(--muted); }
.kc-role-arquivado { background: var(--surface-3); color: var(--muted); }
[data-theme="dark"] .kc-role-editor { color: #6ea8e0; }

/* color swatches (novo board) */
.kc-color-swatches { display: flex; gap: 9px; }
.kc-swatch {
  width: 30px; height: 30px; border-radius: 50%;
  border: 2px solid transparent; color: #fff; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.08);
  transition: transform 0.12s;
}
.kc-swatch:hover { transform: scale(1.08); }
.kc-swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px currentColor; }

/* soon placeholder */
.kc-soon {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 6px; color: var(--muted); text-align: center; padding: 40px;
}
.kc-soon .bi { font-size: 38px; color: var(--faint); margin-bottom: 8px; }
.kc-soon-title { font-size: calc(18px * var(--type-scale)); font-weight: 700; color: var(--text); margin: 0; }
.kc-soon p { margin: 0; font-size: var(--fs-body); line-height: 1.6; }
.kc-linkbtn { border: none; background: none; color: var(--brand); font: inherit; font-weight: 700; cursor: pointer; padding: 0; }
.kc-linkbtn:hover { text-decoration: underline; }

/* archived section */
.kc-archived { margin-top: 30px; }
.kc-archived-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  border: none; background: transparent; color: var(--muted);
  font-size: var(--fs-sm); font-weight: 600; padding: 6px 0;
}
.kc-archived-toggle:hover { color: var(--text); }
.kc-archived-grid { margin-top: 12px; }

/* mini progress for checklist on card */
.kc-mini-prog {
  height: 3px; width: 100%; margin-top: 8px;
  background: var(--surface-3); border-radius: 2px; overflow: hidden;
}
.kc-mini-prog > div { height: 100%; background: var(--ok); border-radius: 2px; }
/* ============================================================
   CONCILIO KANBAN — Card modal
   ============================================================ */

.kc-overlay {
  position: fixed; inset: 0;
  background: var(--overlay);
  backdrop-filter: blur(3px);
  display: flex; align-items: flex-start; justify-content: center;
  padding: 5vh 16px;
  z-index: 100;
  overflow-y: auto;
  animation: kc-fade 0.18s ease;
}
@keyframes kc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes kc-pop { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }

.kc-modal {
  width: 100%;
  max-width: 720px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-pop);
  overflow: hidden;
  animation: kc-pop 0.22s cubic-bezier(0.2, 0.8, 0.3, 1);
  margin-bottom: 5vh;
}
.kc-modal-cover { height: 5px; background: var(--brand); }
.kc-modal-head {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--border);
}
.kc-modal-crumbs {
  display: flex; align-items: center; gap: 7px; flex-wrap: wrap;
  font-size: var(--fs-xs); color: var(--muted); font-weight: 600;
}
.kc-crumb-board { display: inline-flex; align-items: center; gap: 5px; }
.kc-status-badge {
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: 0.02em;
  padding: 2px 8px; border-radius: 99px; color: #fff;
}
.kc-modal-title {
  font-size: calc(20px * var(--type-scale));
  font-weight: 800; letter-spacing: -0.02em;
  margin: 7px 0 0; line-height: 1.2; color: var(--text);
}
.kc-modal-body {
  padding: 16px 18px 20px;
  max-height: 64vh;
  overflow-y: auto;
}
.kc-modal-foot {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}
.kc-foot-spacer { flex: 1; }

/* toast de confirmação dentro do modal */
.kc-toast {
  display: flex; align-items: center; gap: 8px;
  margin: 0 18px; margin-top: 12px;
  padding: 9px 13px;
  border-radius: var(--radius-sm);
  background: var(--ok-tint);
  color: var(--ok);
  font-size: var(--fs-sm); font-weight: 600;
  animation: kc-toast-in 0.2s ease;
}
.kc-toast .bi { font-size: 14px; }
@keyframes kc-toast-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* field grid */
.kc-fields {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 12px 14px;
}
.kc-field { display: flex; flex-direction: column; gap: 5px; width: 100%; min-width: 0; } /* width:100% faz o campo preencher a área do grid; sem isso os selects/datas encolhiam ao conteúdo (col-4 ia a 73px) */
.kc-field.col-12 { grid-column: span 12; }
.kc-field.col-6 { grid-column: span 6; }
.kc-field.col-4 { grid-column: span 4; }
.kc-field.col-3 { grid-column: span 3; }
.kc-label {
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}
.kc-input, .kc-textarea, .kc-modal .kc-select {
  width: 100%;
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: var(--fs-body);
  transition: border-color 0.15s, box-shadow 0.15s;
}
.kc-textarea { resize: vertical; min-height: 64px; line-height: 1.5; }
.kc-input:focus, .kc-textarea:focus, .kc-modal .kc-select:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px var(--brand-tint);
}

/* section */
.kc-sec { margin-top: 20px; }
.kc-sec-head {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.kc-sec-head .bi { color: var(--muted); font-size: 14px; }
.kc-sec-title {
  font-size: var(--fs-sm); font-weight: 700; color: var(--text);
  letter-spacing: -0.01em;
}
.kc-sec-count { font-size: var(--fs-xs); color: var(--muted); font-weight: 600; }
.kc-sec-divider { height: 1px; background: var(--border); margin: 18px 0 0; }

/* tag toggles */
.kc-tag-toggles { display: flex; flex-wrap: wrap; gap: 7px; }
.kc-tag-toggle {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px;
  border-radius: 99px;
  border: 1.5px solid var(--tag-cor, var(--border-strong));
  background: transparent;
  color: var(--text-2);
  font-size: var(--fs-xs); font-weight: 700;
  transition: all 0.14s;
}
.kc-tag-toggle.ativa { background: var(--tag-cor); border-color: var(--tag-cor); color: #fff; }
.kc-tag-toggle:hover { background: color-mix(in srgb, var(--tag-cor) 16%, transparent); }
.kc-tag-toggle.ativa:hover { background: var(--tag-cor); }

/* checklist */
.kc-checkprog {
  height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; margin-bottom: 10px;
}
.kc-checkprog > div { height: 100%; background: var(--ok); border-radius: 99px; transition: width 0.3s; }
.kc-check-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.kc-check-item {
  display: flex; align-items: center; gap: 9px;
  padding: 6px 4px;
  border-radius: var(--radius-sm);
}
.kc-check-item:hover { background: var(--surface-2); }
.kc-check-item:hover .kc-check-actions { opacity: 1; }
.kc-checkbox {
  width: 17px; height: 17px; flex: 0 0 auto;
  border-radius: 5px;
  border: 1.5px solid var(--border-strong);
  display: inline-flex; align-items: center; justify-content: center;
  color: #fff; font-size: 11px;
  transition: all 0.14s;
}
.kc-checkbox.on { background: var(--ok); border-color: var(--ok); }
.kc-check-text { flex: 1; font-size: var(--fs-body); color: var(--text); }
.kc-check-text.done { text-decoration: line-through; color: var(--muted); }
.kc-check-badge {
  display: inline-flex; align-items: center; gap: 4px;
  margin-left: 8px;
  font-size: var(--fs-micro); font-weight: 700; letter-spacing: 0.02em;
  padding: 1px 7px; border-radius: 99px;
  background: var(--brand-tint); color: var(--brand);
  vertical-align: middle;
}
.kc-check-badge .bi { font-size: 10px; }

/* "Virar card" — sempre visível e legível */
.kc-promote-btn {
  flex: 0 0 auto;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px;
  border-radius: 99px;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-2);
  font-size: var(--fs-xs); font-weight: 700;
  white-space: nowrap;
  transition: all 0.14s;
}
.kc-promote-btn .bi { font-size: 11px; }
.kc-promote-btn:hover {
  border-color: var(--brand);
  color: var(--brand);
  background: var(--brand-tint);
}
.kc-promote-btn.ghost {
  border-style: dashed;
  color: var(--muted);
}
.is-promoted .kc-check-text { color: var(--muted); }

.kc-check-del { opacity: 0; transition: opacity 0.15s; }
.kc-check-item:hover .kc-check-del { opacity: 1; }
.kc-mini-btn {
  width: 24px; height: 24px; border: none; background: transparent;
  border-radius: 5px; color: var(--muted); font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.kc-mini-btn:hover { background: var(--surface-3); color: var(--text); }
.kc-mini-btn.danger:hover { background: var(--late-tint); color: var(--late); }
.kc-add-inline {
  display: flex; gap: 8px; margin-top: 8px; align-items: center;
}
.kc-add-inline .kc-input { padding: 7px 10px; font-size: var(--fs-sm); }

/* badge tag inside list rows */
.kc-chip-soft {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-xs); font-weight: 600;
  padding: 3px 8px; border-radius: 99px;
  background: var(--surface-3); color: var(--text-2);
}

/* dependency / generic rows */
.kc-row {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 4px; font-size: var(--fs-body);
  border-bottom: 1px solid var(--border);
}
.kc-row:last-child { border-bottom: none; }
.kc-row .bi { color: var(--muted); }
.kc-row-grow { flex: 1; }
.kc-row-done { color: var(--ok); }

/* comments */
.kc-comment { display: flex; gap: 10px; margin-bottom: 14px; }
.kc-comment-body { flex: 1; }
.kc-comment-meta { font-size: var(--fs-sm); }
.kc-comment-meta strong { font-weight: 700; color: var(--text); }
.kc-comment-meta span { color: var(--muted); }
.kc-comment-text {
  font-size: var(--fs-body); color: var(--text-2); margin-top: 3px; line-height: 1.5;
  background: var(--surface-2); border: 1px solid var(--border);
  padding: 8px 11px; border-radius: var(--radius-sm); border-top-left-radius: 3px;
}
.kc-comment-text .kc-mention { color: var(--brand); font-weight: 700; }

/* deadline / repactuacao alert */
.kc-alert {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border);
  font-size: var(--fs-sm); color: var(--text-2);
}
.kc-alert .bi { color: var(--muted); }
.kc-alert-warn { background: var(--warn-tint); border-color: transparent; color: var(--warn); }
.kc-alert strong { color: var(--text); font-weight: 700; }
.kc-alert-warn strong { color: var(--warn); }

.kc-repact-list { list-style: none; margin: 0; padding: 0; }
.kc-repact-item {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 0; font-size: var(--fs-sm);
  border-bottom: 1px solid var(--border);
}
.kc-repact-item:last-child { border-bottom: none; }
.kc-strike { text-decoration: line-through; color: var(--muted); }
.kc-repact-meta { margin-left: auto; color: var(--muted); font-size: var(--fs-xs); }

.kc-created { font-size: var(--fs-xs); color: var(--faint); margin-top: 16px; display: flex; align-items: center; gap: 6px; }

/* tweaks fab fallback (hidden when host provides toggle) */
.kc-empty { text-align: center; color: var(--faint); font-size: var(--fs-sm); padding: 18px 0; }

/* ============================================================
   ADAPTAÇÃO Flask + Bootstrap 5.3 (server-rendered)
   Integra o design system do protótipo ao app real.
   ============================================================ */
html, body { height: 100%; margin: 0; }
.app-shell { height: 100vh; }

/* flash messages dentro do shell */
.kc-flash { flex: 0 0 auto; padding: 8px 16px 0; }
.kc-flash:empty { display: none; }

/* ---- Bootstrap bridge (botões/inputs/utilitários + dark) ---- */
.btn-primary {
  --bs-btn-bg: var(--brand); --bs-btn-border-color: var(--brand);
  --bs-btn-hover-bg: var(--brand-strong); --bs-btn-hover-border-color: var(--brand-strong);
  --bs-btn-active-bg: var(--brand-strong); --bs-btn-active-border-color: var(--brand-strong);
  --bs-btn-disabled-bg: var(--brand); --bs-btn-disabled-border-color: var(--brand);
}
.bg-primary { background-color: var(--brand) !important; }
.text-primary { color: var(--brand) !important; }
.btn-link { --bs-btn-color: var(--brand); --bs-btn-hover-color: var(--brand-strong); }
.form-control:focus, .form-select:focus, .form-check-input:focus {
  border-color: var(--brand); box-shadow: 0 0 0 .2rem var(--brand-tint);
}
.form-check-input:checked { background-color: var(--brand); border-color: var(--brand); }
[data-bs-theme="dark"] .bg-light { background-color: var(--surface-3) !important; }
[data-bs-theme="dark"] .text-dark { color: var(--text) !important; }

/* chip de usuário na navbar é um dropdown Bootstrap */
.kc-user { border: none; cursor: pointer; }
.kc-user.dropdown-toggle::after { margin-left: 1px; color: var(--muted); border-top-color: currentColor; }
.dropdown-menu {
  --bs-dropdown-bg: var(--surface); --bs-dropdown-border-color: var(--border);
  --bs-dropdown-border-radius: var(--radius-sm); --bs-dropdown-link-hover-bg: var(--surface-2);
  --bs-dropdown-link-active-bg: var(--brand-tint); --bs-dropdown-link-active-color: var(--text);
  box-shadow: var(--shadow-pop);
}

/* coluna em overflow (board.js marca .text-danger) */
.kc-col-count.text-danger { color: var(--late) !important; background: var(--late-tint) !important; }

/* ---- Modal de card dentro do #cardModal (Bootstrap) ---- */
.kc-card-modal .modal-dialog { max-width: 720px; margin: 5vh auto; }
.kc-card-modal .modal-content { border: none; } /* fundo vem de .kc-modal (var(--surface)); transparent aqui vencia por especificidade e deixava o modal vazado */
.kc-card-modal .modal-content.kc-modal { /* .kc-modal já dá surface/raio/sombra */ animation: kc-pop .22s cubic-bezier(.2,.8,.3,1); }
.modal-backdrop.show { background: var(--overlay); opacity: 1; backdrop-filter: blur(3px); }
.kc-modal-body form { margin: 0; }

/* checkbox custom do checklist (input real, estilizado) */
.kc-check-item input[type="checkbox"] {
  appearance: none; -webkit-appearance: none;
  width: 17px; height: 17px; flex: 0 0 auto; margin: 0;
  border-radius: 5px; border: 1.5px solid var(--border-strong);
  background: var(--surface); cursor: pointer; position: relative; transition: all .14s;
}
.kc-check-item input[type="checkbox"]:checked { background: var(--ok); border-color: var(--ok); }
.kc-check-item input[type="checkbox"]:checked::after {
  content: ""; position: absolute; left: 5px; top: 2px; width: 4px; height: 8px;
  border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg);
}
.kc-check-item input[type="checkbox"]:disabled { opacity: .6; cursor: default; }

/* avatar dentro do chip de usuário e membros (texto branco já vem inline) */
.kc-add-card { background: transparent; }

/* botão "Adicionar coluna" (Bootstrap btn dentro de .kc-col-add) */
.kc-col-add .btn {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px; border-radius: var(--radius);
  border: 1px dashed var(--border-strong); background: transparent;
  color: var(--muted); font-size: var(--fs-sm); font-weight: 600;
}
.kc-col-add .btn:hover { color: var(--text); border-color: var(--faint); background: var(--surface-2); }

/* ============================================================
   Telas auxiliares do projeto (lista, gantt, inbox, minhas tarefas)
   Classes que não vêm do protótipo mas o app usa.
   ============================================================ */
.kc-board-wrap { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
.kc-list-row { cursor: pointer; }
.kc-mencao-nao-lida { background: var(--brand-tint); border-left: 3px solid var(--brand); }
.kc-mencao-snippet { color: var(--muted); font-size: var(--fs-sm); }
.kc-gantt-wrap { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; }
/* O Frappe Gantt 1.0.3 é dirigido por variáveis --g-* (defaults branco/cinza em :root,
   por isso as barras saíam invisíveis sobre o surface). Brigar por especificidade não
   funcionava — .gantt .bar-wrapper .bar é 0,3,0. Setamos as variáveis no wrapper (ancestral)
   com os tokens do app -> barras visíveis e tema-aware (claro/escuro). */
.kc-gantt-wrap {
  --g-bar-color: color-mix(in srgb, var(--brand) 20%, var(--surface));
  --g-bar-border: color-mix(in srgb, var(--brand) 45%, var(--surface));
  --g-progress-color: var(--brand);
  --g-text-dark: var(--text);
  --g-tick-color: var(--border);
  --g-tick-color-thick: var(--border-strong);
  --g-border-color: var(--border);
  --g-row-color: var(--surface);
  --g-header-background: var(--surface);
  --g-arrow-color: var(--muted);
}
.kc-gantt-done { --g-bar-color: color-mix(in srgb, var(--ok) 22%, var(--surface));   --g-bar-border: var(--ok);   --g-progress-color: var(--ok); }
.kc-gantt-late { --g-bar-color: color-mix(in srgb, var(--late) 22%, var(--surface)); --g-bar-border: var(--late); --g-progress-color: var(--late); }
.kc-checklist-progress { height: 6px !important; border-radius: 99px; background: var(--surface-3); }
.kc-checklist-progress .progress-bar { background: var(--ok) !important; }
.kc-repactuacoes { max-height: 180px; overflow-y: auto; }

/* popup de menção (Tribute.js) — alinhado ao design system, contraste e acima do modal */
.tribute-container {
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-pop);
  overflow-y: auto; max-height: 220px;
  z-index: 1080;
}
.tribute-container ul { margin: 0; padding: 4px; list-style: none; }
.tribute-container li {
  padding: 7px 10px; border-radius: var(--radius-sm);
  font-size: var(--fs-sm); color: var(--text); cursor: pointer;
}
.tribute-container li.highlight, .tribute-container li:hover { background: var(--brand-tint); }
.tribute-container li small { color: var(--muted); }
.tribute-nomatch { display: block; padding: 7px 10px; font-size: var(--fs-sm); color: var(--muted); }

/* ============================================================
   Responsivo — evita a compressão/overflow em telas estreitas
   (antes não havia NENHUM @media; o layout só era pensado p/ desktop)
   ============================================================ */
@media (max-width: 720px) {
  /* navbar: rótulos viram só ícones, sem estourar a largura (scrollWidth>viewport) */
  .kc-nav { gap: 8px; padding: 0 10px; }
  .kc-nav-links { gap: 0; }
  .kc-nav-link { padding: 7px 9px; }
  .kc-nav-link > span:not(.kc-nav-badge) { display: none; } /* esconde o texto, mantém o badge de menções */
  .kc-nav-link.active::after { left: 6px; right: 6px; }
  .kc-brand-word { display: none; }                          /* mantém só o símbolo */

  /* header do board: quebra em linhas em vez de espremer o título até virar "B" */
  .kc-bh-top { flex-wrap: wrap; gap: 8px 10px; }
  .kc-bh-title-wrap { flex: 1 1 100%; min-width: 0; }
  .kc-bh-title {
    white-space: normal; overflow-wrap: anywhere;
    font-size: calc(var(--fs-display) * var(--type-scale) * 0.86);
  }
  .kc-bh-actions { margin-left: 0; flex-wrap: wrap; }
}

/* modal: o grid de campos deixa de ser 3-por-linha quando não cabe (datas paravam cortadas) */
@media (max-width: 560px) {
  .kc-field.col-4, .kc-field.col-3 { grid-column: span 6; }
}
@media (max-width: 380px) {
  .kc-field.col-4, .kc-field.col-3 { grid-column: span 12; }
}
