/* ==========================================================================
   METRUP - LUNO AUTH SIGN-IN STYLESHEET
   Inspired by Luno Admin Theme Auth Style
   ========================================================================== */

:root {
  --auth-primary: #00a896;
  --auth-primary-hover: #008f80;
  --auth-primary-light: rgba(0, 168, 150, 0.1);
  --auth-bg: #ebf1f0;
  --auth-card-bg: #ffffff;
  --auth-side-bg: #f8fafb;
  --auth-border: #e2e8f0;
  --auth-border-focus: #00a896;
  --auth-text-title: #1e293b;
  --auth-text-body: #475569;
  --auth-text-muted: #8392a5;
  --auth-error: #ef4444;
  --auth-error-light: #fef2f2;
  --auth-font: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

[data-theme="dark"] {
  --auth-primary: #00bfa5;
  --auth-primary-hover: #00d2b6;
  --auth-primary-light: rgba(0, 191, 165, 0.14);
  --auth-bg: #0b0f19;
  --auth-card-bg: #131926;
  --auth-side-bg: #0d121d;
  --auth-border: #232d42;
  --auth-border-focus: #00bfa5;
  --auth-text-title: #f8fafc;
  --auth-text-body: #cbd5e1;
  --auth-text-muted: #8392a5;
  --auth-error: #ef4444;
  --auth-error-light: rgba(239, 68, 68, 0.12);
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body.auth-page {
  font-family: var(--auth-font);
  background-color: var(--auth-bg);
  color: var(--auth-text-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  transition: background-color 0.3s ease, color 0.3s ease;
}

.auth-wrapper {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

/* ── Left Side (Branding & Vector Illustration) ── */
.auth-side {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background-color: var(--auth-side-bg);
  border-right: 1px solid var(--auth-border);
  padding: 48px 60px;
  position: relative;
  overflow: hidden;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

/* Subtle background accent glow */
.auth-side::before {
  content: '';
  position: absolute;
  top: -120px;
  left: -120px;
  width: 380px;
  height: 380px;
  background: radial-gradient(circle, var(--auth-primary-light) 0%, transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.auth-side-header,
.auth-side-content,
.auth-side-footer {
  position: relative;
  z-index: 1;
}

/* Brand Logo */
.auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-badge-icon {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--auth-primary) 0%, #008f80 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 12px rgba(0, 168, 150, 0.3);
}

.brand-name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.5px;
  color: var(--auth-text-title);
}

.brand-accent {
  color: var(--auth-primary);
}

/* Hero Content & Illustration */
.auth-side-content {
  margin: auto 0;
  padding: 24px 0;
  max-width: 520px;
}

.auth-illustration-wrap {
  width: 100%;
  max-width: 440px;
  margin: 0 auto 36px auto;
  display: flex;
  justify-content: center;
  align-items: center;
}

.auth-illustration-svg {
  width: 100%;
  height: auto;
  max-height: 320px;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.06));
}

[data-theme="dark"] .auth-illustration-svg {
  filter: drop-shadow(0 16px 36px rgba(0, 0, 0, 0.45));
}

.auth-side-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--auth-text-title);
  line-height: 1.35;
  margin-bottom: 12px;
  letter-spacing: -0.5px;
}

.auth-side-desc {
  font-size: 14.5px;
  color: var(--auth-text-muted);
  line-height: 1.6;
}

.auth-side-footer {
  font-size: 12.5px;
  color: var(--auth-text-muted);
}

/* ── Right Side (Sign-In Form) ── */
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background-color: var(--auth-card-bg);
  padding: 40px 24px;
  position: relative;
  transition: background-color 0.3s ease;
}

/* Top bar utilities (Theme toggle) */
.auth-topbar-tools {
  position: absolute;
  top: 28px;
  right: 28px;
  display: flex;
  align-items: center;
  gap: 12px;
  z-index: 10;
}

.theme-toggle-btn {
  width: 38px;
  height: 38px;
  border-radius: 9px;
  border: 1px solid var(--auth-border);
  background-color: var(--auth-card-bg);
  color: var(--auth-text-title);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
  border-color: var(--auth-primary);
  color: var(--auth-primary);
  background-color: var(--auth-primary-light);
}

