/* GetOrigin — минимальный финансовый интерфейс.
   Светлый фон, белые карточки, тонкие линии, моно-подписи. Без градиентов. */

:root {
  --bg: #f6f7f8;
  --card: #ffffff;
  --line: #e5e7eb;
  --line-strong: #d7dbe0;
  --text: #0e1116;
  --muted: #6b7280;
  --faint: #9aa1ab;
  --green: #059669;
  --red: #dc2626;
  --radius: 14px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
        "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--text); }

/* ---- бренд ---- */
.brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-weight: 650; font-size: 15px; letter-spacing: -0.01em;
}
.brand .mark {
  width: 28px; height: 28px; border-radius: 8px; flex: none;
  background: #0e1116; color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700;
}

/* ---- вход ---- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px; }
.auth-card {
  width: 100%; max-width: 390px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.auth-card .brand { margin-bottom: 24px; }
h1 { margin: 0 0 6px; font-size: 22px; font-weight: 650; letter-spacing: -0.01em; }
.sub { margin: 0 0 22px; color: var(--muted); font-size: 13.5px; }

.tabs {
  display: flex; gap: 4px; padding: 4px;
  background: #f1f2f4; border-radius: 10px; margin-bottom: 20px;
}
.tabs button {
  flex: 1; padding: 8px; border: 0; border-radius: 8px;
  background: none; cursor: pointer;
  font: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
}
.tabs button.on { background: #fff; color: var(--text); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }

label.field { display: block; margin-bottom: 14px; }
label.field > span {
  display: block; margin-bottom: 6px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
input[type="text"], input[type="password"], input[type="email"] {
  width: 100%; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 9px;
  font: inherit; color: var(--text); background: #fff;
}
input::placeholder { color: var(--faint); }
input:focus { outline: none; border-color: #0e1116; box-shadow: 0 0 0 3px rgba(14, 17, 22, .07); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 16px; border-radius: 9px;
  border: 1px solid transparent; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 600;
  transition: background .15s ease, border-color .15s ease, opacity .15s ease;
}
.btn-block { width: 100%; }
.btn-primary { background: #0e1116; color: #fff; }
.btn-primary:hover { background: #000; }
.btn-primary:disabled { opacity: .35; cursor: not-allowed; }
.btn-ghost { background: #fff; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { background: #f6f7f8; }
.btn-sm { padding: 8px 12px; font-size: 13px; }
.btn-link {
  border: 0; background: none; padding: 0; cursor: pointer;
  font: inherit; font-size: 13.5px; color: var(--muted);
}
.btn-link:hover { color: var(--text); }

.divider {
  display: flex; align-items: center; gap: 10px;
  margin: 18px 0; color: var(--faint); font-size: 12px;
}
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.foot { margin: 20px 0 0; text-align: center; color: var(--faint); font-size: 11.5px; }

.err {
  display: none; margin-bottom: 14px; padding: 9px 11px;
  border: 1px solid #fecaca; border-radius: 9px;
  background: #fef2f2; color: #b91c1c; font-size: 13px;
}
.err.show { display: block; }

/* ---- страница профиля ---- */
.appbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  background: var(--card); border-bottom: 1px solid var(--line);
}
.page { max-width: 660px; margin: 0 auto; padding: 28px 20px 60px; }
.page > h1 { margin-bottom: 6px; }
.page > .lead { margin: 0 0 22px; color: var(--muted); font-size: 14px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  margin-bottom: 16px;
}
.section-label {
  margin: 0 0 14px;
  font-family: var(--mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}

.profile-row { display: flex; gap: 16px; align-items: center; }
.avatar {
  width: 72px; height: 72px; border-radius: 50%; flex: none;
  background: #f1f2f4; color: var(--muted);
  display: grid; place-items: center;
  font-size: 26px; font-weight: 650;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.profile-actions b { display: block; font-size: 14px; }
.hint { margin: 4px 0 10px; color: var(--faint); font-size: 12.5px; }
.row-btns { display: flex; gap: 8px; flex-wrap: wrap; }

.input-prefix { position: relative; }
.input-prefix > span {
  position: absolute; left: 12px; top: 50%; transform: translateY(-50%);
  color: var(--faint); font-family: var(--mono); font-size: 13px;
}
.input-prefix input { padding-left: 28px; }

.status { margin: 6px 0 18px; font-size: 12.5px; }
.status.wait { color: var(--faint); }
.status.ok { color: var(--green); }
.status.bad { color: var(--red); }

.kv {
  display: flex; justify-content: space-between; gap: 12px;
  padding: 10px 0; border-top: 1px solid var(--line);
  font-size: 13.5px;
}
.kv span { color: var(--muted); }
.kv b { font-weight: 600; font-family: var(--mono); font-size: 12.5px; }
.card .btn-primary { margin-top: 18px; }

/* ---- модалка / тост ---- */
.sheet-back {
  position: fixed; inset: 0; z-index: 20;
  display: flex; align-items: center; justify-content: center;
  padding: 20px; background: rgba(14, 17, 22, .35);
}
.sheet {
  width: 100%; max-width: 380px; background: #fff;
  border-radius: 14px; padding: 22px;
  box-shadow: 0 20px 60px rgba(14, 17, 22, .18);
}
.sheet h2 { margin: 0 0 8px; font-size: 17px; font-weight: 650; }
.sheet p { margin: 0 0 18px; color: var(--muted); font-size: 13.5px; line-height: 1.55; }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  padding: 10px 16px; border-radius: 10px;
  background: #0e1116; color: #fff; font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(14, 17, 22, .25);
}
.hidden { display: none !important; }

/* ---- кроппер аватара ---- */
.crop-back {
  position: fixed; inset: 0; z-index: 30;
  display: grid; place-items: center; padding: 20px;
  background: rgba(14, 17, 22, .55);
}
.crop-dialog {
  width: 100%; max-width: 420px; background: #fff;
  border-radius: 16px; padding: 20px;
  box-shadow: 0 24px 70px rgba(14, 17, 22, .3);
}
.crop-dialog h2 { margin: 0 0 6px; font-size: 17px; font-weight: 650; }
.crop-hint { margin: 0 0 14px; color: var(--muted); font-size: 12.5px; line-height: 1.5; }
.crop-stage {
  position: relative; width: min(320px, 100%); aspect-ratio: 1;
  margin: 0 auto 14px; border-radius: 12px; overflow: hidden;
  background: #0e1116; touch-action: none; cursor: grab;
}
.crop-stage.dragging { cursor: grabbing; }
.crop-stage canvas { display: block; width: 100%; height: 100%; }
.crop-zoom { display: flex; align-items: center; gap: 10px; margin: 0 0 6px; color: var(--muted); font-size: 12px; }
.crop-zoom input { flex: 1; accent-color: #0e1116; }
.crop-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 14px; }
