
:root{
  --bg0:#070707;
  --bg1:#0b0b0b;
  --fg:#f5f5f5;
  --muted:rgba(255,255,255,.65);
  --glass: rgba(255,255,255,.06);
  --glass2: rgba(255,255,255,.09);
  --line: rgba(255,255,255,.12);
  --shadow: 0 20px 60px rgba(0,0,0,.55);
}

html,body{height:100%}
body{
  background:
    radial-gradient(1200px 700px at 20% 10%, rgba(255,255,255,.06), transparent 60%),
    radial-gradient(900px 600px at 90% 20%, rgba(255,255,255,.05), transparent 55%),
    radial-gradient(900px 650px at 50% 90%, rgba(255,255,255,.03), transparent 55%),
    linear-gradient(180deg, var(--bg0), var(--bg1));
  color:var(--fg);
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji","Segoe UI Emoji";
}

.glass{
  background: var(--glass);
  border: 1px solid var(--line);
  border-radius: 18px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
}

/* --- Multi-select dropdown (Agenda filtros) --- */
.nx-dd-overlay{
  position: fixed;
  inset: 0;
  z-index: 6000;
  background: transparent;
}
.nx-dd-panel{
  position: absolute;
  left: 0;
  right: 0;
  margin-top: 8px;
  z-index: 6001;
  max-height: 280px;
  overflow: auto;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(10,15,25,.94);
  box-shadow: 0 18px 48px rgba(0,0,0,.55);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

/* Quando um filtro está aberto, elevamos o container pra não ficar atrás do formulário */
.nx-filters{
  position: relative;
  z-index: 1;
}
.nx-filters.open{
  z-index: 5500;
}

.glass-soft{
  background: rgba(255,255,255,.045);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.btn{
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.08);
  border-radius: 14px;
  padding: .65rem 1rem;
  transition: transform .15s ease, background .15s ease, border-color .15s ease;
}
.btn:hover{ transform: translateY(-1px); background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.22); }
.btn:active{ transform: translateY(0px); }

.input{
  background: rgba(255,255,255,.06);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 14px;
  padding: .7rem .9rem;
  outline: none;
}
.input:focus{ border-color: rgba(255,255,255,.25); }

/* Melhor contraste em selects (Safari/Chrome) */
select.input{ color: rgba(255,255,255,.92); }
/* opções de selects (especialmente multi-select da Agenda)
   antes estava vermelho e parecia que tudo estava selecionado */
select.input option{ background: rgba(17,24,39,.92); color: rgba(229,231,235,.95); }
select.input option:checked{ background: rgba(59,130,246,.45); color: rgba(255,255,255,.95); }

.fade-in{ animation: fadeIn .45s ease both; }
.slide-up{ animation: slideUp .45s ease both; }
@keyframes fadeIn{ from{opacity:0} to{opacity:1} }
@keyframes slideUp{ from{opacity:0; transform: translateY(10px)} to{opacity:1; transform: translateY(0)} }

.badge{
  font-size: .75rem;
  padding:.2rem .55rem;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.06);
  color: rgba(255,255,255,.86);
}
.muted{ color: var(--muted); }

button.muted{cursor:pointer}

/* --- Kanban UX --- */
.kanban-col::-webkit-scrollbar{ height:10px; width:10px; }
.kanban-col::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.14); border-radius: 999px; }
.kanban-col::-webkit-scrollbar-track{ background: rgba(255,255,255,.05); border-radius: 999px; }

.kanban-drop{ outline: 2px dashed rgba(255,255,255,.22); outline-offset: 6px; border-radius: 18px; }
.kanban-card{ cursor: grab; }
.kanban-card:active{ cursor: grabbing; }

/* --- Page transition (login -> app) --- */
.page-fade-out{ animation: pageFadeOut .35s ease both; }
.page-fade-out-long{ animation: pageFadeOut 3s cubic-bezier(.22,1,.36,1) both; }
@keyframes pageFadeOut{ from{opacity:1; transform: translateY(0)} to{opacity:0; transform: translateY(-6px)} }

/* --- Login loader (corporativo) --- */
.nx-loader{
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(900px 520px at 50% 30%, rgba(255,255,255,.06), transparent 60%),
    linear-gradient(180deg, rgba(0,0,0,.65), rgba(0,0,0,.82));
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  animation: nxLoaderIn .22s ease both;
}

.nx-loader-card{
  width: min(560px, 92vw);
  border-radius: 22px;
  padding: 24px;
}

.nx-rocket-wrap{
  height: 92px;
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.nx-rocket{
  position: absolute;
  left: 50%;
  bottom: 10px;
  transform: translateX(-50%);
  width: 56px;
  height: 68px;
  opacity: .98;
  animation: nxRocketLift 3s cubic-bezier(.22,1,.36,1) both;
}

/* Corpo do foguete (corporativo/minimalista) */
.nx-rocket-body{
  position: absolute;
  left: 50%;
  bottom: 10px;
  width: 38px;
  height: 46px;
  transform: translateX(-50%);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.24);
  background: linear-gradient(180deg, rgba(255,255,255,.16), rgba(255,255,255,.06));
  box-shadow: 0 14px 28px rgba(0,0,0,.35);
}

