@import url("https://fonts.googleapis.com/css2?family=Manrope:wght@500;600;700;800&family=IBM+Plex+Sans:wght@400;500;600&display=swap");

:root {
  --bg: #f2f3f8;
  --card: #ffffff;
  --card-2: #f7f8fc;
  --text: #151b2b;
  --muted: #73809a;
  --line: #e1e6f1;
  --primary: #6f6ff7;
  --primary-dark: #5558eb;
  --success: #2f9a5c;
  --warn: #d9872f;
  --danger: #bf3c4d;
  --shadow: 0 14px 30px rgba(19, 34, 66, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top left, #fafbff, var(--bg));
}

.page {
  width: min(520px, 100%);
  margin: 0 auto;
  padding: 18px 14px 32px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 8px 0 18px;
  font-family: "Manrope", "IBM Plex Sans", sans-serif;
  font-weight: 800;
  font-size: 23px;
}

.brand-mark {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  background: conic-gradient(from 220deg, #7d86ff, #8f67f5, #f9547f, #7d86ff);
}

.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 12px;
}

.page-title {
  margin: 0;
  font-family: "Manrope", "IBM Plex Sans", sans-serif;
  font-size: 27px;
  line-height: 1.1;
}

.page-subtitle {
  margin: 6px 0 0;
  color: var(--muted);
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}

.card.soft {
  background: var(--card-2);
  box-shadow: none;
}

.card h2,
.card h3 {
  margin: 0 0 10px;
  font-family: "Manrope", "IBM Plex Sans", sans-serif;
}

.card h2 {
  font-size: 21px;
}

.card h3 {
  font-size: 17px;
}

.row {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.row.inline-2 {
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.row.inline-3 {
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

label {
  font-size: 13px;
  color: var(--muted);
}

input,
select,
textarea,
button {
  width: 100%;
  font: inherit;
}

input,
select,
textarea {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 13px;
  padding: 11px 12px;
  font-size: 15px;
  color: var(--text);
}

textarea {
  min-height: 88px;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  outline: 2px solid rgba(111, 111, 247, 0.22);
  border-color: var(--primary);
}

button {
  border: 0;
  border-radius: 13px;
  padding: 11px 13px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, opacity 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--primary-dark);
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.btn-muted {
  background: #edf0f8;
  color: #2b3651;
}

.btn-muted:hover {
  background: #e3e7f3;
}

.btn-danger {
  background: #f6e9ec;
  color: #973447;
}

.btn-danger:hover {
  background: #f2dde2;
}

.actions {
  display: grid;
  gap: 10px;
}

.actions.grid {
  grid-template-columns: repeat(2, 1fr);
}

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
}

.kpi {
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
}

.kpi .name {
  color: var(--muted);
  font-size: 13px;
}

.kpi .value {
  margin-top: 4px;
  font-family: "Manrope", "IBM Plex Sans", sans-serif;
  font-size: 31px;
  font-weight: 800;
  line-height: 1;
}

.kpi .value.negative {
  color: var(--danger);
}

.kpi .value.positive {
  color: var(--success);
}

.profile-grid {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 12px;
}

.avatar {
  border-radius: 16px;
  background: linear-gradient(180deg, #d3d9e8, #c8cedf);
  min-height: 116px;
  position: relative;
  overflow: hidden;
}

.avatar::before {
  content: "";
  position: absolute;
  top: 21px;
  left: 50%;
  width: 38px;
  height: 38px;
  margin-left: -19px;
  border-radius: 50%;
  background: #eef1f7;
}

.avatar::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -15px;
  width: 82px;
  height: 70px;
  margin-left: -41px;
  border-radius: 50% 50% 0 0;
  background: #eef1f7;
}

.profile-meta {
  display: grid;
  gap: 6px;
  align-content: center;
}

.profile-meta .name {
  font-family: "Manrope", "IBM Plex Sans", sans-serif;
  font-size: 19px;
  font-weight: 800;
  line-height: 1.2;
}

.profile-meta .line {
  color: var(--muted);
  font-size: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 13px;
  font-weight: 700;
  width: fit-content;
}

.badge.ok {
  background: #e9f8ef;
  color: var(--success);
}

.badge.wait {
  background: #fff4e6;
  color: var(--warn);
}

.note {
  font-size: 13px;
  color: var(--muted);
}

.error {
  color: var(--danger);
}

.success {
  color: var(--success);
}

.list {
  display: grid;
  gap: 10px;
}

.item {
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 12px;
  display: grid;
  gap: 5px;
}

.item strong {
  font-family: "Manrope", "IBM Plex Sans", sans-serif;
}

.item-subcard {
  margin-top: 8px;
  border: 1px dashed var(--line);
  border-radius: 12px;
  padding: 10px;
  display: grid;
  gap: 6px;
  background: #fafbff;
}

.agreement-text {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  background: #fff;
}

.agreement-text summary {
  cursor: pointer;
  font-weight: 600;
}

.agreement-text p {
  margin: 8px 0 0;
  white-space: pre-wrap;
}

.agreement-contract {
  margin: 8px 0 0;
  white-space: pre-wrap;
  font-family: "IBM Plex Sans", "Segoe UI", sans-serif;
  font-size: 13px;
  line-height: 1.45;
}

.checkbox-line {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text);
}

.checkbox-line input[type="checkbox"] {
  width: auto;
  margin-top: 2px;
}

.kyc-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.kyc-step {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 10px;
  background: #fff;
  text-align: center;
  display: grid;
  gap: 4px;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.kyc-step .number {
  width: 26px;
  height: 26px;
  margin: 0 auto;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  color: #fff;
  background: #c8cfdf;
}

.kyc-step .title {
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}

.kyc-step.active {
  border-color: rgba(111, 111, 247, 0.45);
  background: #f3f2ff;
}

.kyc-step.active .number {
  background: var(--primary);
}

.kyc-step.completed .number {
  background: var(--success);
}

.capture-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.capture-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 10px;
  background: #fff;
  display: grid;
  gap: 8px;
}

.capture-card h3 {
  margin: 0;
  font-size: 14px;
  text-align: center;
}

.capture-preview {
  border: 1px dashed #cfd6e8;
  border-radius: 12px;
  min-height: 138px;
  background: #f8f9ff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8px;
  color: var(--muted);
  font-size: 13px;
  overflow: hidden;
}

.capture-preview img {
  width: 100%;
  height: 136px;
  object-fit: cover;
  border-radius: 10px;
}

.capture-card .note {
  margin: 0;
  text-align: center;
}

.hidden-file-input {
  display: none;
}

.status-warn {
  color: var(--warn);
}

.hidden {
  display: none !important;
}

.footer-nav {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.footer-nav a {
  text-decoration: none;
}

.footer-nav button {
  padding: 10px 6px;
  font-size: 13px;
}

@media (max-width: 440px) {
  .page {
    padding: 14px 10px 26px;
  }

  .row.inline-2,
  .row.inline-3,
  .actions.grid,
  .kpi-grid,
  .capture-grid,
  .kyc-steps {
    grid-template-columns: 1fr;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }
}
