/* Sunix Tools — overlay UI sobreposto ao conteúdo do popup (abaixo do header). */

.sunix-tools-btn{
  display:inline-flex;align-items:center;gap:6px;
  background:linear-gradient(135deg,#1d1d22,#26262d);
  border:1px solid rgba(255,255,255,.12);
  color:#f5f5f7;font-size:11px;font-weight:600;
  padding:6px 10px;border-radius:8px;cursor:pointer;
  margin-left:6px;letter-spacing:.2px;
}
.sunix-tools-btn:hover{border-color:var(--gold,#d4af37);color:var(--gold,#d4af37);}
.sunix-tools-btn .ico{font-size:13px;}

/* Overlay posicionado sobre o conteúdo (abaixo do header). */
.sunix-tools-overlay{
  position:fixed;left:0;right:0;top:80px;bottom:0;
  background:rgba(8,8,10,.97);
  backdrop-filter:blur(6px);
  z-index:9000;
  display:flex;flex-direction:column;
  overflow:hidden;
  border-top:1px solid rgba(212,175,55,.25);
}
.sunix-tools-overlay.hidden{display:none;}
.sunix-tools-overlay .st-head{
  display:flex;align-items:center;justify-content:space-between;
  padding:10px 14px;border-bottom:1px solid rgba(255,255,255,.06);
}
.sunix-tools-overlay .st-head h3{margin:0;font-size:14px;color:var(--gold,#d4af37);}
.sunix-tools-overlay .st-head .st-actions{display:flex;gap:6px;}
.sunix-tools-overlay .st-body{flex:1;overflow:auto;padding:12px 14px;}
.sunix-tools-overlay .st-ctx{
  font-size:10.5px;color:#9a9aa3;padding:0 14px 8px;
  display:flex;flex-wrap:wrap;gap:10px;border-bottom:1px solid rgba(255,255,255,.05);
}
.sunix-tools-overlay .st-ctx b{color:#e8e8ee;font-weight:600;}

.st-cards{display:grid;grid-template-columns:1fr 1fr;gap:10px;}
.st-card{
  background:#15151a;border:1px solid rgba(255,255,255,.08);
  border-radius:10px;padding:12px;cursor:pointer;
  transition:border-color .15s, transform .1s;
  display:flex;flex-direction:column;gap:6px;
}
.st-card:hover{border-color:var(--gold,#d4af37);transform:translateY(-1px);}
/* Ícones removidos do design — mantém só título, descrição e tag. */
.st-card .st-card-ico{display:none;}
.st-card .st-card-name{font-size:12.5px;font-weight:700;color:#fff;}
.st-card .st-card-desc{font-size:11px;color:#9a9aa3;line-height:1.35;}
.st-card.is-soon{opacity:.55;cursor:not-allowed;}
.st-card .st-tag{
  display:inline-block;align-self:flex-start;font-size:9.5px;
  padding:2px 6px;border-radius:6px;background:rgba(212,175,55,.18);
  color:var(--gold,#d4af37);margin-top:2px;
}

/* Tool panel (open inside overlay). */
.st-tool{display:flex;flex-direction:column;gap:10px;}
.st-tabs{display:flex;flex-wrap:wrap;gap:4px;border-bottom:1px solid rgba(255,255,255,.08);margin-bottom:8px;}
.st-tab{
  background:transparent;border:none;color:#9a9aa3;font-size:11.5px;
  padding:6px 10px;cursor:pointer;border-bottom:2px solid transparent;
}
.st-tab.is-active{color:var(--gold,#d4af37);border-bottom-color:var(--gold,#d4af37);}
.st-pane{display:none;}
.st-pane.is-active{display:block;}

.st-row{display:flex;flex-direction:column;gap:4px;margin-bottom:8px;}
.st-row label{font-size:11px;color:#a8a8b0;}
.st-row input,.st-row select,.st-row textarea{
  width:100%;padding:7px 9px;background:#0e0e10;border:1px solid #2a2a31;
  border-radius:7px;color:#f5f5f7;font-size:12px;font-family:inherit;
}
/* Textareas: altura mínima ampla (padrão Sunix) + handle de resize vertical.
   !important porque algumas tools antigas setam min-height inline pequeno. */
.st-row textarea{min-height:500px !important;resize:vertical;line-height:1.45;}

/* Upload IDV Sunix — substitui o file input nativo por um drop-zone com
   borda dourada tracejada e botão "Selecionar" estilizado. */
.st-row input[type=file]{
  width:100%;padding:0;color:#cfcfd6;font-size:11.5px;
  background:linear-gradient(135deg,#0e0e10,#15151a);
  border:1px dashed rgba(212,175,55,.45);border-radius:10px;
  cursor:pointer;transition:border-color .15s, background .15s;
}
.st-row input[type=file]:hover{border-color:var(--gold,#d4af37);background:#15151a;}
.st-row input[type=file]::file-selector-button{
  background:linear-gradient(135deg,#1d1d22,#26262d);
  border:0;border-right:1px solid rgba(255,255,255,.1);
  color:var(--gold,#d4af37);font-weight:700;font-size:11.5px;
  padding:10px 14px;cursor:pointer;letter-spacing:.3px;
  border-radius:10px 0 0 10px;margin-right:10px;
  font-family:inherit;
}
.st-row input[type=file]::file-selector-button:hover{
  background:linear-gradient(135deg,#26262d,#2e2e36);color:#f5d77a;
}
.st-grid2{display:grid;grid-template-columns:1fr 1fr;gap:8px;}
.st-check{display:flex;align-items:center;gap:6px;font-size:11.5px;color:#d8d8de;margin:2px 0;}
.st-actions-row{display:flex;flex-wrap:wrap;gap:6px;margin-top:8px;margin-bottom:12px;}
.st-tool > .st-row + .st-row{margin-top:2px;}
.st-pane > * + .st-row{margin-top:4px;}
.st-actions-row + .st-row,
.st-actions-row + .st-row label{margin-top:4px;}
.st-pre,.st-log{margin-top:6px;}
.st-btn{
  background:#1f1f25;border:1px solid rgba(255,255,255,.1);color:#f5f5f7;
  font-size:11.5px;padding:7px 10px;border-radius:7px;cursor:pointer;
  font-weight:600;transition:border-color .15s, color .15s, background .15s;
}
.st-btn:hover{border-color:var(--gold,#d4af37);color:var(--gold,#d4af37);background:#26262d;}
/* is-primary mantém o mesmo visual base — destaque só no hover (sem amarelo
   "queimado" no primeiro botão de cada tool, conforme padrão visual). */
.st-btn.is-primary{background:#1f1f25;color:#f5f5f7;border-color:rgba(255,255,255,.18);}
.st-btn.is-primary:hover{border-color:var(--gold,#d4af37);color:var(--gold,#d4af37);background:#26262d;}
.st-btn.is-danger{background:#3a1414;color:#ff8888;border-color:#5a1c1c;}
.st-btn.is-danger:hover{background:#4a1a1a;border-color:#ff8888;color:#ffb0b0;}
.st-btn[disabled]{opacity:.5;cursor:not-allowed;}

.st-progress{height:8px;background:#0e0e10;border-radius:6px;overflow:hidden;margin-top:8px;border:1px solid #25252b;}
.st-progress .bar{height:100%;width:0%;background:linear-gradient(90deg,var(--gold,#d4af37),#f0c95a);transition:width .25s;}
.st-status{font-size:11.5px;color:#d8d8de;margin-top:6px;min-height:14px;cursor:pointer;border-radius:6px;padding:2px 4px;transition:background .2s;}
.st-status:hover{background:rgba(255,255,255,0.04);}
.st-log li.err,.st-log li.warn{cursor:pointer;}
.st-log li.err:hover,.st-log li.warn:hover{background:rgba(255,255,255,0.04);}
.st-log{
  margin-top:8px;background:#08080a;border:1px solid #1c1c20;border-radius:8px;
  padding:8px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:10.5px;line-height:1.5;max-height:160px;overflow:auto;list-style:none;
}
.st-log li{padding:1px 0;color:#cfcfd6;}
.st-log li.err{color:#ff7878;}
.st-log li.ok{color:#86e29a;}
.st-log li.warn{color:#f6c674;}

.st-hint{font-size:10.5px;color:#8a8a93;margin-top:2px;}
.st-divider{height:1px;background:rgba(255,255,255,.07);margin:10px 0;}
.st-pre{
  background:#08080a;border:1px solid #1c1c20;border-radius:7px;
  padding:8px;font-family:ui-monospace,monospace;font-size:10.5px;
  color:#cfcfd6;max-height:160px;overflow:auto;white-space:pre-wrap;
}

/* Command Palette ⌘K */
.sunix-cmdk{position:fixed;inset:0;background:rgba(0,0,0,.55);backdrop-filter:blur(4px);z-index:10000;display:flex;align-items:flex-start;justify-content:center;padding-top:60px;}
.sunix-cmdk.hidden{display:none;}
.sunix-cmdk .cmdk-card{width:90%;max-width:520px;background:#15151a;border:1px solid rgba(212,175,55,.35);border-radius:12px;box-shadow:0 20px 60px rgba(0,0,0,.6);overflow:hidden;}
.sunix-cmdk input{width:100%;border:0;outline:0;background:#0f1014;color:#fff;padding:12px 14px;font-size:13px;border-bottom:1px solid rgba(255,255,255,.06);}
.sunix-cmdk .cmdk-list{max-height:340px;overflow:auto;}
.sunix-cmdk .cmdk-item{display:flex;align-items:center;gap:10px;padding:9px 14px;cursor:pointer;font-size:12.5px;color:#e8e8ee;}
.sunix-cmdk .cmdk-item small{margin-left:auto;color:#9a9aa3;font-size:10px;letter-spacing:.5px;}
.sunix-cmdk .cmdk-item.is-sel,.sunix-cmdk .cmdk-item:hover{background:rgba(212,175,55,.12);color:#d4af37;}
