/* iGreen Central do Colaborador — base styles */
:root {
  color-scheme: dark;
  --bg-deep: #0a0e27;
  --bg-mid: #1a1f3a;
  --bg-late: #0f172a;
  --green: #22c55e;
  --green-light: #34d399;
  --green-dark: #16a34a;
  --green-glow: rgba(34, 197, 94, 0.4);
  --text: #ffffff;
  --text-2: #cbd5e1;
  --text-muted: rgba(255, 255, 255, 0.55);
  --text-faint: rgba(255, 255, 255, 0.35);
  --card: linear-gradient(145deg, rgba(30, 41, 59, 0.6), rgba(15, 23, 42, 0.55));
  --glass: rgba(255, 255, 255, 0.05);
  --glass-strong: rgba(255, 255, 255, 0.08);
  --border: rgba(255, 255, 255, 0.08);
  --border-strong: rgba(255, 255, 255, 0.14);
  --border-green: rgba(34, 197, 94, 0.25);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #3b82f6;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg-deep);
  color: var(--text);
  font-family: 'Geist', system-ui, sans-serif;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

body {
  /* Flat deep navy — the green halos and gradients live in .bg-glow / .bg-vignette
     so they're constrained to the configured corners and don't lift the center. */
  background: var(--bg-deep);
}

.mono {
  font-family: 'Geist Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.22em;
}

.tracking-wider-mono {
  letter-spacing: 0.32em;
}

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

input, select, textarea, button {
  font-family: inherit;
  color: inherit;
}

::selection {
  background: rgba(34, 197, 94, 0.35);
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: rgba(34,197,94,0.25); }

/* Background decorative layers */
.bg-layers {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

/* Defensive: never let any overlay block typing in form fields */
input, textarea, select, button {
  pointer-events: auto !important;
  -webkit-user-select: text;
  user-select: text;
}
input:not([type=checkbox]):not([type=radio]):not([type=button]):not([type=submit]):not([type=reset]) {
  caret-color: var(--green);
}
input[readonly] { cursor: default; }
input:not([readonly]):not([disabled]),
textarea:not([readonly]):not([disabled]) {
  /* Force focusable + typeable regardless of parent transforms/animations */
  pointer-events: auto !important;
  -webkit-user-select: text !important;
  user-select: text !important;
  touch-action: manipulation;
}

/* Decorative pseudo-elements must NEVER capture clicks */
.card-topline::before { pointer-events: none; }
.page-head::after     { pointer-events: none; }
.bg-layers, .bg-layers * { pointer-events: none !important; }

/* Hide development tweaks panel (kept in code for debugging) */
.twk-panel { display: none !important; }

/* Page entrance animation */
@keyframes page-enter {
  0%   { opacity: 0; transform: translateY(10px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* === Background: Aurora Command Center === */
.bg-glow {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(900px 500px at 5% 105%, rgba(34,197,94,0.18), transparent 55%),
    radial-gradient(600px 400px at 92% -8%, rgba(16,185,129,0.10), transparent 50%),
    radial-gradient(400px 400px at 50% 50%, rgba(34,197,94,0.04), transparent 60%);
  animation: glow-drift 20s ease-in-out infinite alternate;
}
@keyframes glow-drift {
  0%   { filter: blur(0px); }
  50%  { filter: blur(2px); transform: scale(1.02); }
  100% { filter: blur(0px); }
}

.bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 100% at 50% 50%, transparent 30%, rgba(6,8,20,0.5) 70%, rgba(2,4,12,0.85) 100%);
}

.bg-dots {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle 0.6px, rgba(34,197,94,0.12) 0%, transparent 100%),
    radial-gradient(circle 0.4px, rgba(255,255,255,0.04) 0%, transparent 100%);
  background-size: 28px 28px, 28px 28px;
  background-position: 0 0, 14px 14px;
  opacity: 0.7;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 20%, transparent 75%);
}

.bg-vlines {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(90deg, rgba(34,197,94,0.025) 0 1px, transparent 1px 80px),
    repeating-linear-gradient(0deg, rgba(34,197,94,0.015) 0 1px, transparent 1px 80px);
  opacity: 0.5;
  mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 10%, transparent 70%);
  -webkit-mask-image: radial-gradient(ellipse 90% 80% at 50% 45%, black 10%, transparent 70%);
}

.bg-scan { display: none; }

.header-wrap {
  position: relative;
  z-index: 10;
  transform: translateY(0);
  opacity: 1;
  max-height: 80px;
  overflow: visible;
  transition: transform 350ms cubic-bezier(0.2,0.7,0.2,1),
              opacity 300ms ease,
              max-height 350ms cubic-bezier(0.2,0.7,0.2,1);
}
.header-wrap.is-hidden {
  transform: translateY(-100%);
  opacity: 0;
  max-height: 0;
  overflow: hidden;
  pointer-events: none;
}
.header-reveal-btn {
  position: fixed;
  top: 6px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 20;
  width: 28px; height: 14px;
  border-radius: 0 0 8px 8px;
  background: transparent;
  border: none;
  color: rgba(255,255,255,0.18);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  animation: reveal-float 2.5s ease-in-out infinite;
  transition: color 200ms;
}
.header-reveal-btn:hover {
  color: var(--green);
}
@keyframes reveal-float {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 0.4; }
  50% { transform: translateX(-50%) translateY(3px); opacity: 1; }
}

/* Card primitive */
.card {
  position: relative;
  background: var(--card);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow:
    0 30px 80px -20px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(34, 197, 94, 0.04),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.card-topline::before {
  content: "";
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,0.65), transparent);
}

/* CTA primary */
.btn-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 9999px;
  background: linear-gradient(180deg, #22c55e 0%, #16a34a 100%);
  color: #06170d;
  font-weight: 600;
  font-size: 13px;
  border: none;
  box-shadow: 0 8px 24px -8px rgba(34,197,94,0.55), inset 0 1px 0 rgba(255,255,255,0.35);
  transition: transform 200ms ease, box-shadow 200ms ease;
}
.btn-cta:hover { box-shadow: 0 10px 30px -8px rgba(34,197,94,0.7), inset 0 1px 0 rgba(255,255,255,0.45); }
.btn-cta:active { transform: scale(0.98); }
.btn-cta[disabled] { opacity: 0.55; cursor: not-allowed; }

/* Glass chip */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 24px;
  padding: 0 8px;
  border-radius: 6px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(34,197,94,0.25);
  backdrop-filter: blur(4px);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.7);
  transition: all 200ms ease;
}
.chip:hover { background: rgba(34,197,94,0.15); transform: scale(1.04); }

.chip.is-warn { border-color: rgba(245,158,11,0.35); color: rgba(245,158,11,0.9); }
.chip.is-danger { border-color: rgba(239,68,68,0.4); color: rgba(239,68,68,0.95); }
.chip.is-info { border-color: rgba(59,130,246,0.4); color: rgba(59,130,246,0.95); }

/* kbd */
.kbd {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 20px; height: 20px;
  padding: 0 5px;
  border-radius: 5px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  color: rgba(255,255,255,0.7);
}

/* Pulsing dot */
.dot-pulse {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 0 var(--green-glow);
  animation: pulse 2.2s ease-out infinite;
  display: inline-block;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34,197,94,0.55); }
  70% { box-shadow: 0 0 0 8px rgba(34,197,94,0); }
  100% { box-shadow: 0 0 0 0 rgba(34,197,94,0); }
}

/* Rise entry animation */
.rise {
  opacity: 0;
  transform: translateY(14px);
  animation: rise 700ms cubic-bezier(0.2,0.7,0.2,1) forwards;
}
@keyframes rise {
  to { opacity: 1; transform: translateY(0); }
}

/* Glass field */
.field {
  position: relative;
  display: block;
}
.field input,
.field textarea,
.field select {
  width: 100%;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 8px;
  color: var(--text);
  font-size: 13.5px;
  padding: 22px 14px 8px;
  outline: none;
  transition: all 200ms ease;
}
.field textarea { padding-top: 26px; min-height: 90px; resize: vertical; }
.field select { padding-top: 22px; padding-bottom: 8px; }
.field > span {
  position: absolute;
  left: 14px; top: 14px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 11.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  pointer-events: none;
  transition: all 200ms ease;
}
.field.is-floating > span,
.field:focus-within > span {
  top: 6px;
  font-size: 9.5px;
  color: rgba(34,197,94,0.85);
}
.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: rgba(34,197,94,0.55);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.14), 0 0 30px -10px rgba(34,197,94,0.35);
}

/* Section title */
.section-title {
  display: flex;
  align-items: center;
  gap: 12px;
}
.section-title h2 {
  margin: 0;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  font-family: 'Geist Mono', ui-monospace, monospace;
  color: rgba(255,255,255,0.7);
}
.section-title .rule {
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0.10), transparent);
}
.section-title .count {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  color: rgba(34,197,94,0.85);
  letter-spacing: 0.22em;
}

/* Tool card */
.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 18px 18px 16px;
  background: linear-gradient(145deg, rgba(30,41,59,0.55), rgba(15,23,42,0.6));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  transition: all 220ms ease;
  overflow: hidden;
  min-height: 138px;
}
.tool-card:hover {
  border-color: rgba(34,197,94,0.35);
  transform: translateY(-2px);
  box-shadow: 0 18px 50px -20px rgba(0,0,0,0.7), 0 0 0 1px rgba(34,197,94,0.08);
}
.tool-card::before {
  content: "";
  position: absolute;
  top: 0; left: 14px; right: 14px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,0.5), transparent);
  opacity: 0.6;
}
.tool-card .ic {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(34,197,94,0.22);
  border-radius: 8px;
  color: var(--green);
}
.tool-card.is-danger .ic {
  background: rgba(239,68,68,0.10);
  border-color: rgba(239,68,68,0.25);
  color: var(--danger);
}
.tool-card.is-warn .ic {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.30);
  color: var(--warning);
}
.tool-card.is-info .ic {
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.30);
  color: var(--info);
}
.tool-card h3 {
  margin: 0;
  font-size: 14.5px;
  font-weight: 600;
  color: var(--text);
}
.tool-card p {
  margin: 0;
  font-size: 12.5px;
  line-height: 1.5;
  color: rgba(255,255,255,0.6);
  flex: 1;
}
.tool-card .meta {
  display: flex; align-items: center; justify-content: space-between;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.35);
  padding-top: 8px;
  border-top: 1px dashed rgba(255,255,255,0.06);
}
.tool-card .meta .arrow {
  color: rgba(34,197,94,0.7);
  transition: transform 200ms ease;
}
.tool-card:hover .meta .arrow { transform: translateX(3px); }

