/* =====================================================
 * AUTHENTICATION PAGES - BLUEPRINT NOIR
 * Premium dark aesthetic, technical and clean
 * ===================================================== */

/* ===== BASE AUTHENTICATION CONTAINER ===== */
.auth-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  position: relative;
  background-color: var(--bg-depth);
  
  /* Subtle Grid Background */
  background-image:
      linear-gradient(var(--grid-line) 1px, transparent 1px),
      linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 40px 40px;
}

/* Radial Vignette for Focus */
.auth-container::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, transparent 0%, var(--bg-depth) 80%);
  pointer-events: none;
}

/* ===== AUTHENTICATION CARD ===== */
.auth-card {
  max-width: 420px;
  width: 100%;
  position: relative;
  z-index: 10;
}

/* ===== BRAND HEADER ===== */
.auth-brand {
  text-align: center;
  margin-bottom: 2.5rem;
}

.auth-brand img {
  height: 40px;
  margin-bottom: 1rem;
  filter: drop-shadow(0 0 10px var(--accent-copper-glow));
}

.auth-brand-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-brand-subtitle {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--text-primary);
}

/* ===== FORM CONTAINER ===== */
.auth-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-tech);
  border-top: 2px solid var(--accent-copper);
  border-radius: var(--radius-md);
  padding: 2.5rem;
  box-shadow: 0 20px 50px -10px rgba(0,0,0,0.5);
  position: relative;
}

/* Technical Corner Accents */
.auth-form::before {
  content: '';
  position: absolute;
  top: -1px; left: -1px;
  width: 10px; height: 10px;
  border-top: 1px solid var(--accent-copper);
  border-left: 1px solid var(--accent-copper);
}

.auth-form::after {
  content: '';
  position: absolute;
  bottom: -1px; right: -1px;
  width: 10px; height: 10px;
  border-bottom: 1px solid var(--accent-copper);
  border-right: 1px solid var(--accent-copper);
}

.auth-form-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* ===== FORM FIELDS ===== */
.auth-field {
  margin-bottom: 1.5rem;
}

