/* ==========================================================================
   Shared auth pages design system (register, login, create-company)
   Split-panel layout on desktop, single column on tablet/mobile.
   ========================================================================== */

:root {
  --auth-accent: #6366f1;
  --auth-accent-2: #8b5cf6;
  --auth-accent-dark: #4f46e5;
  --auth-radius-lg: 24px;
  --auth-radius: 14px;
  --auth-radius-sm: 10px;
  --auth-border: #e5e7eb;
  --auth-border-hover: #c7cbf5;
  --auth-text: #111827;
  --auth-text-muted: #6b7280;
  --auth-text-faint: #9ca3af;
  --auth-danger: #ef4444;
  --auth-field-bg: #f9fafb;
  --auth-shadow: 0 25px 70px -18px rgba(79, 70, 229, 0.28), 0 8px 24px rgba(17, 24, 39, 0.06);
}

/* ---------- Page shell ---------- */

.auth-page {
  margin-top: 68px;
  min-height: calc(100vh - 68px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2.5rem 1.25rem;
  background:
    radial-gradient(circle at 15% 20%, rgba(99, 102, 241, 0.08), transparent 45%),
    radial-gradient(circle at 85% 80%, rgba(139, 92, 246, 0.08), transparent 45%),
    #f7f7fb;
}

.auth-shell {
  display: flex;
  width: 100%;
  max-width: 1000px;
  background: #ffffff;
  border-radius: var(--auth-radius-lg);
  overflow: hidden;
  box-shadow: var(--auth-shadow);
}

/* ---------- Left branding panel (desktop only) ---------- */

.auth-brand {
  flex: 0 0 40%;
  position: relative;
  padding: 3rem 2.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #ffffff;
  background: linear-gradient(160deg, var(--auth-accent) 0%, var(--auth-accent-2) 100%);
  overflow: hidden;
}

.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.12);
  pointer-events: none;
}

.auth-brand::before {
  width: 280px;
  height: 280px;
  top: -90px;
  inset-inline-end: -90px;
}

.auth-brand::after {
  width: 200px;
  height: 200px;
  bottom: -70px;
  inset-inline-start: -60px;
  background: rgba(255, 255, 255, 0.08);
}

.auth-brand-top,
.auth-brand-bottom {
  position: relative;
  z-index: 1;
}

.auth-brand-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  margin-bottom: 2.5rem;
}

.auth-brand-logo .logo-badge {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

.auth-brand-title {
  font-size: 1.7rem;
  font-weight: 800;
  line-height: 1.4;
  margin: 0 0 0.75rem;
}

.auth-brand-sub {
  font-size: 0.95rem;
  line-height: 1.7;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  max-width: 30ch;
}

.auth-brand-points {
  list-style: none;
  margin: 2rem 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}

.auth-brand-points li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.92);
}

.auth-brand-points .point-icon {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-brand-points svg {
  width: 14px;
  height: 14px;
}

.auth-brand-quote {
  font-size: 0.82rem;
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.75);
  border-inline-start: 2px solid rgba(255, 255, 255, 0.35);
  padding-inline-start: 12px;
}

/* ---------- Right / form panel ---------- */

/* Reset the standalone .auth-card rule from main.css (border/radius/shadow/
   max-width for a single centered card) - here .auth-card is nested inside
   .auth-shell, which already owns the outer border/radius/shadow. Without
   this reset, main.css's un-overridden properties (border, border-radius,
   box-shadow, max-width:560px) leak through and render as a second,
   undersized card floating inside the shell. */
.auth-shell .auth-card {
  flex: 1;
  min-width: 0;
  width: auto;
  max-width: none;
  padding: 2.75rem 2.75rem;
  max-height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: #ffffff;
}

.auth-shell .auth-header h1 {
  background: none;
  -webkit-background-clip: initial;
  -webkit-text-fill-color: initial;
  background-clip: initial;
  color: var(--auth-text);
}

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

