/* --- NEW DESIGN CSS FRAMEWORK --- */
/* Based on example.txt design with dark theme, grid background, and modern components */

:root {
  /* Color Variables */
  --bg-color: #050505;
  --card-bg: #0f0f0f;
  --border-color: #27272a;
  --text-main: #e4e4e7;
  --text-muted: #a1a1aa;
  --accent-primary: #10b981; /* Vibrant green */
  --accent-secondary: #a855f7; /* Purple */
  --font-main: "Inter", sans-serif;
  --font-mono: "JetBrains Mono", monospace;
  
  /* Spacing & Sizes */
  --header-height: 70px;
  --border-radius: 12px;
  --transition-speed: 0.3s;
}

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

html {
  scroll-behavior: smooth;
}

body {
  background-color: var(--bg-color);
  color: var(--text-main);
  font-family: var(--font-main);
  line-height: 1.6;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- BACKGROUND GRID EFFECT --- */
.grid-bg {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  background-image: 
    linear-gradient(to right, #1a1a1a 1px, transparent 1px),
    linear-gradient(to bottom, #1a1a1a 1px, transparent 1px);
  background-size: 50px 50px;
  mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  -webkit-mask-image: radial-gradient(ellipse at center, black 40%, transparent 80%);
  opacity: 0.6;
}

/* --- HEADER --- */
.header-nav {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  padding: 15px 0;
  z-index: 100;
  background-color: rgba(5, 5, 5, 0.8);
  backdrop-filter: blur(5px);
  border-bottom: 1px solid var(--border-color);
}

.header-content {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 1.2rem;
  text-decoration: none;
  color: var(--text-main);
}

.logo-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
}

.nav-links {
  display: flex;
  gap: 1.5rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: color var(--transition-speed);
  position: relative;
}

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

.nav-links a::after {
  content: "";
  position: absolute;
  bottom: -5px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--accent-primary);
  transition: width var(--transition-speed);
}

.nav-links a:hover::after {
  width: 100%;
}

/* User Avatar Dropdown */
.user-dropdown {
  position: relative;
  display: inline-block;
}

.user-avatar {
  cursor: pointer;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-primary);
  transition: transform var(--transition-speed);
}

.user-avatar:hover {
  transform: scale(1.1);
}

.avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.5rem 0;
  min-width: 150px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
  z-index: 1000;
  display: none;
}

.user-dropdown:hover .dropdown-menu {
  display: block;
}

.dropdown-item {
  display: block;
  padding: 0.75rem 1rem;
  color: var(--text-main);
  text-decoration: none;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  transition: background-color var(--transition-speed);
}

.dropdown-item:hover {
  background-color: var(--border-color);
  color: white;
}

/* --- MAIN CONTENT --- */
main {
  flex: 1;
  margin-top: var(--header-height);
  padding-top: 30px;
}

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

/* --- CARDS --- */
.card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 2rem;
  transition: transform var(--transition-speed), border-color var(--transition-speed);
  position: relative;
  overflow: hidden;
}

.card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

.card-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.card-icon {
  width: 40px;
  height: 40px;
  background: var(--accent-primary);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bg-color);
  font-size: 1.2rem;
}

.card-title {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--text-main);
}

/* --- BUTTONS --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 20px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text-main);
  text-decoration: none;
  transition: all var(--transition-speed);
  cursor: pointer;
}

.btn:hover {
  background: var(--border-color);
  color: #fff;
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--accent-primary);
  border-color: var(--accent-primary);
  color: var(--bg-color);
  font-weight: 700;
}

.btn-primary:hover {
  background: #0da271;
  border-color: #0da271;
  color: var(--bg-color);
}

.btn-secondary {
  background: var(--accent-secondary);
  border-color: var(--accent-secondary);
  color: var(--bg-color);
}

.btn-secondary:hover {
  background: #9340e0;
  border-color: #9340e0;
  color: var(--bg-color);
}

/* --- TYPOGRAPHY --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-mono);
  color: #fff;
  line-height: 1.3;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
  margin-bottom: 1rem;
}

h2 {
  font-size: 1.8rem;
  margin-bottom: 1.5rem;
  display: flex;
  align-items: center;
  gap: 10px;
}

h2::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-main);
  box-shadow: 0 0 10px var(--text-main);
}

p {
  color: var(--text-muted);
  margin-bottom: 1rem;
}

a {
  text-decoration: none;
  color: inherit;
  transition: var(--transition-speed);
}

/* --- FORM ELEMENTS --- */
.form-group {
  margin-bottom: 1.5rem;
}