/* Drawer */
.drawer-backdrop {
  position: fixed; inset: 0;
  background: rgba(5, 8, 22, 0.72);
  backdrop-filter: blur(6px);
  z-index: 80;
  animation: fade-in 200ms ease forwards;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: min(560px, 100vw);
  background: linear-gradient(180deg, rgba(15,23,42,0.96), rgba(10,14,39,0.98));
  border-left: 1px solid rgba(34,197,94,0.18);
  z-index: 90;
  display: flex; flex-direction: column;
  box-shadow: -40px 0 80px -20px rgba(0,0,0,0.7);
  animation: slide-in 320ms cubic-bezier(0.2,0.7,0.2,1);
}
@keyframes slide-in {
  from { transform: translateX(40px); opacity: 0; }
  to { transform: translateX(0); opacity: 1; }
}

/* Command palette */
.cmdk-backdrop {
  position: fixed; inset: 0;
  background: rgba(5,8,22,0.78);
  backdrop-filter: blur(8px);
  z-index: 100;
  display: flex; align-items: flex-start; justify-content: center;
  padding-top: 12vh;
  animation: fade-in 180ms ease forwards;
}
.cmdk {
  width: min(680px, 92vw);
  background: linear-gradient(145deg, rgba(15,23,42,0.92), rgba(10,14,39,0.95));
  border: 1px solid rgba(34,197,94,0.22);
  border-radius: 14px;
  box-shadow: 0 50px 120px -20px rgba(0,0,0,0.85);
  overflow: hidden;
  animation: slide-in 240ms cubic-bezier(0.2,0.7,0.2,1);
}

/* Sidebar nav */
.side-link {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: 8px;
  color: rgba(255,255,255,0.65);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 180ms ease;
  cursor: pointer;
}
.side-link:hover { color: var(--text); background: rgba(255,255,255,0.04); }
.side-link.is-active {
  color: var(--text);
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.22);
}
.side-link .badge {
  margin-left: auto;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
}
.side-link.is-active .badge { color: var(--green); }

/* Stat row */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.stat {
  position: relative;
  padding: 14px 16px 10px;
  background: linear-gradient(145deg, rgba(30,41,59,0.55), rgba(15,23,42,0.6));
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  overflow: hidden;
}
.stat::before {
  content: "";
  position: absolute;
  top: 0; left: 12px; right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,0.45), transparent);
}
.stat .lbl {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.45);
  display: flex; justify-content: space-between; align-items: center;
}
.stat .val {
  margin-top: 6px;
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.stat .val.is-accent { color: var(--green); }
.stat .trend.up { color: var(--success); }
.stat .trend.down { color: var(--danger); }
.stat .spark {
  margin-top: 6px;
  height: 14px;
  width: 100%;
  display: block;
}

/* Density tweak */
body.density-dense .tool-card { min-height: 110px; padding: 14px 14px 12px; }
body.density-dense .tool-card h3 { font-size: 13.5px; }
body.density-dense .tool-card p { font-size: 11.5px; }
body.density-dense .stat .val { font-size: 19px; }

/* Bg layers toggle */
body.bg-min .bg-dots,
body.bg-min .bg-vlines,
body.bg-min .bg-scan,
body.bg-min .bg-glow,
body.bg-min .bg-vignette { display: none; }

/* Print/no-decoration safety */
/* New sidebar */
.sidebar-shell {
  width: 290px;
  padding: 18px 0 18px 12px;
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex; flex-direction: column; gap: 1px;
  position: relative; z-index: 4;
  animation-delay: 60ms;
  max-height: calc(100vh - 73px);
  overflow: hidden;
  flex-shrink: 0;
}
.sidebar-scroll {
  flex: 1; min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex; flex-direction: column; gap: 1px;
  padding-right: 2px;
  margin-right: 0;
}
.sidebar-scroll::-webkit-scrollbar { width: 2px; }
.sidebar-scroll::-webkit-scrollbar-track { background: transparent; margin: 40% 0; }
.sidebar-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 2px; }
.sidebar-scroll::-webkit-scrollbar-thumb:hover { background: rgba(34,197,94,0.25); }
.sidebar-fixed-bottom {
  flex-shrink: 0;
  display: flex; flex-direction: column; gap: 1px;
  padding-right: 12px;
  overflow: hidden;
}
@media (max-width: 1280px) {
  .sidebar-shell { width: 270px; padding: 16px 10px; }
}
@media (max-width: 1024px) {
  .sidebar-shell { width: 250px; padding: 14px 8px; }
  .app-main { padding: 16px 22px 16px !important; }
}
.sidebar-eyebrow {
  font-size: 9.5px;
  color: rgba(255,255,255,0.4);
  padding: 4px 10px 8px;
  letter-spacing: 0.32em;
}
.sidebar-divider {
  height: 1px;
  background: rgba(255,255,255,0.06);
  margin: 8px 8px;
}
.sidebar-status {
  padding: 12px;
  background: rgba(34,197,94,0.06);
  border: 1px solid rgba(34,197,94,0.18);
  border-radius: 10px;
  margin: 14px 4px 4px;
}
.reports-card {
  width: calc(100% - 8px);
  text-align: left;
  cursor: pointer;
  color: inherit;
  font-family: inherit;
  position: relative;
  transition: all 200ms ease;
}
.reports-card::before {
  content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,0.7), transparent);
}
.reports-card:hover {
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.32);
  transform: translateY(-1px);
}
.reports-card.is-active {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.45);
  box-shadow: 0 8px 24px -10px rgba(34,197,94,0.5);
}

/* Role group head */
.side-role { margin-top: 4px; }
.side-role-head {
  width: 100%;
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  color: rgba(255,255,255,0.85);
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  cursor: pointer;
  transition: all 180ms ease;
}
.side-role-head:hover { background: rgba(255,255,255,0.03); }
.side-role-head .badge {
  margin-left: auto;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(34,197,94,0.85);
  font-family: 'Geist Mono', ui-monospace, monospace;
}
.side-role-body {
  display: flex; flex-direction: column; gap: 1px;
  padding: 4px 0 8px;
}

/* Section sub-head */
.side-section { margin-top: 2px; }
.side-section-head {
  width: 100%;
  display: flex; align-items: center; gap: 8px;
  padding: 6px 10px 6px 14px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  color: rgba(255,255,255,0.5);
  font-size: 11px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 100ms ease-out, background 100ms ease-out, color 100ms ease-out;
  transform-origin: left center;
}
.side-section-head:hover { color: rgba(255,255,255,0.7); transform: scale(1.05); }
.side-section-head:active { transform: scale(0.97); }
.side-section-head .badge {
  margin-left: auto;
  font-size: 9px;
  color: rgba(255,255,255,0.35);
}
.side-section-bullet {
  color: rgba(34,197,94,0.55);
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
}
.side-section-body {
  display: flex; flex-direction: column; gap: 1px;
  padding-bottom: 4px;
  margin-left: 22px;
  padding-left: 8px;
  border-left: 1px dashed rgba(255,255,255,0.08);
}

/* Tool item */
.side-tool {
  width: 100%;
  display: flex; align-items: center; gap: 9px;
  padding: 7px 10px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 7px;
  color: rgba(255,255,255,0.7);
  font-size: 12.5px;
  text-align: left;
  cursor: pointer;
  transition: transform 100ms ease-out,
              background 100ms ease-out,
              color 100ms ease-out,
              border-color 100ms ease-out;
  transform-origin: left center;
}
.side-tool:hover {
  color: var(--text);
  transform: scale(1.12);
  z-index: 5;
  position: relative;
}
.side-tool:active {
  transform: scale(0.97);
}
.side-tool:hover + .side-tool {
  transform: scale(1.05);
}
.side-tool:has(+ .side-tool:hover) {
  transform: scale(1.05);
}
.side-tool:hover + .side-tool + .side-tool {
  transform: scale(1.02);
}
.side-tool:has(+ .side-tool + .side-tool:hover) {
  transform: scale(1.02);
}
.side-tool.is-active {
  color: var(--text);
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.22);
}
.side-tool.is-active::before {
  content: ""; position: absolute; left: 0;
}
.side-tool-ic {
  width: 22px; height: 22px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 5px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  flex-shrink: 0;
}
.side-tool-ic.kind-safe   { color: var(--green); border-color: rgba(34,197,94,0.20); background: rgba(34,197,94,0.08); }
.side-tool-ic.kind-warn   { color: var(--warning); border-color: rgba(245,158,11,0.25); background: rgba(245,158,11,0.06); }
.side-tool-ic.kind-danger { color: var(--danger); border-color: rgba(239,68,68,0.25); background: rgba(239,68,68,0.06); }
.side-tool-ic.kind-info   { color: var(--info); border-color: rgba(59,130,246,0.25); background: rgba(59,130,246,0.06); }
.side-tool-label {
  flex: 1;
  white-space: normal;
  line-height: 1.3;
}
.side-tool-tip {
  position: fixed;
  white-space: nowrap;
  padding: 5px 10px;
  border-radius: 7px;
  background: rgba(15,18,37,0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(34,197,94,0.15);
  color: #fff;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 6px 20px rgba(0,0,0,0.4);
  z-index: 9999;
  pointer-events: none;
  animation: tip-in 120ms ease both;
}
@keyframes tip-in {
  from { opacity: 0; transform: translateX(-6px); }
  to { opacity: 1; transform: translateX(0); }
}

/* Page wrapper used by bespoke tool views */
.page {
  display: flex;
  flex-direction: column;
  gap: 18px;
  animation: page-enter 550ms cubic-bezier(0.16,1,0.3,1) both;
  min-width: 0;
  overflow-x: hidden;
}
.page-sidebar-grid > * {
  min-width: 0;
  overflow: hidden;
}
.page-head {
  display: flex; align-items: flex-end; gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  position: relative;
}
.page-head::after {
  content: "";
  position: absolute; left: 0; right: 60%; bottom: -1px;
  height: 1px;
  background: linear-gradient(90deg, rgba(34,197,94,0.5), transparent);
}
.page-eyebrow {
  font-size: 10px; letter-spacing: 0.32em;
  text-transform: uppercase;
  font-family: 'Geist Mono', monospace;
  color: rgba(34,197,94,0.85);
  margin-bottom: 8px;
}
.page-title {
  margin: 0;
  font-size: 30px; font-weight: 300;
  letter-spacing: -0.02em;
}
.page-sub {
  margin: 6px 0 0;
  font-size: 13.5px;
  color: rgba(255,255,255,0.55);
  max-width: 640px;
}

/* Page columns */
.page-cols {
  display: grid;
  grid-template-columns: 1.8fr 1fr;
  gap: 18px;
  align-items: flex-start;
}

/* Search input full-width */
.search-jumbo {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 22px;
  background: linear-gradient(145deg, rgba(30,41,59,0.55), rgba(15,23,42,0.6));
  border: 1px solid rgba(34,197,94,0.18);
  border-radius: 14px;
  position: relative;
}
.search-jumbo::before {
  content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,0.6), transparent);
}
.search-jumbo input {
  flex: 1; background: transparent; border: none; outline: none;
  font-size: 17px; color: var(--text);
  font-family: 'Geist', sans-serif;
}
.search-jumbo input::placeholder { color: rgba(255,255,255,0.35); }

