/* Спільний сучасний дизайн для сторінок реєстрації/авторизації/відновлення —
   палітра й шрифт 1-в-1 з /styles.css головного сайту (--brand, --ink, --muted...)
   і з panel/index.php (та сама --brand/--brand-dark), щоб вхід у кабінет не
   виглядав як окремий продукт. */

:root {
  --ink: #112033;
  --muted: #647084;
  --soft: #eef4f8;
  --line: #dbe5eb;
  --brand: #0f8bd6;
  --brand-dark: #0d3b66;
  --green: #19b47b;
  --yellow: #f7c948;
  --coral: #ff6b5f;
  --violet: #6757d9;
  --shadow: 0 22px 60px rgba(17, 32, 51, 0.14);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body.auth-page {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #f7fafc;
  font-family: Inter, "Segoe UI", Arial, sans-serif;
  line-height: 1.55;
}

.auth-shell {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------- Ліва брендована панель ---------- */
.auth-visual {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(28px, 4vw, 56px);
  color: #fff;
  background: radial-gradient(120% 140% at 10% 0%, #1596e0 0%, var(--brand) 42%, var(--brand-dark) 100%);
  overflow: hidden;
}

.auth-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(600px 400px at 100% 100%, rgba(255, 255, 255, 0.08), transparent 60%),
    radial-gradient(400px 300px at 0% 20%, rgba(255, 255, 255, 0.10), transparent 60%);
  pointer-events: none;
}

.auth-logo {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.auth-logo img {
  height: 34px;
  width: auto;
  filter: brightness(0) invert(1);
}

.auth-visual-content {
  position: relative;
  max-width: 420px;
}

.auth-visual-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 14px;
  margin-bottom: 18px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .3px;
  text-transform: uppercase;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 999px;
}

.auth-visual-content h2 {
  margin: 0 0 14px;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.25;
}

.auth-visual-content p {
  margin: 0 0 28px;
  font-size: 16px;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.86);
}

.auth-feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.auth-feature-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, 0.92);
}

.auth-feature-list .auth-feature-icon {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: rgba(255, 255, 255, 0.16);
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 10px;
  font-size: 14px;
}

.auth-visual-footer {
  position: relative;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.65);
}

/* ---------- Права панель з формою ---------- */
.auth-form-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 20px;
  background: #f7fafc;
}

.auth-mobile-logo {
  display: none;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.auth-card-header {
  margin-bottom: 26px;
}

.auth-card-header h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 800;
  color: var(--ink);
}

.auth-card-header p.auth-subtitle {
  margin: 0;
  font-size: 15px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---------- Форма ---------- */
.auth-form .form-group {
  margin-bottom: 16px;
}

.auth-input {
  display: block;
  width: 100%;
  height: 52px;
  padding: 0 16px;
  font-size: 15px;
  font-family: inherit;
  color: var(--ink);
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-input::placeholder {
  color: #9aa7b5;
}

.auth-input:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(15, 139, 214, 0.14);
}

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 52px;
  margin-top: 6px;
  color: #fff;
  background: var(--brand);
  border: 0;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 139, 214, 0.28);
  font-size: 16px;
  font-weight: 800;
  cursor: pointer;
  transition: background .15s ease, transform .1s ease;
}

.auth-btn:hover {
  background: #0879bd;
  color: #fff;
}

.auth-btn:active {
  transform: translateY(1px);
}

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

.auth-divider {
  height: 1px;
  margin: 22px 0;
  background: var(--line);
  border: 0;
}

.auth-links {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: center;
}

.auth-links a {
  font-size: 14.5px;
  font-weight: 700;
  color: var(--brand-dark);
  text-decoration: none;
}

.auth-links a:hover {
  color: var(--brand);
  text-decoration: underline;
}

.auth-links .auth-links-muted {
  font-size: 14.5px;
  color: var(--muted);
}

/* ---------- Алерти (свій дизайн замість bootstrap-червоного/зеленого) ---------- */
.auth-alert {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 16px;
  margin-bottom: 18px;
  font-size: 14px;
  line-height: 1.5;
  border-radius: 12px;
  border: 1px solid transparent;
}

.auth-alert i { margin-top: 2px; }
.auth-alert a { color: inherit; text-decoration: underline; font-weight: 700; }

.auth-alert-danger {
  color: #9c2b22;
  background: #fdeceb;
  border-color: rgba(255, 107, 95, 0.35);
}

.auth-alert-success {
  color: #0d6b46;
  background: #e8f8f1;
  border-color: rgba(25, 180, 123, 0.3);
}

.auth-alert-warning {
  color: #7a5b00;
  background: #fef7e3;
  border-color: rgba(247, 201, 72, 0.45);
}

.auth-alert-info {
  color: var(--brand-dark);
  background: var(--soft);
  border-color: rgba(15, 139, 214, 0.22);
}

.auth-status-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  margin-bottom: 18px;
  font-size: 24px;
  border-radius: 16px;
}

.auth-status-icon.is-success { color: #0d6b46; background: #e8f8f1; }
.auth-status-icon.is-warning { color: #7a5b00; background: #fef7e3; }
.auth-status-icon.is-danger  { color: #9c2b22; background: #fdeceb; }
.auth-status-icon.is-info    { color: var(--brand-dark); background: var(--soft); }

/* ---------- Адаптив ---------- */
@media (max-width: 900px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-visual {
    display: none;
  }

  .auth-mobile-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 24px;
  }

  .auth-mobile-logo img {
    height: 30px;
  }

  .auth-form-panel {
    padding: 48px 20px;
  }
}

@media (max-width: 420px) {
  .auth-card-header h1 { font-size: 24px; }
  .auth-input, .auth-btn { height: 48px; }
}
