:root {
  --lime: #92FF5F;
  --move-green: #0F3B27;
  --soft-white: #F7F9F7;
  --orange: #FF7036;
  --ice: #BFF2F0;
  --mint: #CFF1D2;

  --bg: #020202;
  --surface: #121413;
  --surface-alt: rgba(247, 249, 247, 0.05);
  --text: #F7F9F7;
  --muted: rgba(247, 249, 247, 0.64);
  --border: rgba(247, 249, 247, 0.12);
  --input-bg: #020202;
  --shadow: 0 10px 30px rgba(2, 2, 2, 0.45);
}

body.light {
  --bg: #F7F9F7;
  --surface: #F7F9F7;
  --surface-alt: rgba(15, 59, 39, 0.05);
  --text: #0F3B27;
  --muted: rgba(15, 59, 39, 0.65);
  --border: rgba(15, 59, 39, 0.14);
  --input-bg: rgba(15, 59, 39, 0.04);
  --shadow: 0 8px 24px rgba(15, 59, 39, 0.07);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body {
  margin: 0;
  padding: 0;
  min-height: 100dvh;
  font-family: "Poppins", system-ui, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
}

.hidden { display: none !important; }
h1, h2, h3 { margin: 0 0 6px; font-weight: 600; letter-spacing: -0.015em; }
p { margin: 0; }
.muted { color: var(--muted); font-size: 0.84rem; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: 62px;
  padding: 0 20px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.brand-wrap { display: flex; align-items: center; gap: 10px; }
.brand-logo { height: 26px; width: auto; display: block; }
.pro-tag {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--move-green);
}

.top-actions { display: flex; align-items: center; gap: 8px; }

.page-wrap {
  max-width: 960px;
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 24px;
  box-shadow: var(--shadow);
}

.auth-card { max-width: 430px; margin: 28px auto; }

.badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 600;
  background: var(--ice);
  color: var(--move-green);
}
.badge-ok { background: var(--mint); color: var(--move-green); }
.badge-lime { background: var(--lime); color: var(--move-green); }
.badge-warn { background: rgba(255, 112, 54, 0.16); color: var(--orange); }

.field { margin-top: 12px; }
label { display: block; font-size: 0.78rem; color: var(--muted); margin-bottom: 5px; font-weight: 500; }
input, select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--input-bg);
  color: var(--text);
  font-family: inherit;
  font-size: 0.88rem;
  outline: none;
}
input:focus, select:focus { border-color: var(--lime); }

.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 12px;
}

button {
  cursor: pointer;
  font-family: inherit;
  font-weight: 600;
  font-size: 0.85rem;
  border-radius: 999px;
  padding: 11px 18px;
  transition: background-color 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.12s ease;
}
button:active { transform: scale(0.98); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.btn-lime {
  background: var(--lime);
  color: var(--move-green);
  border: 1.5px solid var(--lime);
}
.btn-lime:hover:not(:disabled) {
  background: var(--move-green);
  color: var(--lime);
}

.btn-outline {
  background: transparent;
  color: var(--text);
  border: 1.5px solid var(--text);
}
.btn-outline:hover:not(:disabled) {
  background: var(--text);
  color: var(--bg);
}

.btn-google {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: var(--soft-white);
  color: #0F3B27;
  border: 1.5px solid var(--border);
}
.btn-google:hover:not(:disabled) { border-color: var(--lime); }

.full-w { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 0.78rem; }

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.76rem;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 10px;
  margin: 14px 0 18px;
}

.role-card {
  text-align: left;
  padding: 14px;
  border-radius: 16px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  color: var(--text);
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.role-card:hover { border-color: var(--lime); }
.role-card.active { border-color: var(--lime); background: var(--surface-alt); }

/* BLOQUE KYC INE + SELFIE */
.kyc-section {
  margin-top: 20px;
  padding: 16px;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.kyc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.upload-card {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 170px;
  padding: 14px;
  border-radius: 16px;
  border: 1.5px dashed var(--border);
  background: var(--input-bg);
  text-align: center;
  cursor: pointer;
  margin: 0;
  transition: border-color 0.16s ease;
}
.upload-card:hover, .upload-card.has-file { border-color: var(--lime); border-style: solid; }
.upload-card input[type="file"] { display: none; }

.upload-preview {
  width: 100%;
  max-height: 140px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--border);
}

.tabs-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.tab-btn {
  padding: 8px 16px;
  background: transparent;
  color: var(--muted);
  border: 1px solid var(--border);
}
.tab-btn.active {
  background: var(--lime);
  color: var(--move-green);
  border-color: var(--lime);
}

.embed-box {
  margin-top: 14px;
  padding: 18px;
  border-radius: 18px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  min-height: 280px;
}

.msg-error { color: var(--orange); font-size: 0.82rem; margin-top: 10px; min-height: 18px; font-weight: 500; }
.head-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }