/* ========== Admin Login (tenant /login) ========== */
:root {
  color-scheme: light;
  --auth-font: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --auth-surface: #ffffff;
  --auth-primary: #667eea;
  --auth-primary-dark: #5a67d8;
  --auth-primary-soft: rgba(102, 126, 234, 0.12);
  --auth-text: #0f172a;
  --auth-text-muted: #64748b;
  --auth-border: #e2e8f0;
  --auth-danger: #ef4444;
  --auth-danger-soft: rgba(239, 68, 68, 0.08);
  --auth-danger-border: rgba(239, 68, 68, 0.28);
  --auth-success: #16a34a;
  --auth-success-soft: rgba(22, 163, 74, 0.08);
  --auth-success-border: rgba(22, 163, 74, 0.28);
  --auth-radius: 12px;
  --auth-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 10px 28px rgba(15, 23, 42, 0.08);
}

.auth-login {
  margin: 0;
  min-height: 100dvh;
  font-family: var(--auth-font);
  color: var(--auth-text);
  background:
    radial-gradient(900px 420px at 8% -8%, rgba(102, 126, 234, 0.14), transparent 55%),
    radial-gradient(760px 380px at 100% 110%, rgba(118, 75, 162, 0.1), transparent 58%),
    #f1f5f9;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.auth-login *,
.auth-login *::before,
.auth-login *::after {
  box-sizing: border-box;
}

.auth-page {
  display: flex;
  min-height: 100dvh;
}

/* ── Hero panel ───────────────────────────────────── */
.auth-hero {
  display: none;
  flex: 1;
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, #1e1b4b 0%, #312e81 45%, #764ba2 120%);
  color: #fff;
  padding: 48px clamp(32px, 5vw, 72px);
}

@media (min-width: 1024px) {
  .auth-hero {
    display: flex;
    align-items: center;
    justify-content: center;
  }
}

.auth-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 80% 70% at 40% 40%, #000 20%, transparent 75%);
}

.auth-hero__glow {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.auth-hero__glow--one {
  width: 520px;
  height: 520px;
  top: -140px;
  right: -120px;
  background: radial-gradient(circle, rgba(102, 126, 234, 0.28) 0%, transparent 70%);
  animation: authGlow 8s ease-in-out infinite alternate;
}

.auth-hero__glow--two {
  width: 420px;
  height: 420px;
  bottom: -120px;
  left: -80px;
  background: radial-gradient(circle, rgba(118, 75, 162, 0.22) 0%, transparent 70%);
  animation: authGlow 10s ease-in-out infinite alternate-reverse;
}

.auth-hero__orb {
  position: absolute;
  width: 280px;
  height: 280px;
  right: 12%;
  bottom: 18%;
  border-radius: 40% 60% 55% 45%;
  border: 1px solid rgba(167, 139, 250, 0.22);
  background: linear-gradient(145deg, rgba(102, 126, 234, 0.12), transparent 60%);
  pointer-events: none;
  animation: authOrb 12s ease-in-out infinite;
}

@keyframes authGlow {
  from { transform: translate(0, 0) scale(1); opacity: 0.85; }
  to { transform: translate(-18px, 14px) scale(1.06); opacity: 1; }
}

@keyframes authOrb {
  0%, 100% { transform: rotate(0deg) translateY(0); }
  50% { transform: rotate(8deg) translateY(-10px); }
}

.auth-hero__inner {
  position: relative;
  z-index: 1;
  max-width: 440px;
  width: 100%;
  animation: authFadeIn 0.7s ease both;
}

@keyframes authFadeIn {
  from { opacity: 0; transform: translateX(-16px); }
  to { opacity: 1; transform: translateX(0); }
}

.auth-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #fff;
  margin-bottom: 40px;
}

.auth-brand img {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 8px 22px rgba(102, 126, 234, 0.35);
}

.auth-brand span {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}

.auth-brand--mobile {
  display: none;
  color: var(--auth-text);
  margin-bottom: 1.5rem;
}

.auth-brand--mobile img {
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.12);
}

.auth-hero__title {
  font-size: clamp(1.75rem, 3.2vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin: 0 0 14px;
}

.auth-hero__desc {
  font-size: 0.98rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.68);
  margin: 0 0 32px;
}

.auth-hero__points {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-hero__points li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.78);
  line-height: 1.5;
}

.auth-hero__point-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(102, 126, 234, 0.16);
  border: 1px solid rgba(167, 139, 250, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.auth-hero__point-icon svg {
  width: 16px;
  height: 16px;
  stroke: #c4b5fd;
}

.auth-hero__copy {
  margin-top: 40px;
  padding-top: 22px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.42);
}

/* ── Sign-in panel ────────────────────────────────── */
.auth-panel {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(1.5rem, 4vw, 3rem);
}

@media (min-width: 1024px) {
  .auth-panel {
    flex: 0 0 520px;
    max-width: 560px;
  }
}

.auth-panel-inner {
  width: 100%;
  max-width: 430px;
  background: var(--auth-surface);
  border: 1px solid var(--auth-border);
  border-radius: 18px;
  padding: clamp(1.35rem, 3.5vw, 2rem);
  box-shadow: var(--auth-shadow);
  animation: authFadeUp 0.5s ease both;
}

@keyframes authFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.auth-panel__head {
  margin-bottom: 1.35rem;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--auth-primary);
  background: var(--auth-primary-soft);
  border: 1px solid rgba(102, 126, 234, 0.22);
  border-radius: 999px;
  padding: 0.24rem 0.58rem;
  margin-bottom: 0.65rem;
}

.auth-page .panel-title {
  font-size: clamp(1.45rem, 4vw, 1.75rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 0 0 0.4rem;
  color: var(--auth-text);
}

.auth-page .panel-subtitle {
  font-size: 0.92rem;
  color: var(--auth-text-muted);
  line-height: 1.55;
  margin: 0;
}

.auth-page .auth-panel-inner form {
  display: grid;
  gap: 1rem;
}

.auth-page .field {
  display: grid;
  gap: 0.45rem;
}

.auth-page .field label {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--auth-text);
}

.auth-page .input-shell {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  border: 1.5px solid var(--auth-border);
  border-radius: var(--auth-radius);
  padding: 0 0.85rem;
  background: #fff;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-page .input-shell:focus-within {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.16);
}

.auth-page .field-icon {
  width: 18px;
  height: 18px;
  stroke: var(--auth-text-muted);
  flex-shrink: 0;
  transition: stroke 0.2s ease;
}

.auth-page .input-shell:focus-within .field-icon {
  stroke: var(--auth-primary);
}

.auth-page .input-shell input {
  flex: 1;
  min-width: 0;
  border: none;
  background: transparent;
  padding: 0.78rem 0;
  font-size: 0.95rem;
  font-family: inherit;
  color: var(--auth-text);
}

.auth-page .input-shell input::placeholder {
  color: #94a3b8;
}

.auth-page .input-shell input:focus {
  outline: none;
}

.auth-page .toggle-password {
  border: none;
  background: none;
  color: var(--auth-primary);
  font-size: 0.78rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  padding: 0.25rem 0.15rem;
  flex-shrink: 0;
}

.auth-page .toggle-password:hover {
  color: var(--auth-primary-dark);
}

.auth-page .form-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  font-size: 0.85rem;
}

.auth-remember {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--auth-text-muted);
  font-size: 0.85rem;
  cursor: pointer;
  user-select: none;
}

.auth-remember input {
  width: 15px;
  height: 15px;
  accent-color: var(--auth-primary);
  cursor: pointer;
}

