/* dist/style.css */
:root{
  --bg:#0b1020;
  --card:#0f1730;
  --card2:#101a36;
  --line:rgba(255,255,255,.08);
  --text:#e9efff;
  --muted:rgba(233,239,255,.68);
  --brand1:#2b7cff;
  --brand2:#7c3aed;
  --ok:#17c964;
  --danger:#ff4d4d;
  --shadow: 0 10px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --radius2: 12px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: radial-gradient(1200px 600px at 20% 0%, rgba(43,124,255,.25), transparent 60%),
              radial-gradient(900px 500px at 80% 10%, rgba(124,58,237,.20), transparent 60%),
              var(--bg);
  color:var(--text);
}

.bg{ display:grid; place-items:center; }

.auth{ width:min(420px, 92vw); padding:24px; }
.card{
  background: linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border:1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding:22px;
}
.brand{
  font-weight:800;
  letter-spacing:.12em;
  font-size:20px;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  -webkit-background-clip:text;
  background-clip:text;
  color: transparent;
}
.subtitle{ color:var(--muted); margin-top:6px; margin-bottom:18px; }

label{ display:block; font-size:13px; color:var(--muted); margin:12px 0 6px; }
input, select{
  width:100%;
  padding:12px 12px;
  border-radius: 12px;
  border:1px solid var(--line);
  background: rgba(0,0,0,.2);
  color:var(--text);
  outline:none;
}
input:focus, select:focus{ border-color: rgba(43,124,255,.6); }

.btn{
  width:100%;
  margin-top:14px;
  padding:12px 14px;
  border:none;
  border-radius: 14px;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  color:white;
  font-weight:700;
  cursor:pointer;
}
.btn.ghost{
  width:auto;
  background: transparent;
  border:1px solid var(--line);
  color:var(--text);
}

.hint{ margin-top:14px; color:var(--muted); font-size:13px; }

.alert{
  border:1px solid rgba(255,77,77,.35);
  background: rgba(255,77,77,.12);
  color:#ffd6d6;
  padding:10px 12px;
  border-radius: 12px;
  margin:12px 0;
}
.alert.ok{
  border-color: rgba(23,201,100,.35);
  background: rgba(23,201,100,.12);
  color:#d8ffe9;
}

.sidebar{
  position: fixed;
  inset: 0 auto 0 0;
  width: 260px;
  background: rgba(15,23,48,.75);
  backdrop-filter: blur(10px);
  border-right:1px solid var(--line);
  padding:16px;
  transform: translateX(0);
  transition: .2s ease;
  z-index: 5;
}
.sidebar.hidden{ transform: translateX(-105%); }

.side-top{ padding:6px 6px 14px; border-bottom:1px solid var(--line); }
.logo{
  font-weight:900;
  letter-spacing:.12em;
  background: linear-gradient(90deg, var(--brand1), var(--brand2));
  -webkit-background-clip:text; background-clip:text; color:transparent;
}
.small{ color:var(--muted); font-size:13px; margin-top:6px; }

.nav{ display:flex; flex-direction:column; gap:8px; padding:14px 0; }
.nav-item{
  text-decoration:none;
  color:var(--text);
  padding:10px 12px;
  border-radius: 12px;
  border:1px solid transparent;
  background: rgba(255,255,255,.03);
}
.nav-item:hover{ border-color: rgba(255,255,255,.10); }
.nav-item.active{ border-color: rgba(43,124,255,.45); background: rgba(43,124,255,.12); }

.side-bottom{ position:absolute; bottom:14px; left:16px; right:16px; color:var(--muted); font-size:12px; }

.main{
  margin-left: 260px;
  min-height: 100vh;
  display:flex;
  flex-direction:column;
}
.topbar{
  position: sticky;
  top:0;
  z-index: 4;
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  padding:14px 16px;
  background: rgba(11,16,32,.65);
  backdrop-filter: blur(10px);
  border-bottom:1px solid var(--line);
}
.topbar-left{ display:flex; align-items:center; gap:10px; }
.hamb{
  display:none;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  color:var(--text);
  padding:8px 10px;
  border-radius: 10px;
  cursor:pointer;
}
.title{ font-weight:800; letter-spacing:.06em; }

.topbar-right{ display:flex; align-items:center; gap:12px; }
.userpill{
  padding:8px 10px;
  border:1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  font-size:13px;
  color:var(--text);
}
.userpill .lvl{ color: var(--muted); margin-left:6px; }
.link{ color:var(--text); text-decoration:none; opacity:.85; }
.link:hover{ opacity:1; }

.content{ padding:16px; flex:1; }
.footer{
  border-top:1px solid var(--line);
  padding:14px 16px;
  color:var(--muted);
  font-size:12px;
}

.panel{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  padding:14px;
}
.panel-head{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:12px;
  margin-bottom:12px;
}
.panel-title{ font-weight:900; font-size:18px; }
.panel-sub{ color:var(--muted); font-size:13px; margin-top:6px; }

.search{ display:flex; gap:8px; align-items:center; }
.search input{ width: min(380px, 52vw); }

.card2{
  margin-top:12px;
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  padding:12px;
}
.card2-title{ font-weight:800; margin-bottom:10px; }

.form-grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:10px;
}
.row{ display:flex; flex-direction:column; }
.span2{ grid-column: span 2; }

