/* CRM Objetivo • Tema azul + amarelo ouro (ajuste fino se desejar) */
:root{
  --blue-900:#081f12;
  --blue-850:#0a2b17;
  --blue-800:#0a2a5f;
  --blue-700:#0d3474;
  --blue-200:#cfe2ff;
  --gold:#16a34a;         /* amarelo ouro */
  --gold-2:#4ade80;
  --text:#eef4ff;
  --muted:#b8c7e6;
  --line:rgba(255,255,255,.14);
  --card:rgba(255,255,255,.06);
  --card2:rgba(255,255,255,.09);
  --danger:#ff4d6d;
  --ok:#22c55e;
  --warn:#f59e0b;
  --shadow: 0 14px 40px rgba(0,0,0,.35);
  --radius:16px;
  --radius2:14px;
  --font: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, "Helvetica Neue", Arial;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  color:var(--text);
  background:
    radial-gradient(1100px 520px at 18% 0%, rgba(13,52,116,.85) 0%, rgba(6,26,58,.95) 55%),
    radial-gradient(900px 420px at 85% 10%, rgba(245,183,0,.18) 0%, rgba(6,26,58,0) 60%),
    linear-gradient(180deg, var(--blue-900), var(--blue-850));
}

a{color:inherit}
.muted{color:var(--muted)}

.topbar{
  position:sticky; top:0; z-index:9;
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  padding:14px 16px;
  background: linear-gradient(180deg, rgba(6,26,58,.92), rgba(6,26,58,.75));
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}

.brand{display:flex; align-items:center; gap:12px}
.brand__mark{
  width:42px; height:42px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--gold), #5bbcff);
  box-shadow: var(--shadow);
  border:1px solid rgba(255,255,255,.18);
}
.brand__title{font-weight:900; letter-spacing:.2px}
.brand__sub{font-size:12px; color:var(--muted); margin-top:2px}

.topbar__right{display:flex; align-items:center; gap:10px; flex-wrap:wrap; justify-content:flex-end}

.env{
  display:flex; align-items:center; gap:8px;
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.04);
}
.env__dot{width:10px; height:10px; border-radius:999px; background: var(--warn)}
.env__dot.online{background: var(--ok)}
.env__label{font-size:12px; color:var(--muted); font-weight:700}

.btn{
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color: var(--text);
  border-radius: 12px;
  padding:10px 12px;
  font-weight:800;
  cursor:pointer;
  transition: .14s;
  display:inline-flex;
  align-items:center;
  gap:8px;
  user-select:none;
}
.btn:hover{transform: translateY(-1px); background: rgba(255,255,255,.10)}
.btn--primary{
  background: linear-gradient(180deg, rgba(245,183,0,.92), rgba(245,183,0,.72));
  color:#1b1b1b;
  border-color: rgba(255,255,255,.24);
}
.btn--primary:hover{background: linear-gradient(180deg, rgba(255,211,74,.96), rgba(245,183,0,.74))}
.btn--ghost{background: rgba(255,255,255,.04)}
.btn--danger{
  background: rgba(255,77,109,.16);
  border-color: rgba(255,77,109,.35);
}

.wrap{padding:14px 14px 24px}

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

.search{
  flex:1 1 320px;
  display:flex;
  align-items:center;
  gap:10px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  border-radius: 14px;
  padding: 10px 12px;
  min-width:260px;
}
.search input{
  border:0;
  outline:none;
  background: transparent;
  color: var(--text);
  width:100%;
  font-size:14px;
}
.search__icon{opacity:.85}

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

.select, input, textarea{
  font-family:var(--font);
}
.select{
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 10px;
  outline:none;
}

.board{
  display:flex;
  gap:12px;
  overflow:auto;
  padding-bottom: 10px;
  scroll-snap-type: x proximity;
}

.col{
  flex:0 0 330px;
  min-height: 70vh;
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  box-shadow: 0 10px 24px rgba(0,0,0,.18);
  scroll-snap-align: start;
  padding: 10px;
}
.col__head{
  display:flex; align-items:flex-start; justify-content:space-between;
  gap:10px;
  padding: 6px 6px 10px;
  border-bottom: 1px dashed rgba(255,255,255,.16);
  margin-bottom: 10px;
}
.col__title{
  font-weight: 950;
  font-size: 13px;
  letter-spacing: .25px;
  line-height: 1.15;
}
.col__count{
  font-size: 12px;
  color: var(--muted);
  border:1px solid rgba(255,255,255,.16);
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.10);
}

.dropzone{
  min-height: 48px;
  padding-bottom: 12px;
}
.dropzone.dragover{
  outline: 2px dashed rgba(245,183,0,.9);
  outline-offset: 6px;
  border-radius: 14px;
}

