:root {
  --bg-dark: #070c17;
  --panel-bg: rgba(30, 41, 59, 0.7);
  --panel-border: rgba(255, 255, 255, 0.08);
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --primary-blue: #0ea5e9;
  --primary-green: #10b981;
  --primary-orange: #f59e0b;
  --danger: #ef4444;
  --sidebar-w: 260px;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Inter', sans-serif;
}

body {
  background: var(--bg-dark) url('https://www.transparenttextures.com/patterns/cubes.png');
  color: var(--text-main);
  overflow-x: hidden;
}

/* Base Layout */
.dashboard-container {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: var(--sidebar-w);
  background: rgba(15, 23, 42, 0.95);
  backdrop-filter: blur(12px);
  border-right: 1px solid var(--panel-border);
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  padding: 30px 20px;
  display: flex;
  align-items: center;
  gap: 15px;
  border-bottom: 1px solid var(--panel-border);
}

.logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--primary-blue), var(--primary-green));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.sidebar-header h2 {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.2;
}
.sidebar-header h2 span {
  font-size: 0.8rem;
  color: var(--primary-green);
  font-weight: 500;
}

.sidebar-nav {
  padding: 20px 0;
  flex: 1;
}

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

.nav-item:hover {
  color: var(--text-main);
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  color: var(--primary-green);
  background: linear-gradient(90deg, rgba(16,185,129,0.1) 0%, transparent 100%);
  border-left: 3px solid var(--primary-green);
}

.sidebar-footer {
  padding: 20px 0;
  border-top: 1px solid var(--panel-border);
}

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

.topbar {
  height: 70px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--panel-border);
  background: rgba(7, 12, 23, 0.8);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.search-bar {
  display: flex;
  align-items: center;
  background: var(--panel-bg);
  padding: 8px 16px;
  border-radius: 20px;
  border: 1px solid var(--panel-border);
  width: 300px;
}

.search-bar i {
  color: var(--text-muted);
  margin-right: 10px;
}

.search-bar input {
  background: none;
  border: none;
  outline: none;
  color: var(--text-main);
  width: 100%;
}

.profile-area {
  display: flex;
  align-items: center;
  gap: 20px;
}

.notification-bell {
  position: relative;
  font-size: 1.2rem;
  cursor: pointer;
}

.badge {
  position: absolute;
  top: -5px;
  right: -8px;
  background: var(--danger);
  color: white;
  font-size: 0.6rem;
  font-weight: bold;
  padding: 2px 5px;
  border-radius: 10px;
}

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
}

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

.content-wrapper {
  padding: 40px;
}

