/* Odoo Migration Studio — ledger-inspired UI
   Palette fixed by the brief: page gradient #0f5b73 -> #1581a3,
   cards & buttons #093442, white type. */

@import url('https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:wght@400;500;600&family=IBM+Plex+Sans:wght@400;500;600;700&display=swap');

:root {
  --teal-deep: #0f5b73;
  --teal-bright: #1581a3;
  --ink: #093442;
  --ink-soft: #0c4356;
  --line: rgba(255, 255, 255, .16);
  --line-strong: rgba(255, 255, 255, .3);
  --mute: rgba(255, 255, 255, .62);
  --debit: #7fd4ef;
  --credit: #f2c76b;
  --ok: #6fd7a8;
  --warn: #f2c76b;
  --bad: #ff9a8a;
  --r: 14px;
  --shadow: 0 18px 44px rgba(4, 26, 34, .34);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  font-family: 'IBM Plex Sans', system-ui, sans-serif;
  color: #fff;
  background: linear-gradient(160deg, var(--teal-deep) 0%, var(--teal-bright) 100%) fixed;
  line-height: 1.5;
}

a { color: #fff; text-decoration: none; border-bottom: 1px solid var(--line-strong); }
a:hover { border-bottom-color: #fff; }

code, .mono, .num { font-family: 'IBM Plex Mono', ui-monospace, monospace; }
.num { font-variant-numeric: tabular-nums; }

.wrap { max-width: 1360px; margin: 0 auto; padding: 28px 22px 80px; }

/* ---------------------------------------------------------------- masthead */
.masthead {
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
  padding: 18px 22px; margin-bottom: 24px;
  background: var(--ink); border-radius: var(--r); box-shadow: var(--shadow);
}
.masthead h1 {
  margin: 0; font-size: 19px; font-weight: 600; letter-spacing: -.01em;
}
.masthead .eyebrow {
  display: block; font-family: 'IBM Plex Mono', monospace;
  font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--mute);
}
.masthead .spacer { flex: 1; }
.chip {
  font-family: 'IBM Plex Mono', monospace; font-size: 11.5px;
  padding: 5px 10px; border: 1px solid var(--line); border-radius: 999px; color: var(--mute);
}
.chip.live { color: var(--ok); border-color: rgba(111, 215, 168, .45); }

/* ---------------------------------------------------------------- surfaces */
.card {
  background: var(--ink); border-radius: var(--r); padding: 22px;
  box-shadow: var(--shadow); margin-bottom: 20px;
}
.card > h2 {
  margin: 0 0 4px; font-size: 15px; font-weight: 600;
}
.card > h2 .step {
  font-family: 'IBM Plex Mono', monospace; font-size: 11px; color: var(--mute);
  margin-right: 10px;
}
.card .hint { margin: 0 0 16px; color: var(--mute); font-size: 13px; }

.grid { display: grid; gap: 20px; }
.grid.two { grid-template-columns: 1fr 1fr; }
.grid.side { grid-template-columns: 1.55fr 1fr; align-items: start; }
@media (max-width: 940px) { .grid.two, .grid.side { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------- forms */
label { display: block; font-size: 11.5px; letter-spacing: .04em; color: var(--mute); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; color: #fff; font-size: 14px;
  font-family: inherit;
  background: rgba(255, 255, 255, .07);
  border: 1px solid var(--line); border-radius: 9px;
}
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid #fff; outline-offset: 2px;
}
select option { background: var(--ink); color: #fff; }
.field { margin-bottom: 14px; }
.row { display: flex; gap: 14px; flex-wrap: wrap; }
.row > .field { flex: 1 1 190px; }

button, .btn {
  font-family: inherit; font-size: 13.5px; font-weight: 500; color: #fff;
  background: var(--ink); border: 1px solid var(--line-strong); border-radius: 9px;
  padding: 10px 16px; cursor: pointer; transition: background .15s, transform .06s;
}
button:hover, .btn:hover { background: var(--ink-soft); }
button:active { transform: translateY(1px); }
button[disabled] { opacity: .45; cursor: not-allowed; }
.btn-primary { background: rgba(255, 255, 255, .14); border-color: #fff; }
.btn-primary:hover { background: rgba(255, 255, 255, .22); }
.btn-ghost { background: transparent; border-color: var(--line); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

/* ---------------------------------------------------------------- balance beam
   Signature element: the trial balance drawn as a beam that levels out
   as debit and credit converge. */
.beam { margin: 6px 0 4px; }
.beam-track {
  position: relative; height: 34px; border-radius: 9px; overflow: hidden;
  background: rgba(255, 255, 255, .07); border: 1px solid var(--line);
  display: flex;
}
.beam-debit { background: linear-gradient(90deg, rgba(127,212,239,.85), rgba(127,212,239,.45)); }
.beam-credit { background: linear-gradient(90deg, rgba(242,199,107,.45), rgba(242,199,107,.85)); }
.beam-track > span { transition: width .5s cubic-bezier(.3,.8,.3,1); }
.beam-pivot {
  position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px;
  background: #fff; transform: translateX(-1px);
}
.beam-legend {
  display: flex; justify-content: space-between; margin-top: 8px;
  font-family: 'IBM Plex Mono', monospace; font-size: 12px;
}
.beam-legend .diff.ok { color: var(--ok); }
.beam-legend .diff.off { color: var(--warn); }

/* ---------------------------------------------------------------- stats */
.stats { display: flex; gap: 26px; flex-wrap: wrap; margin: 4px 0 0; }
.stat .k {
  font-family: 'IBM Plex Mono', monospace; font-size: 22px; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.stat .l { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--mute); }

/* ---------------------------------------------------------------- table */
.table-scroll { max-height: 62vh; overflow: auto; border: 1px solid var(--line); border-radius: 11px; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
thead th {
  position: sticky; top: 0; z-index: 2; text-align: left;
  background: var(--ink); color: var(--mute);
  font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 500;
  padding: 11px 10px; border-bottom: 1px solid var(--line-strong);
}
tbody td { padding: 7px 10px; border-bottom: 1px solid rgba(255, 255, 255, .08); vertical-align: middle; }
tbody tr:hover { background: rgba(255, 255, 255, .05); }
tbody tr.review { box-shadow: inset 3px 0 0 var(--warn); }
tbody tr.err { box-shadow: inset 3px 0 0 var(--bad); }
td.r { text-align: right; }
td input, td select { padding: 5px 7px; font-size: 12.5px; border-radius: 6px; }
td input.code { width: 92px; }
td .why { display: block; font-size: 11px; color: var(--mute); margin-top: 2px; }

.tag {
  display: inline-block; font-family: 'IBM Plex Mono', monospace; font-size: 10.5px;
  padding: 2px 7px; border-radius: 999px; border: 1px solid var(--line-strong); color: var(--mute);
}
.tag.create { color: var(--debit); border-color: rgba(127,212,239,.5); }
.tag.map { color: var(--ok); border-color: rgba(111,215,168,.5); }
.tag.skip { color: var(--mute); }
.tag.ai { color: var(--credit); border-color: rgba(242,199,107,.5); }

.filters { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.filters input { width: 220px; }

/* ---------------------------------------------------------------- log & alerts */
.log { max-height: 280px; overflow: auto; font-size: 12.5px; }
.log li { list-style: none; padding: 8px 0; border-bottom: 1px solid rgba(255,255,255,.08); }
.log .when { font-family: 'IBM Plex Mono', monospace; color: var(--mute); margin-right: 8px; }
.log .success { color: var(--ok); }
.log .warn { color: var(--warn); }
.log .error { color: var(--bad); }

.alert {
  padding: 11px 14px; border-radius: 9px; font-size: 13px; margin-bottom: 14px;
  border: 1px solid var(--line-strong); background: rgba(255, 255, 255, .07);
}
.alert.bad { border-color: rgba(255,154,138,.6); }
.alert.good { border-color: rgba(111,215,168,.6); }

.project-list { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.project-list .card { margin: 0; }
.project-list h3 { margin: 0 0 4px; font-size: 15px; }
.project-list .meta { color: var(--mute); font-size: 12px; font-family: 'IBM Plex Mono', monospace; }

.spinner {
  display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.3); border-top-color: #fff;
  animation: spin .7s linear infinite; vertical-align: -2px; margin-right: 7px;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

.muted { color: var(--mute); }
.small { font-size: 12px; }
pre.review-out { white-space: pre-wrap; font-size: 12.5px; line-height: 1.6; margin: 0; }
