* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, sans-serif;
  background: #f4f6fb;
  color: #333;
}

/* ---------- SIDEBAR ---------- */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 230px;
  height: 100vh;
  background: #1f2a40;
  color: #fff;
  transition: transform 0.3s ease;
  z-index: 1000;
}

.sidebar h2 {
  text-align: center;
  padding: 20px;
  margin: 0;
  background: #162033;
}

.sidebar a {
  display: block;
  padding: 14px 20px;
  color: #fff;
  text-decoration: none;
}

.sidebar a:hover {
  background: #2c3e50;
}

/* ---------- MAIN ---------- */
.main {
  margin-left: 230px;
  padding: 20px;
  transition: 0.3s;
}

/* ---------- TOPBAR ---------- */
.topbar {
  background: #fff;
  padding: 12px 16px;
  border-radius: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}

.menu-btn {
  display: none;
  font-size: 22px;
  cursor: pointer;
}

/* ---------- FORMS ---------- */
form {
  background: #fff;
  padding: 20px;
  border-radius: 12px;
  max-width: 900px;
  box-shadow: 0 4px 10px rgba(0,0,0,0.08);
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.form-group {
  flex: 1 1 48%;
  display: flex;
  flex-direction: column;
}

.form-group-full {
  flex: 1 1 100%;
}

label {
  font-size: 14px;
  margin-bottom: 6px;
}

input, textarea, select {
  padding: 10px;
  border-radius: 6px;
  border: 1px solid #ccc;
  font-size: 14px;
}

textarea {
  resize: vertical;
}

/* ---------- BUTTONS ---------- */
.btn {
  background: #2563eb;
  color: #fff;
  border: none;
  padding: 12px 20px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 15px;
}

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

/* ---------- TABLE ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  background: #fff;
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #eee;
}

th {
  background: #2563eb;
  color: #fff;
}

/* ---------- FLASH ---------- */
.flash {
  background: #22c55e;
  color: #fff;
  padding: 10px;
  border-radius: 6px;
  margin-bottom: 10px;
}

/* ---------- MOBILE ---------- */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }

  .sidebar.show {
    transform: translateX(0);
  }

  .main {
    margin-left: 0;
    padding: 14px;
  }

  .menu-btn {
    display: block;
  }

  form {
    padding: 16px;
  }

  .form-group {
    flex: 1 1 100%;
  }

  table {
    font-size: 13px;
  }
}
/* ---------- WOW BACKGROUND ---------- */
body {
  background: linear-gradient(135deg, #667eea, #764ba2);
  min-height: 100vh;
}

/* Glass effect cards */
form, table, .topbar {
  background: rgba(255,255,255,0.92);
  backdrop-filter: blur(12px);
}
/* ===== Flash message fix (top center) ===== */
.flash {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: #e74c3c;
  color: #fff;
  padding: 12px 20px;
  border-radius: 6px;
  z-index: 9999;
  box-shadow: 0 5px 15px rgba(0,0,0,0.2);
  font-size: 14px;
}

/* Success messages (optional) */
.flash.success {
  background: #27ae60;
}