*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: Inter, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: #fff;
  color: #333;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { text-decoration: none; color: inherit; }

/* ── HEADER ─────────────────────────────────────────────── */
.header {
  width: 100%;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.header-inner {
  max-width: 1024px;
  margin: 0 auto;
  padding: 0 16px;
  height: 90px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.logo img { height: 62px; width: auto; object-fit: contain; display: block; }
.devenir-client {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #555;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: color .2s;
}
.devenir-client:hover { color: #7ab648; }
.devenir-client svg { width: 18px; height: 18px; }

/* ── BANNER ─────────────────────────────────────────────── */
.banner {
  width: 100%;
  background: #7ab648;
  height: 52px;
  display: flex;
  align-items: center;
}
.banner-inner {
  max-width: 1024px;
  width: 100%;
  margin: 0 auto;
  padding: 0 16px;
}
.banner h2 {
  color: #fff;
  font-size: 19px;
  font-weight: 300;
  letter-spacing: .03em;
}

/* ── MAIN ───────────────────────────────────────────────── */
main { flex: 1; }

/* ── FORM CONTROLS ──────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; color: #666; font-weight: 500; }
.field-line {
  position: relative;
  display: flex;
  align-items: center;
}
.field-line input {
  width: 100%;
  height: 40px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #ccc;
  outline: none;
  font-size: 15px;
  color: #333;
  padding: 0;
  transition: border-color .2s;
  font-family: inherit;
}
.field-line input:focus { border-bottom: 2px solid #7ab648; }
.field-line input::placeholder { color: #ccc; }
.field-line .icon {
  position: absolute;
  left: 0;
  pointer-events: none;
  color: #aaa;
  display: flex;
}
.field-line .icon ~ input { padding-left: 28px; }
.field-line .eye-btn {
  position: absolute;
  right: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: #aaa;
  display: flex;
  padding: 4px;
  transition: color .2s;
}
.field-line .eye-btn:hover { color: #555; }
.field-error { font-size: 12px; color: #dc2626; min-height: 16px; }

/* Plain input (validation pages) */
.plain-input {
  width: 100%;
  height: 44px;
  border: 1px solid #ccc;
  border-radius: 4px;
  padding: 0 12px;
  font-size: 14px;
  color: #333;
  outline: none;
  font-family: inherit;
  transition: border-color .2s;
  background: #fff;
}
.plain-input:focus { border-color: #7ab648; box-shadow: 0 0 0 1px #7ab648; }
.plain-input::placeholder { color: #aaa; }

/* ── BUTTONS ────────────────────────────────────────────── */
.btn-primary {
  width: 100%;
  height: 44px;
  background: #fff;
  color: #7ab648;
  border: 1px solid #7ab648;
  border-radius: 3px;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, color .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.btn-primary:hover { background: #7ab648; color: #fff; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.btn-outline-pill {
  height: 40px;
  padding: 0 36px;
  background: #fff;
  color: #7ab648;
  border: 1px solid #7ab648;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  transition: background .2s, color .2s;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-outline-pill:hover { background: #7ab648; color: #fff; }
.btn-outline-pill:disabled { opacity: .5; cursor: not-allowed; }

/* ── LINKS BELOW FORM ───────────────────────────────────── */
.sub-links { display: flex; flex-direction: column; gap: 10px; margin-top: 28px; }
.sub-link {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #7ab648;
  font-size: 13px;
  cursor: pointer;
  width: fit-content;
}
.sub-link:hover { text-decoration: underline; }
.sub-link svg { width: 13px; height: 13px; flex-shrink: 0; }

/* ── ERROR BOX ──────────────────────────────────────────── */
.error-box {
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  padding: 10px 14px;
  font-size: 13px;
  color: #dc2626;
  display: none;
}
.error-box.visible { display: block; }

/* ── DIVIDER ────────────────────────────────────────────── */
.divider { width: 100%; height: 1px; background: #e5e5e5; }

/* ── LOADING OVERLAY ────────────────────────────────────── */
.loading-overlay {
  position: fixed;
  inset: 0;
  background: #fff;
  z-index: 9999;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: inherit;
}
.loading-overlay.active { display: flex; }
.loading-logo { height: 80px; width: auto; margin-bottom: 40px; object-fit: contain; }
.loading-ring { position: relative; width: 56px; height: 56px; margin-bottom: 32px; }
.loading-ring svg { width: 56px; height: 56px; transform: rotate(-90deg); }
.loading-ring-pct {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: #7ab648;
}
.loading-bar-wrap {
  width: 240px;
  height: 4px;
  background: #f0f0f0;
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 28px;
}
.loading-bar {
  height: 100%;
  width: 0%;
  background: #7ab648;
  border-radius: 999px;
  transition: width .08s linear;
}
.loading-text { text-align: center; }
.loading-text p { font-size: 14px; color: #444; font-weight: 500; margin-bottom: 4px; }
.loading-text small { font-size: 12px; color: #aaa; }
.loading-bottom-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 4px;
  background: #f0f0f0;
  overflow: hidden;
}
.loading-bottom-fill {
  height: 100%;
  width: 0%;
  background: #7ab648;
  transition: width .08s linear;
}

/* ── CARD PREVIEW ───────────────────────────────────────── */
.card-visual {
  height: 140px;
  border-radius: 12px;
  background: linear-gradient(135deg, #5a9e2f 0%, #7ab648 50%, #9ecc6a 100%);
  position: relative;
  overflow: hidden;
  margin-bottom: 36px;
}
.card-visual::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(255,255,255,.15), transparent 60%);
}
.card-logo {
  position: absolute;
  top: 14px;
  right: 16px;
  height: 30px;
  width: auto;
  filter: brightness(0) invert(1);
  opacity: .8;
  z-index: 1;
}
.card-chip {
  position: absolute;
  top: 18px;
  left: 22px;
  width: 34px;
  height: 24px;
  background: rgba(255,235,130,.6);
  border: 1px solid rgba(255,220,80,.4);
  border-radius: 3px;
  z-index: 1;
}
.card-bottom {
  position: absolute;
  bottom: 16px;
  left: 22px;
  right: 22px;
  z-index: 1;
}
.card-number {
  font-family: 'Courier New', monospace;
  font-size: 13px;
  letter-spacing: .16em;
  color: rgba(255,255,255,.8);
  margin-bottom: 6px;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
}
.card-meta-item label {
  display: block;
  font-size: 8px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: rgba(255,255,255,.5);
  margin-bottom: 2px;
}
.card-meta-item span {
  font-size: 11px;
  font-weight: 500;
  color: rgba(255,255,255,.8);
  text-transform: uppercase;
  letter-spacing: .05em;
}

/* ── CARD FORM ──────────────────────────────────────────── */
.card-section-label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: #aaa;
  margin-bottom: 16px;
}
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 32px; }
.card-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 20px;
}
.card-field label { font-size: 13px; color: #666; font-weight: 500; }
.card-field input {
  width: 100%;
  height: 40px;
  background: transparent;
  border: none;
  border-bottom: 1px solid #ccc;
  outline: none;
  font-size: 14px;
  color: #333;
  padding: 0;
  transition: border-color .2s;
  font-family: inherit;
}
.card-field input:focus { border-bottom: 2px solid #7ab648; }
.card-field input::placeholder { color: #ccc; }
.card-field input.mono { font-family: 'Courier New', monospace; letter-spacing: .14em; }
.card-field-error { font-size: 11px; color: #dc2626; min-height: 14px; }

/* ── SUCCESS ────────────────────────────────────────────── */
.success-wrap {
  display: flex;
  flex: 1;
  align-items: center;
  justify-content: center;
}
.success-box { text-align: center; max-width: 380px; padding: 64px 32px; }
.success-icon {
  width: 64px; height: 64px;
  background: rgba(122,182,72,.08);
  border: 1px solid rgba(122,182,72,.25);
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 24px;
}
.success-icon svg { width: 32px; height: 32px; color: #7ab648; }
.success-box h2 { font-size: 22px; font-weight: 600; color: #333; margin-bottom: 10px; }
.success-box p { font-size: 14px; color: #888; }

/* ── SSL NOTE ───────────────────────────────────────────── */
.ssl-note {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #bbb;
  margin-top: 12px;
}
.ssl-note svg { width: 12px; height: 12px; }

/* ── RIGHT COL INFO ─────────────────────────────────────── */
.info-section { margin-bottom: 36px; }
.info-section h2 {
  font-size: 15px;
  font-weight: 700;
  color: #333;
  letter-spacing: .04em;
  margin-bottom: 18px;
  line-height: 1.4;
}
.info-section p { font-size: 14px; color: #444; line-height: 1.7; margin-bottom: 12px; }
.info-section .green { color: #7ab648; font-weight: 700; }
.info-section a { color: #7ab648; }
.info-section a:hover { text-decoration: underline; }
.info-section ul { list-style: none; }
.info-section ul li { font-size: 14px; color: #444; line-height: 1.8; }
.more-link { color: #7ab648; font-size: 14px; font-weight: 500; margin-top: 16px; display: inline-block; }
.more-link:hover { text-decoration: underline; }

/* ── LAYOUT LOGIN ───────────────────────────────────────── */
.login-main {
  max-width: 1024px;
  margin: 0 auto;
  padding: 48px 16px 64px;
  display: flex;
  flex-wrap: wrap;
  gap: 48px;
}
.login-left { width: 100%; max-width: 380px; }
.login-left h1 { font-size: 26px; font-weight: 500; color: #333; margin-bottom: 12px; }
.login-right {
  flex: 1;
  min-width: 280px;
  padding-left: 40px;
  border-left: 1px solid #e5e5e5;
}

/* ── LAYOUT VALIDATION ──────────────────────────────────── */
.validate-main {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 32px 64px;
}
.validate-main p { font-size: 15px; color: #444; line-height: 1.7; margin-bottom: 16px; }
.validate-main strong { color: #222; }
.validate-form { max-width: 380px; margin-top: 40px; display: flex; flex-direction: column; gap: 20px; }

/* ── LAYOUT CARD ────────────────────────────────────────── */
.card-main { max-width: 720px; margin: 0 auto; padding: 36px 32px 64px; }

/* ── SPINNER (submit) ───────────────────────────────────── */
.spin {
  display: inline-block;
  width: 18px; height: 18px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
