@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

:root {
  --bg-dark: #0f172a;
  --bg-panel: #1e293b;
  --bg-card: #334155;
  --primary: #3b82f6;
  --primary-hover: #2563eb;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --border: #475569;
  --success: #10b981;
  --danger: #ef4444;
}

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

body {
  font-family: 'Inter', sans-serif;
  background-color: var(--bg-dark);
  color: var(--text-main);
  display: flex;
  height: 100vh;
  overflow: hidden;
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-panel);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  transition: all 0.3s ease;
}

.sidebar-header {
  margin-bottom: 2.5rem;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--primary);
}

.logo i {
  font-size: 28px;
}

.logo h2 {
  font-size: 1.25rem;
  color: var(--text-main);
  font-weight: 700;
  letter-spacing: 0.5px;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-grow: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  text-decoration: none;
  color: var(--text-muted);
  border-radius: 8px;
  transition: all 0.2s ease;
  font-weight: 500;
}

.nav-item i {
  font-size: 20px;
}

.nav-item:hover {
  background-color: rgba(59, 130, 246, 0.1);
  color: var(--primary);
}

.nav-item.active {
  background-color: var(--primary);
  color: white;
}

/* Main Content */
.main-content {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  padding: 2rem 3rem;
}

/* Topbar */
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 2.5rem;
}

.page-title {
  font-size: 1.75rem;
  font-weight: 700;
  margin-bottom: 4px;
}

.page-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.user-profile {
  display: flex;
  align-items: center;
  gap: 12px;
  background-color: var(--bg-panel);
  padding: 8px 16px;
  border-radius: 50px;
  border: 1px solid var(--border);
  cursor: pointer;
  transition: border-color 0.2s ease;
}

.user-profile:hover {
  border-color: var(--primary);
}

.user-name {
  font-weight: 500;
  font-size: 0.9rem;
}

.avatar {
  width: 36px;
  height: 36px;
  background: linear-gradient(135deg, var(--primary), #8b5cf6);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: bold;
  font-size: 0.85rem;
}

/* Dashboard Grid */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.card {
  background-color: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 1.5rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

/* Stat Cards */
.stat-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.stat-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  color: var(--text-muted);
}

.stat-header h3 {
  font-size: 0.9rem;
  font-weight: 500;
}

.stat-icon {
  font-size: 24px;
  color: var(--primary);
  background-color: rgba(59, 130, 246, 0.1);
  padding: 8px;
  border-radius: 8px;
}

.stat-value {
  font-size: 2rem;
  font-weight: 700;
}

.stat-change {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 0.85rem;
  font-weight: 500;
}

.stat-change.positive { color: var(--success); }
.stat-change.negative { color: var(--danger); }

/* Feature Card */
.feature-card {
  grid-column: span 3;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: linear-gradient(135deg, var(--bg-panel) 0%, #1e293b 100%);
  border-left: 4px solid var(--primary);
  padding: 2rem 3rem;
  margin-top: 1rem;
}

.feature-content h2 {
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
}

.feature-content p {
  color: var(--text-muted);
  max-width: 500px;
  line-height: 1.6;
  margin-bottom: 1.5rem;
}

.btn-primary {
  background-color: var(--primary);
  color: white;
  border: none;
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.btn-primary:hover {
  background-color: var(--primary-hover);
}

.feature-illustration i {
  font-size: 120px;
  color: var(--primary);
  opacity: 0.8;
}

/* Responsive */
@media (max-width: 1024px) {
  .dashboard-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .feature-card {
    grid-column: span 2;
  }
}

@media (max-width: 768px) {
  .sidebar { width: 80px; }
  .sidebar-header h2, .nav-item span { display: none; }
  .nav-item { justify-content: center; }
  .dashboard-grid { grid-template-columns: 1fr; }
  .feature-card {
    grid-column: span 1;
    flex-direction: column;
    text-align: center;
    gap: 2rem;
  }
}
