/* ===========================
   Helpal Auth UI
   Premium, calm, low-noise
   =========================== */

:root {
  --auth-radius: 16px;
  --auth-radius-sm: 12px;
  --auth-radius-pill: 999px;
  --auth-border: rgba(15, 23, 42, 0.08);
  --auth-border-strong: rgba(15, 23, 42, 0.12);
  --auth-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  --auth-shadow-soft: 0 10px 24px rgba(15, 23, 42, 0.06);
  --auth-surface: #ffffff;
  --auth-surface-alt: #f8fafc;
  --auth-surface-muted: #f1f5f9;
  --auth-text: #0f172a;
  --auth-text-secondary: #475569;
  --auth-text-muted: #64748b;
  --auth-focus: rgba(15, 118, 110, 0.14);
  --auth-focus-border: rgba(15, 118, 110, 0.34);
  --auth-primary-soft: rgba(15, 118, 110, 0.08);
  --auth-success-soft: rgba(21, 128, 61, 0.08);
  --auth-warning-soft: rgba(217, 119, 6, 0.10);
  --auth-danger-soft: rgba(220, 38, 38, 0.08);
}

.auth-page {
  min-height: calc(100vh - 120px);
  display: flex;
  align-items: center;
  padding: 4.5rem 0;
}

.auth-shell {
  border: 1px solid var(--auth-border);
  border-radius: var(--auth-radius);
  background: var(--auth-surface);
  box-shadow: var(--auth-shadow);
  overflow: hidden;
}

.auth-panel-left {
  min-height: 100%;
  padding: 3.5rem 3rem;
  color: #fff;
  background:
    radial-gradient(circle at top right, rgba(255, 255, 255, 0.12), transparent 30%),
    linear-gradient(160deg, #0f172a 0%, #111c44 68%, #0f766e 140%);
}

.auth-panel-left > * {
  position: relative;
  z-index: 1;
}

.auth-panel-right {
  padding: 3rem;
  background: var(--auth-surface);
}

.auth-brand-logo {
  width: 110px;
  max-width: 100%;
  height: auto;
}

.auth-left-title {
  font-size: clamp(2rem, 2.8vw, 2.5rem);
  line-height: 1.12;
  letter-spacing: -0.04em;
  font-weight: 800;
  margin: 0 0 1rem;
}

.auth-left-text {
  max-width: 32rem;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.75;
  margin-bottom: 2rem;
}

.auth-benefits {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 1rem;
}

.auth-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: rgba(255, 255, 255, 0.92);
}

.auth-benefits li i {
  margin-top: 0.18rem;
}

.auth-header {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-header h1,
.auth-header h2,
.auth-header h3 {
  color: var(--auth-text);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.08;
  margin: 0 0 0.65rem;
}

.auth-card-title {
  font-size: clamp(1.85rem, 2vw, 2.2rem);
}

.auth-subtitle {
  max-width: 34rem;
  margin: 0 auto;
  color: var(--auth-text-secondary);
  line-height: 1.7;
  font-size: 1rem;
}

.auth-form .form-label {
  margin-bottom: 0.55rem;
  color: var(--auth-text);
  font-weight: 700;
  letter-spacing: -0.01em;
}

.auth-form .form-control,
.auth-form .form-select {
  min-height: 52px;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 14px;
  border: 1px solid var(--auth-border-strong);
  background: var(--auth-surface);
  color: var(--auth-text);
  box-shadow: none;
}

.auth-form textarea.form-control {
  min-height: 140px;
  padding-top: 0.85rem;
}

.auth-form .form-control::placeholder,
.auth-form .form-select {
  color: var(--auth-text-muted);
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
  border-color: var(--auth-focus-border);
  box-shadow: 0 0 0 4px var(--auth-focus);
}

.auth-form .input-group .form-control {
  border-top-right-radius: 0;
  border-bottom-right-radius: 0;
}

.auth-form .input-group .btn {
  min-width: 52px;
  border-top-right-radius: 14px;
  border-bottom-right-radius: 14px;
}

.auth-form .form-text {
  margin-top: 0.55rem;
  color: var(--auth-text-muted);
}

.auth-submit-btn {
  min-height: 52px;
  border-radius: 14px;
  font-weight: 700;
  letter-spacing: -0.01em;
  box-shadow: none;
}

.auth-muted-link {
  color: var(--auth-text-secondary);
  text-decoration: none;
}

.auth-muted-link:hover {
  color: var(--color-secondary-700, #0f766e);
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin: 1.5rem 0;
  color: var(--auth-text-muted);
  font-size: 0.86rem;
}

.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: rgba(148, 163, 184, 0.28);
}

.role-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-card {
  border-radius: 16px;
  border: 1px solid var(--auth-border);
  background: var(--auth-surface);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
  cursor: pointer;
}

.role-card:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.14);
  box-shadow: var(--auth-shadow-soft);
}

.role-card.active {
  border-color: rgba(15, 118, 110, 0.28);
  background: rgba(15, 118, 110, 0.03);
  box-shadow: var(--auth-shadow-soft);
}

