.auth-shell {
  max-width: 1160px;
  margin: 0 auto;
  padding: 2.5rem 1.25rem 4rem;
}

.auth-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 1.4rem;
}

.auth-hero,
.auth-card {
  border-radius: 28px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 30px 70px rgba(15, 23, 42, 0.1);
}

.auth-hero {
  position: relative;
  overflow: hidden;
  padding: 2.3rem;
  background:
    radial-gradient(circle at top left, rgba(34, 211, 238, 0.26), transparent 34%),
    radial-gradient(circle at bottom right, rgba(34, 197, 94, 0.24), transparent 32%),
    linear-gradient(135deg, #082f49, #0f172a 56%, #111827);
  color: #f8fafc;
}

.auth-hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.42rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(186, 230, 253, 0.25);
  font-size: 0.86rem;
  font-weight: 700;
}

.auth-hero h1 {
  margin: 1rem 0 0.7rem;
  font-size: clamp(2rem, 4.6vw, 3.25rem);
  line-height: 1.05;
}

.auth-hero p {
  margin: 0;
  max-width: 38rem;
  color: rgba(226, 232, 240, 0.86);
}

.auth-points {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.4rem;
}

.auth-point {
  padding: 0.9rem 1rem;
  border-radius: 18px;
  background: rgba(15, 23, 42, 0.46);
  border: 1px solid rgba(148, 163, 184, 0.16);
}

.auth-card {
  padding: 2rem;
  background: rgba(255, 255, 255, 0.94);
}

body.theme-dark .auth-card {
  background: rgba(2, 6, 23, 0.88);
}

