:root {
  --grm-bg-top: #eef5ff;
  --grm-bg-bottom: #dceafe;
  --grm-surface: #ffffff;
  --grm-surface-soft: #f4f8ff;
  --grm-border: #d7e5fa;
  --grm-text: #22324f;
  --grm-muted: #5d7295;
  --grm-accent: #4b79d8;
  --grm-accent-strong: #305aac;
  --grm-success-bg: #eaf8ef;
  --grm-success-border: #b8e4c8;
  --grm-success-text: #1f6e3a;
  --grm-danger-bg: #fff0f2;
  --grm-danger-border: #f2c4cb;
  --grm-danger-text: #a83247;
  --grm-warning-bg: #fff9eb;
  --grm-warning-border: #f5deb1;
  --grm-warning-text: #9a6a0a;
  --grm-shadow: 0 16px 42px rgba(39, 79, 143, 0.14);
  --grm-shadow-soft: 0 8px 24px rgba(46, 84, 145, 0.12);
  --wrap: min(1180px, calc(100vw - 36px));
}

* {
  box-sizing: border-box;
}

body.auth-page {
  margin: 0;
  color: var(--grm-text);
  font-family: "Manrope", "Segoe UI", "Roboto", sans-serif;
  background:
    radial-gradient(circle at 10% 14%, rgba(255, 255, 255, 0.92), transparent 34%),
    radial-gradient(circle at 87% 18%, rgba(123, 169, 244, 0.22), transparent 30%),
    linear-gradient(165deg, var(--grm-bg-top), var(--grm-bg-bottom));
  min-height: 100vh;
}

body.auth-page a {
  color: inherit;
  text-decoration: none;
}

.shell {
  width: var(--wrap);
  margin: 0 auto;
}

.header-wrap {
  position: sticky;
  top: 14px;
  z-index: 80;
  padding-top: 14px;
}

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
  padding: 10px 18px;
  border: 1px solid var(--grm-border);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--grm-shadow-soft);
  backdrop-filter: blur(8px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
  font-weight: 800;
  color: #2a4f8a;
  letter-spacing: 0.01em;
}

.brand img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  border-radius: 10px;
  background: #fff;
}

.brand-mark {
  font-family: "Sora", "Manrope", sans-serif;
  font-size: 1.07rem;
  line-height: 1.05;
}

.brand-mark small {
  display: block;
  margin-top: 2px;
  font-family: "Manrope", sans-serif;
  font-size: 0.68rem;
  color: #6c82a6;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav a {
  padding: 10px 13px;
  border-radius: 12px;
  font-weight: 700;
  color: #385883;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.nav a:hover {
  background: #e8f1ff;
  color: #274b83;
  transform: translateY(-1px);
}

.header-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.btn {
  border-radius: 12px;
  border: 1px solid #c6d9f7;
  background: #f7fbff;
  color: #355886;
  font-weight: 700;
  padding: 11px 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: #edf5ff;
  box-shadow: 0 10px 18px rgba(53, 89, 150, 0.12);
}

.btn.primary {
  border: 0;
  color: #fff;
  background: linear-gradient(140deg, var(--grm-accent), var(--grm-accent-strong));
  box-shadow: 0 10px 24px rgba(52, 93, 171, 0.26);
}

.btn.primary:hover {
  background: linear-gradient(140deg, #5888ea, #2d58af);
}

.auth-main {
  width: var(--wrap);
  margin: 28px auto 0;
  padding-bottom: 24px;
}

.auth-layout {
  border: 1px solid var(--grm-border);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.87);
  box-shadow: var(--grm-shadow);
  display: grid;
  grid-template-columns: 1fr minmax(330px, 460px);
  gap: 22px;
  padding: 24px;
}

.auth-side {
  border-radius: 18px;
  border: 1px solid #dce8fb;
  background: linear-gradient(180deg, #f9fcff, #f1f7ff);
  padding: 24px 24px 20px;
  position: relative;
  overflow: hidden;
}

.auth-side::before {
  content: "";
  position: absolute;
  right: -70px;
  top: -90px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle at center, rgba(82, 126, 214, 0.26), rgba(82, 126, 214, 0));
  pointer-events: none;
}

.kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 11px;
  border-radius: 999px;
  border: 1px solid #d4e4fb;
  background: #f3f8ff;
  color: #4a6794;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.auth-title {
  margin: 14px 0 10px;
  font-family: "Sora", "Manrope", sans-serif;
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 16ch;
  position: relative;
  z-index: 1;
}

.auth-lead {
  margin: 0;
  color: var(--grm-muted);
  line-height: 1.62;
  max-width: 54ch;
  position: relative;
  z-index: 1;
}

.bullet-list {
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 10px;
  position: relative;
  z-index: 1;
}

