/* ============================================
   login.css
   Styles specific to the login page.
   Requires: variables.css loaded first.
   ============================================ */

body.login-page {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

/* ── Left Panel ── */
.panel-left {
  flex: 1;
  background-color: var(--dark);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  padding: 60px 56px;
  position: relative;
  overflow: hidden;
}

/* Diagonal red wash */
.panel-left::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--red) 0%, transparent 45%);
  opacity: 0.18;
  pointer-events: none;
}

/* Gold rule on right edge */
.panel-left::after {
  content: '';
  position: absolute;
  top: 0; right: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(to bottom, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
}

/* Subtle grid texture overlay */
.grid-texture {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(201,168,76,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201,168,76,0.04) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

.tail-number {
  font-family: var(--font-display);
  font-size: clamp(52px, 7vw, 88px);
  color: var(--white);
  letter-spacing: 0.06em;
  line-height: 1;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.7s ease both;
}

.tail-number span {
  color: var(--red);
}

.plane-label {
  font-size: 13px;
  font-weight: 300;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-top: 10px;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.7s 0.1s ease both;
}

.panel-left .divider-gold {
  margin: 28px 0;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.7s 0.2s ease both;
}

.tagline {
  font-size: 14px;
  font-weight: 300;
  color: rgba(255,255,255,0.5);
  line-height: 1.7;
  max-width: 260px;
  position: relative;
  z-index: 1;
  animation: fadeUp 0.7s 0.3s ease both;
}

.plane-silhouette {
  position: absolute;
  bottom: -10px;
  right: -30px;
  width: 340px;
  opacity: 0.06;
  pointer-events: none;
  z-index: 0;
  animation: slideIn 1s 0.4s ease both;
}

/* ── Right Panel ── */
.panel-right {
  width: 460px;
  flex-shrink: 0;
  background: var(--white);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 60px 48px;
  position: relative;
}

/* Red-to-gold top stripe */
.panel-right::before {
  content: '';
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 4px;
  background: linear-gradient(to right, var(--red) 60%, var(--gold) 100%);
}

.sign-in-heading {
  font-family: var(--font-display);
  font-size: 36px;
  letter-spacing: 0.08em;
  color: var(--dark);
  margin-bottom: 6px;
  animation: fadeUp 0.6s 0.2s ease both;
}

.sign-in-sub {
  font-size: 13px;
  font-weight: 300;
  color: var(--mid);
  letter-spacing: 0.02em;
  margin-bottom: 36px;
  animation: fadeUp 0.6s 0.3s ease both;
}

/* ── Form elements ── */
.form-group {
  margin-bottom: 20px;
  animation: fadeUp 0.6s ease both;
}

.form-group:nth-child(1) { animation-delay: 0.35s; }
.form-group:nth-child(2) { animation-delay: 0.45s; }

.form-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--mid);
  margin-bottom: 7px;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--light);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 15px;
  color: var(--dark);
  background: var(--panel-bg);
  transition: border-color 0.2s, box-shadow 0.2s;
  outline: none;
}

.form-control:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200,16,46,0.08);
  background: #fff;
}

.form-control::placeholder {
  color: #C0BBB5;
}

/* ── Submit button ── */
.btn-signin {
  width: 100%;
  padding: 13px;
  background: var(--red);
  color: #fff;
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-display);
  font-size: 18px;
  letter-spacing: 0.12em;
  cursor: pointer;
  margin-top: 8px;
  position: relative;
  overflow: hidden;
  transition: background 0.2s, transform 0.1s;
  animation: fadeUp 0.6s 0.55s ease both;
}

/* Gold underline on hover */
.btn-signin::after {
  content: '';
  position: absolute;
  bottom: 0; left: 0;
  width: 100%; height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s ease;
}

.btn-signin:hover              { background: var(--red-dark); transform: translateY(-1px); }
.btn-signin:hover::after       { transform: scaleX(1); }
.btn-signin:active             { transform: translateY(0); }
.btn-signin:disabled           { opacity: 0.7; cursor: not-allowed; transform: none; }

/* ── Error message ── */
.error-msg {
  display: none;
  font-size: 13px;
  color: var(--red);
  margin-top: 12px;
  padding: 10px 14px;
  background: rgba(200,16,46,0.06);
  border-left: 3px solid var(--red);
  border-radius: 2px;
  animation: fadeUp 0.3s ease both;
}

/* ── Loading spinner ── */
.loading-spinner {
  display: none;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.4);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  margin: 0 auto;
}

/* ── Footer note ── */
.footer-note {
  margin-top: 32px;
  font-size: 12px;
  color: #B0AAA4;
  text-align: center;
  letter-spacing: 0.02em;
  animation: fadeUp 0.6s 0.65s ease both;
}

.footer-note a {
  color: var(--gold);
  text-decoration: none;
}

.footer-note a:hover {
  text-decoration: underline;
}

/* ── Mobile ── */
@media (max-width: 768px) {
  body.login-page {
    flex-direction: column;
  }

  .panel-left {
    padding: 40px 32px 36px;
    flex: none;
  }

  .panel-left::after {
    /* Replace vertical gold rule with a horizontal bottom border */
    top: auto;
    right: 0;
    bottom: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(to right, transparent 0%, var(--gold) 30%, var(--gold) 70%, transparent 100%);
  }

  .plane-silhouette {
    display: none;
  }

  .tail-number {
    font-size: 56px;
  }

  .panel-right {
    width: 100%;
    padding: 40px 28px 48px;
  }

  .panel-right::before {
    height: 3px;
  }
}