.auth-logo {
  width: 50px;
  height: 50px;
  margin: 0 auto 1rem;
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-2));
  border-radius: var(--auth-radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* On the split layout the small header logo is only needed as a mobile fallback
   (the brand panel already carries it on desktop) */
.auth-shell .auth-card > .auth-header > .auth-logo {
  display: none;
}

.auth-header h1 {
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--auth-text);
  margin: 0 0 0.35rem;
}

.auth-header p {
  color: var(--auth-text-muted);
  font-size: 0.9rem;
  margin: 0;
}

/* ---------- Social login ---------- */

.google-button-container {
  margin-bottom: 1.25rem;
}

.btn-google,
.btn-social {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 12px 20px;
  border-radius: var(--auth-radius-sm);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition: all 0.2s ease;
  background-color: #ffffff;
  color: var(--auth-text);
  border: 1.5px solid var(--auth-border);
  height: 44px;
  box-sizing: border-box;
}

.btn-google:hover,
.btn-social:hover {
  border-color: var(--auth-border-hover);
  background-color: #fafafe;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(17, 24, 39, 0.06);
}

.btn-google:active,
.btn-social:active {
  transform: translateY(0);
  box-shadow: none;
}

.btn-google svg,
.btn-social svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.social-login-group {
  display: flex;
  gap: 10px;
  margin-bottom: 1.5rem;
  width: 100%;
}

.social-login-group .btn-social {
  flex: 1;
}

.auth-divider {
  text-align: center;
  margin: 0.5rem 0 1.25rem;
  position: relative;
  width: 100%;
}

.auth-divider::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1px;
  background-color: var(--auth-border);
  z-index: 1;
}

.auth-divider span {
  background-color: #ffffff;
  padding: 0 14px;
  color: var(--auth-text-faint);
  font-size: 0.82rem;
  position: relative;
  z-index: 2;
}

/* ---------- Account type / role chips ---------- */

.account-type-selection {
  margin-bottom: 1rem;
}

.account-type-selection > label,
.role-selection > label {
  display: block;
  font-weight: 700;
  color: var(--auth-text);
  margin-bottom: 0.6rem;
  font-size: 0.82rem;
}

.type-options {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.type-option {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px;
  border: 1.5px solid var(--auth-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--auth-field-bg);
  position: relative;
}

.type-option:hover {
  border-color: var(--auth-border-hover);
  background-color: #f2f2fc;
}

.type-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  inset: 0;
}

.type-option:has(input:checked) {
  border-color: var(--auth-accent);
  background: linear-gradient(0deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.08));
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.type-option input[type="radio"]:checked ~ svg {
  color: var(--auth-accent);
}

.type-option input[type="radio"]:checked ~ span {
  color: var(--auth-accent-dark);
  font-weight: 700;
}

.type-option svg {
  width: 20px;
  height: 20px;
  color: var(--auth-text-muted);
  flex-shrink: 0;
}

.type-option span {
  color: var(--auth-text-muted);
  font-weight: 600;
  font-size: 0.86rem;
}

.role-selection {
  margin-bottom: 1.5rem;
}

.role-options {
  display: flex;
  gap: 10px;
}

.role-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px;
  border: 1.5px solid var(--auth-border);
  border-radius: 999px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: var(--auth-field-bg);
  position: relative;
}

.role-option:hover {
  border-color: var(--auth-border-hover);
  background-color: #f2f2fc;
}

.role-option input[type="radio"] {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  inset: 0;
}

.role-option:has(input:checked) {
  border-color: var(--auth-accent);
  background: rgba(99, 102, 241, 0.08);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.role-option input[type="radio"]:checked ~ svg {
  color: var(--auth-accent);
}

.role-option input[type="radio"]:checked ~ span {
  color: var(--auth-accent-dark);
  font-weight: 700;
}

.role-option svg {
  width: 18px;
  height: 18px;
  color: var(--auth-text-muted);
  flex-shrink: 0;
}

.role-option span {
  color: var(--auth-text-muted);
  font-weight: 600;
  font-size: 0.84rem;
}

/* ---------- Step indicators ---------- */

.step-indicators {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 1.75rem;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--auth-text-faint);
  font-weight: 600;
}

.step.active {
  color: var(--auth-accent-dark);
}

