:root {
  --blue-100: #60a5fa;
  --blue-500: #2563eb;
  --blue-700: #1d4ed8;
  --blue-900: #1e3a8a;
  --yellow-300: #fde047;
  --yellow-400: #facc15;
  --amber-500: #e9b308;
  --orange-600: #d97706;
  --gray-200: #d1d5db;
  --gray-400: #a3a3a3;
  --slate-400: #6b7280;
  --white: #ffffff;
  --bg: #f8fafc;
  --text: #0f172a;
  --shadow: 0 18px 45px rgba(30, 58, 138, 0.12);
  --container: 1120px;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100vh;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background: linear-gradient(180deg, #ffffff 0%, var(--bg) 100%);
  color: var(--text);
  display: flex;
  flex-direction: column;
}

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

img {
  display: block;
  max-width: 100%;
}

button,
input {
  font: inherit;
}

.page-shell,
.auth-page,
.dashboard-page {
  min-height: 100vh;
}

.page-shell {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.page-shell main {
  flex: 1;
}

.container {
  width: min(calc(100% - 32px), var(--container));
  margin: 0 auto;
}

.topbar {
  padding: 14px 0;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(209, 213, 219, 0.7);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 20;
}

.topbar__wrap {
  display: flex;
  align-items: center;
}

.brand {
  display: inline-flex;
  align-items: center;
}

.brand__logo {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.hero {
  padding: 48px 0 28px;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 28px;
  align-items: center;
}

.hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px;
  border-radius: 999px;
  background: rgba(96, 165, 250, 0.14);
  color: var(--blue-900);
  font-weight: 700;
  font-size: 14px;
}

.hero h1,
.auth-card__title,
.dashboard-card__title {
  margin: 18px 0 14px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 1.05;
  letter-spacing: -0.03em;
  color: var(--blue-900);
}

.hero p,
.form-card p {
  margin: 0 0 22px;
  font-size: 18px;
  line-height: 1.65;
  color: var(--slate-400);
}

.card {
  background: var(--white);
  border-radius: 24px;
  padding: 26px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(209, 213, 219, 0.7);
}

.form-card {
  position: relative;
  overflow: hidden;
}

.form-card__before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, var(--yellow-300), var(--yellow-400), var(--orange-600));
}

.form-card h2 {
  margin: 10px 0 8px;
  font-size: 28px;
  color: var(--blue-900);
}

.form-group {
  margin-bottom: 14px;
}

.label {
  display: block;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 700;
  color: #334155;
}

.label__hint {
  color: var(--gray-400);
  font-weight: 400;
}

.input {
  width: 100%;
  min-height: 54px;
  padding: 0 16px;
  border-radius: 14px;
  border: 1px solid var(--gray-200);
  background: #fff;
  font-size: 16px;
  color: #0f172a;
  outline: none;
}

.input:focus {
  border-color: var(--blue-500);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}

.error {
  font-size: 13px;
  color: #b91c1c;
  margin-top: 6px;
  display: none;
}

.field--invalid .input {
  border-color: #dc2626;
  background: #fff8f8;
}

.field--invalid .error {
  display: block;
}

.checkbox {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 18px;
  color: #475569;
  line-height: 1.5;
  font-size: 14px;
}

.checkbox input {
  margin-top: 3px;
}

.consent__term-link {
  color: var(--blue-700);
  font-weight: 700;
  text-decoration: underline;
}

.helper {
  margin-top: 14px;
  padding: 14px;
  border-radius: 14px;
  background: rgba(250, 204, 21, 0.14);
  color: #854d0e;
  font-size: 14px;
  line-height: 1.55;
}

.helper--error {
  background: rgba(239, 68, 68, 0.12);
  color: #991b1b;
}

.helper--success {
  background: rgba(34, 197, 94, 0.12);
  color: #166534;
}

.form-card__submit {
  width: 100%;
}

.footer {
  padding: 0;
  border-top: 1px solid rgba(209, 213, 219, 0.12);
  font-size: 14px;
}

