/*
 * auth.css - Shared styling for the sign-in and password pages.
 *
 * Extracted from login.html, which carried all of it inline. Five pages
 * now share this look (sign in, change, forgot, verify, reset), and
 * duplicating ~290 lines five times was not an option.
 */

:root {
  --df-primary: #194c5e;
  --df-white: #ffffff;
  --df-light-bg: #f0f4f8;
  --df-border: #e0e7f0;
  --df-text: #1f2937;
  --df-text-muted: #6b7280;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
  height: 100%;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  background-image: url('https://endimoanalytics.com/wp-content/uploads/2019/06/scm2.jpeg?w=1440');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

}

.login-wrapper {
  display: flex;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.login-container {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  background: var(--df-white);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  width: 100%;
}

/* ── Left panel ─────────────────────────────────────────── */
.login-panel-left {
  background: linear-gradient(135deg, var(--df-primary) 0%, #0f3844 100%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 3rem;
  position: relative;
  overflow: hidden;
  color: var(--df-white);
}

.login-panel-left::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 80% 60% at 20% 110%, rgba(255,255,255,.15) 0%, transparent 70%),
    radial-gradient(ellipse 60% 50% at 90% -10%,  rgba(255,255,255,.1) 0%, transparent 65%);
  pointer-events: none;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  text-decoration: none;
  position: relative;
  z-index: 1;
  cursor: pointer;
}

.login-brand-icon {
  width: 2.75rem;
  height: 2.75rem;
  background: rgba(255, 255, 255, 0.2);
  border-radius: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  color: var(--df-white);
  flex-shrink: 0;
}

.login-brand-name {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--df-white);
  letter-spacing: -.02em;
}

.login-panel-tagline {
  position: relative;
  z-index: 1;
  margin: 2rem 0;
}

.login-panel-tagline h2 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--df-white);
  line-height: 1.25;
  margin-bottom: 1rem;
}

.login-panel-tagline p {
  color: rgba(255, 255, 255, 0.7);
  font-size: .95rem;
  line-height: 1.6;
  margin: 0;
}

.login-panel-footer {
  position: relative;
  z-index: 1;
  color: rgba(255, 255, 255, 0.4);
  font-size: .8rem;
}

/* ── Right panel ────────────────────────────────────────── */
.login-panel-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 2rem;
  background: var(--df-white);
}

.login-card {
  width: 100%;
  max-width: 380px;
}

.login-card h1 {
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--df-text);
  margin-bottom: .35rem;
}

.login-card .subtitle {
  color: var(--df-text-muted);
  font-size: .9rem;
  margin-bottom: 2rem;
}

.form-label {
  font-weight: 600;
  font-size: .825rem;
  color: var(--df-text);
  margin-bottom: .4rem;
}

.form-control {
  border-radius: .5rem;
  border: 1.5px solid var(--df-border);
  padding: .65rem 1rem;
  font-size: .9rem;
  transition: border-color .2s, box-shadow .2s;
  color: var(--df-text);
}

.form-control::placeholder {
  color: var(--df-text-muted);
}

.form-control:focus {
  border-color: var(--df-primary);
  box-shadow: 0 0 0 3px rgba(25, 76, 94, 0.1);
  outline: none;
}

.input-group-text {
  border-radius: .5rem 0 0 .5rem;
  border: 1.5px solid var(--df-border);
  border-right: none;
  background: var(--df-light-bg);
  color: var(--df-text-muted);
}

.input-group .form-control {
  border-radius: 0 .5rem .5rem 0;
}

.btn-login {
  width: 100%;
  padding: .75rem;
  font-size: .95rem;
  font-weight: 600;
  border-radius: .5rem;
  background: var(--df-primary);
  border: none;
  color: var(--df-white);
  margin-top: 1rem;
  cursor: pointer;
  transition: background .2s, transform .1s, box-shadow .2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}

.btn-login:hover:not(:disabled) {
  background: #0f3844;
  box-shadow: 0 4px 16px rgba(25, 76, 94, 0.35);
}

.btn-login:active:not(:disabled) {
  transform: scale(.98);
}

.btn-login:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.alert {
  border-radius: .5rem;
  padding: .75rem 1rem;
  margin-bottom: 1rem;
  font-size: .9rem;
}

.alert-danger {
  background-color: #fee;
  color: #c33;
  border: 1px solid #fcc;
}

.checkbox-group {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: 1rem 0;
}

.form-check-input {
  width: 1rem;
  height: 1rem;
  cursor: pointer;
  accent-color: var(--df-primary);
}

.form-check-label {
  color: var(--df-text-muted);
  font-size: .875rem;
  cursor: pointer;
  margin: 0;
}

/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
  .login-container {
    grid-template-columns: 1fr;
  }

  .login-panel-left {
    display: none;
  }

  .login-panel-right {
    padding: 2rem 1.5rem;
  }

  .login-card {
    max-width: 100%;
  }
}

/* Eye icon button */
.btn-toggle-pass {
  background: transparent;
  border: 1.5px solid var(--df-border);
  border-left: none;
  border-radius: 0 .5rem .5rem 0;
  padding: .65rem 1rem;
  cursor: pointer;
  color: var(--df-text-muted);
  transition: color .2s;
}

.btn-toggle-pass:hover {
  color: var(--df-primary);
}

/* ---------------------------------------------------------------
   Additions for the password pages, which login.html never needed.
   --------------------------------------------------------------- */

.alert-success {
  background-color: #e8f5ec;
  color: #1a7f45;
  border: 1px solid #b8e0c6;
}

.alert-info {
  background-color: #e8f1f7;
  color: #1c5e80;
  border: 1px solid #b9d7e8;
}

.alert-warning {
  background-color: #fdf4e3;
  color: #8a6116;
  border: 1px solid #f0dcaf;
}

/* A single-field page (verify code, forgot password) needs less room
   than the two-column sign-in card. */
.auth-narrow .login-container {
  max-width: 520px;
  grid-template-columns: 1fr;
}

.auth-narrow .login-panel-left {
  display: none;
}

.auth-link {
  display: inline-block;
  margin-top: 1rem;
  color: var(--df-primary);
  font-size: .875rem;
  text-decoration: none;
}

.auth-link:hover {
  text-decoration: underline;
}

.auth-forgot {
  display: block;
  text-align: right;
  margin-top: .4rem;
  font-size: .8rem;
  color: var(--df-text-muted);
  text-decoration: none;
}

.auth-forgot:hover {
  color: var(--df-primary);
}

/* The six-digit code: wide tracking makes the digits easy to check
   against the email. */
.code-input {
  text-align: center;
  font-size: 1.6rem;
  letter-spacing: .6em;
  text-indent: .6em;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.auth-hint {
  color: var(--df-text-muted);
  font-size: .85rem;
  line-height: 1.5;
  margin-bottom: 1.25rem;
}

.password-rules {
  color: var(--df-text-muted);
  font-size: .8rem;
  margin-top: .35rem;
}
