/* HLPFL Forms - Main Layout System */

/* Container System */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-fluid {
  width: 100%;
  padding: 0 2rem;
}

/* Navigation Bar */
.navbar {
  background: var(--hlpfl-dark-1);
  border-bottom: 1px solid var(--hlpfl-dark-4);
  padding: 1rem 0;
  position: sticky;
  top: 0;
  z-index: 1000;
  backdrop-filter: blur(10px);
}

.navbar-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  text-decoration: none;
  color: var(--hlpfl-text-primary);
  font-size: 1.5rem;
  font-weight: 700;
}

.navbar-logo {
  height: 40px;
  width: auto;
  transition: transform var(--hlpfl-transition-normal);
}

.navbar-logo:hover {
  transform: scale(1.05);
}

.navbar-menu {
  display: flex;
  gap: 2rem;
  align-items: center;
  list-style: none;
}

.navbar-link {
  color: var(--hlpfl-text-secondary);
  text-decoration: none;
  font-weight: 500;
  transition: color var(--hlpfl-transition-fast);
  position: relative;
}

.navbar-link:hover {
  color: var(--hlpfl-copper);
}

.navbar-link.active {
  color: var(--hlpfl-copper);
}

.navbar-link.active::after {
  content: '';
  position: absolute;
  bottom: -5px;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--hlpfl-gradient-primary);
}

/* Hero Section */
.hero {
  padding: 4rem 0;
  text-align: center;
  background: var(--hlpfl-gradient-dark);
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 50%, rgba(200, 121, 65, 0.1) 0%, transparent 70%);
  pointer-events: none;
}

.hero-content {
  position: relative;
  z-index: 1;
}

.hero-title {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1rem;
  line-height: 1.2;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--hlpfl-text-secondary);
  margin-bottom: 2rem;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* Grid System */
.grid {
  display: grid;
  gap: 2rem;
}

.grid-2 {
  grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
  grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 1024px) {
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }
  
  .navbar-menu {
    gap: 1rem;
  }
  
  .hero-title {
    font-size: 2.5rem;
  }
}

/* Section Spacing */
.section {
  padding: 4rem 0;
}

.section-title {
  font-size: 2.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-subtitle {
  font-size: 1.125rem;
  color: var(--hlpfl-text-secondary);
  margin-bottom: 3rem;
}

/* Dashboard Layout */
.dashboard {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 2rem;
  min-height: calc(100vh - 80px);
}

.sidebar {
  background: var(--hlpfl-dark-1);
  border-right: 1px solid var(--hlpfl-dark-4);
  padding: 2rem 1rem;
  position: sticky;
  top: 80px;
  height: fit-content;
}

.sidebar-menu {
  list-style: none;
}

.sidebar-item {
  margin-bottom: 0.5rem;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  color: var(--hlpfl-text-secondary);
  text-decoration: none;
  border-radius: var(--hlpfl-radius-md);
  transition: all var(--hlpfl-transition-fast);
}

.sidebar-link:hover {
  background: var(--hlpfl-dark-2);
  color: var(--hlpfl-text-primary);
}

.sidebar-link.active {
  background: var(--hlpfl-gradient-primary);
  color: var(--hlpfl-text-primary);
  box-shadow: var(--hlpfl-glow-copper);
}

.main-content {
  padding: 2rem;
}

@media (max-width: 1024px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  
  .sidebar {
    position: static;
    border-right: none;
    border-bottom: 1px solid var(--hlpfl-dark-4);
  }
}

/* Stats Cards */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--hlpfl-dark-1);
  border: 1px solid var(--hlpfl-dark-4);
  border-radius: var(--hlpfl-radius-lg);
  padding: 1.5rem;
  transition: all var(--hlpfl-transition-normal);
}

.stat-card:hover {
  border-color: var(--hlpfl-copper);
  box-shadow: var(--hlpfl-shadow-lg), var(--hlpfl-glow-copper);
  transform: translateY(-2px);
}

.stat-label {
  font-size: 0.875rem;
  color: var(--hlpfl-text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.stat-value {
  font-size: 2.5rem;
  font-weight: 700;
  background: var(--hlpfl-gradient-primary);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat-change {
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

.stat-change.positive {
  color: #4ade80;
}

.stat-change.negative {
  color: #f87171;
}

/* Form Styles */
.form-group {
  margin-bottom: 1.5rem;
}

.form-label {
  display: block;
  margin-bottom: 0.5rem;
  font-weight: 500;
  color: var(--hlpfl-text-primary);
}

.form-help {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--hlpfl-text-muted);
}

.form-error {
  display: block;
  margin-top: 0.25rem;
  font-size: 0.875rem;
  color: var(--hlpfl-red);
}

/* Modal */
.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  animation: fadeIn var(--hlpfl-transition-fast);
}

.modal {
  background: var(--hlpfl-dark-1);
  border: 1px solid var(--hlpfl-dark-4);
  border-radius: var(--hlpfl-radius-xl);
  max-width: 600px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: var(--hlpfl-shadow-xl);
  animation: slideUp var(--hlpfl-transition-normal);
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--hlpfl-dark-4);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1.5rem;
  font-weight: 700;
}

.modal-close {
  background: transparent;
  border: none;
  color: var(--hlpfl-text-secondary);
  font-size: 1.5rem;
  cursor: pointer;
  transition: color var(--hlpfl-transition-fast);
}

.modal-close:hover {
  color: var(--hlpfl-text-primary);
}

.modal-body {
  padding: 1.5rem;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--hlpfl-dark-4);
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes slideUp {
  from {
    transform: translateY(20px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

@keyframes pulse {
  0%, 100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.loading {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}