/* BASE-PEI — Asaas Subcontas front · mobile-first, azul escuro + branco */
:root {
  --navy: #10083F;
  --navy-2: #1b1259;
  --navy-soft: #2a2069;
  --white: #ffffff;
  --gray-bg: #f4f5fa;
  --gray-line: #e2e4ef;
  --gray-text: #5b5f72;
  --error: #c0392b;
  --error-bg: #fdecea;
  --ok: #1e8449;
  --ok-bg: #e8f6ec;
  --radius: 12px;
  --shadow: 0 10px 30px rgba(16, 8, 63, 0.12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background: linear-gradient(160deg, var(--navy) 0%, var(--navy-2) 55%, var(--navy-soft) 100%);
  color: #1a1c28;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 24px 16px 48px;
  -webkit-font-smoothing: antialiased;
}

.card {
  background: var(--white);
  width: 100%;
  max-width: 440px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 32px 26px;
  margin-top: 6vh;
}

.brand { text-align: center; margin-bottom: 24px; }
.brand-dot {
  width: 46px; height: 46px; margin: 0 auto 14px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--navy) 0%, #3a2fa0 100%);
  box-shadow: 0 6px 16px rgba(16, 8, 63, 0.28);
}
.brand h1 {
  font-size: 22px; margin: 0 0 6px; color: var(--navy); font-weight: 700;
}
.subtitle { margin: 0; font-size: 14px; color: var(--gray-text); line-height: 1.45; }

.field { margin-bottom: 16px; }
.field label {
  display: block; font-size: 13px; font-weight: 600;
  margin-bottom: 6px; color: var(--navy);
}
.field input, .field select {
  width: 100%;
  padding: 12px 14px;
  font-size: 15px;
  border: 1.5px solid var(--gray-line);
  border-radius: 10px;
  background: var(--white);
  color: #1a1c28;
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%2310083F' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.field input:focus, .field select:focus {
  outline: none;
  border-color: var(--navy);
  box-shadow: 0 0 0 3px rgba(16, 8, 63, 0.12);
}
.field input.invalid, .field select.invalid {
  border-color: var(--error);
  box-shadow: 0 0 0 3px rgba(192, 57, 43, 0.10);
}
.field .hint { font-size: 12px; color: var(--gray-text); margin-top: 5px; }
.field .prefix { display: flex; align-items: center; }
.field .prefix .cur {
  padding: 12px 12px; border: 1.5px solid var(--gray-line); border-right: none;
  border-radius: 10px 0 0 10px; background: var(--gray-bg); font-size: 15px; color: var(--gray-text);
}
.field .prefix input { border-radius: 0 10px 10px 0; }

.btn {
  width: 100%;
  padding: 13px 16px;
  font-size: 15px;
  font-weight: 700;
  color: var(--white);
  background: var(--navy);
  border: none;
  border-radius: 10px;
  cursor: pointer;
  margin-top: 6px;
  position: relative;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  transition: background .15s, opacity .15s;
}
.btn:hover:not(:disabled) { background: #1a1060; }
.btn:disabled { opacity: .7; cursor: not-allowed; }
.btn .spinner {
  width: 17px; height: 17px;
  border: 2.5px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: none;
  animation: spin .7s linear infinite;
}
.btn.is-loading .spinner { display: inline-block; }
.btn.is-loading .btn-label { opacity: .85; }
@keyframes spin { to { transform: rotate(360deg); } }

.btn-secondary {
  background: transparent; color: var(--navy);
  border: 1.5px solid var(--gray-line);
}
.btn-secondary:hover:not(:disabled) { background: var(--gray-bg); }

.msg {
  display: none;
  font-size: 13.5px;
  padding: 11px 13px;
  border-radius: 9px;
  margin: 4px 0 14px;
  line-height: 1.4;
}
.msg.is-visible { display: block; }
.msg-error { background: var(--error-bg); color: var(--error); border: 1px solid #f5c6c0; }
.msg-ok { background: var(--ok-bg); color: var(--ok); border: 1px solid #bfe5c8; }

.foot {
  margin-top: 22px; text-align: center;
  font-size: 12px; color: var(--gray-text);
}

/* Topbar cadastro */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 22px;
}
.topbar .who { font-size: 13px; color: var(--gray-text); }
.topbar .who strong { color: var(--navy); }
.link-logout {
  background: none; border: none; color: var(--navy);
  font-size: 13px; font-weight: 600; cursor: pointer; padding: 4px;
  text-decoration: underline;
}

/* Card de sucesso (resultado subconta) */
.result {
  display: none;
  border: 1.5px solid #bfe5c8;
  background: var(--ok-bg);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 4px;
}
.result.is-visible { display: block; }
.result h2 { margin: 0 0 4px; color: var(--ok); font-size: 18px; }
.result .result-sub { margin: 0 0 16px; font-size: 13.5px; color: #2f5d3f; }
.kv { display: flex; flex-direction: column; gap: 10px; }
.kv .row {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--white); border-radius: 8px; padding: 10px 12px;
  border: 1px solid var(--gray-line); gap: 12px;
}
.kv .row .k { font-size: 12px; color: var(--gray-text); font-weight: 600; }
.kv .row .v {
  font-size: 13.5px; color: var(--navy); font-weight: 700;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  word-break: break-all; text-align: right;
}
.badge {
  display: inline-block; padding: 3px 10px; border-radius: 999px;
  font-size: 12px; font-weight: 700; background: var(--ok); color: #fff;
}

@media (max-width: 480px) {
  .card { padding: 26px 18px; margin-top: 3vh; }
  .brand h1 { font-size: 20px; }
}