.form-group label {
  display: block;
  margin-bottom: 0.5rem;
  color: var(--text-main);
  font-family: var(--font-mono);
  font-size: 0.9rem;
}

.form-control {
  width: 100%;
  padding: 12px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: 8px;
  color: var(--text-main);
  font-family: var(--font-main);
  font-size: 1rem;
  transition: border-color var(--transition-speed);
}

.form-control:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.2);
}

/* --- LISTS --- */
.info-list {
  list-style: none;
  padding: 0;
}

.info-list li {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.info-list li:last-child {
  border-bottom: none;
}

/* --- STATUS BADGES --- */
.status-badge {
  padding: 0.3rem 0.8rem;
  border-radius: 20px;
  font-size: 0.8rem;
  font-family: var(--font-mono);
  font-weight: 600;
}

.status-online {
  background: rgba(16, 185, 129, 0.2);
  color: var(--accent-primary);
}

.status-offline {
  background: rgba(231, 76, 60, 0.2);
  color: #e74c3c;
}

.status-maintenance {
  background: rgba(243, 156, 18, 0.2);
  color: #f39c12;
}

/* --- GRID SYSTEM --- */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: var(--card-bg);
  border: 1px solid var(--border-color);
  border-radius: var(--border-radius);
  padding: 1.5rem;
  text-align: center;
  transition: all var(--transition-speed);
}

.stat-card:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  color: var(--accent-primary);
  margin-bottom: 0.5rem;
}

.stat-label {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-family: var(--font-mono);
}

/* --- ACTION BUTTONS --- */
.action-buttons {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 1.5rem;
}

/* --- WELCOME SECTION --- */
.welcome-section {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(168, 85, 247, 0.1));
  padding: 3rem 0;
  text-align: center;
  margin-bottom: 3rem;
  border-radius: var(--border-radius);
  border: 1px solid var(--border-color);
}

.welcome-section h1 {
  margin-bottom: 1rem;
}

/* --- FOOTER --- */
.footer {
  background: var(--card-bg);
  border-top: 1px solid var(--border-color);
  padding: 3rem 0 1.5rem;
  margin-top: 4rem;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 2rem;
  margin-bottom: 2rem;
}

.footer-section h4 {
  color: var(--accent-primary);
  margin-bottom: 1rem;
  font-family: var(--font-mono);
}

.footer-section p,
.footer-section a {
  color: var(--text-muted);
  text-decoration: none;
  line-height: 1.8;
  font-size: 0.9rem;
}

.footer-section a:hover {
  color: var(--accent-primary);
}

.footer-bottom {
  text-align: center;
  padding-top: 2rem;
  border-top: 1px solid var(--border-color);
  color: var(--text-muted);
  font-size: 0.8rem;
  font-family: var(--font-mono);
}

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

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

.mb-2 {
  margin-bottom: 2rem;
}

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

.mt-2 {
  margin-top: 2rem;
}

.d-flex {
  display: flex;
}

.justify-content-between {
  justify-content: space-between;
}

.align-items-center {
  align-items: center;
}

.gap-1 {
  gap: 1rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 768px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }
  
  .quick-stats {
    grid-template-columns: repeat(2, 1fr);
  }
  
  .action-buttons {
    flex-direction: column;
  }
  
  .header-content {
    flex-direction: column;
    gap: 1rem;
  }
  
  .nav-links {
    flex-wrap: wrap;
    justify-content: center;
  }
  
  .welcome-section {
    padding: 2rem 0;
  }
  
  .footer-content {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 480px) {
  .quick-stats {
    grid-template-columns: 1fr;
  }
  
  .footer-content {
    grid-template-columns: 1fr;
  }
  
  .card {
    padding: 1.5rem;
  }
}