:root {
  --bg: #07110f;
  --surface: #10201c;
  --surface-2: #142720;
  --ink: #f7f2e8;
  --muted: #93a9a1;
  --line: #254038;
  --mint: #68e0b2;
  --mint-deep: #183f32;
  --amber: #f5bd66;
  --rose: #ff9292;
  --blue: #86bfff;
}

* { box-sizing: border-box; }

body {
  min-height: 100vh;
  margin: 0;
  overflow-x: hidden;
  color: var(--ink);
  background: var(--bg);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.glow {
  position: fixed;
  z-index: -1;
  width: 560px;
  height: 560px;
  border-radius: 50%;
  filter: blur(8px);
  pointer-events: none;
}

.glow-a {
  top: -330px;
  left: -130px;
  background: radial-gradient(circle, rgba(104, 224, 178, .2), transparent 68%);
}

.glow-b {
  top: 60px;
  right: -390px;
  background: radial-gradient(circle, rgba(134, 191, 255, .13), transparent 68%);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: auto;
  padding: 28px 0 64px;
}

.brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 38px;
}

.brand a {
  display: flex;
  gap: 11px;
  align-items: center;
  color: var(--ink);
  font-weight: 850;
  text-decoration: none;
}

.brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  color: #07110f;
  background: var(--mint);
  border-radius: 12px;
  font-family: Georgia, serif;
  font-size: 18px;
}

.pilot-pill,
.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid rgba(104, 224, 178, .35);
  border-radius: 999px;
  color: var(--mint);
  background: rgba(24, 63, 50, .55);
  font-size: 11px;
  font-weight: 850;
}

.loading-card,
.access-card {
  width: min(680px, 100%);
  margin: 10vh auto 0;
  padding: 48px;
  border: 1px solid var(--line);
  border-radius: 28px;
  color: var(--muted);
  background: linear-gradient(145deg, rgba(20, 39, 32, .97), rgba(12, 26, 22, .97));
  text-align: center;
}

.access-card h1 {
  margin: 0 0 12px;
  color: var(--ink);
  font: 500 clamp(34px, 6vw, 52px)/1 Georgia, serif;
}

.access-card p {
  margin: 0;
  line-height: 1.6;
}

.layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.side {
  position: sticky;
  top: 24px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: rgba(16, 32, 28, .86);
  backdrop-filter: blur(16px);
}

