/* --- GLOBAL RESETS --- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Poppins', sans-serif;
}

body {
  display: flex;
  min-height: 100vh;
  background: #f8f9fc;
  color: #333;
  transition: all 0.3s ease;
}

body.dark {
  background: #1e1e2f;
  color: #ddd;
}

/* --- SIDEBAR --- */
.sidebar {
  width: 240px;
  background: #1f2937;
  color: #fff;
  padding: 20px 0;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  flex-direction: column;
  transition: 0.3s;
}

.sidebar h2 {
  font-size: 20px;
  text-align: center;
  margin-bottom: 30px;
  font-weight: 600;
  color: #fff;
}

.sidebar a {
  display: block;
  padding: 12px 25px;
  color: #d1d5db;
  text-decoration: none;
  font-weight: 500;
  transition: 0.3s;
}

.sidebar a:hover,
.sidebar a.active {
  background: #374151;
  color: #fff;
}

/* --- MAIN CONTENT --- */
.main-content {
  margin-left: 240px;
  width: calc(100% - 240px);
  padding: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* --- HEADER --- */
.header {
  background: #ffffff;
  border-bottom: 1px solid #e5e7eb;
  padding: 15px 25px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.header h1 {
  font-size: 22px;
  font-weight: 600;
}

.header .logout-btn {
  background: #ef4444;
  color: #fff;
  padding: 8px 16px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 14px;
}

.header .logout-btn:hover {
  background: #dc2626;
}

.header .toggle-btn {
  background: #374151;
  color: #fff;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  margin-right: 10px;
}

.header .toggle-btn:hover {
  background: #4b5563;
}

/* --- PAGE CONTENT --- */
.page-content {
  padding: 25px;
}

.card {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
  margin-bottom: 25px;
}

body.dark .card {
  background: #2b2b3d;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

.card h3 {
  font-size: 18px;
  margin-bottom: 15px;
  color: #111827;
}

body.dark .card h3 {
  color: #f9fafb;
}

label {
  display: block;
  margin-top: 10px;
  font-weight: 500;
}

input[type=text],
input[type=file],
select {
  width: 100%;
  padding: 10px;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  margin-top: 5px;
}

body.dark input,
body.dark select {
  background: #1e1e2f;
  color: #eee;
  border: 1px solid #4b5563;
}

.btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 8px;
  margin-top: 10px;
  cursor: pointer;
  font-weight: 500;
  transition: 0.3s;
}

.btn:hover {
  background: #1d4ed8;
}

.btn-danger {
  background: #ef4444;
}

.btn-danger:hover {
  background: #dc2626;
}

.message {
  background: #dcfce7;
  color: #166534;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 15px;
}

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f3f4f6;
  padding: 10px 15px;
  border-radius: 8px;
  margin-top: 8px;
}

body.dark .list-item {
  background: #34344a;
}

.list-item a {
  color: #2563eb;
  text-decoration: none;
  margin-right: 15px;
}

.list-item form {
  margin: 0;
}

/* --- DARK MODE --- */
body.dark .sidebar {
  background: #111827;
}

body.dark .header {
  background: #1f2937;
  border-bottom: 1px solid #374151;
}

body.dark .header h1 {
  color: #f9fafb;
}