.bullet-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #d8e8fd;
  color: #335581;
  font-weight: 600;
  line-height: 1.4;
}

.bullet-list li::before {
  content: "";
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 0.35em;
  background: linear-gradient(140deg, #4f80df, #315cad);
  flex: 0 0 auto;
}

.panel {
  border-radius: 18px;
  border: 1px solid #d8e7fc;
  background: #ffffff;
  padding: 22px;
  box-shadow: 0 12px 24px rgba(50, 84, 143, 0.08);
}

.panel-title {
  margin: 0;
  font-size: 1.3rem;
  font-family: "Sora", "Manrope", sans-serif;
  letter-spacing: -0.01em;
}

.panel-sub {
  margin: 8px 0 16px;
  color: var(--grm-muted);
  line-height: 1.52;
  font-size: 0.95rem;
}

.panel-head {
  margin-bottom: 8px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.panel-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  border: 1px solid #d2e2fb;
  background: #eef5ff;
  color: #2f568f;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.panel-badge::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #4f80df;
}

.alert {
  margin: 0 0 16px;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid;
  font-size: 0.95rem;
  line-height: 1.5;
  font-weight: 600;
}

.alert.success {
  color: var(--grm-success-text);
  border-color: var(--grm-success-border);
  background: var(--grm-success-bg);
}

.alert.danger {
  color: var(--grm-danger-text);
  border-color: var(--grm-danger-border);
  background: var(--grm-danger-bg);
}

.alert.warning {
  color: var(--grm-warning-text);
  border-color: var(--grm-warning-border);
  background: var(--grm-warning-bg);
}

.alert-list {
  margin: 0 0 16px;
  padding: 12px 14px 12px 30px;
  border-radius: 12px;
  border: 1px solid var(--grm-danger-border);
  background: var(--grm-danger-bg);
  color: var(--grm-danger-text);
  line-height: 1.5;
  font-weight: 600;
}

.alert-list li + li {
  margin-top: 4px;
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
}

.field label {
  font-weight: 700;
  color: #2d4c79;
  font-size: 0.9rem;
}

input[type="email"],
input[type="password"] {
  width: 100%;
  min-height: 46px;
  border: 1px solid #c8dbf9;
  border-radius: 12px;
  padding: 11px 13px;
  font: inherit;
  color: #1f3558;
  background: #fafdff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input::placeholder {
  color: #8ca2c3;
}

input:focus {
  outline: none;
  border-color: #6a95e8;
  box-shadow: 0 0 0 3px rgba(106, 149, 232, 0.2);
  background: #ffffff;
}

.field-hint {
  margin: 2px 0 0;
  color: #6d85a8;
  font-size: 0.82rem;
  line-height: 1.4;
}

.actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

.actions .btn,
.actions button {
  width: 100%;
  min-height: 46px;
  border-radius: 12px;
  border: 1px solid #c8dbf9;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.actions-inline .btn {
  width: auto;
}

.actions button {
  border: 0;
  color: #fff;
  background: linear-gradient(140deg, var(--grm-accent), var(--grm-accent-strong));
  box-shadow: 0 10px 24px rgba(52, 93, 171, 0.24);
}

.actions button:hover {
  background: linear-gradient(140deg, #5888ea, #2d58af);
  transform: translateY(-1px);
}

.text-links {
  margin-top: 12px;
  color: #5c7295;
  font-size: 0.9rem;
  text-align: center;
  line-height: 1.45;
}

.text-links a {
  color: #355c9a;
  font-weight: 700;
}

.text-links a:hover {
  text-decoration: underline;
}

.shell-single {
  max-width: min(760px, 100%);
  margin-left: auto;
  margin-right: auto;
}

.status-panel {
  padding: 24px;
}

.footer {
  width: var(--wrap);
  margin: 18px auto 30px;
  color: #5c7295;
  text-align: center;
  font-size: 0.9rem;
}

.footer a {
  color: #355c9a;
  font-weight: 700;
  text-decoration: underline;
}

@media (max-width: 1020px) {
  .header {
    flex-wrap: wrap;
    justify-content: center;
  }

  .auth-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .header {
    border-radius: 16px;
    padding: 12px;
  }

  .brand {
    width: 100%;
    justify-content: center;
  }

  .nav {
    width: 100%;
    justify-content: center;
  }

  .header-actions {
    width: 100%;
    justify-content: center;
  }

  .auth-layout {
    border-radius: 18px;
    padding: 14px;
  }

  .auth-side,
  .panel {
    padding: 16px;
  }

  .panel-head {
    flex-wrap: wrap;
  }

  .panel-badge {
    margin-left: 0;
  }

  .actions-inline {
    flex-direction: column;
    align-items: stretch;
  }

  .actions-inline .btn {
    width: 100%;
  }
}
