/* Partek Genomics Suite 7.0 — apariencia clásica Windows/Tk */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font: 11px/1.35 "Segoe UI", Tahoma, Verdana, sans-serif;
  background: #f0f0f0; color: #000; overflow: hidden;
  -webkit-font-smoothing: antialiased;
}
#app { display: flex; flex-direction: column; height: 100vh; }

/* ---------------------------------------------------------- barra título */
.titlebar {
  background: linear-gradient(#f6f6f6, #e2e6ea);
  border-bottom: 1px solid #a0a0a0;
  padding: 4px 8px; display: flex; align-items: center; gap: 8px;
}
.titlebar .logo { width: 18px; height: 18px; border-radius: 3px; background: #c62828;
  color: #fff; font: bold 11px/18px "Segoe UI"; text-align: center; }
.titlebar b { font-weight: 600; }
.titlebar .proj { color: #444; margin-left: 6px; }

/* ------------------------------------------------------------- menú */
.menubar { display: flex; background: #f0f0f0; border-bottom: 1px solid #a0a0a0; padding: 0 2px; user-select: none; }
.menubar > .m { position: relative; }
.menubar > .m > span { display: block; padding: 3px 8px; cursor: default; white-space: nowrap; }
.menubar > .m > span:hover, .menubar > .m.open > span { background: #316ac5; color: #fff; }
.dropdown {
  display: none; position: absolute; top: 100%; left: 0; min-width: 220px; z-index: 60;
  background: #f6f6f6; border: 1px solid #9a9a9a; box-shadow: 2px 2px 4px rgba(0,0,0,.35); padding: 2px 0;
}
.menubar > .m.open .dropdown { display: block; }
.dropdown .it { padding: 3px 22px 3px 22px; cursor: default; white-space: nowrap; position: relative; }
.dropdown .it:hover { background: #316ac5; color: #fff; }
.dropdown .it.dis { color: #999; }
.dropdown .it.dis:hover { background: transparent; color: #999; }
.dropdown .sep { height: 1px; background: #c8c8c8; margin: 3px 2px; }
.dropdown .it.sub::after { content: "▸"; position: absolute; right: 6px; }

/* ---------------------------------------------------------- toolbar */
.toolbar { display: flex; align-items: center; gap: 2px; padding: 3px 6px; background: #ececec;
  border-bottom: 1px solid #b6b6b6; }
.toolbar button {
  font: 11px "Segoe UI"; background: #f4f4f4; border: 1px solid #b0b0b0; border-radius: 2px;
  padding: 3px 8px; cursor: pointer;
}
.toolbar button:hover { background: #e2ecff; border-color: #6a9bd8; }
.toolbar .sep { width: 1px; height: 18px; background: #b8b8b8; margin: 0 5px; }

/* ---------------------------------------------------------- cuerpo */
.body { flex: 1; display: flex; min-height: 0; }
.side {
  width: 288px; min-width: 200px; border-right: 1px solid #a0a0a0; background: #f7f7f7;
  display: flex; flex-direction: column; min-height: 0;
}
.panelhdr { background: linear-gradient(#f0f0f0,#e4e4e4); border-bottom: 1px solid #bdbdbd;
  padding: 3px 6px; font-weight: 600; display: flex; justify-content: space-between; }
.tree { overflow: auto; flex: 1; padding: 2px 0; user-select: none; }
.tnode { padding: 2px 6px; display: flex; align-items: center; gap: 5px; cursor: default; white-space: nowrap; }
.tnode:hover { background: #e8f0fe; }
.tnode.act { background: #316ac5; color: #fff; }
.tnode .ic { width: 14px; text-align: center; }
.tnode .kind { color: #777; font-size: 10px; }
.tnode.act .kind { color: #dbe6ff; }
.children { margin-left: 14px; border-left: 1px dotted #c0c0c0; }

.attrs { border-top: 1px solid #bdbdbd; max-height: 34%; display: flex; flex-direction: column; }
.attrs table { width: 100%; border-collapse: collapse; font-size: 11px; }
.attrs th, .attrs td { border: 1px solid #dcdcdc; padding: 2px 5px; text-align: left; }
.attrs th { background: #eaeaea; position: sticky; top: 0; }

/* ---------------------------------------------------------- rejilla */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; min-height: 0; background: #fff; }
.gridwrap { flex: 1; overflow: auto; position: relative; }
table.grid { border-collapse: separate; border-spacing: 0; font: 11px "Consolas", "Lucida Console", monospace; }
table.grid th, table.grid td { border-right: 1px solid #d8d8d8; border-bottom: 1px solid #e6e6e6;
  padding: 1px 6px; white-space: nowrap; max-width: 260px; overflow: hidden; text-overflow: ellipsis; }
table.grid thead th {
  position: sticky; top: 0; z-index: 3; background: linear-gradient(#fbfbfb,#eaeaea);
  color: #222; font-weight: 600; border-bottom: 1px solid #9a9a9a;
}
table.grid tbody th {
  position: sticky; left: 0; z-index: 2; background: #f6f6f6; text-align: left; font-weight: 400;
  border-right: 1px solid #9a9a9a; color: #123; max-width: 240px;
}
table.grid thead th:first-child { left: 0; z-index: 4; }
table.grid tbody tr:nth-child(even) td { background: #fcfcfc; }
table.grid tbody tr:hover td { background: #eef4ff; }
table.grid td.num { text-align: right; }
td.hit { background: #fff3b0 !important; }

/* ---------------------------------------------------------- pestañas */
.tabs { display: flex; gap: 1px; background: #e8e8e8; border-top: 1px solid #a0a0a0; padding: 2px 4px 0; }
.tabs .tab { padding: 3px 12px; background: #dcdcdc; border: 1px solid #b6b6b6; border-bottom: none;
  cursor: default; font-size: 11px; }
.tabs .tab.act { background: #fff; font-weight: 600; }

.statusbar { background: #ececec; border-top: 1px solid #b6b6b6; padding: 2px 8px; color: #333;
  display: flex; gap: 14px; font-size: 11px; }

/* ---------------------------------------------------------- diálogos */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.18); display: none; z-index: 100; }
.overlay.show { display: block; }
.dialog {
  position: fixed; z-index: 101; background: #f0f0f0; border: 1px solid #7a7a7a;
  box-shadow: 3px 3px 10px rgba(0,0,0,.45); min-width: 470px; max-width: 720px;
  display: none; flex-direction: column;
}
.dialog.show { display: flex; }
.dialog .dh { background: linear-gradient(#3c6ea5,#2c5b8f); color: #fff; padding: 4px 8px;
  font-weight: 600; display: flex; justify-content: space-between; }
.dialog .dh .x { cursor: pointer; padding: 0 4px; }
.dialog .db { padding: 10px 12px; max-height: 66vh; overflow: auto; }
.dialog .df { padding: 8px 12px; border-top: 1px solid #c4c4c4; display: flex; justify-content: flex-end; gap: 8px;
  background: #e9e9e9; }
.dialog .df button { font: 11px "Segoe UI"; padding: 3px 16px; border: 1px solid #8a8a8a;
  background: linear-gradient(#fdfdfd,#e6e6e6); cursor: pointer; border-radius: 2px; }
.dialog .df button.primary { border-color: #2c5b8f; font-weight: 600; }
.fieldset { border: 1px solid #c0c0c0; margin: 0 0 10px; padding: 8px 10px; }
.fieldset legend { font-weight: 600; padding: 0 4px; }
.row { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.row label { width: 168px; text-align: right; color: #222; }
.row select, .row input[type=text], .row input[type=number] { font: 11px "Segoe UI"; padding: 2px 4px;
  border: 1px solid #9a9a9a; background: #fff; min-width: 190px; }
.row input[type=number] { min-width: 90px; }
.hint { color: #555; font-size: 10px; margin: 2px 0 8px 176px; }
table.list { width: 100%; border-collapse: collapse; font-size: 11px; }
table.list th, table.list td { border: 1px solid #cfcfcf; padding: 2px 5px; }
table.list th { background: #e6e6e6; }
.plotsel { display: flex; gap: 10px; align-items: center; margin-bottom: 8px; }
canvas.plot { background: #fff; border: 1px solid #9a9a9a; }
.err { color: #a00; font-weight: 600; margin: 6px 0; }
.busy { position: fixed; right: 12px; bottom: 34px; background: #2c5b8f; color: #fff; padding: 6px 12px;
  border-radius: 3px; display: none; z-index: 200; }
.workflow { display: flex; flex-wrap: wrap; gap: 6px; padding: 6px; background: #f2f2f2;
  border-bottom: 1px solid #c4c4c4; }
.workflow .step { border: 1px solid #b0b0b0; background: #fbfbfb; padding: 3px 8px; cursor: pointer; }
.workflow .step:hover { background: #e2ecff; }
