/* ==========================================================================
   IDA Pro-style window (home experience C). Namespaced under .ida.
   Light macOS chrome; dark graph blocks with syntax colours.
   ========================================================================== */
.ida {
  position: relative;
  z-index: 40;
  width: 1000px;
  max-width: 100%;
  background: #d8d8d8;
  border: 1px solid #9a9a9a;
  border-radius: 7px 7px 4px 4px;
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.4);
  overflow: hidden;
  color: #1c1c1c;
  font-family: "DejaVu Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 12px;
  user-select: none;
  -webkit-user-select: none;
}
.ida.is-floating { position: absolute; }
.ida * { box-sizing: border-box; }

/* title bar */
.ida-titlebar {
  display: flex;
  align-items: center;
  height: 26px;
  padding: 0 10px;
  background: linear-gradient(#e6e6e6, #d2d2d2);
  border-bottom: 1px solid #b0b0b0;
  cursor: grab;
  touch-action: none;
}
.ida.is-dragging .ida-titlebar { cursor: grabbing; }
.ida-lights { display: flex; gap: 6px; width: 60px; }
.ida-lights-sp { width: 60px; }
.ida-lights i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.ida-lights .l-r { background: #ff5f57; }
.ida-lights .l-y { background: #febc2e; }
.ida-lights .l-g { background: #28c840; }
.ida-title {
  flex: 1; text-align: center;
  font-size: 11.5px; color: #333;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* toolbar */
.ida-toolbar {
  display: flex; align-items: center; gap: 3px;
  padding: 3px 8px;
  background: #e4e4e4;
  border-bottom: 1px solid #bcbcbc;
}
.ida-toolbar .tb {
  width: 18px; height: 18px;
  background: linear-gradient(#fbfbfb, #e2e2e2);
  border: 1px solid #b4b4b4; border-radius: 3px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 10px; color: #555;
}
.ida-toolbar .tb-blue { color: #2f6fd0; font-weight: bold; }
.ida-toolbar .tb-red { color: #c0392b; }
.ida-toolbar .tb-green { color: #27ae60; }
.ida-toolbar .tb-run { color: #27ae60; }
.ida-toolbar .tb-sep { width: 1px; height: 18px; background: #b4b4b4; margin: 0 3px; }
.ida-toolbar .tb-combo { margin-left: 6px; width: 120px; height: 18px; background: #fff; border: 1px solid #b4b4b4; border-radius: 3px; text-align: right; padding-right: 4px; color: #666; }

/* nav band */
.ida-navband { background: #ececec; border-bottom: 1px solid #bcbcbc; padding: 4px 8px 6px; }
.nav-strip { display: flex; height: 16px; border: 1px solid #9a9a9a; }
.nav-strip i { display: block; height: 100%; }
.nav-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 5px; font-size: 11px; color: #333; }
.nav-legend span { display: inline-flex; align-items: center; gap: 4px; }
.nav-legend i { width: 11px; height: 11px; display: inline-block; border: 1px solid #8a8a8a; }

/* tabs */
.ida-tabs { display: flex; gap: 2px; padding: 3px 6px 0; background: #d2d2d2; border-bottom: 1px solid #9a9a9a; overflow: hidden; }
.ida-tabs span {
  padding: 3px 12px; font-size: 11.5px; color: #333;
  background: #cfcfcf; border: 1px solid #a8a8a8; border-bottom: 0;
  border-radius: 3px 3px 0 0; white-space: nowrap;
}
.ida-tabs span.on { background: #f4f4f4; color: #000; font-weight: 600; }

/* main split */
.ida-main { display: flex; height: 320px; background: #b9b9b9; }
.ida-left { flex: 0 0 210px; width: 210px; display: flex; flex-direction: column; border-right: 1px solid #8f8f8f; background: #f0f0f0; }
.ida-panelhdr { background: #dcdcdc; border-bottom: 1px solid #b4b4b4; border-top: 1px solid #b4b4b4; padding: 2px 8px; font-size: 11px; color: #333; font-weight: 600; }
.ida-funcs { flex: 1 1 auto; overflow-y: auto; background: #fff; font-family: "DejaVu Sans Mono", Menlo, monospace; font-size: 11px; }
.ida-funcs .fn { padding: 1px 8px; white-space: nowrap; cursor: pointer; color: #1a1a1a; }
.ida-funcs .fn:hover { background: #eef3fb; }
.ida-funcs .fn.on { background: #2f6fd0; color: #fff; }
.ida-funcs .fn .ico { color: #2f6fd0; margin-right: 5px; }
.ida-funcs .fn.on .ico { color: #cfe0ff; }
.ida-overview { flex: 0 0 92px; position: relative; background: #cfcfcf; overflow: hidden; }
.ov-box { position: absolute; left: 42%; top: 30%; width: 16%; height: 42%; border: 1px solid #666; background: rgba(120,120,120,0.25); }
.ov-cross { position: absolute; left: 50%; top: 0; width: 1px; height: 100%; background: #f0c000; }

/* graph */
.ida-graph { flex: 1 1 auto; position: relative; overflow: hidden; background: #b9b9b9; cursor: grab; }
.ida-graph.panning { cursor: grabbing; }
.ida-canvas { position: absolute; left: 0; top: 0; width: 1200px; height: 1000px; transform: translate(0,0); transform-origin: 0 0; }
.ida-edges { position: absolute; left: 0; top: 0; width: 1200px; height: 1000px; pointer-events: none; overflow: visible; }
.ida-edges path { fill: none; stroke-width: 1.6; }

.ida-node {
  position: absolute;
  background: #1b1b1b;
  border: 1px solid #000;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
  font-family: "DejaVu Sans Mono", Menlo, Consolas, monospace;
  font-size: 12px;
  line-height: 1.32;
  cursor: pointer;
}
.ida-node .nd-hdr { display: flex; gap: 4px; padding: 2px 4px; background: #cececc; }
.ida-node .nd-hdr i { width: 11px; height: 11px; border-radius: 2px; background: #7a7a7a; display: inline-block; }
.ida-node .nd-hdr i:nth-child(1) { background: #c0392b; }
.ida-node .nd-hdr i:nth-child(2) { background: #d0a020; }
.ida-node .nd-hdr i:nth-child(3) { background: #2f6fd0; }
.ida-node .nd-body { padding: 4px 10px 6px; color: #d6d6d6; white-space: pre; }
.ida-node .mn { color: #d6d6d6; }
.ida-node .loc { color: #d7b34a; }
.ida-node .num { color: #4aa3df; }
.ida-node .cmt { color: #6a9a5a; }
.ida-node .stars { color: #ff4136; }
.ida-node.nd-fault { border-color: #ff4136; }
.ida-node.nd-fault .nd-body { background: #241010; }
.ida-node.sel { outline: 2px solid #ffcf3f; outline-offset: 1px; z-index: 5; }
.ida-node.dragging { z-index: 6; box-shadow: 0 8px 20px rgba(0,0,0,0.5); }

/* output */
.ida-output { border-top: 1px solid #8f8f8f; background: #fff; }
.ida-outhdr { background: #dcdcdc; border-bottom: 1px solid #b4b4b4; padding: 2px 8px; font-size: 11px; font-weight: 600; color: #333; }
.ida-outbody {
  height: 92px; overflow-y: auto;
  padding: 3px 8px; background: #fbfbfb;
  font-family: "DejaVu Sans Mono", Menlo, monospace; font-size: 11px;
  color: #1a1a1a; white-space: pre-wrap; word-break: break-word;
}
.ida-outbody .cmd { color: #1746a0; }
.ida-outbody .dim { color: #888; }

/* status */
.ida-status {
  display: flex; justify-content: space-between; gap: 12px;
  background: #d2d2d2; border-top: 1px solid #a8a8a8;
  padding: 2px 8px; font-size: 11px; color: #333;
  font-family: "DejaVu Sans Mono", Menlo, monospace;
}
.ida-status span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

@media (max-width: 720px) {
  .ida { width: 100%; }
  .ida-titlebar { cursor: default; }
  .ida-title { font-size: 10px; }
  .ida-toolbar, .ida-navband, .ida-tabs, .ida-left { display: none; }   /* mobile: graph + output only */
  .ida-main { flex-direction: column; height: auto; }
  .ida-left { flex: none; width: auto; flex-direction: row; height: 118px; }
  .ida-left .ida-panelhdr { display: none; }
  .ida-funcs { flex: 1; }
  .ida-funcs .fn { font-size: 10px; padding: 1px 6px; }
  .ida-overview { flex: 0 0 84px; width: 84px; }
  /* graph blocks are zoom-to-fit by JS on mobile (see ida.js) */
  .ida-graph { height: 340px; }
  .ida-outbody { height: 70px; font-size: 10px; }
  .ida-status { font-size: 10px; }
  .ida-status .ida-au { display: none; }
}
