/* CSS Custom Properties */
:root {
  --primary-color: #b71c1c;
  --secondary-color: #7b1fa2;
  --dark-color: #263238;
  --light-color: #f5f5f5;
  --accent-color: #ff9800; /* Deep orange for better harmony with red/purple */
  
  /* Spacing Variables */
  --spacing-xs: 0.25rem;
  --spacing-sm: 0.5rem;
  --spacing-md: 1rem;
  --spacing-lg: 1.5rem;
  --spacing-xl: 2rem;
  --spacing-xxl: 3rem;
  --spacing-xxxl: 4rem;
  --spacing-xxxxl: 5rem;
  
  /* Layout Variables */
  --footer-height: 60px;
  --hero-height: 350px;
  --hero-height-mobile: 300px;
  --border-radius: 8px;
  --border-radius-lg: 10px;
  --border-radius-xl: 12px;
  
  /* Breakpoints */
  --breakpoint-sm: 576px;
  --breakpoint-md: 768px;
  --breakpoint-lg: 992px;
  --breakpoint-xl: 1200px;
}

/* Base Styles */
body {
  font-family: 'Rubik', sans-serif;
  background: linear-gradient(to bottom, rgb(244, 235, 235), #ffffff);
  color: #37474f;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  padding-bottom: var(--footer-height);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--dark-color);
}

/* Navigation Styles */
.navbar {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  background: white !important;
  padding: 0.7rem var(--spacing-md);
  transition: all 0.3s ease;
}

.navbar-brand {
  font-weight: 700;
  color: var(--primary-color) !important;
  font-size: 1.5rem;
}

.nav-link {
  font-weight: 500;
  color: var(--dark-color) !important;
  transition: color 0.2s ease;
  padding: 0.5rem 1rem;
}

.nav-link:hover {
  color: var(--primary-color) !important;
}

.dropdown-menu {
  border: none;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  border-radius: var(--border-radius);
  overflow: hidden;
}

.dropdown-item {
  padding: 0.5rem 1.5rem;
  font-weight: 400;
  transition: background-color 0.2s ease;
}

.dropdown-item:hover {
  background-color: rgba(211, 47, 47, 0.1);
}

/* Layout Styles */

.footer {
  background: white !important;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.05);
  padding: var(--spacing-md) 0;
  position: absolute;
  bottom: 0;
  width: 100%;
}

.footer a {
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.2s ease;
}

.footer a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* Button Styles */
.btn {
  border-radius: 6px;
  font-weight: 500;
  padding: 0.5rem 1.5rem;
  transition: all 0.3s ease;
}

.btn-primary {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
}

.btn-primary:hover {
  background-color: var(--primary-color);
  border-color: var(--primary-color);
  box-shadow: 0 4px 8px rgba(211, 47, 47, 0.3);
}

/* This is used in the email confirmation / password change dialogues */
.btn-success {
  background-color: var(--secondary-color);
  border-color: var(--secondary-color);
}

.btn-success:hover {
  background-color: #6a1b9a;
  border-color: #6a1b9a;
  box-shadow: 0 4px 8px rgba(123, 31, 162, 0.3);
}

/* Component-specific styles for FLARMnet application */

header {
  padding-bottom: var(--spacing-xxxl);
}

main {
  padding-bottom: var(--spacing-xxxxl);
}

tr.clickable-row {
  cursor: pointer;
  transition: background-color 0.2s ease;
}

tr.clickable-row:hover {
  background-color: rgba(211, 47, 47, 0.05);
}

/* Form Styles */
.login-form {
  margin-top: 60px;
}

/* Form Error Styling */
#form-errors {
  color: #f44336;
  font-weight: 500;
  margin-bottom: 1.5rem;
  border-radius: 8px;
  border-left: 4px solid #f44336;
}

.alert-danger {
  background-color: rgba(244, 67, 54, 0.1);
  border-color: rgba(244, 67, 54, 0.2);
}

.invalid-feedback {
  color: #f44336;
  font-size: 0.85rem;
  margin-top: 0.25rem;
  display: block;
}

.is-invalid {
  border-color: #f44336 !important;
}

.is-invalid:focus {
  box-shadow: 0 0 0 0.2rem rgba(244, 67, 54, 0.25) !important;
}

form[role=login] {
  color: #37474f;
  background: white;
  padding: 2rem;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
  transition: all 0.3s ease;
}

form[role=login]:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

form[role=login] img {
  display: block;
  margin: 0 auto 2rem auto;
  max-width: 150px;
}

form[role=login] input,
form[role=login] button {
  font-size: 1rem;
  margin: 1rem 0;
  border-radius: 6px;
}

form[role=login] input {
  padding: 0.75rem 1rem;
  border: 1px solid #e0e0e0;
  transition: border-color 0.2s ease;
}

form[role=login] input:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 0 3px rgba(211, 47, 47, 0.2);
}

