/* GRMAPdb Structure Converter (Open Babel) — every rule is scoped under .obabel-tool. */
.obabel-tool { padding: 40px 0 60px; color: #222; font-size: 14px; line-height: 1.5; }
.obabel-tool *, .obabel-tool *::before, .obabel-tool *::after { box-sizing: border-box; }
.obabel-tool [hidden] { display: none !important; }
.obabel-tool h3 { font-size: 16px; font-weight: 700; color: #0f172a; margin: 0; }
.obabel-tool .ob-intro { color: #475569; margin: 0 0 18px; }

/* ── Form ─────────────────────────────────────────────────────────── */
.obabel-tool .ob-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 20px; }
.obabel-tool .ob-grid { display: grid; grid-template-columns: 1.45fr 1fr; gap: 20px; }
@media (max-width: 820px) { .obabel-tool .ob-grid { grid-template-columns: 1fr; } }
.obabel-tool .ob-box { background: #f8fafc; border: 1px solid #eef2f6; border-radius: 10px; padding: 16px 18px; margin-bottom: 16px; }
.obabel-tool .ob-box-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.obabel-tool .ob-title { display: flex; align-items: center; gap: 10px; }
.obabel-tool .ob-step { width: 26px; height: 26px; border-radius: 50%; background: #00897b; color: #fff; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.obabel-tool .ob-link { background: none; border: 0; padding: 0; color: #00897b; font-weight: 600; font-size: 13px; cursor: pointer; }
.obabel-tool .ob-link:hover { text-decoration: underline; }
.obabel-tool textarea { width: 100%; height: 130px; border: 1px solid #cbd5e1; border-radius: 8px; padding: 10px 12px;
  font: 13px/1.5 ui-monospace, Menlo, Consolas, monospace; background: #fff; color: #1e293b; resize: vertical; }
.obabel-tool textarea:focus, .obabel-tool select:focus { outline: 2px solid rgba(0, 137, 123, .25); border-color: #00897b; }
.obabel-tool .ob-meta { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: #64748b; margin: 6px 0 12px; }
.obabel-tool .ob-upload { border: 1.5px dashed #99f6e4; background: #f0fdfa; border-radius: 10px; padding: 10px 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.obabel-tool .ob-upload-title { font-weight: 700; font-size: 13.5px; }
.obabel-tool .ob-upload-sub { font-size: 12px; color: #64748b; }
.obabel-tool .ob-choose { background: #fff; border: 1.5px solid #5eead4; color: #0d9488; font-weight: 600; font-size: 13px;
  padding: 6px 14px; border-radius: 6px; cursor: pointer; margin: 0; flex: none; }
.obabel-tool .ob-file { font-size: 12.5px; color: #0d9488; font-weight: 600; margin-top: 8px; }
.obabel-tool .ob-label { display: block; font-weight: 700; font-size: 13.5px; color: #0f172a; margin-bottom: 6px; }
.obabel-tool select { width: 100%; background: #fff; border: 1px solid #cbd5e1; border-radius: 8px; padding: 8px 10px; font-size: 13.5px; color: #0f172a; height: auto; }
.obabel-tool .ob-check { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: #0f172a; margin: 0 0 10px; cursor: pointer; }
.obabel-tool .ob-check input { width: 17px; height: 17px; accent-color: #00897b; margin: 0; }
.obabel-tool .ob-actions { display: flex; gap: 14px; }
.obabel-tool .ob-btn-primary, .obabel-tool .ob-btn-secondary { display: inline-block; text-align: center; border-radius: 8px;
  padding: 10px 22px; font-weight: 700; font-size: 15px; cursor: pointer; text-decoration: none; }
.obabel-tool .ob-actions .ob-btn-primary, .obabel-tool .ob-actions .ob-btn-secondary { flex: 1; }
.obabel-tool .ob-btn-primary { background: #00897b; color: #fff; border: 0; }
.obabel-tool .ob-btn-primary:hover { background: #00796b; color: #fff; }
.obabel-tool .ob-btn-primary:disabled { opacity: .7; cursor: progress; }
.obabel-tool .ob-btn-secondary { background: #fff; color: #00897b; border: 1.5px solid #00897b; }
.obabel-tool .ob-btn-secondary:hover { background: #f0fdfa; color: #00897b; }
.obabel-tool .ob-notice { background: #fff8e6; border: 1px solid #f3d27a; border-radius: 8px; padding: 20px; text-align: center; }

/* ── Result ───────────────────────────────────────────────────────── */
.obabel-tool .ob-panel { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 18px 20px; margin-bottom: 18px; }
.obabel-tool .ob-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.obabel-tool .ob-panel-head .ob-btn-primary, .obabel-tool .ob-panel-head .ob-btn-secondary { font-size: 14px; padding: 7px 16px; }
.obabel-tool .ob-summary { display: flex; flex-wrap: wrap; gap: 8px 28px; }
.obabel-tool .ob-summary b { color: #1e1e2d; }
.obabel-tool .ob-warn { color: #9a6700; background: #fff8e6; border-radius: 6px; padding: 8px 12px; margin: 12px 0 0; }
.obabel-tool .ob-messages, .obabel-tool .ob-output { font: 12.5px/1.45 ui-monospace, Menlo, Consolas, monospace; background: #f8fafc;
  border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px; max-height: 480px; overflow: auto; white-space: pre; margin: 0; color: #1e293b; }
.obabel-tool .ob-messages { margin-top: 12px; max-height: 200px; }
.obabel-tool .ob-table-wrap { overflow-x: auto; border: 1px solid #e2e8f0; border-radius: 8px; }
.obabel-tool table { border-collapse: collapse; width: 100%; font-size: 14px; }
.obabel-tool th, .obabel-tool td { border-bottom: 1px solid #e2e8f0; padding: 8px 12px; text-align: left; }
.obabel-tool th { background: #00897b; color: #fff; font-weight: 600; white-space: nowrap; }
.obabel-tool td.num, .obabel-tool th.num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.obabel-tool td.smi { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.obabel-tool tbody tr:nth-child(even) td { background: #f8fafc; }
.obabel-tool .ob-empty { padding: 20px; text-align: center; color: #64748b; margin: 0; }
.obabel-tool .ob-hint { font-size: 13px; color: #64748b; margin: 8px 0 0; }

/* ── Error dialog ─────────────────────────────────────────────────── */
.obabel-tool .ob-dialog { border: 0; border-top: 4px solid #c0392b; border-radius: 10px; padding: 22px 24px 18px; max-width: 440px;
  width: calc(100% - 32px); box-shadow: 0 12px 40px rgba(0, 0, 0, .25); }
.obabel-tool .ob-dialog::backdrop { background: rgba(20, 24, 30, .55); }
.obabel-tool .ob-dlg-head { display: flex; align-items: center; gap: 12px; }
.obabel-tool .ob-dlg-icon { width: 30px; height: 30px; border-radius: 50%; background: #fdecea; color: #c0392b; font-weight: 700; font-size: 18px;
  display: inline-flex; align-items: center; justify-content: center; flex: none; }
.obabel-tool .ob-dialog p { margin: 14px 0 18px 42px; color: #444; white-space: pre-line; }
.obabel-tool .ob-dialog form { text-align: right; }