.step-number {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--auth-field-bg);
  border: 1.5px solid var(--auth-border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--auth-text-faint);
  transition: all 0.2s ease;
}

.step.active .step-number {
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-2));
  color: #ffffff;
  border-color: transparent;
}

.step-connector {
  flex: 1;
  height: 2px;
  background: var(--auth-border);
  border-radius: 1px;
}

/* ---------- Form fields ---------- */

.form-group {
  margin-bottom: 1.1rem;
}

.form-group label {
  display: block;
  font-weight: 600;
  color: var(--auth-text);
  margin-bottom: 0.4rem;
  font-size: 0.82rem;
}

.form-group input,
.form-group select {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 14px;
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  font-size: 0.92rem;
  font-family: inherit;
  transition: all 0.2s ease;
  background: var(--auth-field-bg);
  color: var(--auth-text);
}

.form-group select {
  padding-inline-end: 36px;
  min-height: 44px;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
}

[dir="rtl"] .form-group select {
  background-position: left 12px center;
}

.form-group input:hover,
.form-group select:hover {
  border-color: var(--auth-border-hover);
}

.form-group input:focus,
.form-group select:focus {
  outline: none;
  border-color: var(--auth-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.form-group input::placeholder {
  color: var(--auth-text-faint);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ---------- Custom dropdown (also used by create-company.html) ---------- */

.custom-select {
  position: relative;
  width: 100%;
}

.custom-select-trigger {
  width: 100%;
  box-sizing: border-box;
  padding: 11px 36px 11px 14px;
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  font-size: 0.92rem;
  background: var(--auth-field-bg);
  color: var(--auth-text);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
}

[dir="rtl"] .custom-select-trigger {
  padding: 11px 14px 11px 36px;
}

.custom-select-trigger:hover {
  border-color: var(--auth-border-hover);
}

.custom-select-trigger.open {
  border-color: var(--auth-accent);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.12);
}

.custom-select-trigger::after {
  content: '';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 5px solid #9ca3af;
  transition: transform 0.2s ease;
}

[dir="rtl"] .custom-select-trigger::after {
  right: auto;
  left: 14px;
}

.custom-select-trigger.open::after {
  transform: translateY(-50%) rotate(180deg);
}

.custom-select-options {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: #ffffff;
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius-sm);
  box-shadow: 0 12px 32px rgba(17, 24, 39, 0.12);
  z-index: 1000;
  max-height: 250px;
  overflow-y: auto;
  display: none;
}

.custom-select-options.open {
  display: block;
}

.custom-select-search {
  padding: 10px;
  border-bottom: 1px solid var(--auth-border);
  position: sticky;
  top: 0;
  background: #ffffff;
}

.custom-select-search input {
  width: 100%;
  box-sizing: border-box;
  padding: 8px 12px;
  border: 1.5px solid var(--auth-border);
  border-radius: 8px;
  font-size: 0.85rem;
  outline: none;
}

.custom-select-search input:focus {
  border-color: var(--auth-accent);
}

.custom-select-option {
  padding: 10px 14px;
  cursor: pointer;
  transition: background 0.15s ease;
  font-size: 0.9rem;
  color: var(--auth-text);
}

.custom-select-option:hover {
  background: #f2f2fc;
}

.custom-select-option.selected {
  background: var(--auth-accent);
  color: #ffffff;
}

.custom-select-option.no-results {
  padding: 12px;
  color: var(--auth-text-faint);
  font-size: 0.85rem;
  text-align: center;
}

/* ---------- Password visibility toggle ---------- */

.password-wrapper {
  position: relative;
}

.password-wrapper input {
  padding-inline-end: 42px;
}

.toggle-password {
  position: absolute;
  inset-inline-end: 10px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--auth-text-faint);
  transition: color 0.2s ease;
}

.toggle-password:hover {
  color: var(--auth-accent);
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

/* ---------- Checkboxes / links ---------- */

.form-options {
  margin-bottom: 1.25rem;
}

.form-options label {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--auth-text-muted);
  cursor: pointer;
  line-height: 1.5;
}

