/* ------------------------------------------------------------
   Global Color Variables
------------------------------------------------------------ */
:root {
  --cream: #fffcf7;
  --beige: #e8b678;
  --red: #d22435;
  --maroon: #7b1e3a;
  --text-light: #eaeaea;
  --text-dim: #999;
  --bg-dark: #12141a;
  --border-dark: #1f2024;
}

/* ------------------------------------------------------------
   Base Page Layout
------------------------------------------------------------ */
body {
  margin: 0;
  font-family: "Inter", system-ui, sans-serif;
  background: var(--cream);
  color: #222;
}

main.main-content {
  margin-left: 70px; /* Sidebar width */
  padding: 20px;
}

/* ------------------------------------------------------------
   Fixed Icon Sidebar (Unified)
------------------------------------------------------------ */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 70px;
  height: 100vh;
  background: var(--maroon);
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-top: 20px;
  border-right: 1px solid var(--beige);
  z-index: 1000;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  align-items: center;
}

.nav-item {
  color: var(--beige);
  text-decoration: none;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  padding: 10px 0;
  transition: color 0.2s ease, background 0.2s ease;
}

.nav-item:hover {
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.08);
}

.nav-item.active {
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border-left: 3px solid var(--beige);
}

.nav-item i {
  width: 22px;
  height: 22px;
}

/* ------------------------------------------------------------
   Topbar (Optional, if still used)
------------------------------------------------------------ */
.topbar {
  position: fixed;
  top: 0;
  left: 70px;
  right: 0;
  height: 50px;
  background: white;
  border-bottom: 1px solid #ddd;
  display: flex;
  align-items: center;
  padding: 0 1rem;
  z-index: 10;
}

.content {
  margin-top: 60px;
  padding: 1rem 2rem;
}

/* ------------------------------------------------------------
   Tables, Buttons, and Utility Styles
------------------------------------------------------------ */
.table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.table th, .table td {
  border: 1px solid #ccc;
  padding: 0.5rem;
  text-align: center;
}

.center { text-align: center; }

.btn {
  background: var(--red);
  color: #fff;
  border: none;
  padding: 0.5rem 1rem;
  cursor: pointer;
  margin-top: 1rem;
  transition: background 0.2s;
}

.btn:hover { background: var(--maroon); }

/* ------------------------------------------------------------
   Modal (if used)
------------------------------------------------------------ */
.modal {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.4);
  display: flex;
  justify-content: center;
  align-items: center;
}

.modal.hidden { display: none; }

.modal-content {
  background: white;
  padding: 1.5rem;
  width: 500px;
  border-radius: 6px;
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.8rem;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  margin-top: 1rem;
}

.cancel { background: gray; }
