/* ====== Global Reset ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
  background: #f5f7fa;
  color: #333;
  font-size: 15px;
}

/* ====== Layout ====== */
.app-container {
  display: flex;
  height: 100vh;
}

/* ====== Sidebar ====== */
.sidebar {
  width: 250px;
  background: #1e293b;
  color: #fff;
  display: flex;
  flex-direction: column;
  position: fixed;
  height: 100%;
  transition: width 0.3s;
}

.sidebar-header {
  display: flex;
  align-items: center;
  padding: 20px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-logo {
  font-size: 24px;
  margin-right: 10px;
  color: #38bdf8;
}

.sidebar-title {
  font-size: 18px;
  font-weight: bold;
}

.sidebar-nav {
  flex-grow: 1;
  padding: 15px 0;
}

.nav-list {
  list-style: none;
}

.nav-item {
  margin: 5px 0;
}

.nav-link {
  display: flex;
  align-items: center;
  padding: 12px 20px;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 15px;
  transition: background 0.2s, color 0.2s;
}

.nav-link i {
  margin-right: 12px;
  font-size: 16px;
}

.nav-link:hover,
.nav-link.active {
  background: #334155;
  color: #fff;
}

.nav-footer {
  padding: 10px 20px;
  border-top: 1px solid rgba(255,255,255,0.1);
}

/* ====== Main Content ====== */
.main-content {
  margin-left: 250px;
  padding: 20px;
  flex-grow: 1;
}

/* ====== Header ====== */
.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  padding: 15px 20px;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.05);
  margin-bottom: 20px;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 20px;
  cursor: pointer;
}

.user-menu {
  position: relative;
}

.user-avatar {
  background: none;
  border: none;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.avatar-img {
  border-radius: 50%;
  width: 36px;
  height: 36px;
}

.dropdown-menu {
  position: absolute;
  right: 0;
  top: 50px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  border-radius: 8px;
  display: none;
  flex-direction: column;
  min-width: 160px;
  overflow: hidden;
}

.dropdown-item {
  padding: 12px 15px;
  color: #333;
  text-decoration: none;
  font-size: 14px;
  transition: background 0.2s;
}

.dropdown-item:hover {
  background: #f1f5f9;
}

.dropdown-divider {
  height: 1px;
  background: #e2e8f0;
  margin: 5px 0;
}

/* ====== Dashboard Stats ====== */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 20px;
}

.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  box-shadow: 0 4px 8px rgba(0,0,0,0.05);
  transition: transform 0.2s;
}

.stat-card:hover {
  transform: translateY(-4px);
}

.stat-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.stat-header h3 {
  font-size: 16px;
  font-weight: 600;
  color: #64748b;
}

.stat-icon {
  font-size: 22px;
  color: #38bdf8;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  margin: 15px 0 5px;
}

.stat-change {
  font-size: 13px;
}

.stat-change.positive {
  color: #16a34a;
}

.stat-change.warning {
  color: #eab308;
}

.stat-change.negative {
  color: #dc2626;
}

/* ====== Content Card ====== */
.content-card {
  background: #fff;
  border-radius: 12px;
  padding: 20px;
  margin-top: 30px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.card-header h2 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 5px;
}

.card-header p {
  font-size: 14px;
  color: #64748b;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 15px;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e2e8f0;
}

.data-table th {
  color: #475569;
  font-size: 14px;
}

.data-table td {
  font-size: 14px;
}

/* ====== Button ====== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 500;
  transition: background 0.2s;
}

.btn-primary {
  background: #2563eb;
  color: #fff;
  padding: 10px 18px;
}

.btn-primary:hover {
  background: #1d4ed8;
}

.btn-secondary {
  background: #e2e8f0;
  color: #333;
  padding: 10px 18px;
}

.btn-secondary:hover {
  background: #cbd5e1;
}

.btn-large {
  font-size: 16px;
  padding: 14px 28px;
}
