/* ============================================
   login.css – Transport Admin Login Page
   ============================================ */

/* ----- RESET & BASE ----- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background: #0b1e33;
  color: #0b1e33;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ============================================
   LOGIN WRAPPER
   ============================================ */
.login-wrapper {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 100vh;
  width: 100%;
}

/* ============================================
   LEFT PANEL – BRANDING
   ============================================ */
.login-brand-panel {
  position: relative;
  background: linear-gradient(135deg, #0b1e33 0%, #142c47 60%, #1a3a5c 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 70px;
  overflow: hidden;
}

.brand-panel-content {
  position: relative;
  z-index: 2;
  max-width: 480px;
  width: 100%;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  gap: 40px;
}

/* Brand Logo */
.brand-logo {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-logo-icon {
  background: #1e88e5;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  color: #ffffff;
  box-shadow: 0 12px 28px -8px rgba(30, 136, 229, 0.6);
  flex-shrink: 0;
}

.brand-logo-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}

.brand-logo-main {
  font-weight: 700;
  font-size: 1.4rem;
  letter-spacing: -0.5px;
  color: #ffffff;
}

.brand-logo-sub {
  font-size: 0.72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: #8ba3c7;
}

/* Hero Section */
.brand-hero h1 {
  font-size: 2.5rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -1px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, #ffffff 0%, #b9d5f5 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.brand-hero p {
  font-size: 1rem;
  line-height: 1.65;
  color: #a9c1dc;
  font-weight: 400;
}

/* Features */
.brand-features {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.feature-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 12px;
  backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.feature-item:hover {
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(30, 136, 229, 0.3);
  transform: translateX(4px);
}

.feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: rgba(30, 136, 229, 0.15);
  border: 1px solid rgba(30, 136, 229, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  color: #4ea6f0;
  flex-shrink: 0;
}

.feature-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.feature-text strong {
  font-size: 0.9rem;
  font-weight: 600;
  color: #ffffff;
}

.feature-text span {
  font-size: 0.78rem;
  color: #8ba3c7;
  font-weight: 400;
}

/* Footer */
.brand-footer p {
  font-size: 0.78rem;
  color: #6f8aa8;
}

/* Decorative Background Elements */
.brand-bg-circle {
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.circle-1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(30, 136, 229, 0.18) 0%, transparent 70%);
  top: -100px;
  right: -150px;
  animation: float 8s ease-in-out infinite;
}

.circle-2 {
  width: 300px;
  height: 300px;
  background: radial-gradient(circle, rgba(30, 136, 229, 0.12) 0%, transparent 70%);
  bottom: -80px;
  left: -80px;
  animation: float 10s ease-in-out infinite reverse;
}

.circle-3 {
  width: 180px;
  height: 180px;
  background: radial-gradient(circle, rgba(78, 166, 240, 0.15) 0%, transparent 70%);
  top: 40%;
  right: 10%;
  animation: float 12s ease-in-out infinite;
}

@keyframes float {
  0%, 100% { transform: translateY(0) scale(1); }
  50%      { transform: translateY(-20px) scale(1.05); }
}

.brand-bg-pattern {
  position: absolute;
  inset: 0;
  background-image: 
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 50px 50px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

/* ============================================
   RIGHT PANEL – LOGIN FORM
   ============================================ */
.login-form-panel {
  background: #f4f7fc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 60px;
  position: relative;
}

.login-form-container {
  width: 100%;
  max-width: 420px;
}

/* Form Header */
.form-header {
  margin-bottom: 32px;
  text-align: left;
}

.form-header-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  margin-bottom: 22px;
  box-shadow: 0 12px 24px -8px rgba(30, 136, 229, 0.5);
}

.form-header h2 {
  font-size: 1.85rem;
  font-weight: 700;
  color: #0b1e33;
  letter-spacing: -0.5px;
  margin-bottom: 8px;
}

.form-header p {
  font-size: 0.92rem;
  color: #6a7e96;
  line-height: 1.5;
}

/* ============================================
   ALERTS
   ============================================ */
.login-alert {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 12px;
  margin-bottom: 22px;
  font-size: 0.88rem;
  font-weight: 500;
  animation: shakeIn 0.4s ease;
}

@keyframes shakeIn {
  0%   { opacity: 0; transform: translateX(-8px); }
  100% { opacity: 1; transform: translateX(0); }
}

.login-alert i {
  font-size: 1.1rem;
  flex-shrink: 0;
}

.login-alert-error {
  background: #ffebee;
  color: #b71c1c;
  border-left: 4px solid #e53935;
}

.login-alert-error i {
  color: #e53935;
}

.login-alert-success {
  background: #e8f5e9;
  color: #1b5e20;
  border-left: 4px solid #43a047;
}

.login-alert-success i {
  color: #43a047;
}

/* ============================================
   FORM
   ============================================ */
.login-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.input-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.input-group label {
  font-size: 0.85rem;
  font-weight: 600;
  color: #2d4258;
  letter-spacing: -0.1px;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 16px;
  color: #8499af;
  font-size: 0.95rem;
  transition: color 0.2s ease;
  pointer-events: none;
}

.input-wrapper input {
  width: 100%;
  padding: 14px 16px 14px 46px;
  font-family: inherit;
  font-size: 0.92rem;
  color: #0b1e33;
  background: #ffffff;
  border: 1.5px solid #dbe4ee;
  border-radius: 12px;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrapper input::placeholder {
  color: #a0b1c5;
  font-weight: 400;
}

.input-wrapper input:hover {
  border-color: #c2d2e2;
}

.input-wrapper input:focus {
  border-color: #1e88e5;
  box-shadow: 0 0 0 4px rgba(30, 136, 229, 0.12);
}

.input-wrapper input:focus ~ .input-icon,
.input-wrapper input:focus + .input-icon {
  color: #1e88e5;
}

/* Password toggle */
.toggle-password {
  position: absolute;
  right: 10px;
  background: transparent;
  border: none;
  color: #8499af;
  font-size: 0.95rem;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  transition: background 0.2s, color 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
}

.toggle-password:hover {
  background: #eef4fb;
  color: #1e88e5;
}

/* Forgot password input padding adjust when toggle is present */
.input-group:has(.toggle-password) .input-wrapper input {
  padding-right: 46px;
}

/* ============================================
   FORM OPTIONS
   ============================================ */
.form-options {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: -4px;
  flex-wrap: wrap;
  gap: 8px;
}

.remember-me {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  user-select: none;
  position: relative;
  font-size: 0.85rem;
  color: #4b5e74;
  font-weight: 500;
}

.remember-me input {
  position: absolute;
  opacity: 0;
  cursor: pointer;
  height: 0;
  width: 0;
}

.checkmark {
  width: 18px;
  height: 18px;
  background: #ffffff;
  border: 1.5px solid #c2d2e2;
  border-radius: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.remember-me:hover .checkmark {
  border-color: #1e88e5;
}

.remember-me input:checked ~ .checkmark {
  background: #1e88e5;
  border-color: #1e88e5;
}

.remember-me input:checked ~ .checkmark::after {
  content: '';
  width: 5px;
  height: 9px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg) translate(-1px, -1px);
}

.remember-label {
  font-size: 0.85rem;
  color: #4b5e74;
}

.forgot-link {
  font-size: 0.85rem;
  color: #1e88e5;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s;
}

.forgot-link:hover {
  color: #1565c0;
  text-decoration: underline;
}

/* ============================================
   LOGIN BUTTON
   ============================================ */
.login-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 15px 24px;
  font-family: inherit;
  font-size: 0.95rem;
  font-weight: 600;
  color: #ffffff;
  background: linear-gradient(135deg, #1e88e5 0%, #1565c0 100%);
  border: none;
  border-radius: 12px;
  cursor: pointer;
  box-shadow: 0 10px 24px -8px rgba(30, 136, 229, 0.6);
  transition: all 0.25s ease;
  letter-spacing: 0.2px;
  margin-top: 4px;
}

.login-btn i {
  font-size: 0.9rem;
  transition: transform 0.25s ease;
}

.login-btn:hover {
  background: linear-gradient(135deg, #2196f3 0%, #1976d2 100%);
  box-shadow: 0 14px 28px -8px rgba(30, 136, 229, 0.75);
  transform: translateY(-1px);
}

.login-btn:hover i {
  transform: translateX(3px);
}

.login-btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 16px -6px rgba(30, 136, 229, 0.6);
}

/* ============================================
   FORM DIVIDER & SECURITY NOTE
   ============================================ */
.form-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 28px 0 20px;
  color: #a0b1c5;
}

.form-divider::before,
.form-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #dbe4ee;
}

