/* ========== CSS Variables ========== */
:root {
  /* Core Colors */
  --primary-dark: #1a2332;
  --primary-darker: #151c28;
  --primary-darkest: #0f141d;
  --accent-gold: #d4af37;
  --accent-gold-hover: #e6c35c;

  /* Text Colors */
  --text-primary: #ffffff;
  --text-secondary: #94a3b8;
  --text-muted: #64748b;

  /* Background Colors */
  --bg-card: #1e293b;
  --bg-input: #0f172a;

  /* Border Colors */
  --border-color: #334155;
  --border-focus: #d4af37;

  /* Core Spacing */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;

  /* Typography */
  --font-primary: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Border Radius */
  --radius-sm: 0.375rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;

  /* Shadows */
  --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* ========== Base Reset ========== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  font-size: 16px;
}

body {
  font-family: var(--font-primary);
  background-color: var(--primary-dark);
  color: var(--text-primary);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ========== Typography ========== */
h1, h2, h3, h4, h5, h6 {
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
}

h1 { font-size: 2.25rem; }
h2 { font-size: 1.875rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: var(--spacing-md);
}

a {
  color: var(--accent-gold);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--accent-gold-hover);
  text-decoration: underline;
}

/* ========== Layout ========== */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
}

/* ========== Cards ========== */
.card {
  background-color: var(--bg-card);
  border-radius: var(--radius-lg);
  padding: var(--spacing-2xl);
  box-shadow: var(--shadow-lg);
}

.card h2 {
  margin-bottom: var(--spacing-xl);
  text-align: center;
  font-size: 1.5rem;
  font-weight: 600;
}

/* ========== Forms ========== */
.form-group {
  margin-bottom: var(--spacing-lg);
}

.form-label {
  display: block;
  margin-bottom: var(--spacing-sm);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-secondary);
}

.form-control,
input.form-control,
input[type="text"].form-control,
input[type="email"].form-control,
input[type="password"].form-control {
  width: 100%;
  padding: var(--spacing-md) var(--spacing-md);
  background-color: var(--bg-input);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: 1rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  display: block;
}

.form-control:focus {
  outline: none;
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.form-control::placeholder {
  color: var(--text-muted);
}

.form-help {
  display: block;
  margin-top: var(--spacing-xs);
  font-size: 0.875rem;
  color: var(--text-muted);
}

.form-help ul {
    margin-left: 0;
    padding-left: 1.2em;
}

.form-help li {
    margin-bottom: 0.25em;
}

.form-error {
  display: block;
  margin-top: var(--spacing-xs);
  font-size: 0.875rem;
  color: #ef4444;
}

.form-error ul {
    margin-left: 0;
    padding-left: 1.2em;
}

.form-error li {
    margin-bottom: 0.25em;
}

.form-footer {
  margin-top: var(--spacing-xl);
  text-align: center;
}

.form-footer p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 0.875rem;
}

/* Password field with toggle */
.password-field {
  position: relative;
}

.password-toggle {
  position: absolute;
  right: var(--spacing-md);
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  padding: var(--spacing-xs);
}

/* ========== Buttons ========== */
.btn {
  display: inline-block;
  padding: var(--spacing-xs) var(--spacing-sm); /* Changed from var(--spacing-sm) var(--spacing-md) */
  border: none;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 0.875rem; /* Changed from 1rem */
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  line-height: 1.5;
}

.btn-lg {
  padding: var(--spacing-xs) var(--spacing-md); /* Changed from var(--spacing-sm) var(--spacing-lg) */
  font-size: 0.75rem; /* Changed from 0.875rem */
  width: 100%;
}

.btn-sm {
  padding: var(--spacing-md) var(--spacing-md);
  font-size: 0.875rem;
  font-weight: 600;
  border-radius: var(--radius-md);
}

/* ========== Auth Pages ========== */
.simple-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  align-items: center;
  justify-content: center;
  padding: var(--spacing-lg);
  background: radial-gradient(circle at top center, var(--primary-darker), var(--primary-darkest));
}

.simple-header {
  display: none; /* Hide the header */
}

.simple-content {
  width: 100%;
  max-width: 400px;
}

/* Forgot password link styling */
.form-group .forgot-password {
  display: block;
  text-align: right;
  font-size: 0.875rem;
  margin-top: var(--spacing-xs);
  color: var(--text-secondary);
}

.form-group .forgot-password:hover {
  color: var(--accent-gold);
  text-decoration: none;
}

/* ========== Messages/Notifications ========== */
.notification {
  padding: var(--spacing-md) var(--spacing-lg);
  margin-bottom: var(--spacing-lg);
  border-radius: var(--radius-md);
  font-size: 0.875rem;
}

.notification-danger {
  background-color: rgba(239, 68, 68, 0.1);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
}

.notification-success {
  background-color: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.3);
  color: #22c55e;
}

/* Success page styling */
.text-success {
  color: #22c55e;
}

.success-icon {
  margin-bottom: var(--spacing-lg);
}

.text-center {
  text-align: center;
}

.mx-auto {
  margin-left: auto;
  margin-right: auto;
}

.mt-2 {
  margin-top: var(--spacing-sm);
}

.mt-4 {
  margin-top: var(--spacing-lg);
}

.mb-4 {
  margin-bottom: var(--spacing-lg);
}

.text-muted {
  color: var(--text-muted);
}

.text-secondary {
  color: var(--text-secondary);
}

/* ========== Responsive ========== */
@media (max-width: 768px) {
  .card {
    padding: var(--spacing-lg);
  }

  .simple-container {
    padding: var(--spacing-md);
  }
}