/* =========================================================
   WMTrans — Premium Login Page
   Split-screen layout with dark gradient brand panel
   and clean login form.
   ========================================================= */

:root {
  --ink:        #0f172a;
  --ink-soft:   #475569;
  --muted:      #94a3b8;
  --line:       #e7e9f2;
  --surface:    #ffffff;
  --bg:         #f5f6fb;
  --brand:      #4f46e5;
  --brand-2:    #6366f1;
  --brand-dark: #3730a3;
  --gold:       #c8a45c;
  --gold-2:     #e6c878;
  --emerald:    #10b981;
  --rose:       #e11d48;
  --radius:     24px;
  --shadow:     0 14px 40px -18px rgba(15,23,42,.30);
  --shadow-lg:  0 30px 70px -28px rgba(15,23,42,.45);
  --ring:       0 0 0 4px rgba(99,102,241,.16);
  --font:       "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

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

html, body {
  width: 100%;
  height: 100%;
  font-family: var(--font);
  overflow: hidden;
}

/* =========================================================
   SPLIT SCREEN LAYOUT
   ========================================================= */
.login-page {
  display: flex;
  width: 100%;
  height: 100vh;
  min-height: 600px;
}

/* ---------- LEFT BRAND PANEL ---------- */
.login-brand {
  flex: 0 0 45%;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(120% 110% at 0% 0%, rgba(200,164,92,.18) 0%, transparent 50%),
    linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #312e81 130%);
  overflow: hidden;
}

/* subtle dot grid overlay */
.login-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255,255,255,.04) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: .6;
}

/* bottom gold accent line */
.login-brand::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--gold-2), transparent);
  opacity: .85;
}

/* animated gold wave */
.brand-wave {
  position: absolute;
  bottom: 3px;
  left: 0;
  width: 100%;
  height: 120px;
  overflow: hidden;
  opacity: .08;
}
.brand-wave svg {
  position: absolute;
  bottom: 0;
  width: 200%;
  height: 100%;
  animation: waveDrift 8s linear infinite;
}
@keyframes waveDrift {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.brand-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 2rem;
  animation: loginFadeUp 0.7s ease both;
}
@keyframes loginFadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.brand-icon {
  width: 90px;
  height: 90px;
  display: grid;
  place-items: center;
  border-radius: 24px;
  font-size: 2.2rem;
  color: #fff;
  background: linear-gradient(135deg, rgba(255,255,255,.18), rgba(255,255,255,.04));
  border: 1px solid rgba(200,164,92,.5);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.25), 0 10px 30px -8px rgba(0,0,0,.5);
  margin: 0 auto 1.8rem;
}

.brand-name {
  font-size: 2.8rem;
  font-weight: 800;
  letter-spacing: 1px;
  background: linear-gradient(135deg, var(--gold-2), var(--gold), #d4a84b);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: .5rem;
  line-height: 1.1;
}

.brand-subtitle {
  font-size: .95rem;
  color: #94a3b8;
  font-weight: 400;
  letter-spacing: .3px;
}

/* ---------- RIGHT FORM PANEL ---------- */
.login-form-side {
  flex: 1 1 55%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 420px;
  animation: loginFadeUp 0.7s ease 0.15s both;
}

.login-card-header {
  text-align: center;
  margin-bottom: 2rem;
}
.login-card-header h2 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: .35rem;
}
.login-card-header p {
  font-size: .9rem;
  color: var(--muted);
}

/* Form card body */
.form-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2rem 2rem 1.6rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.form-body::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--brand), var(--gold));
}

/* Form groups */
.form-group {
  margin-bottom: 1.3rem;
}
.form-group label {
  display: block;
  font-size: .78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .6px;
  color: var(--ink-soft);
  margin-bottom: .4rem;
}

.input-group {
  display: flex;
  align-items: stretch;
}
.input-group-text {
  display: flex;
  align-items: center;
  padding: 0 .85rem;
  font-size: .9rem;
  color: var(--muted);
  background: #f8fafc;
  border: 1px solid var(--line);
  border-right: none;
  border-radius: 12px 0 0 12px;
}
.form-control {
  flex: 1;
  padding: .72rem .85rem;
  font-size: .92rem;
  font-family: var(--font);
  color: var(--ink);
  background: #fbfbfe;
  border: 1px solid var(--line);
  border-radius: 0 12px 12px 0;
  transition: all .2s ease;
  outline: none;
}
.form-control:focus {
  border-color: var(--brand);
  box-shadow: var(--ring);
  background: #fff;
}
.form-control.is-invalid {
  border-color: var(--rose);
}
.form-control.is-invalid:focus {
  box-shadow: 0 0 0 4px rgba(225,29,72,.14);
}

/* Remember me */
.remember-row {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1.2rem 0 1.5rem;
}
.remember-row input[type="checkbox"] {
  appearance: none;
  width: 18px;
  height: 18px;
  border: 2px solid #cbd5e1;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: all .15s ease;
  flex-shrink: 0;
}
.remember-row input[type="checkbox"]:checked {
  background: var(--brand);
  border-color: var(--brand);
}
.remember-row input[type="checkbox"]:checked::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
}
.remember-row label {
  font-size: .85rem;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
}

/* Submit button */
.btn-login {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .85rem;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  font-family: var(--font);
  color: #fff;
  cursor: pointer;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-2) 60%, #818cf8 100%);
  box-shadow: 0 10px 24px -10px rgba(79,70,229,.65);
  transition: all .25s ease;
  letter-spacing: .3px;
}
.btn-login:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px -12px rgba(79,70,229,.75);
}
.btn-login:active {
  transform: translateY(0);
  box-shadow: 0 8px 18px -8px rgba(79,70,229,.5);
}

/* Alerts */
.alert {
  border-radius: 12px;
  padding: .85rem 1rem;
  margin-bottom: 1.2rem;
  font-size: .85rem;
  line-height: 1.45;
  border: 1px solid transparent;
  animation: loginFadeUp 0.3s ease;
}
.alert ul { margin: .3rem 0 0; padding-left: 1.2rem; }
.alert li { margin-bottom: .15rem; }
.alert-danger {
  color: #991b1b;
  background: #fef2f2;
  border-color: #fecaca;
}
.alert-success {
  color: #065f46;
  background: #ecfdf5;
  border-color: #a7f3d0;
}

/* Footer */
.login-footer {
  text-align: center;
  margin-top: 1.5rem;
}
.login-footer small {
  font-size: .78rem;
  color: var(--muted);
}

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
  .login-page {
    flex-direction: column;
    min-height: 100vh;
  }
  .login-brand {
    flex: 0 0 auto;
    min-height: 220px;
    padding: 2rem 1rem;
  }
  .brand-icon {
    width: 64px;
    height: 64px;
    border-radius: 18px;
    font-size: 1.6rem;
    margin-bottom: 1rem;
  }
  .brand-name {
    font-size: 2rem;
  }
  .brand-subtitle {
    font-size: .82rem;
  }
  .brand-wave {
    height: 60px;
  }
  .login-form-side {
    flex: 1 1 auto;
    padding: 1.5rem;
  }
  .form-body {
    padding: 1.5rem;
  }
}