/* Generic info table */
.itable {
  width: 100%; border-collapse: collapse;
  font-size: 12.5px;
}
.itable th {
  padding: 10px 12px;
  text-align: left;
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.5);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  font-weight: 400;
}
.itable td {
  padding: 11px 12px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.85);
}
.itable tr:hover td { background: rgba(255,255,255,0.02); }
.itable tr:last-child td { border-bottom: none; }

/* Page main with no extra padding */
.app-body {
  display: flex;
  position: relative;
  z-index: 2;
}
.app-main {
  flex: 1; padding: 20px 36px 20px; min-width: 0;
  overflow-y: auto; max-height: calc(100vh - 73px);
  transition: max-height 350ms cubic-bezier(0.2,0.7,0.2,1);
}
.app-body.is-home .app-main {
  max-height: 100vh;
}

/* Special "Abrir ticket" entry */
.side-ticket {
  display: flex; align-items: center; gap: 10px;
  width: 100%;
  padding: 14px 14px;
  margin: 6px 0;
  background: linear-gradient(135deg, rgba(34,197,94,0.10), rgba(59,130,246,0.08));
  border: 1px solid rgba(34,197,94,0.25);
  border-radius: 10px;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 200ms ease;
  min-width: 0;
  flex-shrink: 0;
}
.side-ticket::before {
  content: ""; position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,0.7), transparent);
}
.side-ticket:hover {
  border-color: rgba(34,197,94,0.45);
  box-shadow: 0 12px 30px -10px rgba(34,197,94,0.35);
  transform: translateY(-1px);
}
.side-ticket.is-active {
  background: linear-gradient(135deg, rgba(34,197,94,0.18), rgba(59,130,246,0.12));
  border-color: rgba(34,197,94,0.55);
}
.side-ticket-ic {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.30);
  color: var(--green);
  flex-shrink: 0;
}
.side-ticket-text {
  flex: 1; min-width: 0;
  display: flex; flex-direction: column;
}
.side-ticket-title {
  font-size: 13.5px; font-weight: 500; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-ticket-sub {
  font-size: 9px; letter-spacing: 0.22em;
  color: rgba(34,197,94,0.85);
  margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-ticket-dot {
  flex-shrink: 0;
}

.side-ticket-expanded {
  margin-left: 8px;
  padding: 0 0 0 16px;
  border-left: 2px solid rgba(34,197,94,0);
  background: linear-gradient(90deg, rgba(34,197,94,0), transparent 70%);
  border-radius: 0 8px 8px 0;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-6px);
  transition: max-height 300ms cubic-bezier(0.2,0.7,0.2,1),
              opacity 250ms ease,
              transform 250ms ease,
              padding 300ms ease,
              border-color 300ms ease,
              background 300ms ease;
}
.side-ticket-expanded.is-open {
  max-height: 400px;
  opacity: 1;
  transform: translateY(0);
  padding: 8px 0 8px 16px;
  margin-top: 6px;
  border-left-color: rgba(34,197,94,0.25);
  background: linear-gradient(90deg, rgba(34,197,94,0.03), transparent 70%);
}

/* Keep sidebar items at their natural height — flex column was squishing some */
.side-tool, .side-role, .side-section, .reports-card,
.side-role-head, .side-section-head, .sidebar-divider {
  flex-shrink: 0;
}

/* Compact ticket card at narrow sidebar widths */
@media (max-width: 1280px) {
  .side-ticket {
    padding: 12px 10px;
    gap: 9px;
  }
  .side-ticket-ic { width: 30px; height: 30px; }
  .side-ticket-title { font-size: 13px; }
  .side-ticket-sub { font-size: 8.5px; letter-spacing: 0.2em; }
}

/* Tabs */
.tabs {
  display: flex; gap: 4px;
  padding: 4px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 10px;
  width: fit-content;
}
.tab {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 7px;
  color: rgba(255,255,255,0.55);
  font-size: 12.5px;
  cursor: pointer;
  transition: all 180ms ease;
}
.tab:hover { color: var(--text); }
.tab.is-active {
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.25);
  color: var(--text);
}
.tab .tab-count {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.4);
}
.tab.is-active .tab-count { color: var(--green); }

/* Ticket-specific */
.ticket-status {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 9px;
  border-radius: 99px;
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.ticket-status .d {
  width: 6px; height: 6px; border-radius: 99px;
}
.ts-backlog  { background: rgba(255,255,255,0.04); color: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.10); }
.ts-backlog .d  { background: rgba(255,255,255,0.4); }
.ts-triage   { background: rgba(59,130,246,0.08); color: var(--info); border: 1px solid rgba(59,130,246,0.25); }
.ts-triage .d   { background: var(--info); }
.ts-progress { background: rgba(34,197,94,0.10); color: var(--green); border: 1px solid rgba(34,197,94,0.30); }
.ts-progress .d { background: var(--green); box-shadow: 0 0 0 0 rgba(34,197,94,0.5); animation: pulse 2.2s ease-out infinite; }
.ts-review   { background: rgba(168,85,247,0.10); color: #c084fc; border: 1px solid rgba(168,85,247,0.30); }
.ts-review .d   { background: #a855f7; }
.ts-done     { background: rgba(34,197,94,0.06); color: rgba(34,197,94,0.75); border: 1px solid rgba(34,197,94,0.20); }
.ts-done .d     { background: rgba(34,197,94,0.75); }
.ts-blocked  { background: rgba(239,68,68,0.08); color: var(--danger); border: 1px solid rgba(239,68,68,0.25); }
.ts-blocked .d  { background: var(--danger); }

.prio-low    { color: rgba(255,255,255,0.5); }
.prio-med    { color: var(--info); }
.prio-high   { color: var(--warning); }
.prio-crit   { color: var(--danger); }

/* Header narrow width */
@media (max-width: 1180px) {
  .user-meta { display: none !important; }
}
@media (max-width: 980px) {
  .inline-search--header { display: none !important; }
}

@media (prefers-reduced-motion: reduce) {
  .rise, .dot-pulse, .bg-scan { animation: none !important; }
}

/* ============================================================
 * Family Organogram (gs-fam-col → aba "Organograma")
 * ============================================================ */

.tabs-seg {
  display: inline-flex;
  padding: 3px;
  gap: 2px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
}
.tabs-seg > button {
  padding: 5px 12px;
  border-radius: 999px;
  font: inherit;
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: rgba(255,255,255,0.55);
  background: transparent;
  border: none;
  cursor: pointer;
  transition: background 140ms ease, color 140ms ease;
}
.tabs-seg > button:hover:not(.is-active) { color: rgba(255,255,255,0.9); }
.tabs-seg > button.is-active {
  background: rgba(34,197,94,0.14);
  color: #dcfce7;
  box-shadow: inset 0 0 0 1px rgba(34,197,94,0.28);
}

.org-chart {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0;
  padding: 18px 8px 22px;
  position: relative;
}

.org-node-root {
  position: relative;
  min-width: 280px;
  max-width: 460px;
  padding: 16px 22px 14px;
  border-radius: 14px;
  text-align: center;
  background:
    radial-gradient(110% 140% at 50% -30%, rgba(34,197,94,0.16), rgba(34,197,94,0) 55%),
    linear-gradient(180deg, rgba(34,197,94,0.10), rgba(34,197,94,0.02));
  border: 1px solid rgba(34,197,94,0.32);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 18px 48px -28px rgba(34,197,94,0.45);
  z-index: 2;
}
.org-root-tag {
  font-size: 9.5px;
  color: var(--green);
  letter-spacing: 0.32em;
  opacity: 0.85;
  margin-bottom: 6px;
}
.org-root-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.org-root-meta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.55);
}
.org-root-meta .org-dot { color: rgba(255,255,255,0.25); }
.org-root-parent {
  margin-top: 8px;
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.45);
}

.org-trunk {
  width: 1.5px;
  height: 26px;
  background: linear-gradient(180deg, rgba(34,197,94,0.55), rgba(255,255,255,0.08));
  border-radius: 1px;
}

.org-empty {
  margin-top: 18px;
  padding: 14px 18px;
  border: 1px dashed rgba(255,255,255,0.10);
  border-radius: 10px;
  color: rgba(255,255,255,0.5);
  font-size: 12.5px;
}

.org-tier {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.org-tier-label {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 9.5px;
  letter-spacing: 0.32em;
  color: rgba(255,255,255,0.6);
  background: rgba(10,14,39,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 16px;
  position: relative;
  z-index: 2;
}

.org-row {
  position: relative;
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  justify-items: stretch;
  padding-top: 14px;
}
.org-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    rgba(255,255,255,0.18) 14%,
    rgba(255,255,255,0.18) 86%,
    transparent);
}
.org-row:has(> .org-card:only-child)::before { display: none; }

.org-card {
  position: relative;
  padding: 11px 12px 9px;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}
.org-card::before {
  content: '';
  position: absolute;
  top: -14px;
  left: 50%;
  width: 1px;
  height: 14px;
  background: rgba(255,255,255,0.16);
}
.org-card:hover {
  transform: translateY(-1px);
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.14);
}

.org-card-admin {
  background: linear-gradient(180deg, rgba(34,197,94,0.10), rgba(34,197,94,0.02));
  border-color: rgba(34,197,94,0.26);
}
.org-card-admin::before { background: rgba(34,197,94,0.45); }
.org-card-admin:hover {
  background: linear-gradient(180deg, rgba(34,197,94,0.14), rgba(34,197,94,0.04));
  border-color: rgba(34,197,94,0.38);
}