.card{
  background: linear-gradient(180deg, rgba(7,32,74,.92), rgba(10,42,95,.86));
  border: 1px solid rgba(255,255,255,.14);
  border-radius: var(--radius2);
  padding: 10px 10px 10px;
  margin-bottom: 10px;
  box-shadow: 0 10px 18px rgba(0,0,0,.25);
  cursor: grab;
  user-select:none;
}
.card:active{cursor:grabbing}
.card__top{
  display:flex; justify-content:space-between; gap:10px;
  align-items:flex-start;
}
.card__title{
  font-weight: 950;
  font-size: 13px;
  line-height: 1.15;
}
.pill{
  font-size: 11px;
  border-radius: 999px;
  padding: 2px 9px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.08);
  white-space:nowrap;
}
.pill--prio-critica{background: rgba(255,77,109,.18); border-color: rgba(255,77,109,.38)}
.pill--prio-alta{background: rgba(245,158,11,.18); border-color: rgba(245,158,11,.40)}
.pill--prio-normal{background: rgba(34,197,94,.12); border-color: rgba(34,197,94,.30)}

.meta{
  display:flex; flex-wrap:wrap; gap:8px;
  margin: 8px 0 8px;
  color: var(--muted);
  font-size: 12px;
}
.meta span{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.10);
  padding: 2px 8px;
  border-radius: 999px;
}
.notes{
  border-top:1px dashed rgba(255,255,255,.16);
  padding-top:8px;
  margin-top:6px;
  font-size:12px;
  color: rgba(238,244,255,.92);
  white-space: pre-wrap;
}
.card__actions{
  display:flex; gap:8px; margin-top:10px;
}
.card__actions .btn{padding:7px 10px; border-radius: 11px; font-weight:900; font-size:12px}

.modalback{
  position:fixed; inset:0;
  display:none;
  align-items:center; justify-content:center;
  padding: 16px;
  background: rgba(0,0,0,.55);
  z-index: 30;
}
.modal{
  width: min(920px, 100%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(7,32,74,.92);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.modal__head{
  display:flex; justify-content:space-between; align-items:flex-start;
  gap:12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);
}
.modal__title{font-weight: 950}
.modal__sub{font-size:12px; color: var(--muted); margin-top:2px}
.modal__body{padding: 14px 16px 16px}
.modal__foot{
  display:flex; justify-content:flex-end; gap:10px;
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.field{display:flex; flex-direction:column; gap:6px}
.field label{font-size:12px; font-weight:900; color: var(--muted)}
.field input, .field textarea{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.05);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 10px;
  outline:none;
}
.field textarea{resize:vertical}
.span2{grid-column: 1 / -1}

.drawer{
  position:fixed;
  top:0; right:0;
  width: min(420px, 92vw);
  height:100%;
  transform: translateX(110%);
  transition: .2s;
  border-left:1px solid rgba(255,255,255,.14);
  background: rgba(6,26,58,.92);
  backdrop-filter: blur(10px);
  z-index: 20;
  box-shadow: var(--shadow);
  display:flex;
  flex-direction:column;
}
.drawer.open{transform: translateX(0)}
.drawer__head{
  padding: 14px 14px;
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  border-bottom:1px solid rgba(255,255,255,.14);
}
.drawer__title{font-weight:950}
.drawer__sub{font-size:12px; color:var(--muted); margin-top:2px}
.drawer__body{padding: 12px 14px 18px; overflow:auto}

.panel{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  overflow:hidden;
  margin-top: 12px;
}
.panel__title{
  padding: 10px 12px;
  font-weight: 950;
  border-bottom:1px dashed rgba(255,255,255,.16);
}
.panel__body{padding: 10px 12px}

.kpis{display:grid; grid-template-columns: 1fr 1fr; gap:10px}
.kpi{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  border-radius: 16px;
  padding: 10px 12px;
}
.kpi__label{font-size:12px; color:var(--muted); font-weight:900}
.kpi__value{font-size:20px; font-weight: 950; margin-top:4px}
.kpi__hint{font-size:12px; color:var(--muted); margin-top:4px}

.bar{
  display:grid;
  gap:8px;
}
.barrow{
  display:flex; align-items:center; justify-content:space-between;
  gap:10px;
}
.barrow__label{font-size:12px; color:var(--muted); font-weight:900}
.barrow__value{font-size:12px; color:var(--text); font-weight:900}
.barline{
  height:10px;
  border-radius: 999px;
  border:1px solid rgba(255,255,255,.14);
  background: rgba(0,0,0,.12);
  overflow:hidden;
}
.barfill{
  height:100%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(245,183,0,.95), rgba(91,188,255,.9));
  width: 0%;
}

.help summary{cursor:pointer; font-weight:900; color:var(--text)}
.help code{background: rgba(0,0,0,.25); padding:2px 6px; border-radius: 8px; border:1px solid rgba(255,255,255,.14)}
.help ol{margin:8px 0 0 18px}
.help li{margin: 6px 0}

.toast{
  position:fixed; right: 14px; bottom: 14px;
  display:none;
  max-width: 420px;
  border:1px solid rgba(255,255,255,.16);
  background: rgba(0,0,0,.72);
  color: var(--text);
  padding: 10px 12px;
  border-radius: 14px;
  z-index: 40;
}

@media (max-width: 820px){
  .grid{grid-template-columns:1fr}
  .col{flex-basis: 300px}
  .topbar{flex-direction:column; align-items:flex-start}
  .topbar__right{justify-content:flex-start}
}


/* Drag custom */
body.dragging { cursor: grabbing; }
.drag-ghost { cursor: grabbing; }