.role-card .role-icon {
  font-size: 1.7rem;
}

.auth-upload-box {
  border: 1px dashed rgba(15, 23, 42, 0.16);
  border-radius: 16px;
  padding: 1.5rem;
  background: var(--auth-surface-alt);
  text-align: center;
  transition: border-color 0.18s ease, background-color 0.18s ease, box-shadow 0.18s ease;
}

.auth-upload-box:hover {
  border-color: rgba(15, 118, 110, 0.34);
  background: #fbfefd;
  box-shadow: var(--auth-shadow-soft);
}

.auth-upload-box.has-file {
  border-color: rgba(21, 128, 61, 0.28);
  background: rgba(21, 128, 61, 0.04);
}

.auth-file-name {
  margin-top: 0.75rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--auth-text);
  word-break: break-word;
}

.password-strength {
  margin-top: 0.85rem;
}

.password-strength .progress {
  height: 6px;
  border-radius: var(--auth-radius-pill);
  background: #e2e8f0;
}

.password-strength .progress-bar {
  border-radius: var(--auth-radius-pill);
  transition: width 0.2s ease;
}

.strength-text {
  display: inline-block;
  margin-top: 0.45rem;
  font-size: 0.9rem;
}

.auth-alert {
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 0.95rem 1rem;
}

.auth-alert-danger {
  background: var(--auth-danger-soft);
  border-color: rgba(220, 38, 38, 0.12);
  color: #991b1b;
}

.auth-alert-info {
  background: var(--auth-primary-soft);
  border-color: rgba(15, 118, 110, 0.12);
  color: #0f766e;
}

.auth-alert-success {
  background: var(--auth-success-soft);
  border-color: rgba(21, 128, 61, 0.12);
  color: #166534;
}

.auth-alert-warning {
  background: var(--auth-warning-soft);
  border-color: rgba(217, 119, 6, 0.14);
  color: #9a3412;
}

.auth-code-input {
  text-align: center;
  letter-spacing: 0.38em;
  font-size: 1.15rem;
  font-weight: 800;
}

.auth-note-box {
  border: 1px solid var(--auth-border);
  border-radius: 14px;
  background: var(--auth-surface-alt);
  padding: 1rem 1rem;
}

.auth-mini-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.45rem 0.8rem;
  border-radius: var(--auth-radius-pill);
  background: rgba(15, 118, 110, 0.08);
  color: #0f766e;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.auth-link-row {
  margin-top: 1.5rem;
  text-align: center;
  color: var(--auth-text-secondary);
}

.auth-link-row a {
  font-weight: 700;
  color: var(--auth-text);
  text-decoration: none;
}

.auth-link-row a:hover {
  color: var(--color-secondary-700, #0f766e);
}

.auth-form .input-group .toggle-password,
.auth-form .toggle-password {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 52px;
  border: 1px solid var(--auth-border-strong);
  border-left: 0;
  background: var(--auth-surface);
  color: var(--auth-text-secondary);
}

.auth-form .input-group .toggle-password:hover,
.auth-form .toggle-password:hover {
  background: var(--auth-surface-alt);
  color: var(--auth-text);
}

.auth-form .input-group .toggle-password:focus,
.auth-form .toggle-password:focus {
  outline: none;
  box-shadow: none;
}

.auth-form .toggle-password i {
  font-size: 0.98rem;
  line-height: 1;
  color: inherit;
  pointer-events: none;
}

.auth-card {
  border-radius: 16px;
  overflow: hidden;
}

.auth-title {
  font-weight: 800;
  letter-spacing: -0.03em;
}

.auth-success-icon {
  width: 68px;
  height: 68px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 1.7rem;
  background: rgba(21, 128, 61, 0.1);
  color: #15803d;
}

.auth-help {
  max-width: 32rem;
  margin-left: auto;
  margin-right: auto;
}

.auth-page--compact {
  padding: 3.5rem 0;
}

.auth-stack {
  max-width: 760px;
  margin: 0 auto;
}

.auth-stack .auth-shell {
  padding: 0;
}

.auth-stack .auth-panel-right {
  padding: 2.75rem 2.5rem;
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
  color: var(--auth-text-secondary);
  font-weight: 600;
  text-decoration: none;
}

.auth-back-link:hover {
  color: var(--auth-text);
}

@media (max-width: 991.98px) {
  .auth-page {
    padding: 3rem 0;
  }

  .auth-panel-left {
    padding: 2.5rem 2rem;
  }

  .auth-panel-right {
    padding: 2.5rem 2rem;
  }

  .auth-left-title {
    font-size: 1.9rem;
  }
}

@media (max-width: 767.98px) {
  .auth-page,
  .auth-page--compact {
    align-items: flex-start;
    padding: 1.5rem 0;
  }

  .auth-shell,
  .auth-card {
    border-radius: 14px;
  }

  .auth-panel-left,
  .auth-panel-right,
  .auth-stack .auth-panel-right {
    padding: 1.5rem 1.15rem;
  }

  .auth-header {
    margin-bottom: 1.75rem;
  }
}