.org-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
}
.org-card-avatar {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  background: rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.78);
}
.org-card-admin .org-card-avatar {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #06170d;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.32), 0 6px 14px -6px rgba(34,197,94,0.55);
}
.org-card-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.org-card-email {
  font-size: 10.5px;
  color: rgba(255,255,255,0.45);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.org-card-foot {
  margin-top: 9px;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}
.org-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 9px;
  letter-spacing: 0.22em;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
}
.org-pill-admin {
  background: rgba(34,197,94,0.12);
  border-color: rgba(34,197,94,0.30);
  color: #86efac;
}
.org-pill-n2 {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.28);
  color: #fde68a;
}
.org-pill-n1 {
  background: rgba(59,130,246,0.10);
  border-color: rgba(59,130,246,0.28);
  color: #93c5fd;
}
.org-pill-auto {
  background: rgba(168,85,247,0.10);
  border-color: rgba(168,85,247,0.28);
  color: #d8b4fe;
}

/* Team cards (Time × Família) ------------------------------- */
.org-card-team {
  background: linear-gradient(180deg, rgba(59,130,246,0.08), rgba(59,130,246,0.02));
  border-color: rgba(59,130,246,0.24);
}
.org-card-team::before { background: rgba(59,130,246,0.40); }
.org-card-team:hover {
  background: linear-gradient(180deg, rgba(59,130,246,0.13), rgba(59,130,246,0.03));
  border-color: rgba(59,130,246,0.36);
}
.org-card-avatar-team {
  background: linear-gradient(135deg, #60a5fa, #3b82f6);
  color: #06140d;
  box-shadow: 0 0 0 1px rgba(59,130,246,0.32), 0 6px 14px -6px rgba(59,130,246,0.55);
}

.org-card-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 18px;
  height: 18px;
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 140ms ease, background 140ms ease, color 140ms ease;
}
.org-card:hover .org-card-remove { opacity: 1; }
.org-card-remove:hover {
  background: rgba(239,68,68,0.16);
  border-color: rgba(239,68,68,0.32);
  color: #fecaca;
}

/* Reformulated team list (gs-fam-time → aba "Lista") --------- */
.fam-team-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 4px;
}
.fam-team-row {
  display: grid;
  grid-template-columns: 28px 1fr auto auto auto;
  gap: 12px;
  align-items: center;
  padding: 9px 12px;
  border-radius: 9px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  transition: background 140ms ease, border-color 140ms ease;
}
.fam-team-row:hover {
  background: rgba(255,255,255,0.045);
  border-color: rgba(255,255,255,0.10);
}
.fam-team-ic {
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: rgba(59,130,246,0.10);
  border: 1px solid rgba(59,130,246,0.24);
  color: #93c5fd;
  display: flex;
  align-items: center;
  justify-content: center;
}
.fam-team-name {
  font-size: 13px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fam-team-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.fam-team-id {
  font-size: 10.5px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
}

@media (max-width: 900px) {
  .org-row { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .org-row { grid-template-columns: 1fr; }
  .org-row::before { display: none; }
  .org-card::before { display: none; }
  .org-card-remove { opacity: 1; }
  .fam-team-row { grid-template-columns: 28px 1fr auto; }
  .fam-team-row .org-pill-auto, .fam-team-row .fam-team-id { display: none; }
}

/* Fornecedora root + family-child card (Fornecedora × Família) */
.org-node-fornecedora {
  background:
    radial-gradient(110% 140% at 50% -30%, rgba(168,85,247,0.18), rgba(168,85,247,0) 55%),
    linear-gradient(180deg, rgba(168,85,247,0.12), rgba(168,85,247,0.03));
  border-color: rgba(168,85,247,0.34);
  box-shadow:
    0 1px 0 rgba(255,255,255,0.04) inset,
    0 18px 48px -28px rgba(168,85,247,0.5);
}
.org-node-fornecedora .org-root-tag { color: #d8b4fe; }
.org-trunk-fornecedora {
  background: linear-gradient(180deg, rgba(168,85,247,0.55), rgba(255,255,255,0.08));
}

.org-card-fam {
  background: linear-gradient(180deg, rgba(34,197,94,0.08), rgba(34,197,94,0.02));
  border-color: rgba(34,197,94,0.22);
}
.org-card-fam::before { background: rgba(34,197,94,0.42); }
.org-card-fam:hover {
  background: linear-gradient(180deg, rgba(34,197,94,0.12), rgba(34,197,94,0.03));
  border-color: rgba(34,197,94,0.34);
}
.org-card-avatar-fam {
  background: linear-gradient(135deg, rgba(34,197,94,0.32), rgba(22,163,74,0.24));
  color: #bbf7d0;
  box-shadow: 0 0 0 1px rgba(34,197,94,0.32);
}

.org-pill-special {
  background: rgba(168,85,247,0.10);
  border-color: rgba(168,85,247,0.30);
  color: #d8b4fe;
}

.fam-team-ic-fam {
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.24);
  color: #86efac;
}

/* Orphan teams alert (Time × Família) ----------------------- */
.orphan-zone {
  margin-top: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.orphan-bar {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(245,158,11,0.10), rgba(245,158,11,0.02));
  border: 1px solid rgba(245,158,11,0.28);
  color: #fde68a;
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, transform 160ms ease;
}
.orphan-bar:hover {
  background: linear-gradient(180deg, rgba(245,158,11,0.14), rgba(245,158,11,0.03));
  border-color: rgba(245,158,11,0.42);
}
.orphan-bar:active { transform: translateY(0); }
.orphan-bar-arrow {
  color: rgba(255,255,255,0.6);
  font-size: 13px;
  display: inline-block;
  transition: transform 160ms ease;
}
.orphan-bar:hover .orphan-bar-arrow { transform: translate(2px, -2px); color: #fde68a; }
.orphan-bar-ic {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(245,158,11,0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fbbf24;
}
.orphan-bar-text { display: inline-flex; align-items: center; gap: 4px; }
.orphan-bar-text strong { color: #fef3c7; font-weight: 600; }
.orphan-bar-hint {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.4);
  text-transform: uppercase;
  padding-left: 4px;
  border-left: 1px solid rgba(255,255,255,0.10);
  margin-left: 4px;
}
.orphan-bar-chev {
  color: rgba(255,255,255,0.55);
  font-size: 12px;
  transition: transform 220ms ease;
  display: inline-block;
}
.orphan-bar-ok {
  cursor: default;
  background: linear-gradient(180deg, rgba(34,197,94,0.06), rgba(34,197,94,0.02));
  border-color: rgba(34,197,94,0.22);
  color: rgba(220,252,231,0.78);
}
.orphan-bar-ok .orphan-bar-ic {
  background: rgba(34,197,94,0.14);
  color: var(--green);
}
.orphan-bar-ok:hover {
  background: linear-gradient(180deg, rgba(34,197,94,0.06), rgba(34,197,94,0.02));
  border-color: rgba(34,197,94,0.22);
}

.orphan-card {
  padding: 14px 16px;
  width: 100%;
  max-width: 980px;
  animation: orph-in 220ms ease both;
}
@keyframes orph-in {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}
.orphan-help {
  font-size: 9.5px;
  letter-spacing: 0.28em;
  color: rgba(245,158,11,0.78);
  padding-bottom: 10px;
  border-bottom: 1px dashed rgba(255,255,255,0.06);
  margin-bottom: 10px;
}

.orphan-row {
  display: grid;
  grid-template-columns: 32px minmax(180px, 1fr) minmax(160px, 180px) minmax(170px, 200px) auto;
  gap: 10px;
  align-items: center;
  padding: 9px 6px;
  border-top: 1px dashed rgba(255,255,255,0.06);
}
.orphan-row:first-of-type { border-top: none; padding-top: 4px; }

.orphan-ic {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(245,158,11,0.10);
  border: 1px solid rgba(245,158,11,0.24);
  color: #fbbf24;
  display: flex;
  align-items: center;
  justify-content: center;
}
.orphan-name {
  font-size: 13px;
  font-weight: 500;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.orphan-sub {
  margin-top: 2px;
  display: flex;
  gap: 6px;
  font-size: 10.5px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.orphan-sub .orphan-dot { color: rgba(255,255,255,0.25); }
.orphan-sel {
  font: inherit;
  font-size: 12px;
  padding: 7px 8px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 7px;
  color: var(--text);
  outline: none;
  cursor: pointer;
}
.orphan-sel:focus { border-color: rgba(34,197,94,0.40); }

@media (max-width: 900px) {
  .orphan-row {
    grid-template-columns: 32px 1fr 1fr;
    grid-auto-rows: auto;
    row-gap: 8px;
  }
  .orphan-row > .orphan-sel:nth-of-type(1) { grid-column: 2 / 4; }
  .orphan-row > .orphan-sel:nth-of-type(2) { grid-column: 2 / 4; }
  .orphan-row > button { grid-column: 1 / 4; justify-self: stretch; }
}

/* Orphan modal — overlay com lista de times sem família */
.orphan-modal-backdrop {
  position: fixed; inset: 0;
  background: rgba(5,8,22,0.78);
  backdrop-filter: blur(8px);
  z-index: 200;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 8vh 24px 4vh;
  animation: fade-in 180ms ease forwards;
  overflow-y: auto;
}
.orphan-modal {
  width: min(1040px, 100%);
  background: linear-gradient(145deg, rgba(15,23,42,0.94), rgba(10,14,39,0.96));
  border: 1px solid rgba(245,158,11,0.32);
  border-radius: 14px;
  box-shadow: 0 50px 120px -20px rgba(0,0,0,0.85);
  overflow: hidden;
  animation: slide-in 240ms cubic-bezier(0.2,0.7,0.2,1);
  display: flex;
  flex-direction: column;
  max-height: calc(92vh - 8vh);
}
.orphan-modal-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  background: linear-gradient(180deg, rgba(245,158,11,0.06), transparent);
}
.orphan-modal-head .orphan-bar-ic {
  width: 28px; height: 28px;
}
.orphan-modal-title {
  font-size: 14px;
  font-weight: 500;
  color: #fef3c7;
  flex: 1;
}
.orphan-modal-title strong { color: #fde68a; font-weight: 700; }
.orphan-modal-close {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.12);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  width: 28px; height: 28px;
  border-radius: 8px;
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  transition: background 140ms ease, color 140ms ease;
}
.orphan-modal-close:hover { background: rgba(255,255,255,0.10); color: var(--text); }
.orphan-modal-body {
  padding: 14px 18px 18px;
  overflow-y: auto;
}

/* ============================================================
 * Family catalog organogram (gs-fam-cat → aba "Organograma")
 * ============================================================ */

.cat-org {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-top: 4px;
}
.cat-org-section { display: flex; flex-direction: column; gap: 10px; }
.cat-org-section-label {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 10px;
  letter-spacing: 0.32em;
  color: var(--green);
  padding: 0 4px;
}
.cat-org-section-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, rgba(34,197,94,0.30), rgba(255,255,255,0.03));
}
.cat-org-section-count {
  font-size: 10px;
  letter-spacing: 0.22em;
  color: rgba(255,255,255,0.45);
}
.cat-org-section-special { color: #d8b4fe; }
.cat-org-section-special::after {
  background: linear-gradient(90deg, rgba(168,85,247,0.30), rgba(255,255,255,0.03));
}
.cat-org-section-warn { color: rgba(245,158,11,0.95); }
.cat-org-section-warn::after {
  background: linear-gradient(90deg, rgba(245,158,11,0.34), rgba(255,255,255,0.03));
}
.cat-org-section-muted { color: rgba(255,255,255,0.55); }
.cat-org-section-muted::after {
  background: linear-gradient(90deg, rgba(255,255,255,0.16), rgba(255,255,255,0.03));
}
.cat-org-section-todas { color: rgba(96,165,250,0.95); }
.cat-org-section-todas::after {
  background: linear-gradient(90deg, rgba(59,130,246,0.34), rgba(255,255,255,0.03));
}

.cat-org-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(228px, 1fr));
  gap: 10px;
  align-items: start;
}

.cat-tree {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 11px 10px 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.025);
  border: 1px solid rgba(255,255,255,0.06);
  transition: border-color 160ms ease, background 160ms ease;
}
.cat-tree:hover {
  border-color: rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.035);
}
.cat-tree.is-inactive { opacity: 0.55; }