.footer--brand {
  background: linear-gradient(135deg, var(--blue-900) 0%, #162b63 55%, #10214d 100%);
  color: rgba(255, 255, 255, 0.78);
}

.footer__content--minimal {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  padding: 28px 0 18px;
  text-align: center;
}

.footer__logo {
  height: 54px;
  width: auto;
  object-fit: contain;
}

.footer__mini-text {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.72);
  max-width: 420px;
}

.footer__bottom {
  padding: 18px 0 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__copyright {
  margin: 0;
  text-align: center;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.5);
}

.term-modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.term-modal--open {
  display: flex;
}

.term-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.72);
}

.term-modal__dialog {
  position: relative;
  width: min(960px, 100%);
  height: min(84vh, 760px);
  border-radius: 18px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.28);
  border: 1px solid rgba(209, 213, 219, 0.9);
  z-index: 1;
}

.term-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 10px 14px;
  border-bottom: 1px solid rgba(209, 213, 219, 0.8);
  background: #f8fafc;
}

.term-modal__title {
  color: var(--blue-900);
  font-size: 16px;
}

.term-modal__close {
  border: 0;
  background: var(--white);
  color: var(--blue-900);
  width: 36px;
  height: 36px;
  border-radius: 10px;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.term-modal__iframe {
  display: block;
  width: 100%;
  height: calc(100% - 56px);
  border: 0;
}

body.term-modal-open {
  overflow: hidden;
}

.auth-page,
.dashboard-page {
  display: flex;
  align-items: center;
  padding: 48px 0;
}

.auth-page__wrap,
.dashboard-page__wrap {
  width: min(calc(100% - 32px), 720px);
  margin: 0 auto;
}

.auth-card__title,
.dashboard-card__title {
  font-size: clamp(28px, 4vw, 40px);
}

.auth-card__message,
.dashboard-page__message {
  margin: 16px 0 0;
  font-size: 14px;
}

.auth-card__message--error {
  color: #b91c1c;
}

.dashboard-page__message--success {
  color: #166534;
}

.dashboard-page__message--error {
  color: #b91c1c;
}

.dashboard-page__topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}

.dashboard-page__heading {
  margin: 12px 0 0;
  color: var(--blue-900);
  font-size: 30px;
}

.btn {
  min-height: 52px;
  padding: 0 22px;
  border: 0;
  border-radius: 14px;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
}

.btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn--primary {
  background: linear-gradient(135deg, var(--blue-500), var(--blue-900));
  color: var(--white);
  box-shadow: var(--shadow);
}

.btn--secondary {
  background: var(--white);
  color: var(--blue-900);
  border: 1px solid rgba(29, 78, 216, 0.14);
}


.hero__logos-top {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}

.hero__logo-item {
  max-height: 53px;
  width: auto;
  object-fit: contain;
}

.footer__logos-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.footer__logo-fidem {
  height: 44px;
  width: auto;
  object-fit: contain;
}

@media (max-width: 980px) {
  .hero__grid {
    grid-template-columns: 1fr;
  }
}


@media (max-width: 768px) {
  .hero__logos-top {
    flex-direction: column;
    align-items: flex-start;
    margin-bottom: 18px;
    gap: 12px;
  }

  .hero__logo-item {
    max-height: 41px;
  }

  .footer__logos-wrap {
    flex-direction: column;
    align-items: center;
    gap: 12px;
  }

  .footer__logo-fidem {
    height: 34px;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 28px;
  }

  .brand__logo {
    height: 42px;
  }

  .card {
    padding: 20px;
  }

  .btn,
  .input {
    width: 100%;
  }

  .dashboard-page__topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .term-modal {
    padding: 12px;
  }

  .term-modal__dialog {
    height: min(88vh, 760px);
    border-radius: 14px;
  }

  .term-modal__header {
    min-height: 52px;
    padding: 8px 12px;
  }

  .term-modal__iframe {
    height: calc(100% - 52px);
  }
}