.auth-logo {
  width: 92px;
  height: 92px;
  margin: 0 auto 1rem;
  border-radius: 22px;
  padding: 0.7rem;
  background: linear-gradient(145deg, rgba(34, 211, 238, 0.12), rgba(34, 197, 94, 0.12));
  border: 1px solid rgba(34, 211, 238, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.auth-title {
  margin: 0;
  text-align: center;
  font-size: 1.95rem;
}

.auth-copy {
  margin: 0.55rem auto 1.2rem;
  max-width: 30rem;
  text-align: center;
  color: #64748b;
}

body.theme-dark .auth-copy {
  color: #94a3b8;
}

.auth-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
  margin-bottom: 1rem;
}

.auth-tab {
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 16px;
  padding: 0.88rem 1rem;
  background: #f8fafc;
  color: #0f172a;
  cursor: pointer;
  font-weight: 700;
}

.auth-tab.is-active {
  background: linear-gradient(135deg, #14b8a6, #0ea5e9);
  border-color: transparent;
  color: #f8fafc;
}

body.theme-dark .auth-tab {
  background: rgba(15, 23, 42, 0.82);
  color: #e2e8f0;
}

.auth-panel.is-hidden {
  display: none;
}

.auth-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.auth-field {
  margin-bottom: 0.95rem;
}

.auth-field--full {
  grid-column: 1 / -1;
}

.auth-field label {
  display: block;
  margin-bottom: 0.42rem;
  font-weight: 700;
}

.auth-field input {
  width: 100%;
  padding: 0.88rem 0.95rem;
  border-radius: 16px;
  border: 1px solid rgba(148, 163, 184, 0.3);
  background: rgba(248, 250, 252, 0.9);
  box-sizing: border-box;
}

body.theme-dark .auth-field input {
  background: rgba(15, 23, 42, 0.8);
  color: #e2e8f0;
}

.auth-submit {
  width: 100%;
  justify-content: center;
  border-radius: 16px;
  padding: 0.95rem 1rem;
}

.auth-note,
.auth-status {
  margin-top: 0.9rem;
  border-radius: 16px;
  padding: 0.9rem 1rem;
  font-size: 0.94rem;
}

.auth-note {
  background: rgba(34, 211, 238, 0.1);
  color: #0f766e;
}

.auth-status {
  display: none;
}

.auth-status.is-visible {
  display: block;
}

.auth-status.is-success {
  background: #dcfce7;
  color: #166534;
}

.auth-status.is-error {
  background: #fee2e2;
  color: #991b1b;
}

.auth-links {
  display: flex;
  justify-content: center;
  gap: 0.85rem;
  flex-wrap: wrap;
  margin-top: 1rem;
}

.auth-links a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

@media (max-width: 920px) {
  .auth-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .auth-shell {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  .auth-hero,
  .auth-card {
    padding: 1.3rem;
  }

  .auth-grid {
    grid-template-columns: 1fr;
  }
}
.auth-block {
  padding: 1rem 0;
}

.auth-block + .auth-block {
  border-top: 1px solid rgba(148, 163, 184, 0.2);
  margin-top: 0.3rem;
}

.auth-block__title {
  margin: 0 0 0.8rem;
  font-size: 1.08rem;
}

/* Hard fallback so stale legacy login tabs never show again. */
.auth-page .auth-tabs,
.auth-page .auth-tab,
.auth-page .auth-tab-switch,
.auth-page .auth-switch,
.auth-page [data-auth-tabs],
.auth-page [data-auth-switch] {
  display: none !important;
}

.auth-page--customer .auth-links a[href="/login/agent.php"],
.auth-page--customer .auth-links a[href="/login/agent"],
.auth-page--customer .auth-links a[href*="agent.php"] {
  display: none !important;
}

.auth-page--agent .auth-links a[href="/login/"],
.auth-page--agent .auth-links a[href="/login/index.php"],
.auth-page--agent .auth-links a[href*="customer"] {
  display: none !important;
}
.auth-alert {
  margin-top: 1.2rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  background: rgba(15, 23, 42, 0.34);
  display: grid;
  gap: 0.3rem;
}

.auth-alert strong {
  font-size: 0.96rem;
}

.auth-alert--customer {
  border-color: rgba(125, 211, 252, 0.34);
  background: rgba(15, 23, 42, 0.42);
}

.auth-alert--agent {
  border-color: rgba(165, 180, 252, 0.34);
  background: rgba(15, 23, 42, 0.42);
}
.auth-block--toggle {
  display: grid;
  gap: 0.85rem;
}

.auth-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.05rem;
  border-radius: 18px;
  border: 1px solid rgba(125, 211, 252, 0.35);
  background: linear-gradient(135deg, rgba(236, 254, 255, 0.96), rgba(224, 242, 254, 0.96));
  color: #082f49;
  font-size: 1.08rem;
  font-weight: 800;
  cursor: pointer;
  box-shadow: 0 12px 26px rgba(14, 165, 233, 0.08);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.auth-toggle:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(20, 184, 166, 0.12);
}

.auth-toggle.is-open {
  border-color: rgba(20, 184, 166, 0.4);
  background: linear-gradient(135deg, rgba(209, 250, 229, 0.98), rgba(224, 242, 254, 0.98));
}

.auth-toggle__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: rgba(20, 184, 166, 0.14);
  color: #0f766e;
  font-size: 0;
  line-height: 1;
  flex-shrink: 0;
}

.auth-toggle.is-open .auth-toggle__icon {
  background: rgba(14, 165, 233, 0.16);
}

.auth-toggle.is-open .auth-toggle__icon::before {
  content: '-';
  font-size: 1.25rem;
  font-weight: 800;
}

.auth-toggle:not(.is-open) .auth-toggle__icon::before {
  content: '+';
  font-size: 1.25rem;
  font-weight: 800;
}

.auth-collapse {
  padding-top: 0.2rem;
}

.auth-note {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}

.auth-note__emoji {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.6);
  font-size: 1.05rem;
  flex-shrink: 0;
}

body.theme-dark .auth-toggle {
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.92), rgba(30, 41, 59, 0.92));
  color: #e2e8f0;
  border-color: rgba(125, 211, 252, 0.22);
}

body.theme-dark .auth-toggle.is-open {
  background: linear-gradient(135deg, rgba(6, 78, 59, 0.92), rgba(15, 23, 42, 0.92));
}




.auth-card__status-wrap {
  flex: 1;
}
.auth-hero__intro--with-logo {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.auth-logo--hero-left {
  margin: 0;
  width: 84px;
  height: 84px;
  flex-shrink: 0;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.16), rgba(191, 219, 254, 0.16));
  border-color: rgba(186, 230, 253, 0.32);
}

.auth-page--customer .auth-hero h1 {
  margin-top: 0.7rem;
}

@media (max-width: 640px) {
  .auth-hero__intro--with-logo {
    align-items: flex-start;
  }

  .auth-logo--hero-left {
    width: 72px;
    height: 72px;
  }
}