.cat-tree-root {
  padding: 9px 11px;
  border-radius: 8px;
  text-align: center;
  background:
    radial-gradient(140% 140% at 50% -30%, rgba(34,197,94,0.12), rgba(34,197,94,0) 55%),
    linear-gradient(180deg, rgba(34,197,94,0.08), rgba(34,197,94,0.02));
  border: 1px solid rgba(34,197,94,0.26);
  box-shadow: 0 10px 24px -22px rgba(34,197,94,0.45);
}
.cat-tree-root.is-special {
  background:
    radial-gradient(140% 140% at 50% -30%, rgba(168,85,247,0.16), rgba(168,85,247,0) 55%),
    linear-gradient(180deg, rgba(168,85,247,0.10), rgba(168,85,247,0.02));
  border-color: rgba(168,85,247,0.30);
  box-shadow: 0 12px 30px -22px rgba(168,85,247,0.45);
}
.cat-tree-root.is-orphan-root {
  background: linear-gradient(180deg, rgba(245,158,11,0.10), rgba(245,158,11,0.02));
  border-color: rgba(245,158,11,0.28);
  box-shadow: none;
}
.cat-tree-root.is-uncat-root {
  background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  border-color: rgba(255,255,255,0.10);
  box-shadow: none;
}

.cat-tree-tag {
  font-size: 8.5px;
  letter-spacing: 0.28em;
  color: var(--green);
  margin-bottom: 4px;
  opacity: 0.9;
}
.cat-tree-root.is-special .cat-tree-tag { color: #d8b4fe; }
.cat-tree-root.is-orphan-root .cat-tree-tag { color: #fbbf24; }
.cat-tree-root.is-uncat-root .cat-tree-tag { color: rgba(255,255,255,0.55); }
.cat-tree-inactive {
  color: var(--danger);
  letter-spacing: 0.22em;
}

.cat-tree-title {
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.2;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-tree-key {
  margin-top: 2px;
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.5);
  overflow: hidden;
  text-overflow: ellipsis;
}
.cat-tree-meta {
  margin-top: 5px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
  letter-spacing: 0.20em;
  color: rgba(255,255,255,0.5);
  justify-content: center;
}

.cat-tree-trunk {
  align-self: center;
  width: 1.5px;
  height: 12px;
  background: linear-gradient(180deg, rgba(34,197,94,0.40), rgba(255,255,255,0.06));
  border-radius: 1px;
}
.cat-tree-root.is-special + .cat-tree-trunk {
  background: linear-gradient(180deg, rgba(168,85,247,0.40), rgba(255,255,255,0.06));
}

.cat-tree-tier {
  align-self: center;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 8.5px;
  letter-spacing: 0.28em;
  color: rgba(255,255,255,0.6);
  background: rgba(10,14,39,0.55);
  border: 1px solid rgba(255,255,255,0.10);
  margin-bottom: 6px;
}

.cat-tree-row {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 4px;
  padding-top: 8px;
}
.cat-tree-row::before {
  content: '';
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.14) 14%, rgba(255,255,255,0.14) 86%, transparent);
}
.cat-tree-row:has(> .cat-sub:only-child)::before { display: none; }

.cat-sub {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 7px 10px;
  border-radius: 6px;
  background: rgba(245,158,11,0.05);
  border: 1px solid rgba(245,158,11,0.18);
  transition: background 140ms ease, border-color 140ms ease;
  min-width: 0;
}
.cat-sub::before {
  content: '';
  position: absolute;
  top: -8px;
  left: 50%;
  width: 1px;
  height: 8px;
  background: rgba(255,255,255,0.16);
}
.cat-sub:hover {
  background: rgba(245,158,11,0.10);
  border-color: rgba(245,158,11,0.30);
}
.cat-sub.is-inactive { opacity: 0.5; }
.cat-sub-label {
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3;
  word-break: break-word;
}
.cat-sub-key {
  font-size: 9px;
  letter-spacing: 0.14em;
  color: rgba(255,255,255,0.4);
  word-break: break-all;
}
.cat-sub-tag {
  font-size: 8.5px;
  letter-spacing: 0.22em;
  color: var(--danger);
  padding: 2px 6px;
  border-radius: 99px;
  background: rgba(239,68,68,0.10);
  border: 1px solid rgba(239,68,68,0.28);
}

@media (max-width: 560px) {
  .cat-org-grid { grid-template-columns: 1fr; }
  .cat-sub::before { display: none; }
  .cat-tree-row::before { display: none; }
}

/* ============================================================
 * Confirm / Alert modal (window.CCConfirm / window.CCAlert)
 * Substitui o confirm()/alert() nativos do browser.
 * ============================================================ */
.cc-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(5, 8, 22, 0.55);
  -webkit-backdrop-filter: blur(8px) saturate(1.1);
  backdrop-filter: blur(8px) saturate(1.1);
  opacity: 0;
  transition: opacity 180ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cc-modal-backdrop.is-open { opacity: 1; }
.cc-modal-backdrop.is-closing { opacity: 0; }

.cc-modal {
  width: 100%;
  max-width: 440px;
  border-radius: 14px;
  padding: 22px 22px 18px;
  color: var(--text);
  background:
    radial-gradient(140% 80% at 50% -20%, rgba(34,197,94,0.10), rgba(34,197,94,0) 60%),
    linear-gradient(180deg, rgba(30, 41, 59, 0.96), rgba(15, 23, 42, 0.96));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 40px 80px -20px rgba(0,0,0,0.65),
    0 0 0 1px rgba(34,197,94,0.05),
    inset 0 1px 0 rgba(255,255,255,0.05);
  transform: translateY(10px) scale(0.97);
  opacity: 0;
  transition: transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1), opacity 180ms ease;
}
.cc-modal-backdrop.is-open .cc-modal {
  transform: translateY(0) scale(1);
  opacity: 1;
}
.cc-modal-backdrop.is-closing .cc-modal {
  transform: translateY(6px) scale(0.985);
  opacity: 0;
}

.cc-modal-title {
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.3;
  margin-bottom: 8px;
}
.cc-modal-message {
  font-size: 13px;
  color: rgba(255,255,255,0.72);
  line-height: 1.55;
  margin-bottom: 14px;
  white-space: pre-line;
}

.cc-modal-textarea {
  width: 100%;
  min-height: 90px;
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.12);
  color: var(--text);
  font: inherit;
  font-size: 13px;
  line-height: 1.5;
  resize: vertical;
  caret-color: var(--green);
  margin-bottom: 6px;
}
.cc-modal-textarea:focus {
  outline: none;
  border-color: rgba(34,197,94,0.45);
  box-shadow: 0 0 0 2px rgba(34,197,94,0.10);
}
.cc-modal-hint {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-bottom: 4px;
  letter-spacing: 0.02em;
}
.cc-modal-counter {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.35);
  text-align: right;
  margin-bottom: 16px;
}

.cc-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.cc-modal-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.cc-modal-btn {
  padding: 9px 16px;
  border-radius: 8px;
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid transparent;
  transition: background 140ms ease, border-color 140ms ease, transform 100ms ease, box-shadow 140ms ease;
}
.cc-modal-btn:active { transform: scale(0.97); }
.cc-modal-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(34,197,94,0.45);
}

.cc-modal-btn-cancel {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.82);
}
.cc-modal-btn-cancel:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.18);
}

.cc-modal-btn-primary {
  background: linear-gradient(180deg, rgba(34,197,94,0.30), rgba(22,163,74,0.20));
  border-color: rgba(34,197,94,0.42);
  color: #dcfce7;
}
.cc-modal-btn-primary:hover {
  background: linear-gradient(180deg, rgba(34,197,94,0.40), rgba(22,163,74,0.28));
  border-color: rgba(34,197,94,0.55);
}

.cc-modal-btn-danger {
  background: linear-gradient(180deg, rgba(239,68,68,0.28), rgba(220,38,38,0.18));
  border-color: rgba(239,68,68,0.42);
  color: #fecaca;
}
.cc-modal-btn-danger:hover {
  background: linear-gradient(180deg, rgba(239,68,68,0.38), rgba(220,38,38,0.26));
  border-color: rgba(239,68,68,0.55);
}
.cc-modal-btn-danger:focus-visible {
  box-shadow: 0 0 0 2px rgba(239,68,68,0.45);
}

/* ---- Atribuição automática · visão macro ---- */
.atrb-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}
.atrb-stat {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(145deg, rgba(30,41,59,0.55), rgba(15,23,42,0.50));
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}
.atrb-stat::before {
  content: "";
  position: absolute;
  top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--atrb-color, rgba(255,255,255,0.4)), transparent);
  pointer-events: none;
}
.atrb-stat-ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--atrb-bg, rgba(255,255,255,0.04));
  border: 1px solid var(--atrb-border, rgba(255,255,255,0.10));
  color: var(--atrb-color, var(--text));
  flex-shrink: 0;
}
.atrb-stat-num {
  font-size: 22px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--text);
}
.atrb-stat-lbl {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.55);
  margin-top: 6px;
}