.icon-sun, .icon-moon {
  transition: transform 0.2s ease;
}

[data-theme="dark"] .icon-sun {
  display: block;
}

[data-theme="dark"] .icon-moon {
  display: none;
}

:root:not([data-theme="dark"]) .icon-sun {
  display: none;
}

:root:not([data-theme="dark"]) .icon-moon {
  display: block;
}

/* Form Container */
.auth-form-card {
  width: 100%;
  max-width: 420px;
  padding: 20px 0;
}

.mobile-brand {
  display: none;
  margin-bottom: 28px;
}

.auth-header {
  margin-bottom: 28px;
}

.auth-title {
  font-size: 26px;
  font-weight: 800;
  color: var(--auth-text-title);
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.auth-subtitle {
  font-size: 14px;
  color: var(--auth-text-muted);
  line-height: 1.5;
}

/* Alerts */
.auth-alert {
  padding: 12px 16px;
  border-radius: 8px;
  margin-bottom: 20px;
  font-size: 13.5px;
  line-height: 1.45;
  display: flex;
  align-items: center;
  gap: 10px;
}

.auth-alert.alert-error {
  background-color: var(--auth-error-light);
  border: 1px solid rgba(239, 68, 68, 0.25);
  color: var(--auth-error);
}

/* Form Inputs */
.form-group {
  margin-bottom: 20px;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--auth-text-title);
  margin-bottom: 7px;
}

.input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.form-control {
  width: 100%;
  height: 46px;
  padding: 0 16px;
  font-family: var(--auth-font);
  font-size: 14px;
  color: var(--auth-text-title);
  background-color: var(--auth-card-bg);
  border: 1px solid var(--auth-border);
  border-radius: 9px;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

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

.form-control:focus {
  outline: none;
  border-color: var(--auth-border-focus);
  box-shadow: 0 0 0 3.5px var(--auth-primary-light);
}

/* Password Input with toggle eye */
.input-wrap-password .form-control {
  padding-right: 46px;
}

.btn-toggle-password {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 34px;
  height: 34px;
  border: none;
  background: transparent;
  color: var(--auth-text-muted);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: color 0.15s ease;
}

.btn-toggle-password:hover {
  color: var(--auth-text-title);
}

.btn-toggle-password .icon-eye-off {
  display: none;
}

.btn-toggle-password.is-visible .icon-eye {
  display: none;
}

.btn-toggle-password.is-visible .icon-eye-off {
  display: block;
}

/* Remember me Checkbox */
.form-check-row {
  display: flex;
  align-items: center;
  margin-bottom: 24px;
  user-select: none;
}

.form-check {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  cursor: pointer;
}

.form-check-input {
  appearance: none;
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--auth-border);
  border-radius: 5px;
  background-color: var(--auth-card-bg);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.18s ease;
  position: relative;
}

.form-check-input:checked {
  background-color: var(--auth-primary);
  border-color: var(--auth-primary);
}

.form-check-input:checked::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid #ffffff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  margin-bottom: 2px;
}

.form-check-input:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--auth-primary-light);
}

.form-check-label {
  font-size: 13.5px;
  font-weight: 500;
  color: var(--auth-text-body);
}

/* Submit Button */
.btn-auth-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: 9px;
  background: var(--auth-primary);
  color: #ffffff;
  font-family: var(--auth-font);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  box-shadow: 0 4px 14px rgba(0, 168, 150, 0.28);
}

.btn-auth-submit:hover {
  background: var(--auth-primary-hover);
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 168, 150, 0.38);
}

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

/* ── Responsive Behavior ── */
@media (max-width: 991px) {
  .auth-side {
    display: none !important;
  }

  .auth-main {
    flex: 1 1 100%;
    padding: 32px 20px;
    justify-content: center;
  }

  .mobile-brand {
    display: flex;
    justify-content: flex-start;
  }

  .auth-form-card {
    max-width: 390px;
    padding: 10px 0;
  }

  .auth-topbar-tools {
    top: 20px;
    right: 20px;
  }
}