.auth-page .auth-btn {
  width: 100%;
  padding: 0.85rem 1rem;
  margin-top: 0.15rem;
  border-radius: var(--auth-radius);
  border: none;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: 0 4px 14px rgba(102, 126, 234, 0.32);
  transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.auth-page .auth-btn:hover {
  filter: brightness(1.04);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(118, 75, 162, 0.36);
}

.auth-page .auth-btn:active {
  transform: translateY(0);
}

.auth-page .auth-btn:disabled {
  opacity: 0.75;
  cursor: not-allowed;
  transform: none;
}

.auth-page .auth-btn.auth-is-loading .btn-text {
  display: none;
}

.auth-page .auth-btn .btn-loading {
  display: none;
  align-items: center;
  gap: 0.35rem;
}

.auth-page .auth-btn.auth-is-loading .btn-loading {
  display: inline-flex;
}

.auth-page .auth-link {
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.875rem;
}

.auth-page .auth-link:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

.auth-page .auth-alert {
  padding: 0.8rem 0.95rem;
  border-radius: 12px;
  border: 1px solid var(--auth-border);
  font-size: 0.875rem;
  line-height: 1.5;
  background: #fff;
  margin: 0 0 0.25rem;
}

.auth-page .auth-alert ul {
  margin: 0;
  padding-left: 1.1rem;
}

.auth-page .auth-alert.error {
  background: var(--auth-danger-soft);
  border-color: var(--auth-danger-border);
  color: #991b1b;
}

.auth-page .auth-alert.success {
  background: var(--auth-success-soft);
  border-color: var(--auth-success-border);
  color: #065f46;
}

.auth-page .spinner {
  width: 1rem;
  height: 1rem;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-spin 0.65s linear infinite;
}

@keyframes auth-spin {
  to { transform: rotate(360deg); }
}

.auth-panel__footer {
  margin: 1.25rem 0 0;
  padding-top: 1rem;
  border-top: 1px solid var(--auth-border);
  text-align: center;
  font-size: 0.78rem;
  color: var(--auth-text-muted);
}

/* ── Responsive ───────────────────────────────────── */
@media (max-width: 1023.98px) {
  .auth-brand--mobile {
    display: inline-flex;
  }

  .auth-panel-inner {
    max-width: 460px;
  }
}

@media (max-width: 480px) {
  .auth-panel {
    padding: 1.15rem;
  }

  .auth-panel-inner {
    padding: 1.2rem;
    border-radius: 16px;
  }

  .auth-page .panel-title {
    font-size: 1.35rem;
  }

  .auth-page .panel-subtitle {
    font-size: 0.85rem;
  }

  .auth-page .form-meta {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ========== Simple card screens (verify, passwords) ========== */
.auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--auth-font);
  background:
    radial-gradient(800px 400px at 0% 0%, rgba(102, 126, 234, 0.12), transparent 55%),
    #f1f5f9;
  padding: 24px;
}

.auth-wrapper .auth-card {
  width: 100%;
  max-width: 520px;
  background: #fff;
  border: 1px solid var(--auth-border);
  border-radius: 16px;
  box-shadow: var(--auth-shadow);
  padding: 28px;
}

.auth-wrapper.auth-card-narrow .auth-card {
  max-width: 480px;
}

.auth-wrapper .auth-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
  color: var(--auth-text);
}

.auth-wrapper .auth-brand img {
  max-height: 56px;
  width: auto;
  border-radius: 12px;
}

.auth-wrapper .auth-title {
  margin: 10px 0 2px 0;
  font-size: 22px;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.02em;
}

.auth-wrapper .auth-subtitle {
  margin: 0 0 18px 0;
  color: #6b7280;
  text-align: center;
  font-size: 14px;
}

.auth-wrapper .form-group {
  margin-bottom: 14px;
}

.auth-wrapper .form-group label {
  display: block;
  margin-bottom: 8px;
  font-weight: 600;
  font-size: 13px;
  color: #374151;
}

.auth-wrapper .auth-input {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e5e7eb;
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.auth-wrapper .auth-input:focus {
  border-color: var(--auth-primary);
  box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.16);
}

.auth-wrapper .form-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: 8px 0 16px 0;
}

.auth-wrapper .remember {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #374151;
  font-size: 13px;
}

.auth-wrapper .auth-link {
  font-size: 13px;
  color: var(--auth-primary);
  text-decoration: none;
  font-weight: 600;
}

.auth-wrapper .auth-link:hover {
  color: var(--auth-primary-dark);
  text-decoration: underline;
}

.auth-wrapper .auth-btn {
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 10px;
  background: linear-gradient(135deg, #667eea, #764ba2);
  color: #fff;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: filter 0.15s, box-shadow 0.2s;
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.28);
}

.auth-wrapper .auth-btn:hover {
  filter: brightness(1.04);
}

.auth-wrapper .auth-alert {
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 13px;
  margin-bottom: 12px;
}

.auth-wrapper .auth-alert.success {
  background: #ecfdf5;
  color: #065f46;
  border: 1px solid #a7f3d0;
}

.auth-wrapper .auth-alert.error {
  background: #fef2f2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

.auth-wrapper .auth-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

.auth-wrapper .auth-actions--center {
  justify-content: center;
  margin-top: 10px;
}
