:root{
  --bg:#eef4f1;
  --card:#ffffff;
  --text:#0f172a;
  --muted:#64748b;
  --green:#16a34a;
  --green2:#22c55e;
  --bad:#ef4444;
  --warn:#f59e0b;
  --shadow: 0 20px 60px rgba(15, 23, 42, .12);
  --radius: 20px;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  color:var(--text);
  background: radial-gradient(1000px 400px at 20% 0%, rgba(34,197,94,.18), transparent 60%),
              radial-gradient(900px 500px at 90% 10%, rgba(16,185,129,.14), transparent 55%),
              var(--bg);
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:18px 22px;
}

.brand{
  display:flex;
  align-items:center;
  gap:14px;
  min-width: 320px;
}
.logo{ width:42px; height:42px; object-fit:contain; }
.title{ font-weight:800; letter-spacing:.2px; }
.subtitle{ font-size:13px; color:var(--muted); margin-top:2px; }

.status{
  display:flex;
  align-items:center;
  gap:10px;
  font-size:13px;
  color:var(--muted);
}
.dot{
  width:10px; height:10px; border-radius:999px;
  background:#cbd5e1;
}
.dot.ok{ background: var(--green2); }
.dot.bad{ background: var(--bad); }
.dot.warn{ background: var(--warn); }

.wrap{
  display:flex;
  justify-content:center;
  padding: 10px 18px 28px;
}

.card{
  width:min(980px, 100%);
  background:var(--card);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
}

.hero{
  height:170px;
  background-size:cover;
  background-position:center;
}

.hint{
  padding: 12px 18px;
  border-bottom:1px solid #eef2f7;
  font-size:13px;
}
.hint code{
  background:#f1f5f9;
  padding:2px 8px;
  border-radius:999px;
  border:1px solid #e2e8f0;
}
.muted{ color:var(--muted); margin-left:8px; }

.chat{
  padding:18px;
  height: 360px;
  overflow:auto;
  background: linear-gradient(180deg, #ffffff, #fbfdff);
}

.bubble{
  max-width: 78%;
  padding: 12px 14px;
  border-radius: 16px;
  margin: 10px 0;
  line-height: 1.35;
  border:1px solid #e2e8f0;
  white-space: pre-wrap;
}

.bubble.bot{
  background:#ffffff;
  border-top-left-radius: 6px;
}

.bubble.user{
  margin-left:auto;
  background: rgba(34,197,94,.10);
  border-color: rgba(34,197,94,.22);
  border-top-right-radius: 6px;
}

/* aviso/erro */
.bubble.warn{
  background: rgba(245,158,11,.10);
  border-color: rgba(245,158,11,.25);
}

.composer{
  padding:16px 18px 18px;
  border-top:1px solid #eef2f7;
  background:#fff;
}

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

.fileBtn{
  display:inline-flex;
  align-items:center;
  gap:8px;
  padding:10px 12px;
  background:#0b3b2b;
  color:#fff;
  border-radius:12px;
  cursor:pointer;
  user-select:none;
  font-size:14px;
}
.fileBtn input{ display:none; }

.fileName{
  flex:1;
  min-width: 220px;
  padding:10px 12px;
  border:1px dashed #cbd5e1;
  border-radius:12px;
  color:var(--muted);
  background:#fbfdff;
}

.ghost{
  padding:10px 12px;
  border-radius:12px;
  border:1px solid #e2e8f0;
  background:#fff;
  cursor:pointer;
}

.msgRow{
  margin-top:10px;
  display:flex;
  gap:10px;
}

#message{
  flex:1;
  padding:12px 14px;
  border-radius:14px;
  border:1px solid #e2e8f0;
  outline:none;
  font-size:14px;
}

.send{
  padding: 12px 16px;
  border:0;
  border-radius:14px;
  background: linear-gradient(135deg, var(--green), var(--green2));
  color:#fff;
  font-weight:800;
  cursor:pointer;
}

.send[disabled]{
  opacity:.6;
  cursor:not-allowed;
}

.tiny{
  margin-top:10px;
  font-size:12px;
  color:var(--muted);
}
.tiny code{
  background:#f1f5f9;
  padding:1px 6px;
  border-radius:8px;
  border:1px solid #e2e8f0;
}

/* -------------------- */
/* NOVO: tabela bonita  */
/* -------------------- */
.tableWrap{
  width: 100%;
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
}

.procTable{
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  background: #fff;
}

.procTable th,
.procTable td{
  padding: 10px 10px;
  border-bottom: 1px solid #eef2f7;
  vertical-align: top;
}

.procTable thead th{
  position: sticky;
  top: 0;
  background: #f8fafc;
  z-index: 1;
  text-align: left;
  font-weight: 800;
}

.procTable tbody tr:nth-child(even){
  background: #fbfdff;
}

.procTable .colIdx{
  width: 36px;
  text-align: center;
  color: #64748b;
  font-weight: 800;
  background: rgba(15, 23, 42, 0.02);
}
