/* auth.css - Premium Light Background / Red Card Login */
:root {
  --primary-red: #dc2626;        /* Exact red from admin.pcbsdb */
  --primary-red-hover: #b91c1c;  /* Red hover color */
  --bg-light: #f8fafc;           /* Light slate background */
  
  --card-bg: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%); /* Red Card background */
  --text-primary: #ffffff;       /* White text on red card */
  --text-secondary: #fecdd3;     /* Light pink/rose secondary text */
  
  --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}

body {
  background: radial-gradient(circle at 10% 20%, rgba(220, 38, 38, 0.06) 0%, transparent 45%),
              radial-gradient(circle at 90% 80%, rgba(220, 38, 38, 0.04) 0%, transparent 45%),
              var(--bg-light);
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1rem;
  overflow: hidden;
  position: relative;
}

/* Subtle background glowing mesh circles */
body::before, body::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  filter: blur(120px);
  z-index: 0;
  pointer-events: none;
}
body::before {
  width: 400px;
  height: 400px;
  background: rgba(220, 38, 38, 0.05);
  top: 15%;
  left: 20%;
  transform: translate(-50%, -50%);
}
body::after {
  width: 500px;
  height: 500px;
  background: rgba(220, 38, 38, 0.03);
  bottom: 10%;
  right: 15%;
  transform: translate(50%, 50%);
}

.login-container {
  width: 100%;
  max-width: 460px;
  z-index: 1;
  animation: fadeIn 0.8s ease-out;
}

.login-card {
  background: var(--card-bg);
  border: 1px solid rgba(220, 38, 38, 0.1);
  border-radius: 1.5rem;
  box-shadow: 
    0 20px 40px rgba(220, 38, 38, 0.18),
    0 1px 3px rgba(0, 0, 0, 0.05);
  padding: 3rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.branding {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  width: 180px;
  height: auto;
  margin-bottom: 1.25rem;
  filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.15));
  transition: transform 0.3s ease;
}
.logo:hover {
  transform: scale(1.05);
}

.brand-text h1 {
  color: var(--text-primary);
  font-size: 1.6rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  margin-bottom: 0.35rem;
}

.brand-text p {
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Form Styles */
.input-field {
  position: relative;
  margin-bottom: 1.75rem;
}

.input-icon {
  position: absolute;
  left: 1.25rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  fill: #94a3b8;
  transition: var(--transition);
  pointer-events: none;
  z-index: 2;
}

.input-field input {
  width: 100%;
  padding: 1.1rem 1rem 1.1rem 3.25rem;
  border: 1.5px solid transparent;
  border-radius: 0.85rem;
  font-size: 0.95rem;
  background: #ffffff;
  color: #1e293b;
  outline: none;
  transition: var(--transition);
}

.input-field input::placeholder {
  color: transparent;
}

.input-field label {
  position: absolute;
  left: 3.25rem;
  top: 50%;
  transform: translateY(-50%);
  color: #94a3b8;
  pointer-events: none;
  font-size: 0.95rem;
  transition: var(--transition);
}

/* Focus and input states */
.input-field input:focus {
  border-color: #ffffff;
  background: #ffffff;
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.25);
}

.input-field input:focus ~ .input-icon {
  fill: var(--primary-red);
}

.input-field input:focus ~ label,
.input-field input:not(:placeholder-shown) ~ label,
.input-field input:-webkit-autofill ~ label {
  transform: translateY(-230%) scale(0.8);
  transform-origin: left top;
  color: #ffffff;
  font-weight: 600;
}

/* Webkit Autofill Overrides */
.input-field input:-webkit-autofill,
.input-field input:-webkit-autofill:hover,
.input-field input:-webkit-autofill:focus,
.input-field input:-webkit-autofill:active {
  -webkit-box-shadow: 0 0 0 100px #ffffff inset !important;
  -webkit-text-fill-color: #1e293b !important;
  border-color: #ffffff;
  transition: background-color 5000s ease-in-out 0s;
}

.primary-button {
  width: 100%;
  padding: 1.1rem;
  background: #ffffff;
  color: var(--primary-red);
  border: none;
  border-radius: 0.85rem;
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
  transition: var(--transition);
}

.primary-button:hover {
  background: #f8fafc;
  color: var(--primary-red-hover);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
  transform: translateY(-2px);
}
.primary-button:active {
  transform: translateY(0);
}

.button-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
}

/* Alert styling */
.alert {
  padding: 1rem 1.25rem;
  background: rgba(255, 255, 255, 0.18);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #ffffff;
  border-radius: 0.85rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.75rem;
  font-size: 0.875rem;
  animation: shake 0.5s ease-in-out;
}

.alert-icon {
  width: 20px;
  height: 20px;
  fill: currentColor;
  flex-shrink: 0;
}

.footer {
  text-align: center;
  margin-top: 2.25rem;
  color: #64748b; /* Slate 500 for high contrast on light background */
  font-size: 0.8rem;
  font-weight: 500;
  line-height: 1.5;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes shake {
  0%, 100% { transform: translateX(0); }
  20%, 60% { transform: translateX(-6px); }
  40%, 80% { transform: translateX(6px); }
}

@media (max-width: 480px) {
  .login-card {
    padding: 2.25rem 1.5rem;
  }
  .brand-text h1 {
    font-size: 1.4rem;
  }
}