:root {
  --login-bg: #020712;
  --panel-bg: rgba(15, 23, 42, 0.55);
  --panel-border: rgba(255, 255, 255, 0.16);
  --panel-border-strong: rgba(255, 255, 255, 0.28);
  --text-main: #f8fafc;
  --text-muted: #cbd5e1;
  --text-dim: #94a3b8;
  --accent: #38bdf8;
  --accent-strong: #0284c7;
  --accent-soft: rgba(56, 189, 248, 0.16);
  --accent-border: rgba(56, 189, 248, 0.4);
  --button-text: #ffffff;
  --support: #10d979;
  --support-soft: rgba(16, 217, 121, 0.14);
  --support-border: rgba(16, 217, 121, 0.35);
  --warning: #fbbf24;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  padding: 0;
}

body.login-shell-body {
  min-height: 100vh;
  min-height: 100svh;
  background: var(--login-bg);
  color: var(--text-main);
  font-family: Inter, "Segoe UI", sans-serif;
  overflow-x: hidden;
}

button,
input,
select {
  font: inherit;
}

/* Background Specs - Construction Excavator Image with transparent glass glow */
.login-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100svh;
  width: 100%;
  padding: 24px 16px;
  isolation: isolate;
  overflow: hidden;
  background-image:
    radial-gradient(ellipse at 50% 50%, rgba(15, 23, 42, 0.15) 0%, rgba(2, 6, 15, 0.42) 100%),
    linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.25)),
    url("/uploads/excavator.jpeg");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

.login-card-wrapper {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 480px;
  z-index: 1;
}

/* Premium Transparent Glassmorphism Card */
.auth-panel {
  width: 100%;
  padding: 42px 38px 34px;
  border: 1.5px solid rgba(255, 255, 255, 0.24);
  border-radius: 24px;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.38) 0%, rgba(10, 18, 38, 0.48) 100%);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  box-shadow:
    0 32px 64px -12px rgba(0, 0, 0, 0.65),
    0 0 0 1px rgba(255, 255, 255, 0.12) inset,
    0 1px 0 rgba(255, 255, 255, 0.38) inset,
    0 0 36px rgba(56, 189, 248, 0.12);
  text-align: center;
  position: relative;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.logo-header {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 24px;
}

/* Larger, High-Impact Logo */
.login-logo-img {
  height: 72px;
  max-height: 72px;
  max-width: 280px;
  object-fit: contain;
  filter: drop-shadow(0 6px 20px rgba(0, 0, 0, 0.6)) drop-shadow(0 0 16px rgba(56, 189, 248, 0.25));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.login-logo-img:hover {
  transform: scale(1.03);
}

.auth-title {
  margin: 0;
  color: #ffffff;
  font-family: Outfit, Inter, sans-serif;
  font-size: 28px;
  font-weight: 900;
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.75);
}

.auth-subtitle {
  margin: 8px 0 26px;
  color: #f1f5f9;
  font-size: 14.5px;
  line-height: 1.45;
  font-weight: 500;
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.6);
}

.flash-stack {
  display: grid;
  gap: 10px;
  margin-bottom: 20px;
}

.flash-message {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 11px 16px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  border-radius: 12px;
  background: rgba(127, 29, 29, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fecaca;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.auth-form {
  display: grid;
  gap: 20px;
  text-align: left;
}

.field-label {
  display: block;
  margin: 0 0 8px;
  color: #f8fafc;
  font-size: 11.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.field-control {
  position: relative;
}

.field-icon,
.field-action {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
}

.field-icon {
  left: 16px;
  color: #38bdf8;
  font-size: 15px;
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(56, 189, 248, 0.5));
}

.login-input {
  width: 100%;
  height: 50px;
  padding: 0 48px 0 48px;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  border-radius: 12px;
  outline: none;
  background: rgba(15, 23, 42, 0.40);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  color: #ffffff;
  font-size: 14.5px;
  font-weight: 600;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  transition: all 0.2s ease;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3), 0 2px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
}

.login-input::placeholder {
  color: #cbd5e1;
  opacity: 0.8;
  font-weight: 500;
}

.login-input:focus {
  border-color: rgba(56, 189, 248, 0.9);
  background: rgba(15, 23, 42, 0.65);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.28), inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Chrome/Safari/Edge Autofill Override to prevent bright white/blue boxes */
.login-input:-webkit-autofill,
.login-input:-webkit-autofill:hover, 
.login-input:-webkit-autofill:focus, 
.login-input:-webkit-autofill:active {
  -webkit-text-fill-color: #ffffff !important;
  caret-color: #ffffff !important;
  -webkit-box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.70) inset !important;
  box-shadow: 0 0 0 1000px rgba(15, 23, 42, 0.70) inset !important;
  border-color: rgba(56, 189, 248, 0.65) !important;
  transition: background-color 5000s ease-in-out 0s;
  font-family: inherit !important;
  font-size: 14.5px !important;
  font-weight: 600 !important;
}

.field-action {
  right: 8px;
  display: inline-flex;
  width: 36px;
  height: 36px;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: #cbd5e1;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}

.field-action:hover,
.field-action:focus-visible {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.primary-action {
  display: inline-flex;
  width: 100%;
  height: 50px;
  min-height: 50px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 6px;
  border: 0;
  border-radius: 12px;
  background: linear-gradient(135deg, #0284c7 0%, #2563eb 50%, #3b82f6 100%);
  color: #ffffff;
  cursor: pointer;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  box-shadow: 0 8px 24px rgba(37, 99, 235, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.35);
  transition: all 0.2s ease;
}

.primary-action:hover,
.primary-action:focus-visible {
  filter: brightness(1.12);
  box-shadow: 0 12px 32px rgba(37, 99, 235, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.45);
  transform: translateY(-1.5px);
}

.primary-action:active {
  transform: translateY(1px);
}

.support-card {
  margin-top: 24px;
  padding: 16px 14px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.36);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  text-align: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1), 0 4px 16px rgba(0, 0, 0, 0.2);
}

.support-text {
  margin: 0 0 10px;
  color: #fde047;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.01em;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.6);
}

.whatsapp-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 1px solid rgba(16, 185, 129, 0.45);
  border-radius: 10px;
  background: rgba(16, 185, 129, 0.18);
  color: #4ade80;
  font-size: 13.5px;
  font-weight: 800;
  text-decoration: none;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.2s ease;
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.2);
}

.whatsapp-action:hover {
  background: rgba(16, 185, 129, 0.3);
  border-color: rgba(74, 222, 128, 0.7);
  color: #86efac;
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.35);
  transform: translateY(-1px);
}

.auth-footer {
  margin-top: 22px;
  color: #e2e8f0;
  font-size: 12px;
  text-align: center;
  font-weight: 600;
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.7);
}

@media (max-width: 480px) {
  .login-page {
    padding: max(16px, env(safe-area-inset-top)) max(12px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(12px, env(safe-area-inset-left));
  }
  .auth-panel {
    padding: 28px 18px 22px;
    border-radius: 18px;
  }
  .login-logo-img {
    height: 52px;
    max-height: 52px;
  }
  .auth-title {
    font-size: 22px;
  }
  .auth-subtitle {
    font-size: 13px;
    margin-bottom: 20px;
  }
  .input-field {
    height: 44px;
    font-size: 15px;
  }
  .btn-submit {
    height: 44px;
    font-size: 15px;
  }
}

@media (max-width: 360px) {
  .auth-panel {
    padding: 22px 14px 18px;
  }
  .auth-title {
    font-size: 20px;
  }
}
