/* =============================================================================
   LAYOUT STYLES - Containers, Headers, Grids, Spacing
   ============================================================================= */

/* Main Containers */
.container {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  width: 100%;
  padding: 40px;
  animation: slideIn 0.5s ease-out;
  margin: 0 auto;
}

.admin-panel {
  background: white;
  border-radius: 16px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  max-width: 1200px;
  width: 100%;
  padding: 40px;
  margin: 0 auto;
}

.admin-panel h2::before {
  content: "⚙️";
}

/* Header Styles */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 20px 30px;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
  position: relative;
}

/* Mobile Hamburger Menu Toggle */
.mobile-menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  gap: 3px;
  flex-shrink: 0; /* Prevent shrinking */
}

.mobile-menu-toggle:hover {
  background-color: #f7fafc;
}

/* Hamburger Lines */
.hamburger-line {
  width: 20px;
  height: 2px;
  background-color: #4a5568; /* Changed from #667eea to darker gray for better visibility */
  border-radius: 2px;
  transition: all 0.3s ease;
  transform-origin: center;
}

/* Hamburger Animation States */
.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
  transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
  opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
  transform: rotate(-45deg) translate(5px, -5px);
}

/* Header Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
  transition: all 0.3s ease;
}

/* Mobile Header Actions (Collapsible) */
@media (max-width: 767px) {
  .mobile-menu-toggle {
    display: flex;
  }
  
  .header-actions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-top: 1px;
    flex-direction: column;
    gap: 12px;
    z-index: 1000;
    transform: translateY(-10px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
  }
  
  .header-actions.mobile-expanded {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  /* Make buttons full width on mobile menu */
  .header-actions .admin-toggle,
  .header-actions .logout-btn {
    width: 100%;
    justify-content: center;
    padding: 12px 20px;
    font-size: 14px;
  }

  /* Admin badges in mobile menu */
  .header-actions .admin-badge {
    align-self: center;
  }
}

.user-info {
  display: flex;
  align-items: center;
  gap: 15px;
}

.user-avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid #667eea;
}

.user-details {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-weight: 600;
  color: #2d3748;
}

.user-email {
  font-size: 12px;
  color: #718096;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 15px;
}

/* Logo Styles */
.logo {
  font-size: 36px;
  font-weight: 900;
  letter-spacing: -1px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: 'Orbitron', 'Rajdhani', 'Exo 2', 'Audiowide', sans-serif;
  text-transform: uppercase;
}

.logo-cargofl {
  display: inline-block;
  gap: 0;
  letter-spacing: -2px;
}

.logo-cargo {
  color: #1e40af;
  text-shadow: 2px 2px 6px rgba(30, 64, 175, 0.4);
}

.logo-fl {
  color: #3b82f6;
  text-shadow: 2px 2px 6px rgba(59, 130, 246, 0.5);
  font-weight: 700;
}

.logo-spotx {
  display: flex;
  gap: 0;
  letter-spacing: -1px;
  padding-left: 2px;
  border-left: 3px solid rgba(255, 255, 255, 0.3);
  margin-left: 8px;
}

.logo-spot {
  color: white;
  text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.3);
}

.logo-x {
  color: #ef4444;
  text-shadow: 2px 2px 6px rgba(239, 68, 68, 0.5);
  font-weight: 800;
}

/* Form Sections */
.form-section {
  background: #f7fafc;
  border-radius: 12px;
  padding: 24px;
  margin-bottom: 20px;
  border: 2px solid #e2e8f0;
}

.row {
  margin-bottom: 20px;
}

/* Output Section */
.output-section {
  margin-top: 24px;
}

.output-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.output-label h3 {
  color: #2d3748;
  font-size: 16px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Admin Tabs */
.admin-tabs {
  display: flex;
  gap: 10px;
  margin-bottom: 30px;
  border-bottom: 2px solid #e2e8f0;
}

.admin-content {
  min-height: 400px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  padding: 24px;
  border-radius: 12px;
  color: white;
}

.stat-card h3 {
  font-size: 14px;
  opacity: 0.9;
  margin-bottom: 8px;
}

.stat-card .value {
  font-size: 32px;
  font-weight: 700;
}

/* URL Link Container */
.url-link-container {
  margin-top: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  border-radius: 12px;
  text-align: center;
  display: none;
}

.url-link-container.active {
  display: block;
}

.url-link-container.inactive {
  display: block;
  background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
  opacity: 0.7;
}

.url-link-label {
  color: white;
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Management Projects Layout */
#mgmtProjects > div {
  padding: 12px;
  margin-bottom: 12px;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  transition: all 0.3s ease;
}

#mgmtProjects > div:hover {
  border-color: #cbd5e0;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

#mgmtProjects ul {
  margin: 8px 0;
  padding-left: 20px;
}

#mgmtProjects li {
  margin: 6px 0;
  padding: 8px;
  background: white;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

#mgmtProjects li:hover {
  background: #f7fafc;
}

/* Files container animation */
#mgmtProjects ul[id^="files_"] {
  transition: all 0.3s ease;
  overflow: hidden;
}

#mgmtProjects ul[id^="files_"][style*="display: none"] {
  max-height: 0;
  opacity: 0;
}

#mgmtProjects ul[id^="files_"][style*="display: block"] {
  max-height: 2000px;
  opacity: 1;
}

/* File list buttons */
#mgmtProjects li button {
  margin-left: auto;
  margin-right: 4px;
}