/* Bootstrap extras and custom styles */

/* Sidebar styles from frontend */
.sidebar {
  background: #333231;
  border-right: 1px solid #e5a749;
  min-height: 100vh;
  width: 15rem;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  padding-top: 5.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  max-height: 100vh;
}

.sidebar nav {
  flex: 1 1 auto;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem 0 0.5rem 0;
}

.sidebar-logo img {
  max-width: 120px;
  max-height: 48px;
}

.sidebar-link {
  display: block;
  padding: 0.75rem 1rem;
  color: #fff7e6;
  text-decoration: none;
  border-radius: 0.375rem;
  transition: background 0.2s, color 0.2s;
  font-weight: 500;
}

.sidebar-link:hover {
  background: #cc7a00;
  color: #fff;
}

.sidebar-link.active {
  background: #fff;
  color: #ff9900;
}

.sidebar-sublink {
  font-size: 0.92rem;
  color: #ffe0b3;
  font-style: italic;
  font-weight: 400;
  padding-left: 2.2rem;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  display: block;
  border-radius: 0.375rem;
  transition: background 0.2s, color 0.2s;
}

.sidebar-sublink:hover {
  background: #b36b00;
  color: #fff;
}

.sidebar-sublink.active {
  background: #fff;
  color: #ff9900;
}

.ml-64 {
  margin-left: 16rem;
}

/* Header and footer adjustments for sidebar */
header, .header-logo {
  margin-left: 16rem;
}

footer {
  margin-left: 16rem;
}

/* Responsive sidebar disabled in favor of Bootstrap Offcanvas */
/*
@media (max-width: 900px) {
  .sidebar {
    width: 100vw;
    min-height: auto;
    position: static;
    padding-top: 0;
    border-right: none;
    border-bottom: 1px solid #e5e7eb;
    flex-direction: row;
    flex-wrap: wrap;
  }
  
  .ml-64 {
    margin-left: 0;
  }
  
  .sidebar-logo {
    justify-content: flex-start;
    padding: 0.5rem 1rem;
  }
  
  header, .header-logo {
    margin-left: 0;
  }
  
  footer {
    margin-left: 0;
  }
}
*/

/* Collapsible styles from frontend */
.collapsible {
  background: #f5f7fc;
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 15px;
  color: #222;
  cursor: pointer;
  margin-bottom: 4px;
  margin-top: 12px;
  transition: background 0.2s, border 0.2s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}

.collapsible:hover, .collapsible.active {
  background: #e0e7ff;
  border-color: #b6c3e6;
}

.collapsible.active {
  color: #2563eb;
}

.collapsible-content {
  display: none;
  padding: 1rem;
  background-color: #fff;
  border: 1px solid #4A4A4A;
  margin-top: 0.5rem;
}

.collapsible-content.active {
  display: block;
}

/* Additional utility classes */
.required { 
  color: #d72660; 
  margin-left: 2px; 
}

.input-error { 
  border: 1px solid #d72660 !important; 
  background: #fff0f3; 
}

.hint { 
  font-size: 11px; 
  color: #888; 
  margin-top: 2px; 
  margin-bottom: 4px; 
}

/* Form compact styles */
.form-compact label {
  font-size: 11px;
  margin-bottom: 2px;
}

.form-compact input,
.form-compact select,
.form-compact textarea {
  height: 26px;
  padding: 2px 6px;
  font-size: 13px;
  border-radius: 4px;
  margin-bottom: 4px;
  width: 100%;
  box-sizing: border-box;
}

.form-compact .grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-start;
}

.form-compact .grid > div {
  width: 240px;
  min-width: 240px;
  flex-basis: 240px;
  flex-shrink: 0;
  flex-grow: 0;
  margin-right: 0;
} 