.form-divider span {
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: #8499af;
}

.security-note {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  background: #eaf4ff;
  border: 1px solid #cfe5fa;
  border-radius: 10px;
}

.security-note i {
  color: #1e88e5;
  font-size: 1.1rem;
  flex-shrink: 0;
}

.security-note p {
  font-size: 0.78rem;
  color: #4b5e74;
  line-height: 1.4;
}

.security-note strong {
  color: #0b1e33;
  font-weight: 600;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large tablet */
@media (max-width: 1100px) {
  .login-brand-panel {
    padding: 50px 40px;
  }
  .brand-hero h1 {
    font-size: 2rem;
  }
  .login-form-panel {
    padding: 40px 40px;
  }
}

/* Tablet / small laptop */
@media (max-width: 900px) {
  .login-wrapper {
    grid-template-columns: 1fr;
  }
  .login-brand-panel {
    padding: 50px 30px 40px;
    min-height: auto;
  }
  .brand-panel-content {
    gap: 28px;
  }
  .brand-hero h1 {
    font-size: 1.9rem;
  }
  .brand-features {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
  }
  .feature-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 14px;
  }
  .feature-text strong {
    font-size: 0.82rem;
  }
  .feature-text span {
    font-size: 0.72rem;
  }
  .login-form-panel {
    padding: 50px 30px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .login-brand-panel {
    padding: 36px 22px 30px;
  }
  .brand-logo-icon {
    width: 44px;
    height: 44px;
    font-size: 1.3rem;
  }
  .brand-logo-main {
    font-size: 1.15rem;
  }
  .brand-hero h1 {
    font-size: 1.6rem;
    letter-spacing: -0.5px;
  }
  .brand-hero p {
    font-size: 0.88rem;
  }
  .brand-features {
    grid-template-columns: 1fr;
  }
  .feature-item {
    flex-direction: row;
    align-items: center;
    padding: 12px 14px;
  }
  .feature-icon {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .login-form-panel {
    padding: 36px 22px;
  }
  .form-header h2 {
    font-size: 1.55rem;
  }
  .form-header-icon {
    width: 48px;
    height: 48px;
    font-size: 1.2rem;
    margin-bottom: 18px;
  }
  .form-options {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
}

/* Very small screens */
@media (max-width: 380px) {
  .brand-hero h1 {
    font-size: 1.4rem;
  }
  .form-header h2 {
    font-size: 1.35rem;
  }
  .input-wrapper input {
    padding: 12px 14px 12px 42px;
    font-size: 0.88rem;
  }
  .input-icon {
    left: 14px;
    font-size: 0.88rem;
  }
  .login-btn {
    padding: 13px 20px;
    font-size: 0.9rem;
  }
}