/* static/css/style.css */
/* ─────────────────────────────────────────────────────────────
   Layout & Sidebar
───────────────────────────────────────────────────────────── */
html, body {
  margin: 0;
  font-family: Arial, sans-serif;
  height: 100vh;
  overflow: hidden;
}
.main-container {
  display: flex;
  height: 100vh;
  width: 100vw;
}
.sidebar-wrapper {
  background: #2c3e50;
  width: 220px;
  min-width: 220px;
  transition: width 0.3s ease;
}
html.collapsed .sidebar-wrapper {
  width: 60px;
  min-width: 60px;
}
.sidebar {
  color: white;
  height: 100vh;
  display: flex;
  flex-direction: column;
}
.sidebar-header {
  display: flex;
  align-items: center;
  padding: 20px;
  gap: 25px;
}
.sidebar-header img {
  height: 50px;
  width: auto;
}
#sidebarToggle {
  background: none;
  border: none;
  color: white;
  font-size: 20px;
  cursor: pointer;
  padding: 0;
}
html.collapsed .sidebar-header img {
  visibility: hidden;
}
.sidebar-scroll {
  overflow-y: auto;
  flex-grow: 1;
  max-height: calc(100vh - 80px);
  scrollbar-width: thin;
  scrollbar-color: #888 #2c3e50;
  padding-top: 10px;
}
.sidebar-scroll::-webkit-scrollbar {
  width: 8px;
}
.sidebar-scroll::-webkit-scrollbar-track {
  background: #2c3e50;
}
.sidebar-scroll::-webkit-scrollbar-thumb {
  background-color: #888;
  border-radius: 4px;
}
.sidebar-item,
.category-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 20px;
  color: white;
  text-decoration: none;
  transition: background 0.2s;
  margin: 2px 0;
}
.sidebar-item:hover,
.category-header:hover,
.sidebar-item.active {
  background-color: #34495e;
}
.sidebar-item i,
.category-header i {
  min-width: 20px;
  text-align: center;
  font-size: 18px;
}
.label {
  transition: opacity 0.2s, transform 0.2s;
}
html.collapsed .label {
  opacity: 0;
  transform: scaleX(0);
  width: 0;
  overflow: hidden;
}
.category {
  margin-top: 5px;
}
.category-links {
  display: none;
  padding-left: 20px;
}
.arrow {
  margin-left: auto;
  font-size: 12px;
}
html.collapsed .category-links {
  display: none !important;
}
.content {
  flex-grow: 1;
  padding: 30px;
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background-color: #f5f5f5;
}

/* ─────────────────────────────────────────────────────────────
   Generic Buttons
───────────────────────────────────────────────────────────── */
.btn,
.details-btn {
  text-decoration: none;
  padding: 12px 24px;
  font-size: 16px;
  color: white;
  border-radius: 5px;
  display: inline-block;
  font-weight: bold;
}
.btn-default, .details-btn.default   { background-color: #007BFF; }
.btn-save,    .details-btn.edit      { background-color: #28a745; }
.btn-submit,  .details-btn.submit    { background-color: #17a2b8; }
.btn-delete,  .details-btn.delete    { background-color: #dc3545; }

/* ─────────────────────────────────────────────────────────────
   Modal (hidden by default)
───────────────────────────────────────────────────────────── */
.modal {
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.5);
  display: none;
}
.modal-content {
  background-color: #fefefe;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  border-radius: 8px;
}
.close {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}
.close:hover, .close:focus {
  color: black;
}