form[role=login]>div {
  text-align: center;
}

.form-links {
  text-align: center;
  margin-top: 1.5rem;
  margin-bottom: 3rem;
}

.form-links a {
  color: var(--primary-color);
  font-weight: 500;
  transition: color 0.2s ease;
}

.form-links a:hover {
  color: var(--accent-color);
  text-decoration: none;
}

/* Section Styles */
#welcome {
  background: linear-gradient(135deg, #d32f2f, #7b1fa2);
  color: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
  margin-bottom: 2rem;
}

#amount {
  background: linear-gradient(135deg, #7b1fa2, #d32f2f);
  color: white;
  border-radius: 10px;
  padding: 2rem;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Link Styles */
.download-link {
  color: var(--primary-color);
  font-weight: 500;
  transition: all 0.2s ease;
  text-decoration: none;
  display: inline-block;
  padding: 0.25rem 0;
  position: relative;
}

.download-link:after {
  content: '';
  position: absolute;
  width: 100%;
  transform: scaleX(0);
  height: 2px;
  bottom: 0;
  left: 0;
  background-color: var(--accent-color);
  transform-origin: bottom right;
  transition: transform 0.3s ease-out;
}

.download-link:hover {
  color: var(--accent-color);
  text-decoration: none;
}

.download-link:hover:after {
  transform: scaleX(1);
  transform-origin: bottom left;
}

.download-link:active {
  transform: translateY(1px);
}

/* Card Styles */
.card {
  border: none;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
  transition: all 0.3s ease;
  overflow: hidden;
}

.card:hover {
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
  transform: translateY(-2px);
}

.card-header {
  background-color: white;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  font-weight: 600;
}

.card-body {
  padding: 1.5rem;
}

/* Table Styles */
.table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.table th {
  font-weight: 600;
  color: var(--dark-color);
  border-top: none;
  border-bottom: 2px solid #e0e0e0;
}

.table td {
  vertical-align: middle;
  border-top: 1px solid #f0f0f0;
}

/* Utility Classes */
.shadow-sm {
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
}

.shadow {
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08) !important;
}

.shadow-lg {
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1) !important;
}

.rounded {
  border-radius: 8px !important;
}

.rounded-lg {
  border-radius: 12px !important;
}
.text-primary {
  color: var(--primary-color) !important;
}

.text-secondary {
  color: var(--secondary-color) !important;
}

.text-accent {
  color: var(--accent-color) !important;
}

.bg-primary {
  background-color: var(--primary-color) !important;
}

.bg-secondary {
  background-color: var(--secondary-color) !important;
}

.bg-accent {
  background-color: var(--accent-color) !important;
}

.bg-transparent {
  background-color: transparent;
}

/* Note: Base dropdown-item styles are now in base.css */
.dropdown-item {
  font-size: 0.9rem;
}

/* Hero */
.hero-background {
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  width: 100%;
  height: var(--hero-height);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(80deg, rgba(149, 206, 253, 0.5), rgba(153, 55, 170, 0.5));
}

/* Responsive Design */
@media (max-width: 768px) {
  .hero-background {
    height: var(--hero-height-mobile);
  }
  
  .navbar {
    padding: 0.5rem var(--spacing-sm);
  }
  
  .navbar-brand {
    font-size: 1.3rem;
  }
  
  form[role=login] {
    padding: 1.5rem;
    margin: 0 var(--spacing-sm);
  }
  
  #welcome,
  #amount {
    padding: 1.5rem;
    margin: 0 var(--spacing-sm) var(--spacing-lg) var(--spacing-sm);
  }
  
  .card-body {
    padding: 1rem;
  }
  
  header {
    padding-bottom: var(--spacing-xl);
  }
  
  main {
    padding-bottom: var(--spacing-xxxl);
  }
}

@media (max-width: 576px) {
  .hero-background {
    height: calc(var(--hero-height-mobile) - 50px);
  }
  
  .navbar-brand {
    font-size: 1.2rem;
  }
  
  .btn {
    padding: 0.4rem 1rem;
    font-size: 0.9rem;
  }
  
  .table {
    font-size: 0.85rem;
  }
  
  .dropdown-item {
    font-size: 0.85rem;
  }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* High contrast mode support */
@media (prefers-contrast: high) {
  .card {
    border: 1px solid var(--dark-color);
  }
  
  .btn {
    border: 2px solid;
  }
  
  .dropdown-menu {
    border: 1px solid var(--dark-color);
  }
}

/* Focus styles for better keyboard navigation */
.btn:focus,
.nav-link:focus,
.dropdown-item:focus,
form[role=login] input:focus {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* Print styles */
@media print {
  .navbar,
  .footer,
  .btn,
  .hero-background {
    display: none !important;
  }
  
  body {
    background: white !important;
    color: black !important;
  }
  
  .card {
    border: 1px solid #000 !important;
    box-shadow: none !important;
  }
}