.form-options input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-accent);
  cursor: pointer;
  margin-top: 2px;
  flex-shrink: 0;
}

.form-options a {
  color: var(--auth-accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.form-options a:hover {
  text-decoration: underline;
}

.form-options-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  gap: 12px;
  flex-wrap: wrap;
}

.form-options-row label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.84rem;
  color: var(--auth-text-muted);
  cursor: pointer;
}

.form-options-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--auth-accent);
  cursor: pointer;
}

.form-options-row a {
  color: var(--auth-accent-dark);
  text-decoration: none;
  font-weight: 700;
  font-size: 0.84rem;
}

.form-options-row a:hover {
  text-decoration: underline;
}

/* ---------- Buttons ----------
   Scoped to .auth-shell: ".btn" is also used by the site-wide navbar
   (Register link), so an unscoped rule here would force it to
   width:100%/display:flex and knock it onto its own line. */

.auth-shell .btn {
  width: 100%;
  box-sizing: border-box;
  padding: 12px 18px;
  border: none;
  border-radius: var(--auth-radius-sm);
  font-size: 0.95rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 46px;
  font-family: inherit;
}

.auth-shell .btn-full {
  background: linear-gradient(135deg, var(--auth-accent), var(--auth-accent-2));
  color: #ffffff;
  box-shadow: 0 8px 20px -6px rgba(99, 102, 241, 0.55);
}

.auth-shell .btn-full:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 26px -6px rgba(99, 102, 241, 0.6);
}

.auth-shell .btn-full:active {
  transform: translateY(0);
}

.auth-shell .btn-secondary {
  background: var(--auth-field-bg);
  color: var(--auth-text-muted);
  border: 1.5px solid var(--auth-border);
}

.auth-shell .btn-secondary:hover {
  background: #f2f2fc;
  border-color: var(--auth-border-hover);
  color: var(--auth-text);
}

/* ---------- Footer ---------- */

.auth-footer {
  text-align: center;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--auth-border);
}

.auth-footer p {
  color: var(--auth-text-muted);
  font-size: 0.85rem;
  margin: 0 0 0.6rem;
}

.auth-footer a {
  color: var(--auth-accent-dark);
  text-decoration: none;
  font-weight: 700;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--auth-text-faint);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: color 0.2s ease;
}

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

/* ---------- Logo upload zone (register step 2) ---------- */

.logo-section {
  margin-bottom: 1.75rem;
}

.logo-section-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--auth-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  display: block;
  text-align: center;
  margin-bottom: 0.875rem;
}

.logo-upload-zone {
  border: 1.5px dashed var(--auth-border);
  border-radius: var(--auth-radius);
  padding: 1.75rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
  position: relative;
  background: var(--auth-field-bg);
}

.logo-upload-zone:hover,
.logo-upload-zone.dragover {
  border-color: var(--auth-accent);
  background: #f2f2fc;
}

.logo-placeholder {
  pointer-events: none;
}

.logo-placeholder-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ede9fe, #ddd6fe);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.875rem;
}

.logo-placeholder-icon svg {
  width: 26px;
  height: 26px;
  color: var(--auth-accent-dark);
}

.logo-placeholder p {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--auth-text);
  margin: 0 0 3px;
}

.logo-placeholder > span {
  font-size: 0.76rem;
  color: var(--auth-text-faint);
}

.logo-placeholder em {
  display: inline-block;
  margin-top: 0.5rem;
  font-style: normal;
  font-size: 0.7rem;
  background: #f3f0ff;
  color: var(--auth-accent-dark);
  padding: 3px 10px;
  border-radius: 20px;
}

.logo-preview-wrap {
  display: none;
  flex-direction: column;
  align-items: center;
  gap: 0.875rem;
}

.logo-preview-img-wrap {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  border: 3px solid #ffffff;
  outline: 1.5px solid var(--auth-border);
  overflow: hidden;
  background: #f3f4f6;
  box-shadow: 0 6px 18px rgba(17, 24, 39, 0.12);
}