.atrb-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: start;
}
.atrb-col {
  display: flex;
  flex-direction: column;
  background: linear-gradient(145deg, rgba(30,41,59,0.45), rgba(15,23,42,0.40));
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  min-height: 200px;
}
.atrb-col-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--atrb-tint, rgba(255,255,255,0.02)), transparent);
}
.atrb-col-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--atrb-color, rgba(255,255,255,0.5));
  box-shadow: 0 0 0 3px rgba(255,255,255,0.04);
}
.atrb-col-title {
  font-family: 'Geist Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--atrb-color, rgba(255,255,255,0.7));
  font-weight: 600;
}
.atrb-col-count {
  margin-left: auto;
  font-family: 'Geist Mono', monospace;
  font-size: 11px;
  color: rgba(255,255,255,0.6);
  background: rgba(255,255,255,0.04);
  padding: 2px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.08);
}
.atrb-col-body {
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  padding: 6px 6px 8px;
}
.atrb-col-empty {
  padding: 18px 14px;
  font-size: 12px;
  color: rgba(255,255,255,0.4);
  text-align: center;
}

.atrb-row {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  padding: 7px 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  cursor: default;
  transition: background 120ms ease, border-color 120ms ease;
}
.atrb-row:hover {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}
.atrb-row + .atrb-row { margin-top: 2px; }
.atrb-avatar {
  width: 26px; height: 26px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.02em;
  background: var(--atrb-bg, rgba(255,255,255,0.06));
  color: var(--atrb-color, var(--text));
  border: 1px solid var(--atrb-border, rgba(255,255,255,0.10));
}
.atrb-row-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.atrb-row-name {
  font-size: 12.5px;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.atrb-row-sub {
  font-family: 'Geist Mono', monospace;
  font-size: 9.5px;
  letter-spacing: 0.06em;
  color: rgba(255,255,255,0.45);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}
.atrb-row-actions {
  display: flex;
  gap: 4px;
  opacity: 0.5;
  transition: opacity 120ms ease;
}
.atrb-row:hover .atrb-row-actions { opacity: 1; }
.atrb-ic-btn {
  width: 26px; height: 26px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.75);
  cursor: pointer;
  padding: 0;
  transition: background 120ms ease, color 120ms ease, border-color 120ms ease;
}
.atrb-ic-btn:hover {
  background: rgba(255,255,255,0.08);
  color: var(--text);
  border-color: rgba(255,255,255,0.18);
}
.atrb-ic-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.atrb-ic-btn[data-tone="warn"]:hover  { background: rgba(245,158,11,0.14); color: #fde68a; border-color: rgba(245,158,11,0.4); }
.atrb-ic-btn[data-tone="danger"]:hover { background: rgba(239,68,68,0.14); color: #fecaca; border-color: rgba(239,68,68,0.4); }
.atrb-ic-btn[data-tone="safe"]:hover   { background: rgba(34,197,94,0.14); color: #bbf7d0; border-color: rgba(34,197,94,0.4); }

/* Floating tooltip (renderizada via React, position: fixed — escapa qualquer overflow) */
.atrb-tip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: rgba(10,14,39,0.96);
  color: var(--text);
  border: 1px solid rgba(34,197,94,0.32);
  border-radius: 7px;
  padding: 6px 10px;
  font: 500 11px 'Geist', system-ui, sans-serif;
  letter-spacing: 0;
  white-space: nowrap;
  box-shadow: 0 14px 30px -10px rgba(0,0,0,0.75);
  transform: translate(-50%, -100%) translateY(-8px);
  opacity: 0;
  animation: atrb-tip-in 120ms ease forwards;
}
.atrb-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: rgba(34,197,94,0.32);
}
@keyframes atrb-tip-in {
  to { opacity: 1; transform: translate(-50%, -100%) translateY(-10px); }
}

@media (max-width: 1100px) {
  .atrb-stats { grid-template-columns: 1fr; }
  .atrb-grid  { grid-template-columns: 1fr; }
  .atrb-col-body { max-height: none; }
}

/* ============================================================
 * Relatório de Resoluções (gs-rel-resol)
 * ============================================================ */
.cc-resol-root { position: relative; }

.cc-resol-filters-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 18px 14px;
  margin-top: 14px;
  box-shadow: 0 8px 28px rgba(0,0,0,0.18);
}
.cc-resol-filters-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(160px, 1fr) minmax(220px, 1.4fr) minmax(140px, auto);
  gap: 12px;
  align-items: end;
}
@media (max-width: 1100px) {
  .cc-resol-filters-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 680px) {
  .cc-resol-filters-grid { grid-template-columns: 1fr; }
}
.cc-resol-field { position: relative; display: flex; flex-direction: column; min-width: 0; }
.cc-resol-label {
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 9.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin: 0 4px 6px;
  font-weight: 700;
}
.cc-resol-period-input {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 4px;
  background: rgba(10, 14, 39, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 6px 8px;
  height: 50px;
  transition: border-color 160ms ease;
}
.cc-resol-period-input:focus-within { border-color: var(--border-green); }
.cc-resol-period-slot {
  display: flex; align-items: center; gap: 8px;
  padding: 6px 8px; border-radius: 8px;
  cursor: pointer; min-width: 0;
  color: var(--text);
}
.cc-resol-period-slot:hover { background: var(--glass); }
.cc-resol-period-slot .mono {
  font-size: 13px; letter-spacing: 0.08em; text-transform: none; color: var(--text);
}
.cc-resol-period-sep {
  font-size: 11px; color: var(--text-muted); padding: 0 4px;
}

.cc-resol-calendar-pop {
  position: absolute;
  top: 100%;
  margin-top: 6px;
  z-index: 60;
  background: var(--bg-mid);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(0,0,0,0.45);
  width: 288px;
}
.cc-resol-calendar-pop.is-left { left: 0; }
.cc-resol-calendar-pop.is-right { right: 0; }
.cc-resol-cal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 12px; border-bottom: 1px solid var(--border);
}
.cc-resol-cal-nav {
  border: none; background: transparent; color: var(--text);
  width: 28px; height: 28px; border-radius: 6px;
  font-size: 16px; line-height: 1;
}
.cc-resol-cal-nav:hover { background: var(--glass); }
.cc-resol-cal-title {
  font-weight: 600; font-size: 13.5px; text-transform: capitalize;
}
.cc-resol-cal-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; padding: 10px 12px 6px;
  font-size: 10.5px; color: var(--text-muted); text-align: center;
}
.cc-resol-cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  gap: 4px; padding: 0 12px 12px;
}
.cc-resol-cal-empty { height: 32px; }
.cc-resol-cal-day {
  height: 32px; border: none; border-radius: 7px;
  background: var(--glass);
  color: var(--text); font-size: 12.5px;
  display: flex; align-items: center; justify-content: center;
  transition: background 140ms ease;
}
.cc-resol-cal-day:hover { background: var(--glass-strong); }
.cc-resol-cal-day.is-sel { background: var(--green); color: #07210e; font-weight: 700; }
.cc-resol-cal-day.is-dis { opacity: 0.35; cursor: not-allowed; }

.cc-resol-select-btn {
  height: 50px;
  background: rgba(10, 14, 39, 0.6);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: var(--text);
  padding: 0 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  font-size: 13.5px; min-width: 0;
  transition: border-color 160ms ease;
}
.cc-resol-select-btn:hover:not(:disabled) { border-color: var(--border-green); }
.cc-resol-select-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.cc-resol-select-text {
  flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left;
}
.cc-resol-select-caret {
  color: var(--text-muted); font-size: 11px;
  transition: transform 180ms ease;
}
.cc-resol-select-caret.is-open { transform: rotate(180deg); }

.cc-resol-dropdown-pop {
  position: absolute;
  top: 100%; left: 0; margin-top: 6px;
  z-index: 60;
  background: var(--bg-mid);
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  box-shadow: 0 14px 38px rgba(0,0,0,0.45);
  width: 100%; min-width: 200px;
  overflow: hidden;
}
.cc-resol-dropdown-pop.is-wide { min-width: 280px; }
.cc-resol-dd-list {
  max-height: 280px; overflow-y: auto;
  padding: 4px 0;
}
.cc-resol-dd-item {
  width: 100%; border: none; background: transparent;
  color: var(--text);
  padding: 8px 12px;
  display: flex; align-items: center; gap: 8px;
  font-size: 13px; text-align: left;
}
.cc-resol-dd-item:hover { background: var(--glass); }
.cc-resol-dd-check {
  display: inline-flex; align-items: center; justify-content: center;
  width: 14px; height: 14px; color: var(--green); font-weight: 700;
}
.cc-resol-dd-checkbox {
  display: inline-flex; align-items: center; justify-content: center;
  width: 16px; height: 16px;
  border-radius: 4px;
  border: 1px solid var(--border-green);
  color: #07210e; font-size: 11px; font-weight: 700;
}
.cc-resol-dd-checkbox.is-on { background: var(--green); border-color: var(--green); }
.cc-resol-dd-label { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cc-resol-dd-empty {
  padding: 14px 12px; font-size: 12.5px; color: var(--text-muted);
}
.cc-resol-dd-foot {
  display: flex; justify-content: flex-end;
  padding: 6px 10px; border-top: 1px solid var(--border);
}
.cc-resol-dd-clear {
  border: none; background: transparent;
  color: var(--text-muted); font-size: 11.5px;
}
.cc-resol-dd-clear:hover { color: var(--text); }

.cc-resol-search-btn {
  height: 50px;
  background: linear-gradient(135deg, var(--green) 0%, var(--green-dark) 100%);
  color: #07210e; font-weight: 700; font-size: 13.5px;
  border: none; border-radius: 12px;
  padding: 0 18px;
  display: flex; align-items: center; gap: 8px;
  box-shadow: 0 4px 14px rgba(34,197,94,0.22);
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.cc-resol-search-btn:hover:not(:disabled) {
  box-shadow: 0 6px 22px rgba(34,197,94,0.42);
  transform: translateY(-1px);
}
.cc-resol-search-btn:active:not(:disabled) { transform: scale(0.97); }
.cc-resol-search-btn:disabled { opacity: 0.55; cursor: not-allowed; box-shadow: none; }

.cc-resol-mode-row { display: flex; justify-content: flex-end; margin-top: 12px; }
.cc-resol-mode-badge {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--glass);
  border: 1px solid var(--border);
  padding: 5px 11px; border-radius: 999px;
  font-family: 'Geist Mono', ui-monospace, monospace;
  font-size: 10.5px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--text-2);
}
.cc-resol-mode-dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(34,197,94,0.6);
}
.cc-resol-err {
  margin-top: 10px; padding: 8px 12px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-radius: 8px;
  color: #fecaca; font-size: 12.5px;
}