/* Sections */
.content-section {
  display: none;
  animation: fadeIn 0.4s ease forwards;
}
.content-section.active {
  display: block;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

.page-header {
  margin-bottom: 30px;
}
.page-header h1 {
  font-size: 1.8rem;
  font-weight: 600;
  margin-bottom: 5px;
}
.page-header p {
  color: var(--text-muted);
}

/* Glass Panels */
.glass-panel {
  background: var(--panel-bg);
  backdrop-filter: blur(16px);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

/* Grid Layouts */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}

/* Stat Cards */
.stat-card {
  background: var(--panel-bg);
  border: 1px solid var(--panel-border);
  border-radius: 16px;
  padding: 24px;
  display: flex;
  align-items: center;
  gap: 20px;
}
.icon-wrap {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
}
.icon-wrap.blue { background: rgba(14, 165, 233, 0.15); color: var(--primary-blue); }
.icon-wrap.green { background: rgba(16, 185, 129, 0.15); color: var(--primary-green); }
.icon-wrap.orange { background: rgba(245, 158, 11, 0.15); color: var(--primary-orange); }

.stat-info h3 {
  font-size: 0.9rem;
  color: var(--text-muted);
  font-weight: 500;
  margin-bottom: 4px;
}
.val {
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}
.trend.up {
  color: var(--primary-green);
  font-size: 0.8rem;
  background: rgba(16, 185, 129, 0.1);
  padding: 2px 6px;
  border-radius: 6px;
}

/* Typography & Utils */
.text-green { color: var(--primary-green); }
.text-blue { color: var(--primary-blue); }
.text-danger { color: var(--danger); }
.mt-10 { margin-top: 10px; }
.mt-20 { margin-top: 20px; }
.text-center { text-align: center; }
.text-sm { font-size: 0.85rem; }
.text-xs { font-size: 0.75rem; }
.w-full { width: 100%; }
.block { display: block; }
.flex-column-center { display: flex; flex-direction: column; align-items: center; }

/* Forms */
.form-panel h3 { margin-bottom: 20px; display: flex; align-items: center; gap: 10px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; font-weight: 500; }
.form-group input[type="text"], .form-group input[type="email"], .form-group textarea, .styled-select {
  width: 100%;
  padding: 12px 16px;
  background: rgba(0,0,0,0.2);
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  color: var(--text-main);
  outline: none;
  font-family: inherit;
  transition: all 0.2s;
}
.form-group input:focus, .form-group textarea:focus, .styled-select:focus {
  border-color: var(--primary-blue);
  box-shadow: 0 0 0 2px rgba(14, 165, 233, 0.2);
}

.toggle-group {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

/* Switch Toggle */
.switch { position: relative; display: inline-block; width: 46px; height: 24px; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255,255,255,0.1); transition: .3s; border-radius: 24px;
}
.slider:before {
  position: absolute; content: ""; height: 18px; width: 18px; left: 3px; bottom: 3px;
  background-color: white; transition: .3s; border-radius: 50%;
}
input:checked + .slider { background-color: var(--primary-green); }
input:checked + .slider:before { transform: translateX(22px); }

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  justify-content: center;
}
.btn-sm { padding: 6px 12px; font-size: 0.8rem; }
.btn-primary { background: linear-gradient(135deg, var(--primary-blue), var(--primary-green)); color: white; }
.btn-primary:hover { opacity: 0.9; transform: translateY(-1px); }
.btn-outline { background: transparent; border: 1px solid var(--panel-border); color: var(--text-main); }
.btn-outline:hover { background: rgba(255,255,255,0.05); }

.btn-icon {
  background: none; border: none; color: var(--text-muted); cursor: pointer;
  padding: 5px; border-radius: 4px; transition: color 0.2s;
}
.btn-icon:hover { color: var(--text-main); }
.btn-icon.text-danger:hover { color: var(--danger); }

/* Tables */
.panel-header-row {
  display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px;
}
.data-table {
  width: 100%; border-collapse: collapse;
}
.data-table th {
  text-align: left; padding: 12px 16px; color: var(--text-muted); font-weight: 500;
  border-bottom: 1px solid var(--panel-border);
}
.data-table td {
  padding: 16px; border-bottom: 1px solid rgba(255,255,255,0.03); vertical-align: middle;
}
.data-table tr:hover td { background: rgba(255,255,255,0.015); }
.data-table img { vertical-align: middle; margin-right: 8px; border-radius: 2px; }

.badge-active { background: rgba(16, 185, 129, 0.1); color: var(--primary-green); padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }
.badge-inactive { background: rgba(239, 68, 68, 0.1); color: var(--danger); padding: 4px 8px; border-radius: 4px; font-size: 0.75rem; font-weight: bold; }

/* Users */
.user-cell { display: flex; align-items: center; gap: 12px; }
.upic {
  width: 32px; height: 32px; border-radius: 50%; background: var(--primary-green);
  display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 0.8rem;
}
.bg-blue { background: var(--primary-blue); }
.bg-orange { background: var(--primary-orange); }

.search-input {
  width: 300px; padding: 10px 16px; background: rgba(0,0,0,0.2); border: 1px solid var(--panel-border);
  border-radius: 20px; color: var(--text-main); outline: none;
}

/* Logo Preview */
.logo-preview {
  width: 120px; height: 120px;
  background: rgba(0,0,0,0.3);
  border: 1px dashed var(--panel-border);
  display: flex; align-items: center; justify-content: center;
  border-radius: 16px;
}