.logo-preview-img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.logo-preview-name {
  font-size: 0.78rem;
  color: var(--auth-text-muted);
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logo-preview-actions {
  display: flex;
  gap: 0.5rem;
}

.logo-btn-change,
.logo-btn-remove {
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  border: 1.5px solid transparent;
  transition: all 0.15s ease;
  font-family: inherit;
}

.logo-btn-change {
  background: #ede9fe;
  color: var(--auth-accent-dark);
  border-color: #c4b5fd;
}

.logo-btn-change:hover {
  background: #ddd6fe;
}

.logo-btn-remove {
  background: #fef2f2;
  color: #dc2626;
  border-color: #fca5a5;
}

.logo-btn-remove:hover {
  background: #fee2e2;
}

/* ---------- Validation toast (shared by register + login, via
   static/website/js/validation-toast.js -> window.showValidationToast) ---------- */

.validation-toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(24px);
  background: #fff;
  border: 1px solid #fecaca;
  border-inline-start: 4px solid var(--auth-danger);
  border-radius: var(--auth-radius);
  padding: 1rem 1.1rem;
  box-shadow: 0 20px 45px rgba(17, 24, 39, 0.18);
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  width: calc(100% - 32px);
  max-width: 380px;
}

.validation-toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  pointer-events: auto;
}

[dir="rtl"] .validation-toast {
  left: auto;
  right: 50%;
  transform: translateX(50%) translateY(24px);
}

[dir="rtl"] .validation-toast.show {
  transform: translateX(50%) translateY(0);
}

.validation-toast .toast-icon {
  flex-shrink: 0;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #fef2f2;
  color: var(--auth-danger);
  display: flex;
  align-items: center;
  justify-content: center;
}

.validation-toast .toast-body {
  flex: 1;
  min-width: 0;
}

.validation-toast .toast-title {
  display: block;
  color: #111827;
  font-size: 0.88rem;
  font-weight: 700;
  margin-bottom: 2px;
}

.validation-toast .toast-message {
  color: #4b5563;
  font-size: 0.85rem;
  line-height: 1.5;
  margin: 0;
}

.validation-toast .toast-field-list {
  margin: 0.35rem 0 0;
  padding-inline-start: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.validation-toast .toast-field-list li {
  color: #4b5563;
  font-size: 0.83rem;
  line-height: 1.5;
}

.validation-toast .toast-close {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  border: none;
  background: none;
  color: #9ca3af;
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
}

.validation-toast .toast-close:hover {
  background: #f3f4f6;
  color: #4b5563;
}

/* Input / select error state */
input.error,
.form-group input.error {
  border-color: var(--auth-danger) !important;
  background: #fef2f2 !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
  animation: auth-shake 0.4s ease;
}

.custom-select-trigger.error {
  border-color: var(--auth-danger) !important;
  box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.12) !important;
  animation: auth-shake 0.4s ease;
}

@keyframes auth-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}

/* ---------- RTL fine-tuning ---------- */

[dir="rtl"] .auth-divider span {
  /* inherits centered background clip, nothing extra needed */
}

/* ==========================================================================
   Responsive
   ========================================================================== */

/* Tablet: collapse the split layout to a single centered card */
@media (max-width: 900px) {
  .auth-shell {
    max-width: 560px;
    border-radius: var(--auth-radius);
  }

  .auth-brand {
    display: none;
  }

  .auth-shell .auth-card > .auth-header > .auth-logo {
    display: flex;
  }

  .auth-card {
    padding: 2.25rem 2rem;
  }
}

@media (max-width: 640px) {
  .auth-page {
    padding: 1.25rem 0.75rem;
    align-items: flex-start;
  }

  .auth-shell {
    border-radius: var(--auth-radius);
  }

  .auth-card {
    padding: 1.75rem 1.25rem;
  }

  .auth-header h1 {
    font-size: 1.3rem;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .type-options,
  .role-options {
    grid-template-columns: 1fr;
  }

  .type-option,
  .role-option {
    justify-content: flex-start;
    padding: 10px 14px;
  }

  .social-login-group {
    flex-direction: column;
  }
}

@media (max-width: 380px) {
  .auth-card {
    padding: 1.5rem 1rem;
  }
}
