/* migrate.ln2crm.com: the sign in page and the migration tool. Same dark violet
   world as ln2crm.com/crm-migration/, so the landing and the tool read as one. */
:root{
  --ink:#0a0b10; --band:#0e1017; --surf:#12141c; --surf-2:#181b25; --surf-3:#1f2330;
  --text:#ebe9e4; --text-2:#a09fa6; --mid:#85838d;
  --line:rgba(244,241,234,.08); --line-2:rgba(244,241,234,.14);
  --violet:#6651f6; --violet-ink:#a99dff; --violet-soft:rgba(102,81,246,.14); --edge:rgba(102,81,246,.32);
  --green:#3ecf6d; --green-soft:rgba(62,207,109,.12);
  --amber:#f2b84b; --amber-soft:rgba(242,184,75,.12);
  --red:#ff7a7a; --red-soft:rgba(255,122,122,.12);
  --sans:"General Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono:"JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --r-sm:8px; --r:12px; --r-lg:18px;
  --fast:150ms; --ease:cubic-bezier(.16,1,.3,1);
}
*{ box-sizing:border-box; }
html,body{ margin:0; }
body{ background:var(--ink); color:var(--text); font:16px/1.55 var(--sans); -webkit-font-smoothing:antialiased; }
a{ color:var(--violet-ink); }
h1,h2,h3{ text-wrap:balance; letter-spacing:-.02em; margin:0; }
button,input,select{ font:inherit; color:inherit; }
:focus-visible{ outline:2px solid var(--violet-ink); outline-offset:2px; }
.num{ font-family:var(--mono); font-variant-numeric:tabular-nums; }
.muted{ color:var(--text-2); }
[hidden]{ display:none !important; }

/* Buttons */
.btn{ display:inline-flex; align-items:center; justify-content:center; gap:10px; padding:12px 18px; border-radius:var(--r);
  border:1px solid var(--line-2); background:var(--surf-2); font-weight:600; font-size:15px; cursor:pointer; text-decoration:none;
  color:var(--text); transition:transform var(--fast) var(--ease), filter var(--fast), background var(--fast); }
