/* auth.css */
:root {
  --primary: #dc2626;        /* Red */
  --primary-dark: #991b1b;   /* Dark Red */
  --surface: #7f1d1d;        /* Deep Red */
  --background: #f8fafc;
  --error: #dc2626;
  --warning: #f59e0b;        /* Amber for access denied */
  --text-primary: #ffffff;
  --text-secondary: #fecaca; /* Light Red */
  --border: #b91c1c;         /* Red Border */
  --transition: 0.2s 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: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
  display: grid;
  place-items: center;
  min-height: 100vh;
  padding: 1rem;
}

.login-container {
  width: 100%;
  max-width: 440px;
}

.login-card {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(8px);
  border-radius: 1rem;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.10),
    0 2px 8px rgba(220, 38, 38, 0.08);
  padding: 2.5rem;
  position: relative;
}

.branding {
  text-align: center;
  margin-bottom: 2.5rem;
}

.logo {
  width: 200px;
  margin-bottom: 1rem;
}

.brand-text h1 {
  color: var(--primary-dark); /* Dark red text */
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 0.25rem;
}

.brand-text p {
  color: #64748b; /* Muted gray */
  font-size: 0.875rem;
}

.input-field {
  position: relative;
  margin-bottom: 1.5rem;
}

.input-icon {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  z-index: 2;
}

.input-field input {
  width: 100%;
  padding: 1rem 1rem 1rem 3rem;
  border: 1px solid #e5e7eb;
  border-radius: 0.75rem;
  font-size: 1rem;
  background: #f8fafc; /* Very light background */
  color: #1a365d;
  transition: border-color var(--transition);
}

.input-field input::placeholder {
  color: #64748b;
}

.input-field label {
  position: absolute;
  left: 3rem;
  top: 50%;
  transform: translateY(-50%);
  color: #64748b;
  pointer-events: none;
  transition: all var(--transition);
}

.input-icon {
  color: #64748b;
}

.input-field input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1); /* Red shadow */
}

.input-field input:focus ~ label,
.input-field input:not(:placeholder-shown) ~ label {
  transform: translate(-2rem, -170%);
  font-size: 0.875rem;
  color: var(--primary);
}

.checkbox {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  cursor: pointer;
}

.checkmark {
  display: inline-block;
  width: 1.25rem;
  height: 1.25rem;
  border: 2px solid var(--border);
  border-radius: 0.375rem;
  position: relative;
  transition: all var(--transition);
}

.checkbox input:checked ~ .checkmark {
  background: var(--primary);
  border-color: var(--primary);
}

.checkmark:after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid white;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
  opacity: 0;
  transition: opacity var(--transition);
}

.checkbox input:checked ~ .checkmark:after {
  opacity: 1;
}

.primary-button {
  width: 100%;
  padding: 1rem;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: 0.75rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  cursor: pointer;
  transition: background var(--transition);
}

.primary-button:hover {
  background: var(--primary-dark);
}

.button-icon {
  width: 20px;
  height: 20px;
  color: var(--surface);
}

.alert {
  padding: 1rem;
  background: #fef2f2;
  color: var(--error);
  border-radius: 0.75rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.alert.access-denied {
  background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
  border: 1px solid #f59e0b;
  color: #92400e;
  padding: 1.25rem;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.15);
  position: relative;
  transition: opacity 0.3s ease;
}

.alert.access-denied .alert-icon {
  color: #d97706;
}

.alert-content h4 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: #92400e;
}

.alert-content p {
  font-size: 0.875rem;
  line-height: 1.4;
  margin: 0;
  color: #92400e;
}

.alert-close {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #92400e;
  cursor: pointer;
  padding: 0;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: background-color 0.2s ease;
}

.alert-close:hover {
  background-color: rgba(146, 64, 14, 0.1);
}

.alert-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
}

.footer {
  color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,0.08);
  text-align: center;
  margin-top: 2rem;
  font-size: 0.875rem;
  font-weight: 500;
}

@media (max-width: 480px) {
  .login-card {
    padding: 1.5rem;
  }
  
  .brand-text h1 {
    font-size: 1.5rem;
  }
}