/* Nariz (cone) */
.nx-rocket-nose{
  position: absolute;
  left: 50%;
  top: 6px;
  width: 38px;
  height: 22px;
  transform: translateX(-50%);
  clip-path: polygon(50% 0%, 100% 100%, 0% 100%);
  border: 1px solid rgba(255,255,255,.20);
  border-bottom: none;
  background: linear-gradient(180deg, rgba(255,255,255,.18), rgba(255,255,255,.08));
  filter: drop-shadow(0 10px 18px rgba(0,0,0,.25));
}

/* Asas */
.nx-rocket-fin{
  position: absolute;
  bottom: 12px;
  width: 16px;
  height: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,.14), rgba(255,255,255,.05));
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 10px 18px rgba(0,0,0,.25);
}
.nx-rocket-fin-l{
  left: 6px;
  border-radius: 10px 4px 10px 12px;
  clip-path: polygon(100% 0%, 100% 100%, 0% 86%, 10% 12%);
}
.nx-rocket-fin-r{
  right: 6px;
  border-radius: 4px 10px 12px 10px;
  clip-path: polygon(0% 0%, 100% 12%, 100% 86%, 0% 100%);
}

/* Janela */
.nx-rocket-window{
  position: absolute;
  left: 50%;
  top: 14px;
  width: 12px;
  height: 12px;
  transform: translateX(-50%);
  border-radius: 999px;
  border: 1px solid rgba(0,0,0,.35);
  background: radial-gradient(circle at 35% 35%, rgba(255,255,255,.18), rgba(0,0,0,.20));
  box-shadow: inset 0 1px 2px rgba(255,255,255,.10);
}

/* Chama */
.nx-rocket-flame{
  position: absolute;
  left: 50%;
  bottom: 0px;
  width: 18px;
  height: 18px;
  transform: translateX(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(255,255,255,.85) 0%, rgba(255,255,255,.25) 55%, rgba(255,255,255,0) 70%);
  filter: blur(.2px);
  opacity: .55;
  animation: nxFlame 0.55s ease-in-out infinite;
}

.nx-progress{
  height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  overflow: hidden;
}

.nx-progress > div{
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(255,255,255,.18), rgba(255,255,255,.38));
  transition: width .12s linear;
}

.nx-loader-out{ animation: nxLoaderOut .32s ease both; }

/* --- Modal scroll guard (evita estourar conteúdo em telas menores) --- */
.modal-card{
  max-height: 86vh;
  overflow: auto;
  overscroll-behavior: contain;
}

.modal-card::-webkit-scrollbar{ height:10px; width:10px; }
.modal-card::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.14); border-radius: 999px; }
.modal-card::-webkit-scrollbar-track{ background: rgba(255,255,255,.05); border-radius: 999px; }

/* Observações (Projetos): histórico com rolagem */
.notes-scroll{
  max-height: 52vh;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 6px;
}

.notes-scroll::-webkit-scrollbar{ height:10px; width:10px; }
.notes-scroll::-webkit-scrollbar-thumb{ background: rgba(255,255,255,.14); border-radius: 999px; }
.notes-scroll::-webkit-scrollbar-track{ background: rgba(255,255,255,.05); border-radius: 999px; }

@keyframes nxLoaderIn{ from{ opacity:0 } to{ opacity:1 } }
@keyframes nxLoaderOut{ from{ opacity:1 } to{ opacity:0 } }

@keyframes nxRocketLift{
  0%{ transform: translateX(-50%) translateY(0) scale(1); }
  65%{ transform: translateX(-50%) translateY(-28px) scale(1.01); }
  100%{ transform: translateX(-50%) translateY(-54px) scale(1.02); }
}

@keyframes nxFlame{
  0%{ transform: translateX(-50%) scale(.85); opacity: .35; }
  50%{ transform: translateX(-50%) scale(1.05); opacity: .65; }
  100%{ transform: translateX(-50%) scale(.9); opacity: .42; }
}

/* Agenda filtros v2.0: listas clicáveis (sem Ctrl) */
.picklist{
  background: rgba(0,0,0,.25);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 14px;
  max-height: 140px;
  overflow: auto;
  padding: 6px;
}
.pickitem{
  width: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  color: rgba(255,255,255,.92);
  background: transparent;
  border: 0;
  text-align: left;
  cursor: pointer;
}
.pickitem:hover{ background: rgba(255,255,255,.06); }
.pickitem.active{ background: rgba(59,130,246,.28); }
.pickitem .dot{
  width: 10px; height: 10px;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.35);
  background: transparent;
  flex: 0 0 auto;
}
.pickitem .dot.on{ background: rgba(59,130,246,.95); border-color: rgba(59,130,246,.95); }