.btn:hover{ background:var(--surf-3); }
.btn:active{ transform:translateY(1px); }
.btn[disabled]{ opacity:.45; cursor:not-allowed; transform:none; }
.btn-primary{ border-color:transparent; color:#fff; background:linear-gradient(180deg,#7a66ff,var(--violet)); box-shadow:0 8px 24px rgba(102,81,246,.32); }
.btn-primary:hover{ filter:brightness(1.08); background:linear-gradient(180deg,#7a66ff,var(--violet)); }
.btn-ghost{ background:transparent; border-color:transparent; color:var(--text-2); padding:8px 10px; }
.btn-ghost:hover{ color:var(--text); background:var(--surf-2); }
.btn-danger{ color:var(--red); }
.btn-sm{ padding:8px 12px; font-size:14px; border-radius:var(--r-sm); }

/* Fields */
.field{ display:grid; gap:6px; }
.field label{ font-size:13px; font-weight:600; color:var(--text-2); }
.input, select.input{ width:100%; padding:12px 14px; border-radius:var(--r-sm); border:1px solid var(--line-2); background:var(--ink); }
.input:focus{ border-color:var(--violet); outline:none; box-shadow:0 0 0 3px var(--violet-soft); }
.check{ display:flex; gap:10px; align-items:flex-start; font-size:15px; cursor:pointer; }
.check input{ margin-top:4px; accent-color:var(--violet); width:16px; height:16px; flex:none; }
.check small{ display:block; color:var(--text-2); font-size:13px; }

.msg{ padding:10px 14px; border-radius:var(--r-sm); font-size:14px; }
.msg.err{ background:var(--red-soft); color:var(--red); }
.msg.ok{ background:var(--green-soft); color:var(--green); }
.msg.warn{ background:var(--amber-soft); color:var(--amber); }

/* ---------- Sign in ---------- */
.auth{ min-height:100vh; display:grid; grid-template-columns:1.1fr .9fr; }
.auth-story{ position:relative; overflow:hidden; padding:56px clamp(24px,5vw,72px); display:flex; flex-direction:column; gap:40px;
  background:radial-gradient(900px 500px at 10% -10%, rgba(102,81,246,.22), transparent 60%), var(--band); border-right:1px solid var(--line); }
.brand{ display:inline-flex; align-items:center; gap:10px; font-weight:700; font-size:18px; color:var(--text); text-decoration:none; }
.brand img{ width:30px; height:30px; }
.brand em{ font-style:normal; color:var(--violet-ink); font-weight:600; }
.auth-story h1{ font-size:clamp(34px,4vw,54px); line-height:1.05; letter-spacing:-.03em; max-width:15ch; }
.auth-story .lead{ color:var(--text-2); font-size:18px; max-width:46ch; margin:16px 0 0; }
.route{ display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:14px; max-width:520px;
  padding:22px; border-radius:var(--r-lg); border:1px solid var(--edge); background:var(--surf); box-shadow:0 24px 60px rgba(0,0,0,.35); }
.route-end{ display:grid; gap:6px; justify-items:center; text-align:center; padding:14px 8px; border-radius:var(--r); background:var(--surf-2); }
.route-end img{ height:26px; width:auto; }
.route-end span{ font-size:12px; color:var(--text-2); }
.route-arrow{ display:grid; gap:4px; justify-items:center; color:var(--violet-ink); font-size:12px; }
.route-arrow b{ font-family:var(--mono); font-size:15px; color:var(--text); font-weight:500; }
.route-dots{ display:flex; gap:5px; }
.route-dots i{ width:6px; height:6px; border-radius:50%; background:var(--violet); opacity:.35; animation:hop 1.6s infinite var(--ease); }
.route-dots i:nth-child(2){ animation-delay:.2s } .route-dots i:nth-child(3){ animation-delay:.4s }
@keyframes hop{ 0%,100%{ opacity:.25; transform:none } 40%{ opacity:1; transform:translateY(-3px) } }
.facts{ list-style:none; padding:0; margin:0; display:grid; gap:10px; color:var(--text-2); }
.facts li{ display:flex; gap:10px; align-items:baseline; }
.facts li::before{ content:""; width:7px; height:7px; border-radius:50%; background:var(--green); flex:none; transform:translateY(-1px); }
.facts b{ color:var(--text); font-weight:600; }
.auth-foot{ margin-top:auto; font-size:14px; color:var(--mid); }
.auth-panel{ display:flex; align-items:center; justify-content:center; padding:40px 20px; }
.auth-card{ width:100%; max-width:420px; display:grid; gap:18px; }
.auth-card h2{ font-size:28px; }
.tabs{ display:grid; grid-template-columns:1fr 1fr; padding:4px; border-radius:var(--r); background:var(--surf); border:1px solid var(--line); }
.tabs button{ border:0; background:transparent; padding:10px; border-radius:9px; font-weight:600; color:var(--text-2); cursor:pointer; }
.tabs button[aria-selected="true"]{ background:var(--surf-3); color:var(--text); }
.sso{ display:grid; gap:10px; }
.sso .btn{ width:100%; background:var(--surf); }
.sso img{ width:18px; height:18px; }
.or{ display:flex; align-items:center; gap:12px; color:var(--mid); font-size:13px; }
.or::before,.or::after{ content:""; height:1px; flex:1; background:var(--line-2); }
.auth-form{ display:grid; gap:14px; }
.auth-form .btn-primary{ width:100%; padding:14px; }
.fine{ font-size:13px; color:var(--mid); text-align:center; }
.contact-line{ display:flex; gap:8px; align-items:center; justify-content:center; flex-wrap:wrap; padding:12px; border-radius:var(--r);
  border:1px dashed var(--line-2); font-size:14px; color:var(--text-2); }
.contact-line a{ font-weight:600; }

/* ---------- Tool ---------- */
.top{ position:sticky; top:0; z-index:5; display:flex; align-items:center; gap:18px; padding:12px clamp(16px,3vw,32px);
  background:rgba(10,11,16,.86); backdrop-filter:blur(10px); border-bottom:1px solid var(--line); }
.top .spacer{ flex:1; }
.meter{ display:grid; gap:4px; min-width:220px; font-size:12px; color:var(--text-2); }
.meter-bar{ height:6px; border-radius:6px; background:var(--surf-3); overflow:hidden; }
.meter-bar i{ display:block; height:100%; width:100%; background:linear-gradient(90deg,var(--violet),var(--violet-ink)); transform-origin:left; }
.who{ font-size:14px; color:var(--text-2); max-width:28ch; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.page{ max-width:1120px; margin:0 auto; padding:32px clamp(16px,3vw,32px) 80px; display:grid; gap:28px; }
.sec-head{ display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:14px; flex-wrap:wrap; }
.sec-head h2{ font-size:22px; }
.step-n{ font-family:var(--mono); font-size:12px; color:var(--violet-ink); letter-spacing:.08em; margin-bottom:6px; }
.panel{ border:1px solid var(--line); background:var(--surf); border-radius:var(--r-lg); padding:22px; }

.crms{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; }
.crm{ display:grid; gap:12px; align-content:start; padding:16px; border-radius:var(--r); background:var(--surf-2); border:1px solid var(--line); }
.crm.on{ border-color:rgba(62,207,109,.35); }
.crm-head{ display:flex; align-items:center; justify-content:space-between; gap:8px; min-height:28px; }
.crm-head img{ height:22px; width:auto; max-width:110px; }
.chip{ display:inline-flex; align-items:center; gap:6px; padding:3px 9px; border-radius:999px; font-size:12px; font-weight:600; white-space:nowrap; }
.chip::before{ content:""; width:6px; height:6px; border-radius:50%; background:currentColor; }
.chip.ok{ color:var(--green); background:var(--green-soft); }
.chip.off{ color:var(--mid); background:var(--surf-3); }
.chip.warn{ color:var(--amber); background:var(--amber-soft); }
.chip.run{ color:var(--violet-ink); background:var(--violet-soft); }
.chip.err{ color:var(--red); background:var(--red-soft); }
.crm-label{ font-size:13px; color:var(--text-2); min-height:20px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.crm .token{ display:grid; gap:8px; }

.pair{ display:grid; grid-template-columns:1fr auto 1fr; gap:12px; align-items:end; }
.swap{ height:46px; width:46px; padding:0; }
.opts{ display:grid; grid-template-columns:1fr 1fr; gap:14px 28px; margin-top:20px; }
.opts fieldset{ border:0; padding:0; margin:0; display:grid; gap:10px; }
.opts legend{ font-size:13px; font-weight:600; color:var(--text-2); margin-bottom:8px; }
details.filters{ margin-top:18px; border-top:1px solid var(--line); padding-top:14px; }
details.filters summary{ cursor:pointer; font-weight:600; color:var(--violet-ink); }
.filter-grid{ display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin-top:14px; }
.actions{ display:flex; flex-wrap:wrap; gap:10px; align-items:center; margin-top:20px; }

/* A migration */
.mig-head{ display:flex; flex-wrap:wrap; gap:12px; align-items:center; justify-content:space-between; }
.mig-title{ display:flex; align-items:center; gap:12px; font-size:20px; font-weight:600; }
.mig-title .arrow{ color:var(--violet-ink); }
.stages{ display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:8px; margin:18px 0 6px; }
.stage{ padding:12px 14px; border-radius:var(--r); background:var(--surf-2); border:1px solid var(--line); font-size:14px; }
.stage b{ display:block; font-size:15px; }
.stage small{ color:var(--text-2); }
.stage.done{ border-color:rgba(62,207,109,.35); }
.stage.done b::after{ content:" \2713"; color:var(--green); }
.stage.now{ border-color:var(--edge); background:var(--violet-soft); }
.state{ display:flex; gap:12px; align-items:center; flex-wrap:wrap; padding:14px 16px; border-radius:var(--r); background:var(--surf-2); margin-top:16px; }
.spin{ width:16px; height:16px; border-radius:50%; border:2px solid var(--violet-soft); border-top-color:var(--violet-ink); animation:rot 1s linear infinite; flex:none; }
@keyframes rot{ to{ transform:rotate(360deg) } }

.tbl-wrap{ overflow-x:auto; margin-top:12px; }
table.tbl{ width:100%; border-collapse:collapse; font-size:14px; }
.tbl th{ text-align:left; font-size:12px; font-weight:600; color:var(--mid); text-transform:uppercase; letter-spacing:.06em; padding:8px 10px; border-bottom:1px solid var(--line-2); }
.tbl td{ padding:9px 10px; border-bottom:1px solid var(--line); vertical-align:top; }
.tbl td.n{ text-align:right; font-family:var(--mono); font-variant-numeric:tabular-nums; }
.tbl th.n{ text-align:right; }
.tbl tr.total td{ font-weight:600; border-bottom:0; }
.grid2{ display:grid; grid-template-columns:1fr 1fr; gap:18px; margin-top:18px; }
.box{ padding:16px; border-radius:var(--r); background:var(--surf-2); border:1px solid var(--line); min-width:0; }
.box h3{ font-size:15px; margin-bottom:6px; }
.box ul{ margin:8px 0 0; padding-left:18px; color:var(--text-2); font-size:14px; }
.tag{ font-family:var(--mono); font-size:12px; padding:2px 7px; border-radius:6px; background:var(--surf-3); color:var(--text-2); white-space:nowrap; }
.tag.match{ color:var(--green); background:var(--green-soft); }
.tag.create{ color:var(--violet-ink); background:var(--violet-soft); }
.tag.note{ color:var(--amber); background:var(--amber-soft); }

.history{ display:grid; gap:8px; }
.hist{ display:flex; align-items:center; gap:14px; flex-wrap:wrap; padding:12px 16px; border-radius:var(--r); background:var(--surf); border:1px solid var(--line);
  cursor:pointer; text-align:left; width:100%; }
.hist:hover{ border-color:var(--line-2); }
.hist .when{ margin-left:auto; font-size:13px; color:var(--mid); }
.empty{ padding:22px; text-align:center; color:var(--text-2); border:1px dashed var(--line-2); border-radius:var(--r); }

@media (max-width:900px){
  .auth{ grid-template-columns:1fr; }
  .auth-story{ border-right:0; border-bottom:1px solid var(--line); padding:32px 20px; gap:24px; }
  .crms{ grid-template-columns:1fr 1fr; }
  .stages{ grid-template-columns:1fr 1fr; }
  .grid2,.opts{ grid-template-columns:1fr; }
  .meter{ display:none; }
}
@media (max-width:520px){
  .crms,.filter-grid{ grid-template-columns:1fr; }
  .pair{ grid-template-columns:1fr; }
  .swap{ justify-self:center; transform:rotate(90deg); }
  .route{ grid-template-columns:1fr; }
  .route-arrow{ transform:rotate(90deg); }
  .who{ display:none; }
}
@media (prefers-reduced-motion:reduce){ *{ animation:none !important; transition:none !important; } }
