/* TR-FUND — стили страниц аутентификации (L2). Дизайн-система 03_Design_System.md. */
:root {
  --c-bg: #ffffff;
  --c-bg-alt: #f5f6f8;
  --c-surface: #ffffff;
  --c-border: #e3e6eb;
  --c-text: #0e1a2b;
  --c-text-muted: #4a5567;
  --c-text-subtle: #7b8597;
  --c-brand: #1f3a5f;
  --c-brand-dark: #142640;
  --c-accent: #2e75b6;
  --c-accent-hover: #225a8e;
  --c-success: #2e7d5b;
  --c-danger: #b3261e;
  --radius-sm: 6px;
  --radius-md: 10px;
  --shadow-card: 0 2px 8px rgba(14, 26, 43, 0.06);
  --font-ui: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

body.fund-auth {
  margin: 0;
  font-family: var(--font-ui);
  color: var(--c-text);
  background: var(--c-bg-alt);
  -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}

.fund-auth__wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.fund-auth__card {
  width: 100%;
  max-width: 440px;
  background: var(--c-surface);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 40px;
}

.fund-auth__card--wide { max-width: 760px; }

.fund-auth__brand {
  font-weight: 600;
  font-size: 20px;
  color: var(--c-brand);
  letter-spacing: -0.01em;
  margin-bottom: 8px;
}

.fund-auth__title {
  font-weight: 600;
  font-size: 28px;
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
}

.fund-auth__subtitle {
  color: var(--c-text-muted);
  font-size: 16px;
  margin: 0 0 28px;
}

.fund-auth__field { margin-bottom: 18px; }

.fund-auth__label {
  display: block;
  font-size: 14px;
  font-weight: 500;
  margin-bottom: 6px;
  color: var(--c-text);
}

.fund-auth__input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  font: inherit;
  font-size: 16px;
  color: var(--c-text);
  background: var(--c-bg);
  border: 1px solid var(--c-border);
  border-radius: var(--radius-sm);
  transition: border-color 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.fund-auth__input:focus {
  outline: 2px solid var(--c-accent);
  outline-offset: 2px;
  border-color: var(--c-accent);
}

.fund-auth__btn {
  width: 100%;
  height: 44px;
  font: inherit;
  font-weight: 500;
  font-size: 16px;
  color: #fff;
  background: var(--c-accent);
  border: 0;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background 150ms cubic-bezier(0.4, 0, 0.2, 1);
}
.fund-auth__btn:hover { background: var(--c-accent-hover); }
.fund-auth__btn:focus-visible { outline: 2px solid var(--c-accent); outline-offset: 2px; }
.fund-auth__btn:disabled { opacity: 0.5; cursor: not-allowed; }

.fund-auth__links {
  margin-top: 20px;
  font-size: 14px;
  color: var(--c-text-muted);
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.fund-auth__links a { color: var(--c-accent); text-decoration: none; }
.fund-auth__links a:hover { text-decoration: underline; }

.fund-auth__msg {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  display: none;
}
.fund-auth__msg--error {
  display: block;
  background: #fde6e4;
  color: #7d1a14;
}
.fund-auth__msg--success {
  display: block;
  background: #e2f2ea;
  color: #1f5c42;
}

/* Карточки выбора роли (sign-up) */
.fund-roles {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-bottom: 24px;
}
@media (min-width: 640px) {
  .fund-roles { grid-template-columns: repeat(3, 1fr); }
}
.fund-role {
  border: 1px solid var(--c-border);
  border-radius: var(--radius-md);
  padding: 18px;
  cursor: pointer;
  transition: border-color 150ms, background 150ms;
  background: var(--c-bg);
}
.fund-role:hover { border-color: var(--c-accent); }
.fund-role input { position: absolute; opacity: 0; }
.fund-role--selected {
  border-color: var(--c-accent);
  background: #f0f6fb;
}
.fund-role__name { font-weight: 600; font-size: 16px; margin-bottom: 4px; }
.fund-role__desc { color: var(--c-text-muted); font-size: 14px; }

.fund-auth__checkbox {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 14px;
  color: var(--c-text-muted);
  margin-bottom: 20px;
}
.fund-auth__checkbox a { color: var(--c-accent); }