.table-wrap{ margin-top:12px; overflow:auto; border:1px solid var(--line); border-radius: var(--radius); }
.table{ width:100%; border-collapse: collapse; min-width: 720px; }
.table th, .table td{ padding:10px 12px; border-bottom:1px solid var(--line); text-align:left; }
.table th{ font-size:12px; color:var(--muted); }
.muted{ color:var(--muted); }
.strong{ font-weight:800; }
.pill{
  display:inline-block;
  padding:6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  font-size:12px;
}

.grid{
  display:grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap:12px;
}
.kpi{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  padding:14px;
}
.kpi-title{ color:var(--muted); font-size:12px; letter-spacing:.08em; }
.kpi-value{ font-size:18px; font-weight:900; margin-top:8px; }
.kpi-sub{ color:var(--muted); margin-top:6px; }
.kpi-actions{ display:flex; gap:8px; margin-top:10px; flex-wrap:wrap; }

@media (max-width: 980px){
  .hamb{ display:inline-flex; }
  .sidebar{ transform: translateX(-105%); }
  .sidebar.show{ transform: translateX(0); }
  .main{ margin-left: 0; }
  .grid{ grid-template-columns: 1fr; }
  .form-grid{ grid-template-columns: 1fr; }
  .span2{ grid-column: span 1; }
  .search input{ width: 100%; }
}




/* ===== Kanban ===== */
.kanban{
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(5, minmax(240px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.kb-col{
  border:1px solid var(--line);
  border-radius: var(--radius);
  background: rgba(255,255,255,.03);
  min-height: 220px;
  display:flex;
  flex-direction:column;
}
.kb-head{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:12px;
  border-bottom:1px solid var(--line);
}
.kb-title{ font-weight:900; }
.kb-count{
  min-width: 30px;
  text-align:center;
  padding:6px 10px;
  border-radius: 999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.03);
  font-size: 12px;
  color: var(--muted);
}
.kb-drop{
  padding: 10px;
  display:flex;
  flex-direction:column;
  gap:10px;
  flex: 1;
}
.kb-drop.over{
  outline: 2px dashed rgba(43,124,255,.55);
  outline-offset: -6px;
  border-radius: var(--radius);
  background: rgba(43,124,255,.08);
}
.kb-empty{
  color: var(--muted);
  font-size: 13px;
  border:1px dashed rgba(255,255,255,.16);
  border-radius: 12px;
  padding: 12px;
  text-align:center;
}
.kb-card{
  border:1px solid rgba(255,255,255,.10);
  border-radius: 14px;
  background: rgba(0,0,0,.18);
  padding: 10px 10px 12px;
  cursor: grab;
  box-shadow: 0 8px 18px rgba(0,0,0,.25);
}
.kb-card:active{ cursor: grabbing; }
.kb-card.dragging{
  opacity: .6;
  transform: rotate(-1deg);
}
.kb-card-title{ font-weight:900; margin-bottom:6px; }
.kb-card-sub{ color: var(--muted); font-size: 12.5px; }
.kb-card-foot{
  margin-top: 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}
.kb-chip{
  font-size: 12px;
  color: var(--muted);
  padding: 6px 10px;
  border:1px solid var(--line);
  border-radius: 999px;
  background: rgba(255,255,255,.03);
  max-width: 150px;
  overflow:hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.kb-money{
  font-weight: 900;
  font-size: 12.5px;
}

/* toast */
.kb-toast{
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 50;
  padding: 10px 12px;
  border-radius: 14px;
  border:1px solid rgba(23,201,100,.35);
  background: rgba(23,201,100,.12);
  color: #d8ffe9;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(10px);
  transition: .18s ease;
  pointer-events: none;
  max-width: min(360px, 92vw);
}
.kb-toast.show{
  opacity: 1;
  transform: translateY(0);
}
.kb-toast.bad{
  border-color: rgba(255,77,77,.35);
  background: rgba(255,77,77,.12);
  color: #ffd6d6;
}

/* responsivo: kanban vira scroll horizontal natural */
@media (max-width: 980px){
  .kanban{
    grid-template-columns: repeat(5, minmax(260px, 1fr));
  }
}

:root{
  color-scheme: dark; /* MUITO importante no Chrome/Windows */
}


/* ===== Força esquema escuro pros controles nativos (select, date, scrollbars, etc.) ===== */
:root{
  color-scheme: dark; /* MUITO importante no Chrome/Windows */
}

/* ===== Inputs/Selects/Areas - reforço de tema ===== */
input, select, textarea{
  background: rgba(0,0,0,.22);
  color: var(--text);
  border: 1px solid var(--line);
}

/* Placeholder */
input::placeholder, textarea::placeholder{
  color: rgba(233,239,255,.45);
}

/* ===== Dropdown do SELECT (opções) ===== */
/* Muitos browsers respeitam isso; no Windows/Chrome melhora bem */
select option{
  background: #0f1730; /* parecido com seu --card */
  color: #e9efff;
}
select optgroup{
  background: #0f1730;
  color: rgba(233,239,255,.75);
}

/* Quando a opção está selecionada/hover (nem sempre respeita 100%) */
select option:checked{
  background: #1a2a55;
  color: #fff;
}

/* ===== Autofill do Chrome (pra não ficar branco/amarelo) ===== */
input:-webkit-autofill,
select:-webkit-autofill,
textarea:-webkit-autofill{
  -webkit-text-fill-color: var(--text) !important;
  -webkit-box-shadow: 0 0 0px 1000px rgba(0,0,0,.22) inset !important;
  box-shadow: 0 0 0px 1000px rgba(0,0,0,.22) inset !important;
  border: 1px solid var(--line);
}