.cc-resol-kpi-card {
  margin-top: 14px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 16px;
  overflow: hidden;
}
.cc-resol-kpi-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.02);
  flex-wrap: wrap; gap: 12px;
}
.cc-resol-kpi-title { font-weight: 700; font-size: 14.5px; display: inline-block; margin-right: 10px; }
.cc-resol-kpi-pill {
  display: inline-block;
  padding: 3px 9px; border-radius: 999px;
  background: var(--glass); border: 1px solid var(--border);
  font-size: 10px; color: var(--text-muted);
  letter-spacing: 0.18em;
}
.cc-resol-export-btn {
  display: flex; align-items: center; gap: 6px;
  background: var(--glass-strong);
  color: var(--text);
  border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 10px;
  font-size: 12.5px; font-weight: 500;
}
.cc-resol-export-btn:hover:not(:disabled) { background: rgba(255,255,255,0.12); }
.cc-resol-export-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.cc-resol-kpi-body {
  padding: 36px 18px 32px;
  text-align: center;
}
.cc-resol-kpi-num {
  font-size: 56px; font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--text);
  line-height: 1.05; margin-bottom: 6px;
}
.cc-resol-kpi-cap { font-size: 13px; color: var(--text-muted); }
.cc-resol-kpi-hint {
  margin-top: 10px; font-size: 11.5px; color: var(--text-faint);
}

.cc-resol-modal-backdrop {
  position: fixed; inset: 0; z-index: 90;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
  padding: 16px;
}
.cc-resol-modal {
  width: 100%; max-width: 420px;
  background: var(--bg-mid);
  border: 1px solid rgba(239, 68, 68, 0.45);
  border-radius: 16px;
  padding: 22px;
  box-shadow: 0 20px 48px rgba(0,0,0,0.55);
  text-align: center;
}
.cc-resol-modal-icon {
  width: 52px; height: 52px;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 12px;
  background: rgba(239, 68, 68, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 999px;
  font-size: 22px;
}
.cc-resol-modal-title {
  font-size: 16px; font-weight: 700; margin: 0 0 10px;
}
.cc-resol-modal-text {
  font-size: 13px; color: var(--text-muted); margin: 4px 0; line-height: 1.5;
}
.cc-resol-modal-ok {
  margin-top: 14px;
  width: 100%; height: 42px; border: none; border-radius: 10px;
  background: rgba(239, 68, 68, 0.9); color: #fff;
  font-weight: 700; font-size: 13.5px;
}
.cc-resol-modal-ok:hover { background: rgba(239, 68, 68, 1); }

.cc-resol-loading-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(10, 14, 39, 0.82);
  backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center;
}
.cc-resol-loading-box {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  padding: 24px 32px;
}
.cc-resol-spin {
  font-size: 40px; color: var(--green);
  animation: cc-resol-spin 1.2s linear infinite;
  margin-bottom: 6px;
}
@keyframes cc-resol-spin {
  to { transform: rotate(360deg); }
}
.cc-resol-loading-title {
  color: var(--text); font-weight: 600; font-size: 15px;
}
.cc-resol-loading-sub {
  color: var(--text-muted); font-size: 12.5px;
}

/* Tool comingSoon — pequena nota usada na sidebar (a className extra `is-coming-soon` é também
   aplicada; o style inline cuida do principal mas isso garante o estado visual coerente). */
.side-tool.is-coming-soon { pointer-events: auto; }
.side-tool.is-coming-soon .side-tool-label { color: rgba(255,255,255,0.55); }

/* Responsividade — telas ≤ 1180px (13" laptop comum): empilha o sidebar de
   família/seleção do conteúdo principal pra liberar espaço da árvore. */
@media (max-width: 1180px) {
  .page-sidebar-grid {
    grid-template-columns: 1fr !important;
  }
  .org-row {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }
  .cat-org-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)) !important;
  }
}
@media (max-width: 820px) {
  .org-row {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)) !important;
    gap: 8px !important;
  }
  .cat-org-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)) !important;
  }
}

/* Refresh button — top-right do header. Spin animation curtinha quando clica. */
.header-refresh:hover {
  color: var(--green) !important;
}
@keyframes cc-refresh-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(-360deg); }
}

/* ============================================================
   HOME · MVP "Resolva tudo aqui" (Início)
   Layout central: título grande, busca no centro, dica de atalho.
   ============================================================ */
.home-hero {
  height: 100vh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px 20px 16px;
  position: relative;
  box-sizing: border-box;
}
.home-hero-frame {
  position: absolute;
  inset: 28px;
  pointer-events: none;
}
.home-hero-corner {
  position: absolute;
  width: 22px; height: 22px;
  border-color: rgba(34,197,94,0.35);
  border-style: solid;
  border-width: 0;
  opacity: 0.55;
}
.home-hero-corner.tl { top: 0; left: 0; border-top-width: 1px; border-left-width: 1px; }
.home-hero-corner.tr { top: 0; right: 0; border-top-width: 1px; border-right-width: 1px; }
.home-hero-corner.bl { bottom: 0; left: 0; border-bottom-width: 1px; border-left-width: 1px; }
.home-hero-corner.br { bottom: 0; right: 0; border-bottom-width: 1px; border-right-width: 1px; }

.home-hero-inner {
  position: relative;
  z-index: 1;
  max-width: 780px;
  width: 100%;
  text-align: center;
}
.home-hero-eyebrow {
  font-family: 'Geist Mono', monospace;
  font-size: 10.5px;
  letter-spacing: 0.36em;
  color: rgba(34,197,94,0.85);
  margin-bottom: 12px;
  text-transform: uppercase;
}
.home-hero-title {
  margin: 0 0 12px;
  font-size: clamp(38px, 5vw, 68px);
  font-weight: 200;
  letter-spacing: -0.045em;
  line-height: 0.94;
  background: linear-gradient(180deg, #ffffff 0%, rgba(255,255,255,0.62) 92%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-wrap: balance;
}
.home-hero-sub {
  margin: 0 auto 18px;
  max-width: 560px;
  font-size: 13px;
  line-height: 1.55;
  color: rgba(255,255,255,0.55);
}

/* ============================================================
   INLINE SEARCH · base shared by header bar + home hero
   Each instance owns its own dropdown. Variants tune chrome.
   ============================================================ */
.inline-search {
  position: relative;
  display: flex;
  flex-direction: column;
}
.inline-search-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 10px;
  cursor: text;
  transition: border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}
.inline-search-bar:hover {
  border-color: rgba(255,255,255,0.18);
  background: rgba(255,255,255,0.06);
}
.inline-search.is-open .inline-search-bar,
.inline-search-bar:focus-within {
  border-color: rgba(34,197,94,0.42);
  background: rgba(255,255,255,0.05);
  box-shadow: 0 0 0 3px rgba(34,197,94,0.08);
}
.inline-search-icon {
  display: inline-flex; align-items: center; justify-content: center;
  color: rgba(255,255,255,0.55);
  flex-shrink: 0;
}
.inline-search.is-open .inline-search-icon,
.inline-search-bar:focus-within .inline-search-icon {
  color: var(--green);
  filter: drop-shadow(0 0 10px rgba(34,197,94,0.35));
}
.inline-search-input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: none;
  outline: none;
  color: var(--text);
  font-family: 'Geist', sans-serif;
  caret-color: var(--green);
}
.inline-search-input::placeholder { color: rgba(255,255,255,0.42); }
.inline-search-input:focus::placeholder { color: rgba(255,255,255,0.30); }
.inline-search-hint {
  display: inline-flex; gap: 4px; align-items: center;
  flex-shrink: 0;
  pointer-events: none;
}

/* Header variant: compact, anchored top-right */
.inline-search--header { min-width: 320px; max-width: 380px; }
.inline-search--header .inline-search-bar {
  padding: 8px 12px 8px 14px;
  font-size: 12.5px;
}
.inline-search--header .inline-search-input {
  font-size: 12.5px;
  padding: 1px 0;
}
.inline-search--header .inline-search-icon { color: rgba(255,255,255,0.55); }
.inline-search--header .inline-search-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: min(560px, calc(100vw - 80px));
  z-index: 50;
}

/* Hero variant: large, occupies the home page main area */
.inline-search--hero { width: 100%; }
.inline-search--hero .inline-search-bar {
  padding: 18px 22px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(30,41,59,0.55), rgba(15,23,42,0.62));
  border-color: rgba(34,197,94,0.22);
  box-shadow: 0 22px 70px -34px rgba(34,197,94,0.45),
              inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
}
.inline-search--hero .inline-search-bar::before {
  content: "";
  position: absolute; top: 0; left: 14px; right: 14px; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(34,197,94,0.65), transparent);
  opacity: 0.75;
}
.inline-search--hero .inline-search-bar:hover {
  border-color: rgba(34,197,94,0.42);
  background: linear-gradient(145deg, rgba(30,41,59,0.7), rgba(15,23,42,0.72));
}
.inline-search--hero.is-open .inline-search-bar,
.inline-search--hero .inline-search-bar:focus-within {
  border-color: rgba(34,197,94,0.55);
  box-shadow: 0 30px 80px -30px rgba(34,197,94,0.60),
              inset 0 1px 0 rgba(255,255,255,0.05),
              0 0 0 3px rgba(34,197,94,0.08);
}
.inline-search--hero .inline-search-icon,
.inline-search--hero.is-open .inline-search-icon,
.inline-search--hero .inline-search-bar:focus-within .inline-search-icon {
  color: rgba(255,255,255,0.85);
  filter: none;
  opacity: 1;
}
.inline-search--hero .inline-search-input {
  font-size: 16px;
  letter-spacing: -0.005em;
  padding: 2px 0;
}
.inline-search--hero .inline-search-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  left: 0; right: 0;
  z-index: 5;
}

/* ============================================================
   SHARED RESULTS PANEL (used by inline dropdowns + Ctrl+K modal)
   ============================================================ */