.side .eyebrow,
.eyebrow {
  color: var(--mint);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.side h2 {
  margin: 8px 0 6px;
  font: 500 24px/1.1 Georgia, serif;
}

.side > p {
  margin: 0 0 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.steps {
  display: grid;
  gap: 7px;
}

.step-link {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: center;
  width: 100%;
  padding: 9px;
  border: 0;
  border-radius: 12px;
  color: var(--muted);
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.step-link:hover,
.step-link.active {
  color: var(--ink);
  background: rgba(24, 63, 50, .55);
}

.step-link.done { color: var(--mint); }

.step-number {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 900;
}

.step-link.active .step-number,
.step-link.done .step-number {
  color: #07110f;
  border-color: var(--mint);
  background: var(--mint);
}

.content { min-width: 0; }

.intro {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  margin-bottom: 18px;
}

.intro h1 {
  max-width: 720px;
  margin: 8px 0 10px;
  font: 500 clamp(38px, 6vw, 64px)/.98 Georgia, serif;
}

.intro p {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.panel {
  display: none;
  padding: clamp(20px, 4vw, 34px);
  border: 1px solid var(--line);
  border-radius: 26px;
  background: linear-gradient(145deg, rgba(20, 39, 32, .98), rgba(12, 26, 22, .98));
  box-shadow: 0 24px 70px rgba(0, 0, 0, .2);
}

.panel.active { display: block; }

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: start;
  margin-bottom: 26px;
}

.panel-head h2 {
  margin: 6px 0 8px;
  font: 500 clamp(28px, 5vw, 42px)/1.03 Georgia, serif;
}

.panel-head p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.provider-grid,
.review-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.guide,
.notice,
.upload-box,
.review-card {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 17, 15, .52);
}

.guide h3,
.review-card h3 {
  margin: 0 0 12px;
  font-size: 15px;
}

.guide ol {
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.guide a {
  color: var(--mint);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.notice {
  margin: 16px 0;
  border-color: rgba(245, 189, 102, .4);
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.notice strong { color: var(--amber); }
.notice.safe { border-color: rgba(104, 224, 178, .35); }
.notice.safe strong { color: var(--mint); }
.notice.warning { border-color: rgba(255, 146, 146, .45); color: var(--ink); }

a.primary {
  display: inline-block;
  text-decoration: none;
}

form {
  display: grid;
  gap: 15px;
}

label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

/* display:grid en label/otros pisa el estilo nativo de [hidden]. */
[hidden] { display: none !important; }

input,
select,
textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  outline: none;
  color: var(--ink);
  background: #091713;
  font: inherit;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--mint);
  box-shadow: 0 0 0 3px rgba(104, 224, 178, .12);
}

textarea { min-height: 110px; resize: vertical; }

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.check {
  display: grid;
  grid-template-columns: 20px 1fr;
  gap: 10px;
  align-items: start;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.45;
}

.check input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--mint);
}

.actions {
  display: flex;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.panel-nav {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

button {
  font: inherit;
}

.muted {
  color: var(--muted, #7c8a86);
  font-weight: 500;
}

.accounts-block {
  display: grid;
  gap: 12px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(9, 23, 19, .35);
}

.accounts-head h3 {
  margin: 0 0 2px;
  font-size: 15px;
}

.accounts-head p { margin: 0; font-size: 12px; }

.account-row {
  display: grid;
  gap: 10px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #071310;
}

.account-row-actions {
  display: flex;
  justify-content: flex-end;
}

.link-button {
  padding: 4px 2px;
  border: 0;
  background: none;
  color: var(--mint);
  font-weight: 800;
  cursor: pointer;
}

.link-button:hover { text-decoration: underline; }

.primary,
.secondary,
.danger {
  padding: 12px 16px;
  border-radius: 13px;
  font-weight: 900;
  cursor: pointer;
}

.primary {
  color: #07110f;
  border: 1px solid var(--mint);
  background: var(--mint);
}

.secondary {
  color: var(--ink);
  border: 1px solid var(--line);
  background: #091713;
}

.danger {
  color: var(--rose);
  border: 1px solid rgba(255, 146, 146, .35);
  background: rgba(255, 146, 146, .06);
}

button:disabled {
  opacity: .55;
  cursor: wait;
}

.form-error {
  min-height: 18px;
  color: var(--rose);
  font-size: 12px;
}

.configured {
  display: flex;
  gap: 9px;
  align-items: center;
  margin-bottom: 15px;
  color: var(--mint);
  font-size: 12px;
  font-weight: 800;
}

.configured i {
  display: grid;
  width: 23px;
  height: 23px;
  place-items: center;
  border-radius: 50%;
  color: #07110f;
  background: var(--mint);
  font-style: normal;
}

.upload-box {
  display: grid;
  gap: 14px;
  place-items: center;
  padding: 26px 18px;
  border-style: dashed;
  text-align: center;
}

.upload-box.dragging {
  border-color: var(--mint);
  background: rgba(24, 63, 50, .55);
}

.upload-box input { display: none; }
.upload-box strong { font: 500 24px Georgia, serif; }
.upload-box span { color: var(--muted); font-size: 12px; }

.capture-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.capture-option {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(7, 17, 15, .52);
}

.capture-option-head {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  align-items: start;
  margin-bottom: 16px;
}

.capture-option h3 {
  margin: 2px 0 6px;
  font-size: 16px;
}

.capture-option p,
.option-foot {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.option-foot { margin-top: 13px; }

.option-number {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(104, 224, 178, .35);
  border-radius: 11px;
  color: var(--mint);
  background: rgba(24, 63, 50, .55);
  font-weight: 900;
}

.shortcut-setup {
  display: grid;
  gap: 13px;
  margin-top: 15px;
}

.shortcut-setup .notice { margin: 0; }

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.copy-row input {
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 11px;
}

.copy-row button { padding-inline: 12px; }

.shortcut-steps {
  margin: 2px 0 0;
  padding-left: 20px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.6;
}

.shortcut-steps strong { color: var(--ink); }

.queue {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.review-card {
  min-width: 0;
}

.review-card-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: start;
}

.review-card-head h3 {
  margin: 0;
  overflow-wrap: anywhere;
}

.review-card-head small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.status-pill.error {
  color: var(--rose);
  border-color: rgba(255, 146, 146, .35);
  background: rgba(255, 146, 146, .07);
}

.status-pill.pending {
  color: var(--amber);
  border-color: rgba(245, 189, 102, .35);
  background: rgba(245, 189, 102, .07);
}

.review-form {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.empty {
  padding: 28px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  text-align: center;
}

.complete-banner {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: center;
  margin-bottom: 18px;
  padding: 17px 19px;
  border: 1px solid rgba(104, 224, 178, .34);
  border-radius: 18px;
  background: rgba(24, 63, 50, .38);
}

.complete-banner strong { color: var(--mint); }
.complete-banner p { margin: 4px 0 0; color: var(--muted); font-size: 12px; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 20;
  max-width: 380px;
  padding: 13px 16px;
  border-radius: 14px;
  color: #07110f;
  background: var(--mint);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .45);
  font-weight: 900;
}

@media (max-width: 820px) {
  .layout { grid-template-columns: 1fr; }
  .side { position: static; }
  .steps { grid-template-columns: repeat(5, minmax(42px, 1fr)); }
  .step-link { grid-template-columns: 1fr; place-items: center; text-align: center; }
  .step-link span:last-child { display: none; }
  .provider-grid, .review-grid, .capture-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .shell { width: min(100% - 20px, 680px); padding-top: 18px; }
  .brand { margin-bottom: 24px; }
  .intro h1 { font-size: 42px; }
  .panel { padding: 19px; border-radius: 20px; }
  .panel-head, .complete-banner { flex-direction: column; }
  .form-row { grid-template-columns: 1fr; }
  .actions { align-items: stretch; flex-direction: column; }
  .actions button { width: 100%; }
  .copy-row { grid-template-columns: 1fr; }
  .copy-row button { width: 100%; }
  .toast { right: 10px; bottom: 10px; left: 10px; text-align: center; }
}

.entity-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.entity-chips:empty { display: none; }

.entity-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 8px 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #071310;
  font-size: 13px;
  font-weight: 700;
}

.entity-chip button {
  width: auto;
  padding: 0 5px;
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
}

.entity-chip button:hover { color: var(--rose); }

.entity-add {
  display: flex;
  gap: 8px;
}

.entity-add input { flex: 1; }

.entity-add .secondary { flex-shrink: 0; }

.kind-help {
  margin: 8px 0 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  font-size: 13px;
  line-height: 1.45;
}

.kind-help strong { color: var(--mint); }

.balance-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 12px;
  margin-top: 18px;
}

.balance-card {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  display: grid;
  gap: 6px;
}

.balance-card strong { font-size: 22px; }

.balance-card.debt strong { color: var(--rose); }

.balance-card p {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
}

.balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.balance-row > div:first-child {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.balance-row .muted {
  font-size: 12px;
  overflow-wrap: anywhere;
}

.balance-amount {
  font-size: 18px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--mint);
}

.balance-amount.debt { color: var(--rose); }

.balance-amount .muted {
  font-weight: 400;
  font-size: 12px;
  margin-left: 4px;
}

.pill-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.status-pill.auto {
  color: var(--blue);
  border-color: rgba(134, 191, 255, .35);
  background: rgba(134, 191, 255, .08);
}

.budget-progress-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.budget-progress {
  display: grid;
  gap: 7px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.budget-progress-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
}

.budget-progress-head span { font-size: 13px; white-space: nowrap; }

.progress-track {
  height: 8px;
  border-radius: 999px;
  background: var(--mint-deep);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  border-radius: 999px;
  background: var(--mint);
  transition: width .3s ease;
}

.progress-fill.over { background: var(--rose); }

.over-label { color: var(--rose); }

.balance-row .danger {
  flex-shrink: 0;
  padding: 8px 14px;
  font-size: 13px;
}
