/* Excode Branding Variables */
:root {
  /* Colors */
  --color-primary: #62b22f;
  --color-primary-dark: #4a921d;
  --color-primary-light: #7bc143;
  --color-text: #2c3e50;
  --color-text-secondary: #64748b;
  --color-text-muted: #94a3b8;
  --color-background: #f8fafc;
  --color-surface: #ffffff;
  --color-border: #e2e8f0;
  
  /* Spacing */
  --space-xs: 4px;
  --space-sm: 8px;
  --space-md: 16px;
  --space-lg: 24px;
  --space-xl: 32px;
  --space-2xl: 48px;
  
  /* Border Radius */
  --radius-md: 8px;
  --radius-lg: 12px;
  
  /* Shadows */
  --shadow-md: 0 2px 8px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 4px 12px rgba(0, 0, 0, 0.15);
  
  /* Transitions */
  --transition-fast: 0.2s ease;
}

/* Global Styles */
body {
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--color-background);
  font-family: 'Raleway', 'Segoe UI', 'Inter', system-ui, sans-serif;
}

main {
  text-align: center;
  background: var(--color-surface);
  padding: var(--space-2xl);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  max-width: 420px;
  width: 100%;
  position: relative;
  border: 1px solid var(--color-border);
}

/* Header Styles */
header {
  text-align: center;
  margin-bottom: var(--space-xl);
}

header h1.head {
  font-size: 2.25rem; /* 36px - H1 from branding guide */
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-md) 0;
  line-height: 1.2;
}

header .subtitle {
  font-size: 1rem; /* 16px - Body Regular */
  color: var(--color-text-secondary);
  line-height: 1.6;
  margin: 0;
  font-style: italic;
}

/* Form Styles */
form {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs); /* Small gap between input and button */
  width: 100%;
  margin-bottom: var(--space-md);
}

/* Input Fields */
input[type="text"],
input[type="email"], 
input[type="password"] {
  width: 100%;
  padding: 12px 16px;
  border: 2px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-family: inherit;
  color: var(--color-text);
  background: var(--color-surface);
  box-sizing: border-box;
  transition: all var(--transition-fast);
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus {
  border-color: var(--color-primary);
  box-shadow: 
    0 0 0 3px rgba(98, 178, 47, 0.15),
    0 2px 8px rgba(98, 178, 47, 0.1);
  outline: none;
  transform: translateY(-1px);
}

input[type="text"]:active,
input[type="email"]:active,
input[type="password"]:active {
  transform: translateY(0);
  transition: transform 0.1s ease;
}

input[type="text"]::placeholder,
input[type="email"]::placeholder,
input[type="password"]::placeholder {
  color: var(--color-text-muted);
}

/* Primary Button */
button {
  background: linear-gradient(145deg, var(--color-primary) 0%, var(--color-primary-dark) 50%, var(--color-primary) 100%);
  color: var(--color-surface);
  padding: 12px 16px; /* Same padding as input for consistent width */
  border: none;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 2px 4px rgba(98, 178, 47, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.2);
  width: 100%;
  box-sizing: border-box; /* Ensure consistent sizing */
}

/* Shiny effect */
button::before {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    45deg,
    transparent 30%,
    rgba(255, 255, 255, 0.3) 50%,
    transparent 70%
  );
  transform: translateX(-100%) translateY(-100%) rotate(45deg);
  transition: transform 0.6s ease;
}

button:hover::before {
  transform: translateX(100%) translateY(100%) rotate(45deg);
}

button:hover {
  background: linear-gradient(145deg, var(--color-primary-dark) 0%, var(--color-primary) 50%, var(--color-primary-dark) 100%);
  transform: translateY(-2px);
  box-shadow: 
    0 8px 25px rgba(98, 178, 47, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

button:active {
  transform: translateY(1px) scale(0.98);
  transition: all 0.1s ease;
  box-shadow: 
    0 1px 3px rgba(98, 178, 47, 0.4),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
  background: linear-gradient(145deg, #3d7a1a 0%, var(--color-primary-dark) 50%, #3d7a1a 100%);
}

button:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(98, 178, 47, 0.3),
    0 8px 25px rgba(98, 178, 47, 0.2);
}

button:disabled {
  background: var(--color-text-muted);
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

/* Links */
a {
  color: var(--color-primary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s cubic-bezier(0.4, 0, 0.2, 1);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
  margin: 0; /* Remove margin since container has gap */
  position: relative;
}

a:hover {
  color: var(--color-primary-dark);
  text-decoration: underline;
  text-underline-offset: 2px;
  transform: translateY(-1px);
  text-shadow: 0 1px 2px rgba(98, 178, 47, 0.2);
}

a:active {
  transform: translateY(0) scale(0.97);
  transition: all 0.1s ease;
  color: #3d7a1a;
  text-shadow: none;
}

a:focus {
  outline: 2px solid rgba(98, 178, 47, 0.4);
  outline-offset: 2px;
  background: rgba(98, 178, 47, 0.05);
}

/* Links Container */
.links-container {
  display: flex;
  gap: var(--space-sm); /* Smaller gap for closer alignment */
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
  margin-top: var(--space-sm);
}

a:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
}

/* Responsive Design */
@media (max-width: 768px) {
  main {
    margin: var(--space-md);
    padding: var(--space-xl);
    max-width: 90%;
  }
  
  header h1.head {
    font-size: 1.875rem; /* Smaller on mobile */
  }
}

@media (max-width: 480px) {
  main {
    margin: var(--space-sm);
    padding: var(--space-lg);
    max-width: 95%;
  }
  
  header h1.head {
    font-size: 1.5rem; /* Even smaller on small mobile */
  }
  
  header .subtitle {
    font-size: 0.875rem;
  }
  
  input[type="text"],
  input[type="email"], 
  input[type="password"] {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  
  button {
    padding: 10px 14px;
    font-size: 0.9rem;
  }
  
  .links-container {
    flex-direction: column;
    gap: var(--space-xs);
    margin-top: var(--space-md);
  }
}

@media (max-width: 320px) {
  main {
    margin: var(--space-xs);
    padding: var(--space-md);
  }
  
  header h1.head {
    font-size: 1.25rem;
  }
  
  header .subtitle {
    font-size: 0.75rem;
  }
}

/* Responsive Design - Input width adjustments */
@media (min-width: 600px) {
  input[type="text"],
  input[type="email"],
  input[type="password"],
  textarea {
    max-width: 400px;
  }
}

/* Background Images */
body.login::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("/images/login.png") no-repeat center center fixed;
  background-size: cover;
  opacity: 0.5;
  z-index: -1;
}

body.leaders-login::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: url("/images/leaders-login.png") no-repeat center center fixed;
  background-size: cover;
  opacity: 0.5;
  z-index: -1;
}

