/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', sans-serif;
  }
  
  body {
  background: #0a0a0a;
  color: #ffffff;
  }
  
  /* Sidebar */
  .sidebar {
  width: 260px;
  background: #111;
  padding: 1.5rem;
  height: 100vh;
  position: fixed;
  top: 0;
  left: 0;
  border-right: 1px solid #222;
  display: flex;
  flex-direction: column;
  }
  
  .logo {
  width: 60px;
  margin-bottom: 1rem;
  }
  
  .sidebar-header {
  text-align: center;
  margin-bottom: 2rem;
  }
  
  .sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 10px;
  }
  
  .nav-link {
  display: flex;
  align-items: center;
  padding: 10px 15px;
  gap: 10px;
  color: #ccc;
  text-decoration: none;
  border-radius: 8px;
  transition: background 0.3s ease, color 0.3s ease;
  }
  
  .nav-link:hover,
  .nav-link.active {
  background: rgba(0, 210, 255, 0.15);
  color: #00d2ff;
  }
  
  .logout-btn {
  margin-top: auto;
  padding: 10px 15px;
  color: #ff4444;
  background: rgba(255, 255, 255, 0.05);
  border: none;
  border-radius: 8px;
  cursor: pointer;
  }
  
  .logout-btn:hover {
  background: rgba(255, 68, 68, 0.1);
  }
  
  /* Main Content */
  .main-content {
  margin-left: 260px;
  padding: 2rem;
  min-height: 100vh;
  background: #0a0a0a;
  }
  
  .admin-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2rem;
  }
  
  .header-title h1 {
  font-size: 1.8rem;
  color: #00d2ff;
  }
  
  .datetime {
  color: #888;
  font-size: 0.9rem;
  margin-top: 0.4rem;
  }
  
  .profile-avatar {
  background: #00d2ff;
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 1.1rem;
  margin-right: 10px;
  }
  
  .user-profile {
  display: flex;
  align-items: center;
  }
  
  .profile-info .username {
  font-weight: bold;
  }
  
  /* Dashboard Cards */
  .dashboard-cards {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  }
  
  .card {
  flex: 1 1 250px;
  background: #1a1a2f;
  border-radius: 12px;
  padding: 1.5rem;
  color: #fff;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
  transition: transform 0.2s ease;
  }
  
  .card:hover {
  transform: translateY(-3px);
  }
  
  .card h3 {
  font-size: 1.2rem;
  color: #00d2ff;
  }
  
  .card p {
  font-size: 2rem;
  margin-top: 10px;
  font-weight: bold;
  }
  
  /* Route Management */
  .content-section {
  margin-top: 2.5rem;
  background: #111;
  padding: 2rem;
  border-radius: 12px;
  }
  
  .route-controls {
  margin-top: 1rem;
  }
  
  .control-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
  }
  
  .route-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  }
  
  .route-table th,
  .route-table td {
  padding: 12px;
  text-align: center;
  border: 1px solid #444;
  color: #ccc;
  }
  
  .route-table th {
  background: #222;
  color: #00d2ff;
  }
  
  .status-badge {
  background: #28a74533;
  color: #28a745;
  padding: 6px 10px;
  border-radius: 20px;
  font-size: 0.85rem;
  }
  
  /* Form Styles */
  .hidden {
  display: none;
  }
  
  .form-container {
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: 10px;
  margin-top: 1rem;
  }
  
  .form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin-bottom: 1rem;
  }
  
  .form-input,
  textarea.form-input {
  padding: 10px;
  background: #111;
  color: #fff;
  border: 1px solid #333;
  border-radius: 6px;
  }
  
  .form-actions {
  display: flex;
  gap: 1rem;
  }
  
  .form-btn {
  padding: 10px 20px;
  background: linear-gradient(to right, #00c6ff, #0072ff);
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 0.9rem;
  }
  
  .form-btn.cancel {
  background: #444;
  }
  
  .form-btn.delete-btn {
  background: linear-gradient(to right, #ff416c, #ff4b2b);
  font-size: 0.8rem;
  }
  
  /* Chart Container */
  .chart-container {
  background: #1a1a1a;
  padding: 1.5rem;
  border-radius: 10px;
  margin-top: 2rem;
  }
  
  /* Responsive */
  @media (max-width: 768px) {
  .sidebar {
  position: static;
  width: 100%;
  flex-direction: row;
  overflow-x: auto;
  }
  .main-content {
  margin-left: 0;
  padding: 1rem;
  }
  .dashboard-cards {
  flex-direction: column;
  }
  }
  
  /* Login Page Styles */
  .login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    padding: 20px;
  }
  
  .login-box {
    background: rgba(0, 0, 0, 0.9);
    padding: 2.5rem;
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 0 30px rgba(0, 210, 255, 0.2);
  }
  
  .login-header {
    text-align: center;
    margin-bottom: 2rem;
  }
  
  .logo {
    width: 70px;
    margin-bottom: 1rem;
  }
  
  .login-header h1 {
    color: #00d2ff;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
  }
  
  .login-header p {
    color: #888;
    font-size: 0.9rem;
  }
  
  .login-form {
    margin: 2rem 0;
  }
  
  .input-group {
    position: relative;
    margin-bottom: 2rem;
  }
  
  .input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 1.1rem;
  }
  
  .input-group input {
    width: 100%;
    padding: 14px 14px 14px 40px;
    background: #1a1a1a;
    border: none;
    border-radius: 8px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
  }
  
  .input-group input:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 210, 255, 0.3);
  }
  
  .input-group label {
    position: absolute;
    left: 40px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    pointer-events: none;
    transition: all 0.3s ease;
  }
  
  .input-group input:focus ~ label,
  .input-group input:valid ~ label {
    top: -10px;
    left: 35px;
    font-size: 0.8rem;
    color: #00d2ff;
  }
  
  .password-toggle {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    cursor: pointer;
    transition: color 0.3s ease;
  
    padding: 5px;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .password-toggle:hover {
  
    color: #00d2ff;
  }
  
  .login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #00c6ff 0%, #0072ff 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: transform 0.3s ease;
  }
  
  .login-btn:hover {
    transform: translateY(-2px);
  }
  
  .error-message {
    background: #ff444433;
    color: #ff4444;
    padding: 12px;
    border-radius: 8px;
    margin-top: 1rem;
    display: none;
    align-items: center;
    gap: 10px;
  }
  
  /* Admin Dashboard Styles */
  .admin-container {
    display: flex;
    min-height: 100vh;
  }
  
  .sidebar {
    width: 280px;
    background: #111;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid #222;
  }
  
  .sidebar-header {
    text-align: center;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #222;
    margin-bottom: 1.5rem;
  }
  
  .sidebar-nav {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  
  .nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    color: #888;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
  }
  
  .nav-link:hover {
    background: rgba(0, 210, 255, 0.1);
    color: #00d2ff;
  }
  
  .nav-link.active {
    background: rgba(0, 210, 255, 0.15);
    color: #00d2ff;
  }
  
  .logout-btn {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    color: #ff4444;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
  }
  
  .logout-btn:hover {
    background: rgba(255, 68, 68, 0.1);
  }
  
  .main-content {
    flex: 1;
    background: #0a0a0a;
    padding: 2rem;
  }
  
  .admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem 0;
  }
  
  .content-section {
    background: #111;
    border-radius: 12px;
    padding: 2rem;
    margin-top: 1.5rem;
  }
  
  .stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
  }
  
  .stat-card {
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 10px;
    border-left: 4px solid #00d2ff;
  }
  
  .stat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
  }
  
  .stat-header i {
    font-size: 1.5rem;
    color: #00d2ff;
  }
  
  .stat-value {
    font-size: 2.5rem;
    font-weight: bold;
    margin: 1rem 0;
  }
  
  .stat-trend {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.9rem;
  }
  
  .stat-trend.positive {
    background: rgba(0, 255, 136, 0.1);
    color: #00ff88;
  }
  
  .stat-trend.negative {
    background: rgba(255, 68, 68, 0.1);
    color: #ff4444;
  }
  
  .chart-container {
    margin-top: 2rem;
    background: #1a1a1a;
    padding: 1.5rem;
    border-radius: 10px;
  }
  
  @media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 1rem;
    }
    .sidebar-header {
        padding: 0.5rem 0;
        margin-bottom: 1rem;
    }
    .sidebar-nav {
        flex-direction: row;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        gap: 0.5rem;
    }
    .nav-link {
        padding: 8px 12px;
        white-space: nowrap;
    }
    .nav-link span {
        display: none;
    }
    .nav-link i {
        font-size: 1.2rem;
    }
    .main-content {
        margin-left: 0;
        padding: 1rem;
    }
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        margin-bottom: 1rem;
    }
    .user-profile {
        width: 100%;
        justify-content: flex-start;
    }
    .dashboard-cards {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .card {
        padding: 1rem;
    }
    .card p {
        font-size: 1.5rem;
    }
    .content-section {
        padding: 1rem;
        margin-top: 1rem;
    }
    .route-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
    .route-table th,
    .route-table td {
        padding: 8px;
        font-size: 0.9rem;
    }
    .form-grid {
        grid-template-columns: 1fr;
    }
    .form-actions {
        flex-direction: column;
    }
    .form-btn {
        width: 100%;
    }
    .chart-container {
        padding: 1rem;
        margin-top: 1rem;
    }
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    .stat-card {
        padding: 1rem;
    }
    .stat-value {
        font-size: 2rem;
    }
  }

  /* Additional Mobile Optimizations */
  @media (max-width: 480px) {
    .sidebar-nav {
        justify-content: space-between;
    }
    .nav-link {
        padding: 8px;
    }
    .header-title h1 {
        font-size: 1.5rem;
    }
    .datetime {
        font-size: 0.8rem;
    }
    .profile-avatar {
        width: 35px;
        height: 35px;
        font-size: 0.9rem;
    }
    .profile-info .username {
        font-size: 0.9rem;
    }
    .profile-info .user-role {
        font-size: 0.8rem;
    }
    .card h3 {
        font-size: 1rem;
    }
    .content-section h2 {
        font-size: 1.2rem;
    }
    .form-input,
    textarea.form-input {
        font-size: 0.9rem;
    }
  }
  