:root {
  --primary-color: #00f2ff;
  /* Cyan/Tech Blue */
  --secondary-color: #ff0055;
  /* Tech Red/Pink */
  --bg-color: #050505;
  --card-bg: #111111;
  --text-color: #e0e0e0;
  --border-color: #222;
  --glow-shadow: 0 0 10px rgba(0, 242, 255, 0.5);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  background-color: var(--bg-color);
  color: var(--text-color);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Animation Placeholder */
#particles-js {
  position: fixed;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  z-index: -1;
  background: radial-gradient(circle at center, #0a0a0a 0%, #000 100%);
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Header/Nav */
.navbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 2rem;
  background: rgba(17, 17, 17, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border-color);
  position: sticky;
  top: 0;
  z-index: 100;
}

.brand {
  font-size: 1.5rem;
  font-weight: bold;
  color: var(--primary-color);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.nav-links a {
  color: #fff;
  text-decoration: none;
  margin-left: 1.5rem;
  font-size: 0.9rem;
  transition: color 0.3s;
}

.nav-links a:hover {
  color: var(--primary-color);
}

/* Forms */
.form-container {
  max-width: 400px;
  margin: 5rem auto;
  padding: 2rem;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  position: relative;
  overflow: hidden;
}

.form-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

.form-group {
  margin-bottom: 1.5rem;
}

.form-control {
  width: 100%;
  padding: 10px;
  background: #222;
  border: 1px solid #333;
  color: #fff;
  border-radius: 5px;
  outline: none;
  transition: border-color 0.3s, box-shadow 0.3s;
}

.form-control:focus {
  border-color: var(--primary-color);
  box-shadow: 0 0 5px rgba(0, 242, 255, 0.3);
}

.invalid-feedback {
  color: var(--secondary-color);
  font-size: 0.8rem;
  display: block;
  margin-top: 5px;
}

.btn {
  display: inline-block;
  background: var(--primary-color);
  color: #000;
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-weight: bold;
  text-transform: uppercase;
  letter-spacing: 1px;
  width: 100%;
  transition: background 0.3s, transform 0.2s;
  text-decoration: none;
  text-align: center;
}

.btn:hover {
  background: #00d4e0;
  transform: translateY(-2px);
  box-shadow: var(--glow-shadow);
  text-decoration: none;
  color: #000;
}

.btn-secondary {
  background: #333;
  color: #fff;
}

.btn-secondary:hover {
  background: #444;
  color: #fff;
  box-shadow: none;
}

.btn-success {
  background: #00ff88;
  color: #000;
}

.btn-info {
  background: #17a2b8;
  color: #fff;
}

.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 1rem;
}

/* Utilities */
.text-center {
  text-align: center;
}

.mt-3 {
  margin-top: 1rem;
}

.mb-3 {
  margin-bottom: 1rem;
}

.text-primary {
  color: var(--primary-color);
}

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

.text-success {
  color: #00ff88;
}

.text-white {
  color: #fff;
}

/* Tables */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  border-bottom: 1px solid #333;
  text-align: left;
}

.table th {
  background: #1a1a1a;
  color: var(--primary-color);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
}

.table tr:hover {
  background: rgba(255, 255, 255, 0.02);
}

/* Badges */
.badge {
  padding: 5px 10px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: bold;
  text-transform: uppercase;
}

.badge-primary {
  background: var(--primary-color);
  color: #000;
}

.badge-secondary {
  background: #333;
  color: #ccc;
}

.badge-success {
  background: #00ff88;
  color: #000;
}

.badge-warning {
  background: #ffaa00;
  color: #000;
}

.badge-danger {
  background: var(--secondary-color);
  color: #fff;
}

/* Alerts */
.alert {
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  border: 1px solid transparent;
}

.alert-success {
  background: rgba(0, 255, 136, 0.1);
  border-color: #00ff88;
  color: #00ff88;
}

.alert-danger {
  background: rgba(255, 0, 85, 0.1);
  border-color: #ff0055;
  color: #ff0055;
}

/* --- Redesigned Header Styles --- */
.custom-navbar {
  background: rgba(10, 10, 10, 0.85) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
}

.brand-logo-mini {
  height: 40px;
  width: auto;
  margin-right: 12px;
  background: rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(5px);
  padding: 6px;
  border-radius: 12px;
  /* Soft rounded corners */
  border: 1px solid rgba(255, 255, 255, 0.1);
  transition: transform 0.3s ease;
}

.navbar-brand:hover .brand-logo-mini {
  transform: rotate(5deg) scale(1.05);
  background: rgba(255, 255, 255, 0.2);
}

.custom-navbar .nav-link {
  font-family: 'Orbitron', sans-serif;
  letter-spacing: 1px;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 1rem !important;
  position: relative;
  transition: color 0.3s ease;
}

.custom-navbar .nav-link::after {
  content: '';
  position: absolute;
  bottom: 5px;
  left: 50%;
  width: 0;
  height: 2px;
  background: var(--primary-color);
  transition: width 0.3s ease, left 0.3s ease;
}

.custom-navbar .nav-link:hover {
  color: var(--primary-color) !important;
  text-shadow: 0 0 8px rgba(0, 242, 255, 0.4);
}

.custom-navbar .nav-link:hover::after {
  width: 80%;
  left: 10%;
}

/* Desktop Specific refinements */
@media (min-width: 992px) {
  .btn-logout {
    width: auto !important;
    display: inline-block !important;
    min-width: unset !important;
  }

  .custom-navbar .nav-link {
    margin: 0 5px;
    /* Add breathing room between links */
  }
}

/* Mobile Menu Enhancements */
@media (max-width: 991px) {
  .custom-navbar .navbar-collapse {
    background: rgba(15, 15, 15, 0.98);
    padding: 20px;
    border-radius: 15px;
    margin-top: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  }

  .custom-navbar .nav-link {
    text-align: center;
    padding: 12px 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
  }

  .custom-navbar .nav-link:last-child {
    border-bottom: none;
  }

  .btn-logout {
    width: 100%;
    margin-top: 15px !important;
    margin-left: 0 !important;
  }
}

/* Responsive */
@media (max-width: 768px) {
  .navbar {
    flex-direction: column;
    padding: 1rem;
  }

  .nav-links {
    margin-top: 1rem;
  }

  .nav-links a {
    margin: 0 10px;
  }

  .col-md-6,
  .col-md-4,
  .col-md-3,
  .col-md-9 {
    width: 100%;
    margin-bottom: 1rem;
  }

  .table {
    display: block;
    overflow-x: auto;
  }
}