/* Modern UI with aqua theme */
body { 
  background: #eff4f4; 
  margin: 0;
  padding-top: 70px;
  padding-left: 260px;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Header - Dark Aqua */
.custom-header {
  background: #651FFF;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  height: 70px;
  box-shadow: 0 4px 4px rgba(0,0,0,0.04);
}

.custom-header .navbar-brand {
  font-size: 1.4rem;
  font-weight: 600;
}

/* Sidebar - Light Aqua */
.sidebar {
  position: fixed;
  top: 70px;
  left: 0;
  width: 260px;
  height: calc(100vh - 70px);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  z-index: 999;
  box-shadow: 1px 0 4px rgba(0,0,0,0.04);
}

.sidebar-menu {
  flex: 1;
  padding: 30px 0;
}

.sidebar-item {
  display: flex;
  align-items: center;
  color: #000000;
  text-decoration: none;
  padding: 12px 20px;
  margin: 4px 16px;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-weight: 500;
  font-size: 15px;
}

.sidebar-item i {
  color: #000000;
  transition: color 0.3s ease;
}

.sidebar-item:hover {
  background: rgba(101, 31, 255, 0.08);
  color: #7C4DFF;
}

.sidebar-item:hover i {
  color: #7C4DFF;
}

.sidebar-item.active {
  background: #7C4DFF;
  color: white;
  box-shadow: 0 4px 12px rgba(101, 31, 255, 0.08);
}

.sidebar-item.active i {
  color: white;
}

.sidebar-bottom {
  padding: 0 16px 30px;
}

.logout-btn {
  background: #ef4444 !important;
  color: white !important;
  padding: 12px 20px;
  border-radius: 12px;
  font-weight: 500;
}

.logout-btn i {
  color: white !important;
}

.logout-btn:hover {
  background: #dc2626 !important;
  color: white !important;
}

.logout-btn:hover i {
  color: white !important;
}

/* Main content */
.main-content {
  padding: 30px;
  min-height: calc(100vh - 70px);
}

/* Cards with modern styling */
.card {
  border: none;
  border-radius: 16px;
  box-shadow: 0 4px 20px rgba(0,0,0,0.08);
  transition: transform 0.2s ease;
}

.card.stat { 
  text-align: center; 
  padding: 20px;
  background: #ffffff;
}

.card.stat h3 { 
  margin: 0; 
  font-size: 2rem;
  font-weight: 700;
  color: #000000;
}

.card.stat h6 {
  color: #000000;
  font-weight: 600;
  margin-bottom: 8px;
}

/* Buttons */
.primary-btn,
.btn-secondary {
  background: #651FFF;
  border: none;
  border-radius: 10px;
  padding: 10px 20px;
  font-weight: 500;
  transition: all 0.3s ease;
  color: white !important;
}

.primary-btn:hover,
.btn-secondary:hover {
  background: #5617df;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(101, 31, 255, 0.08);
}

.btn-move-stage {
  border: 2px solid #661fff83;
  color: #661fff83;
  border-radius: 10px;
  padding: 4px 14px !important;
  font-weight: 500;
  transition: all 0.3s ease;
}

.btn-move-stage:hover{
  background: #651FFF;
  color: white;
  border-radius: 10px;
  border: 2px solid #661fff83;
  padding: 4px 14px;
  font-weight: 500;
  box-shadow: 0 4px 12px rgba(101, 31, 255, 0.08);
}

.btn-success {
  background: #4CAF50;
  border: none;
  border-radius: 10px;
}

.btn-success:hover {
  background: #43A047;
}

/* Navigation tabs */
.card-header {
  background: rgba(101, 31, 255, 0.08);
}

.nav-tabs .nav-link {
  border-radius: 10px 10px 0 0;
  border: none;
  color: #000000;
  font-weight: 500;
}

.nav-tabs .nav-link.active {
  background:#651FFF;
  color: white;
}

/* List items */
.list-group-item {
  cursor: pointer;
  border: none;
  border-radius: 12px;
  margin-bottom: 8px;
  transition: all 0.2s ease;
  background:rgba(101, 31, 255, 0.08);
}

.list-group-item:hover {
  background:rgba(101, 31, 255, 0.20);
}

/* Form controls */
.form-control {
  border-radius: 10px;
  border: 2px solid #e5e7eb;
  transition: border-color 0.3s ease;
}

.form-control:focus {
  border-color: #651FFF;
  box-shadow: 0 0 0 3px rgba(101, 31, 255, 0.08);
}

/* Badges */
.badge {
  border-radius: 8px;
  padding: 8px 14px;
  font-weight: 500;
  font-size: 14px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  width: 30px;
  height: 30px;
  padding: 0;
}

.mobile-menu-btn span {
  width: 25px;
  height: 3px;
  background: white;
  border-radius: 2px;
  transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
  transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
  opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
  transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Overlay */
.mobile-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 998;
}

/* Mobile Optimizations */
@media (max-width: 768px) {
  /* General mobile optimizations */
  h1, h2, h3, h4, h5, h6 {
    font-size: 0.9em;
  }
  
  /* Button optimizations */
  .btn {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .btn-sm {
    padding: 4px 8px;
    font-size: 12px;
  }
  
  .primary-btn, .btn-secondary {
    padding: 8px 16px;
    font-size: 14px;
  }
  
  .btn-move-stage {
    padding: 3px 8px !important;
    font-size: 12px;
  }
  
  /* Form elements */
  .form-control {
    padding: 8px 12px;
    font-size: 14px;
  }
  
  .form-label {
    font-size: 14px;
    margin-bottom: 4px;
  }
  
  /* Card optimizations */
  .card-body {
    padding: 15px;
  }
  
  .card-title, .card h5, .card h6 {
    font-size: 16px;
    margin-bottom: 10px;
  }
  
  /* Text optimizations */
  p, div, span {
    font-size: 14px;
  }
  
  .text-primary {
    padding: 8px 15px;
    font-size: 14px;
    margin: 15px 0 10px 0 !important;
  }
  
  /* Badge optimizations */
  .badge {
    padding: 4px 8px;
    font-size: 12px;
  }
  
  /* Alert optimizations */
  .alert {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  /* List group optimizations */
  .list-group-item {
    padding: 10px 15px;
    font-size: 14px;
  }
  
  /* Table optimizations */
  .table {
    font-size: 13px;
  }
  
  .table th, .table td {
    padding: 8px;
  }
}

@media (max-width: 576px) {
  /* Extra small screens */
  .nav-tabs .nav-link {
    padding: 6px 4px;
    font-size: 12px;
  }
  
  .card.stat h3 {
    font-size: 1.3rem;
  }
  
  .card.stat h6 {
    font-size: 0.8rem;
  }
  
  .btn {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .form-control {
    padding: 6px 10px;
    font-size: 13px;
  }
  
  .card-body {
    padding: 12px;
  }
  
  h1, h2, h3, h4, h5, h6 {
    font-size: 0.85em;
  }
}

/* Responsive */
@media (max-width: 768px) {
  body {
    padding-left: 0;
  }
  
  .sidebar {
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .mobile-overlay.show {
    display: block;
  }
  
  .main-content {
    margin-left: 0;
    padding: 20px 15px;
  }
  
  .nav-tabs {
    display: flex;
    flex-wrap: nowrap;
  }
  
  .nav-tabs .nav-item {
    flex: 1;
  }
  
  .nav-tabs .nav-link {
    padding: 10px 8px;
    font-size: 15px;
    white-space: nowrap;
  }
}

/* Form section headers */
.text-primary {
  background: #661fff5d;
  padding: 12px 20px;
  border-radius: 10px;
  margin: 20px 0 15px 0 !important;
  color: #651FFF !important;
  font-weight: 600;
  border-left: 4px solid #651FFF;
}

/* Login Page Styles */
.login-body {
  background: #ffffff;
  min-height: 100vh;
  padding: 0;
}

.login-container {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-card {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border: none;
  border-radius: 20px;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  max-width: 400px;
  width: 100%;
}

.login-header {
  background: linear-gradient(135deg, #651FFF, #7C4DFF);
  color: white;
  text-align: center;
  padding: 40px 30px 30px;
  position: relative;
}

.login-icon {
  width: 80px;
  height: 80px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  font-size: 24px;
  padding-top: 5px;
}

.login-title {
  font-size: 1.8rem;
  font-weight: 700;
  margin: 0;
}

.login-subtitle {
  opacity: 0.9;
  margin: 8px 0 0;
  font-weight: 400;
}

.login-form {
  padding: 40px 30px 30px;
}

.login-form .form-control {
  border: 2px solid #e5e7eb;
  border-radius: 12px;
  padding: 12px 16px;
  font-size: 16px;
  transition: all 0.3s ease;
}

.login-form .form-control:focus {
  border-color: #651FFF;
  box-shadow: 0 0 0 4px rgba(101, 31, 255, 0.1);
  transform: translateY(-1px);
}

.login-btn {
  background: linear-gradient(135deg, #651FFF, #7C4DFF);
  border: none;
  border-radius: 12px;
  padding: 14px;
  font-weight: 600;
  font-size: 16px;
  transition: all 0.3s ease;
}

.login-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 25px rgba(101, 31, 255, 0.3);
}

/* Log Entry Styles */
.log-entry {
  transition: all 0.2s ease;
  border-left: 3px solid transparent;
}

.log-entry:hover {
  background: rgba(101, 31, 255, 0.05) !important;
  border-left-color: #651FFF;
  transform: translateX(2px);
}

.log-details table {
  font-size: 14px;
}

.log-details .table th {
  background: rgba(101, 31, 255, 0.1);
  border: none;
  font-weight: 600;
}

.log-details .table td {
  border: 1px solid #e5e7eb;
  vertical-align: middle;
}

/* Utility classes */
img { max-width: 100%; height: auto; border-radius: 8px; }
.small-note { font-size: 0.9rem; color: #6b7280; }