.auth-label {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-input {
  display: block;
  width: 100%;
  padding: 0.75rem 1rem;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  color: var(--text-primary);
  background-color: var(--bg-input);
  border: 1px solid var(--border-tech);
  border-radius: var(--radius-sm);
  transition: all 0.2s ease;
  outline: none;
}

.auth-input:focus {
  border-color: var(--accent-copper);
  background-color: var(--bg-card);
  box-shadow: 0 0 15px var(--accent-copper-glow);
}

.auth-input::placeholder {
  color: var(--text-muted);
  opacity: 0.5;
}

/* Force light text color on autofill - override browser defaults */
.auth-input:-webkit-autofill,
.auth-input:-webkit-autofill:hover,
.auth-input:-webkit-autofill:focus,
.auth-input:-webkit-autofill:active {
  -webkit-text-fill-color: var(--text-primary) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
  box-shadow: 0 0 0 1000px var(--bg-input) inset !important;
  transition: background-color 5000s ease-in-out 0s;
}

/* Ensure text is always light colored */
.auth-input {
  color: var(--text-primary) !important;
}

/* Firefox autofill fix */
.auth-input:-moz-autofill,
.auth-input:-moz-autofill-preview {
  color: var(--text-primary) !important;
  background-color: var(--bg-input) !important;
}

/* Helper Text Below Inputs */
.auth-hint,
.auth-helper-text {
  display: block;
  margin-top: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* ===== CHECKBOX FIELD ===== */
.auth-checkbox-field {
  display: flex;
  align-items: center;
  margin-bottom: 1.5rem;
  cursor: pointer;
}

.auth-checkbox {
  width: 1.1rem;
  height: 1.1rem;
  appearance: none;
  background-color: var(--bg-input);
  border: 1px solid var(--border-tech);
  border-radius: 2px;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
}

.auth-checkbox:checked {
  background-color: var(--accent-copper);
  border-color: var(--accent-copper);
}

.auth-checkbox:checked::after {
  content: '';
  position: absolute;
  left: 4px; top: 1px;
  width: 4px; height: 8px;
  border: solid #0B0E11;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.auth-checkbox-label {
  margin-left: 0.75rem;
  font-size: 0.9rem;
  color: var(--text-secondary);
  cursor: pointer;
}

/* ===== SUBMIT BUTTON ===== */
.auth-submit {
  width: 100%;
  padding: 0.875rem 1.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #0B0E11;
  background: linear-gradient(135deg, var(--accent-copper) 0%, var(--accent-copper-dim) 100%);
  border: 1px solid var(--accent-copper);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: all 0.3s ease;
}

.auth-submit:hover {
  transform: translateY(-1px);
  box-shadow: 0 0 20px var(--accent-copper-glow);
}

.auth-submit:active {
  transform: translateY(0);
}

/* ===== ACCESS LISTS (Courses/Tools) ===== */
.auth-access-list {
  margin-bottom: 1.5rem;
}

.auth-access-header {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.auth-access-items {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-access-item {
  font-size: 0.9rem;
  color: var(--text-primary);
  padding: 0.5rem 0;
  padding-left: 1.25rem;
  position: relative;
}

.auth-access-item::before {
  content: '•';
  position: absolute;
  left: 0;
  color: var(--accent-copper);
  font-size: 1.2em;
}

/* Info Box for Existing Users */
.auth-info-box {
  background: rgba(37, 99, 235, 0.05);
  border: 1px solid rgba(37, 99, 235, 0.3);
  border-radius: var(--radius-sm);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.auth-info-text {
  font-size: 0.9rem;
  color: var(--text-primary);
  text-align: center;
  line-height: 1.5;
}

/* Expiry Notice */
.auth-expiry-notice {
  margin-top: 1rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border-tech);
  text-align: center;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

/* ===== SECONDARY LINKS ===== */
.auth-links {
  margin-top: 2rem;
  text-align: center;
  border-top: 1px solid var(--border-tech);
  padding-top: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.auth-link {
  font-size: 0.9rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.2s ease;
}

.auth-link:hover {
  color: var(--accent-copper);
}

.auth-link-primary {
  color: var(--accent-copper);
  font-weight: 600;
}

/* ===== ERROR & ALERT MESSAGES ===== */
.auth-errors {
  margin-bottom: 2rem;
  padding: 1rem;
  background: rgba(239, 68, 68, 0.05);
  border: 1px solid rgba(239, 68, 68, 0.3);
  border-left: 3px solid #EF4444;
  border-radius: var(--radius-sm);
}

.auth-errors-title {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: #EF4444;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}

.auth-errors-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.auth-errors-item {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: #FCA5A5;
  margin-bottom: 0.25rem;
}

.auth-errors-item::before {
  content: '> ';
  color: #EF4444;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 480px) {
  .auth-card {
    max-width: 100%;
  }
  
  .auth-form {
    padding: 1.5rem;
  }
  
  .auth-brand-title {
    font-size: 1.75rem;
  }
}

/* ===== USER SETTINGS PAGE (Settings-Specific) ===== */
.settings-page {
  padding: 2rem;
  max-width: 800px;
  margin: 0 auto;
}

.settings-header {
  margin-bottom: 3rem;
  border-bottom: 1px solid var(--border-tech);
  padding-bottom: 1rem;
}

.settings-title {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
}

.form-section-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  color: var(--text-primary);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.form-section-title::before {
  content: '//';
  color: var(--accent-copper);
  font-family: var(--font-mono);
  font-size: 0.8em;
}

.danger-card-content {
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.05);
  padding: 1.5rem;
  border-radius: var(--radius-md);
  display: flex;
  gap: 1rem;
}

.danger-title {
  color: #EF4444;
  font-weight: 700;
}

.danger-description {
  color: #FCA5A5;
  font-size: 0.9rem;
  margin-bottom: 1rem;
}