/* Enterprise UI theme enhancements for Bootstrap-based Django app */

body, html {
  background-color: #f4f6fa;
  color: #222;
}

.card {
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  border: none;
}

.card-header, .card-body, .card-footer {
  background: #fff;
}

h1, h2, h3, h4, h5, h6 {
  color: #1a237e;
  font-weight: 600;
}

.navbar, .bg-success {
  background: linear-gradient(90deg, #23395d 0%, #4062bb 100%) !important;
  color: #fff !important;
}

.sidebar-item.nav-item, .mynav li a {
  font-size: 1.05rem;
  font-weight: 500;
  letter-spacing: 0.01em;
}

.mynav li a.active, .mynav li a:hover, .sidebar-link.active, .sidebar-link:hover {
  background: #e3eafc !important;
  color: #23395d !important;
}

.breadcrumb {
  background: #f8fafc;
  border-radius: 4px;
  padding: 8px 16px;
  font-size: 0.97rem;
}

.table {
  background: #fff;
  border-radius: 6px;
  overflow: hidden;
}

.table thead th {
  background: #e3eafc;
  color: #23395d;
  font-weight: 600;
}

.table-striped > tbody > tr:nth-of-type(odd) {
  background-color: #f4f6fa;
}

.btn-primary, .btn-success, .btn-outline-secondary {
  border-radius: 4px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(64,98,187,0.08);
}

.btn-primary {
  background: linear-gradient(90deg, #4062bb 0%, #23395d 100%);
  border: none;
}

.btn-outline-secondary {
  border-color: #4062bb;
  color: #4062bb;
}

.btn-outline-secondary:hover {
  background: #4062bb;
  color: #fff;
}

::-webkit-scrollbar {
  width: 8px;
  background: #e3eafc;
}
::-webkit-scrollbar-thumb {
  background: #b0b8d1;
  border-radius: 4px;
}

/* Sidebar top-level menu: add visual cue for expanded/collapsed state */
.sidebar-item.nav-item > a.sidebar-link {
  position: relative;
  padding-right: 32px;
  transition: background 0.2s, color 0.2s;
}

/* Add arrow icon for collapsed/expanded state */
.sidebar-item.nav-item > a.sidebar-link::after {
  content: '\25B6'; /* right-pointing triangle */
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%) rotate(0deg);
  font-size: 1.1rem;
  color: #ffb300; /* High-contrast gold/yellow */
  text-shadow: 0 1px 2px #23395d, 0 0 2px #fff;
  transition: transform 0.2s, color 0.2s;
}

.sidebar-item.nav-item > a[aria-expanded="true"].sidebar-link::after,
.sidebar-item.nav-item > a.sidebar-link[aria-expanded="true"]::after {
  content: '\25BC'; /* down-pointing triangle */
  color: #ffb300; /* High-contrast gold/yellow */
  text-shadow: 0 1px 2px #23395d, 0 0 2px #fff;
  transform: translateY(-50%) rotate(0deg);
}

/* Submenu styling for clarity */
.sidebar-dropdown {
  background: #f4f6fa;
  border-left: 3px solid #4062bb;
  margin-left: 0;
  padding-left: 8px;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.sidebar-dropdown .sidebar-item > a.sidebar-link {
  font-size: 0.97rem;
  color: #23395d;
  padding-left: 32px;
}

.sidebar-dropdown .sidebar-item > a.sidebar-link.active,
.sidebar-dropdown .sidebar-item > a.sidebar-link:hover {
  background: #e3eafc !important;
  color: #4062bb !important;
}

.sidebar-dropdown .sidebar-item > a.sidebar-link.active {
  background: #4062bb !important;
  color: #fff !important;
  font-weight: 600;
  border-left: 4px solid #1a237e;
  box-shadow: 0 2px 8px rgba(64,98,187,0.10);
  position: relative;
}

.sidebar-dropdown .sidebar-item > a.sidebar-link.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 4px;
  background: #ffb300;
  border-radius: 2px;
}

/* Responsive tweaks */
@media (max-width: 768px) {
  .card, .main-content, .breadcrumb {
    border-radius: 0 !important;
    box-shadow: none !important;
  }
}