.inline-search-dropdown {
  background: rgba(10,14,39,0.92);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  box-shadow: 0 30px 90px -30px rgba(0,0,0,0.65),
              0 0 0 1px rgba(34,197,94,0.10);
  overflow: hidden;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  animation: cmd-r-pop 160ms ease-out;
}
@keyframes cmd-r-pop {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.cmd-r-list {
  max-height: 420px;
  overflow: auto;
  padding: 6px;
}
.cmd-r-item {
  display: grid;
  grid-template-columns: 28px minmax(180px, 240px) 1fr auto;
  gap: 12px;
  align-items: center;
  width: 100%;
  padding: 10px 12px;
  border-radius: 8px;
  background: transparent;
  border: 1px solid transparent;
  text-align: left;
  color: inherit;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease;
}
.cmd-r-item.is-active {
  background: rgba(34,197,94,0.10);
  border-color: rgba(34,197,94,0.22);
}
.cmd-r-item-ic { color: rgba(255,255,255,0.7); display: inline-flex; }
.cmd-r-item.is-active .cmd-r-item-ic { color: var(--green); }
.cmd-r-item-title {
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-r-item-desc {
  font-size: 12px;
  color: rgba(255,255,255,0.55);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cmd-r-item-role {
  font-size: 9.5px;
  color: rgba(255,255,255,0.45);
  letter-spacing: 0.22em;
}
.cmd-r-empty {
  padding: 28px;
  text-align: center;
  color: rgba(255,255,255,0.4);
  font-size: 13px;
}
.cmd-r-footer {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 14px;
  border-top: 1px solid rgba(255,255,255,0.06);
  font-size: 11px;
  color: rgba(255,255,255,0.5);
  background: rgba(10,14,39,0.5);
}
.cmd-r-footer-spacer { flex: 1; }
.cmd-r-count { letter-spacing: 0.22em; }

/* Centered Ctrl+K modal — reuses the result panel inside its card */
.cmdk-input-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.cmdk-input {
  flex: 1; background: transparent; border: none; outline: none;
  color: var(--text); font-size: 14.5px;
  caret-color: var(--green);
}
.cmdk-results-wrap { /* inherits cmd-r-list spacing from the panel itself */ }

.home-hero-tip {
  margin-top: 14px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
  color: rgba(255,255,255,0.48);
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(34,197,94,0.05);
  border: 1px solid rgba(34,197,94,0.12);
}
.home-hero-tip .kbd {
  margin: 0 1px;
}
.home-hero-tip-dot {
  display: inline-block;
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 12px var(--green-glow);
  animation: home-hero-pulse 2.4s ease-in-out infinite;
}
@keyframes home-hero-pulse {
  0%, 100% { opacity: 0.55; transform: scale(0.85); }
  50%      { opacity: 1;    transform: scale(1); }
}

.home-hero-meta {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 40px;
  padding: 14px 36px;
  border-top: 1px solid rgba(255,255,255,0.06);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.65);
}
.home-hero-meta > span:not(.sep) {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  font-family: 'Geist Mono', monospace;
  min-width: 120px;
}
.home-hero-meta b {
  font-weight: 500;
  font-size: 18px;
  letter-spacing: -0.02em;
  color: var(--text);
  font-family: 'Geist', sans-serif;
}
.home-hero-meta i {
  font-style: normal;
  font-size: 9px;
  letter-spacing: 0.32em;
  color: rgba(255,255,255,0.4);
}
.home-hero-meta .sep {
  width: 1px;
  height: 26px;
  background: rgba(255,255,255,0.10);
}

@media (max-width: 640px) {
  .home-hero { padding: 24px 14px 60px; }
  .home-hero-frame { inset: 14px; }
  .home-hero-title { font-size: 48px; }
  .home-hero-search { padding: 14px 14px; }
  .home-hero-search-placeholder { font-size: 13.5px; }
  .home-hero-meta { gap: 12px; padding: 12px 14px; }
  .home-hero-meta b { font-size: 15px; }
}

/* --- Kanban board --- */
.kanban-board {
  display: flex;
  gap: 14px;
  min-height: 55vh;
  align-items: flex-start;
}
.kanban-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.kanban-col-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
}
.kanban-col-label {
  font-size: 10px;
  letter-spacing: 0.28em;
  flex: 1;
}
.kanban-col-count {
  font-size: 10px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.18em;
}
.kanban-col-add {
  width: 22px; height: 22px;
  border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.5);
  font-size: 14px;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.kanban-col-add:hover { background: rgba(34,197,94,0.10); color: var(--green); border-color: rgba(34,197,94,0.30); }
.kanban-col-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px;
  border-radius: 10px;
  background: rgba(255,255,255,0.015);
  border: 1px dashed rgba(255,255,255,0.06);
  min-height: 120px;
  transition: border-color 200ms, background 200ms;
}
.kanban-col-body.is-drag-over {
  border-color: var(--green);
  background: rgba(34,197,94,0.04);
}
.kanban-card {
  padding: 10px 12px;
  border-radius: 8px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid rgba(255,255,255,0.15);
  cursor: grab;
  transition: transform 150ms, box-shadow 150ms, opacity 150ms;
}
.kanban-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.25);
  background: rgba(255,255,255,0.05);
}
.kanban-card:active { cursor: grabbing; }
.kanban-card.is-dragging { opacity: 0.35; }
.kanban-card.prio-low  { border-left-color: var(--info); }
.kanban-card.prio-med  { border-left-color: var(--warning); }
.kanban-card.prio-high { border-left-color: var(--danger); }
.kanban-check {
  width: 20px; height: 20px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.18);
  background: transparent;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 1px;
  transition: border-color 150ms, background 150ms;
}
.kanban-check:hover {
  border-color: var(--green);
  background: rgba(34,197,94,0.12);
}
.kanban-card-title {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  color: rgba(255,255,255,0.9);
}
.kanban-card-desc {
  font-size: 11px;
  color: rgba(255,255,255,0.45);
  margin-top: 4px;
  line-height: 1.4;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kanban-progress-row {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  cursor: pointer;
}
.kanban-progress-bar {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  overflow: hidden;
}
.kanban-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 150ms ease;
}
.kanban-progress-label {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  color: rgba(255,255,255,0.45);
  min-width: 28px;
  text-align: right;
}
.kanban-card-meta {
  display: flex;
  gap: 6px;
  align-items: center;
  margin-top: 8px;
  flex-wrap: wrap;
}
.kanban-card-chip {
  font-size: 9.5px;
  letter-spacing: 0.18em;
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.5);
}
.kanban-card-chip.is-overdue {
  background: rgba(239,68,68,0.08);
  border-color: rgba(239,68,68,0.25);
  color: var(--danger);
}
.kanban-card-chip.is-recur {
  background: rgba(59,130,246,0.08);
  border-color: rgba(59,130,246,0.20);
  color: var(--info);
}
.kanban-modal-backdrop {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(0,0,0,0.55);
  display: flex; align-items: center; justify-content: center;
  animation: fadein 150ms ease;
}
.kanban-detail {
  background: #0f1225;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 14px;
  width: 520px;
  max-width: 94vw;
  max-height: 88vh;
  display: flex; flex-direction: column;
  overflow: hidden;
  box-shadow: 0 24px 64px rgba(0,0,0,0.6);
}
.kanban-detail-topbar {
  display: flex; align-items: center; gap: 8;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.03);
  flex-shrink: 0;
}
.kanban-detail-body {
  flex: 1; overflow-y: auto;
  padding: 20px 22px;
  display: flex; flex-direction: column; gap: 8;
}
.kanban-detail-title {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: #fff;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 0;
  line-height: 1.35;
}
.kanban-detail-title::placeholder { color: rgba(255,255,255,0.25); }
.kanban-detail-desc {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  color: rgba(255,255,255,0.65);
  font-size: 14px;
  line-height: 1.6;
  padding: 0;
  min-height: 180px;
  resize: none;
  flex: 1;
}
.kanban-detail-desc::placeholder { color: rgba(255,255,255,0.2); }
/* --- Kanban date picker --- */
.kdp-backdrop {
  position: fixed; inset: 0; z-index: 1100;
  background: rgba(0,0,0,0.45);
  display: flex; align-items: center; justify-content: center;
  animation: fadein 120ms ease;
}
.kdp {
  background: #141828;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  width: 320px;
  max-width: 92vw;
  overflow: hidden;
  box-shadow: 0 20px 50px rgba(0,0,0,0.5);
}
.kdp-header {
  display: flex; align-items: center; gap: 8;
  padding: 16px 18px 10px;
}
.kdp-nav {
  width: 28px; height: 28px; border-radius: 6px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.6);
  font-size: 16px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.kdp-nav:hover { background: rgba(255,255,255,0.08); color: #fff; }
.kdp-weekdays {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 4px 14px;
  text-align: center;
  font-size: 11px;
  color: rgba(255,255,255,0.35);
  letter-spacing: 0.05em;
}
.kdp-grid {
  display: grid; grid-template-columns: repeat(7, 1fr);
  padding: 2px 14px 10px;
  gap: 2px;
}
.kdp-day {
  width: 100%; aspect-ratio: 1; border-radius: 50%;
  background: transparent; border: none;
  color: rgba(255,255,255,0.8);
  font-size: 13px; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 100ms;
}
.kdp-day:hover { background: rgba(255,255,255,0.08); }
.kdp-day.outside { color: rgba(255,255,255,0.2); }
.kdp-day.today {
  color: var(--green);
  border: 1.5px solid var(--green);
}
.kdp-day.selected {
  background: var(--info);
  color: #fff;
  font-weight: 600;
}
.kdp-options {
  border-top: 1px solid rgba(255,255,255,0.06);
}
.kdp-option {
  display: flex; align-items: center; gap: 10;
  width: 100%; padding: 12px 18px;
  background: transparent; border: none; border-bottom: 1px solid rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.8); font-size: 13.5px;
  cursor: pointer; text-align: left;
}
.kdp-option:hover { background: rgba(255,255,255,0.03); }
.kdp-footer {
  display: flex; gap: 10; padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.kdp-btn-clear {
  flex: 1; padding: 10px; border-radius: 8px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.10);
  color: rgba(255,255,255,0.7);
  font-size: 13px; cursor: pointer;
}
.kdp-btn-clear:hover { background: rgba(255,255,255,0.08); }
.kdp-btn-ok {
  flex: 1; padding: 10px; border-radius: 8px;
  background: var(--info);
  border: none;
  color: #fff; font-weight: 600;
  font-size: 13px; cursor: pointer;
}
.kdp-btn-ok:hover { filter: brightness(1.1); }

.kanban-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  outline: none;
  cursor: pointer;
}
.kanban-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #0f1225;
  box-shadow: 0 0 8px rgba(34,197,94,0.4);
  cursor: grab;
  transition: transform 100ms;
}
.kanban-slider::-webkit-slider-thumb:active {
  transform: scale(1.2);
  cursor: grabbing;
}
.kanban-slider::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--green);
  border: 2px solid #0f1225;
  box-shadow: 0 0 8px rgba(34,197,94,0.4);
  cursor: grab;
}
.kanban-detail-footer {
  display: flex; align-items: center; gap: 10;
  padding: 12px 18px;
  border-top: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.02);
  flex-shrink: 0;
  flex-wrap: wrap;
}
