/* Admin Layout Styles - Monochrome Design */

/* Base Styles */
.admin-body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  background-color: #000000 !important;
  color: #ffffff !important;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

/* Sidebar Styles */
.sidebar {
  transition: transform 0.3s ease;
  z-index: 1050;
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 260px;
  background: #111;
  box-shadow: 2px 0 8px rgba(0,0,0,0.2);
  transform: translateX(0);
}

.sidebar:not(.show) {
  transform: translateX(-100%);
}

#openSidebarBtn {
  display: none;
}

.sidebar:not(.show) ~ #openSidebarBtn {
  display: block !important;
}

.main-content {
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}

.sidebar:not(.show) ~ .main-content {
  margin-left: 0;
}

.sidebar-header {
  padding: 1.5rem 1rem;
  border-bottom: 1px solid #333333;
  position: relative;
}

.brand-section {
  margin-bottom: 1rem;
}

.brand-title {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.25rem 0;
  letter-spacing: 1px;
}

.brand-subtitle {
  color: #cccccc;
  font-size: 0.875rem;
  margin: 0 0 0.5rem 0;
  font-weight: 400;
}

.brand-options {
  color: #888888;
  font-size: 0.75rem;
  line-height: 1.2;
  margin-bottom: 1rem;
}

.brand-options span {
  color: #cccccc;
}

.sidebar-toggle {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: #1a1a1a;
  border: 1px solid #333333;
  color: #ffffff;
  width: 30px;
  height: 30px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.875rem;
  transition: all 0.2s ease;
}

.sidebar-toggle:hover {
  background-color: #333333;
  border-color: #555555;
}

.sidebar-nav {
  padding: 1rem 0;
}

.nav-section-title {
  color: #666666;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
  padding: 0 1rem;
  margin-bottom: 0.75rem;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 0.75rem 1rem;
  color: #cccccc;
  text-decoration: none;
  transition: all 0.2s ease;
  border-radius: 0;
  margin: 0 0.5rem;
  border-radius: 6px;
}

.nav-item:hover {
  background-color: #1a1a1a;
  color: #ffffff;
  text-decoration: none;
}

.nav-item.active {
  background-color: #ffffff;
  color: #000000;
}

.nav-icon {
  margin-right: 0.75rem;
  font-size: 1.1rem;
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.nav-text {
  font-weight: 500;
  white-space: nowrap;
  transition: opacity 0.3s ease;
}

/* Collapsed sidebar styles */
.sidebar.collapsed .brand-section,
.sidebar.collapsed .nav-section-title {
  opacity: 0;
  height: 0;
  overflow: hidden;
  margin: 0;
  padding: 0;
}

.sidebar.collapsed .nav-text {
  opacity: 0;
  width: 0;
  overflow: hidden;
}

.sidebar.collapsed .nav-item {
  justify-content: center;
  margin: 0.25rem;
  width: 50px;
}

.sidebar.collapsed .nav-icon {
  margin-right: 0;
}

/* Main Content */
.top-header {
  background-color: #000000;
  border-bottom: 1px solid #333333;
  padding: 1rem 2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 999;
}

.header-left {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.mobile-sidebar-toggle {
  background: none;
  border: none;
  color: #ffffff;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.page-title {
  color: #ffffff;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 0;
}

.profile-dropdown {
  position: relative;
}

.profile-dropdown .profile-btn {
  background: none;
  border: none;
  padding: 0;
}

.profile-dropdown .dropdown-menu {
  position: absolute;
  top: 100%;
  right: 0;
  left: auto;
  min-width: 200px;
  z-index: 1050;
  margin-top: 0.125rem;
  background-color: #1a1a1a !important;
  border: 1px solid #333333 !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3) !important;
}

.profile-avatar {
  width: 40px;
  height: 40px;
  background-color: #333333;
  color: #ffffff;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.profile-avatar:hover {
  background-color: #555555;
}

.content-area {
  padding: 2rem;
}

/* Bootstrap Component Overrides */
.dropdown-menu {
  background-color: #1a1a1a !important;
  border-radius: 8px !important;
  box-shadow: 0 4px 12px rgba(255, 255, 255, 0.1) !important;
}

.dropdown-item {
  color: #cccccc !important;
  padding: 0.5rem 1rem !important;
}

.dropdown-item:hover {
  background-color: #333333 !important;
  color: #ffffff !important;
}

.dropdown-divider {
  border-color: #333333 !important;
}

/* Alert Styles */
.alert-success {
  background-color: #1a1a1a !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}

.alert-danger {
  background-color: #1a1a1a !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}

.btn-close {
  filter: invert(1);
}

/* Cards and Widgets */
.metric-card {
  background-color: #000000;
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 1.5rem;
  text-align: left;
  transition: transform 0.2s ease;
  position: relative;
}

.metric-card:hover {
  transform: translateY(-2px);
  border-color: #555555;
}

.metric-value {
  font-size: 2.5rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 0.5rem;
  line-height: 1;
}

.metric-label {
  color: #cccccc;
  font-size: 0.875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Buttons */
.btn-primary {
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  color: #000000 !important;
  font-weight: 500;
}

.btn-primary:hover {
  background-color: #cccccc !important;
  border-color: #cccccc !important;
  color: #000000 !important;
}

.btn-outline-primary {
  border-color: #ffffff !important;
  color: #ffffff !important;
}

.btn-outline-primary:hover {
  background-color: #ffffff !important;
  color: #000000 !important;
}

.btn-secondary {
  background-color: #333333 !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}

.btn-secondary:hover {
  background-color: #555555 !important;
  border-color: #555555 !important;
}

.btn-danger {
  background-color: #1a1a1a !important;
  border-color: #666666 !important;
  color: #ffffff !important;
}

.btn-danger:hover {
  background-color: #333333 !important;
  border-color: #666666 !important;
}

/* Tables */
.table {
  color: #ffffff !important;
  background-color: transparent;
}

.table th {
  border-color: #333333 !important;
  background-color: #1a1a1a;
  color: #ffffff !important;
  font-weight: 600;
}

.table td {
  border-color: #333333 !important;
  background-color: transparent;
  color: #cccccc !important;
}

.table-hover tbody tr:hover {
  background-color: #1a1a1a !important;
}

/* Forms */
.form-control {
  background-color: #1a1a1a !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
  border-radius: 6px;
}

.form-control:focus {
  background-color: #1a1a1a !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.form-control::placeholder {
  color: #666666 !important;
}

.form-control-dark {
  background-color: #1a1a1a !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}

.form-control-dark:focus {
  background-color: #1a1a1a !important;
  border-color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
  color: #ffffff !important;
}

.form-control-dark::placeholder {
  color: #666666 !important;
}

.form-label {
  color: #ffffff !important;
  font-weight: 500;
}

.form-select {
  background-color: #1a1a1a !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}

.form-select:focus {
  border-color: #ffffff !important;
  box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.1) !important;
}

/* Chart Container */
.chart-container {
  background-color: #000000;
  border: 1px solid #333333;
  border-radius: 12px;
  padding: 1.5rem;
  margin-top: 1rem;
  height: 300px; /* Fixed height for smaller chart */
}

.chart-container h4 {
  color: #ffffff;
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.chart-container canvas {
  max-height: 200px !important; /* Limit canvas height */
}

/* Quick Actions */
.quick-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
  margin-top: 2rem;
}

.quick-action-btn {
  background-color: #1a1a1a;
  border: 1px solid #333333;
  color: #ffffff;
  padding: 1rem;
  border-radius: 8px;
  text-decoration: none;
  text-align: center;
  transition: all 0.2s ease;
  font-weight: 500;
}

.quick-action-btn:hover {
  background-color: #333333;
  color: #ffffff;
  text-decoration: none;
  transform: translateY(-2px);
}

/* Mobile Responsive */
@media (max-width: 991.98px) {
  .sidebar {
    transform: translateX(-100%);
    width: 280px;
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .main-content,
  .main-content.sidebar-collapsed {
    margin-left: 0;
  }
  
  .top-header {
    padding: 1rem;
  }
  
  .content-area {
    padding: 1rem;
  }
  
  .metric-card {
    margin-bottom: 1rem;
  }
  
  .quick-actions {
    grid-template-columns: 1fr;
  }

  .sidebar-toggle {
    display: none;
  }
}

@media (max-width: 576px) {
  .profile-dropdown .dropdown-menu {
    position: fixed;
    top: 50%;
    left: 50%;
    right: auto;
    bottom: auto;
    transform: translate(-50%, -50%);
    width: 90%;
    max-width: 300px;
    margin: 0;
  }
}

/* Additional Utility Classes */
.text-muted {
  color: #666666 !important;
}

.bg-dark {
  background-color: #1a1a1a !important;
}

.border-secondary {
  border-color: #333333 !important;
}

/* Modal Overrides */
.modal-content {
  background-color: #1a1a1a !important;
  border: 1px solid #333333 !important;
}

.modal-header {
  border-bottom: 1px solid #333333 !important;
}

.modal-footer {
  border-top: 1px solid #333333 !important;
}

.modal-title {
  color: #ffffff !important;
}

/* Pagination */
.page-link {
  background-color: #1a1a1a !important;
  border: 1px solid #333333 !important;
  color: #ffffff !important;
}

.page-link:hover {
  background-color: #333333 !important;
  border-color: #333333 !important;
  color: #ffffff !important;
}

.page-item.active .page-link {
  background-color: #ffffff !important;
  border-color: #ffffff !important;
  color: #000000 !important;
}

/* Select2 styles are now handled in the admin layout */

.select2-container--default .select2-selection--multiple .select2-selection__choice__display {
    cursor: default;
    padding-left: 10px !important;
    padding-right: 5px;
}

/* White/Blue Theme Overrides */
:root {
  --admin-bg: #f4f8ff;
  --admin-surface: #ffffff;
  --admin-border: #dbeafe;
  --admin-text: #0f172a;
  --admin-muted: #64748b;
  --admin-primary: #2563eb;
  --admin-primary-strong: #1d4ed8;
  --admin-sidebar: #1e3a8a;
  --admin-sidebar-strong: #1d4ed8;
}

.admin-body {
  background-color: var(--admin-bg) !important;
  color: var(--admin-text) !important;
}

.sidebar {
  background: linear-gradient(180deg, var(--admin-sidebar) 0%, var(--admin-sidebar-strong) 100%);
  box-shadow: 4px 0 20px rgba(37, 99, 235, 0.2);
}

.sidebar-header {
  border-bottom: 1px solid rgba(191, 219, 254, 0.35);
}

.brand-title,
.brand-subtitle,
.brand-options,
.brand-options span,
.nav-item,
.nav-section-title {
  color: #dbeafe;
}

.nav-item:hover {
  background-color: rgba(219, 234, 254, 0.16);
  color: #ffffff;
}

.nav-item.active {
  background-color: #ffffff;
  color: var(--admin-primary-strong);
}

.nav-item.active .nav-icon,
.nav-item.active .nav-text {
  color: var(--admin-primary-strong);
}

.sidebar-toggle {
  background: rgba(219, 234, 254, 0.1);
  border-color: rgba(191, 219, 254, 0.9);
  color: #eff6ff;
}

.sidebar-toggle:hover {
  background-color: rgba(219, 234, 254, 0.2);
  border-color: #dbeafe;
}

#openSidebarBtn {
  background-color: #ffffff;
  border-color: var(--admin-primary);
  color: var(--admin-primary);
}

.top-header {
  background-color: #ffffff;
  border-bottom: 1px solid var(--admin-border);
  box-shadow: 0 4px 14px rgba(30, 58, 138, 0.08);
}

.mobile-sidebar-toggle,
.page-title {
  color: var(--admin-primary-strong);
}

.content-area {
  background-color: transparent;
}

.profile-avatar {
  background-color: var(--admin-primary);
  color: #ffffff;
}

.profile-avatar:hover {
  background-color: var(--admin-primary-strong);
}

.profile-dropdown .dropdown-menu,
.dropdown-menu {
  background-color: #ffffff !important;
  border: 1px solid var(--admin-border) !important;
  box-shadow: 0 10px 22px rgba(30, 58, 138, 0.15) !important;
}

.dropdown-item {
  color: var(--admin-text) !important;
}

.dropdown-item:hover {
  background-color: #eff6ff !important;
  color: var(--admin-primary-strong) !important;
}

.dropdown-divider {
  border-color: var(--admin-border) !important;
}

.alert-success {
  background-color: #ecfdf5 !important;
  border: 1px solid #86efac !important;
  color: #14532d !important;
}

.alert-danger {
  background-color: #fef2f2 !important;
  border: 1px solid #fecaca !important;
  color: #991b1b !important;
}

.btn-close {
  filter: none;
}

.metric-card,
.chart-container,
.quick-action-btn,
.modal-content,
.card,
.bg-dark {
  background-color: var(--admin-surface) !important;
  color: var(--admin-text) !important;
  border-color: var(--admin-border) !important;
}

.metric-value {
  color: var(--admin-primary-strong);
}

.metric-label,
.text-muted {
  color: var(--admin-muted) !important;
}

.btn-primary {
  background-color: var(--admin-primary) !important;
  border-color: var(--admin-primary) !important;
  color: #ffffff !important;
}

.btn-primary:hover {
  background-color: var(--admin-primary-strong) !important;
  border-color: var(--admin-primary-strong) !important;
  color: #ffffff !important;
}

.btn-outline-primary,
.btn-outline-light {
  border-color: var(--admin-primary) !important;
  color: var(--admin-primary) !important;
}

.btn-outline-primary:hover,
.btn-outline-light:hover {
  background-color: var(--admin-primary) !important;
  border-color: var(--admin-primary) !important;
  color: #ffffff !important;
}

.btn-secondary {
  background-color: #e2e8f0 !important;
  border-color: #cbd5e1 !important;
  color: #0f172a !important;
}

.btn-secondary:hover {
  background-color: #cbd5e1 !important;
  border-color: #94a3b8 !important;
}

.btn-danger {
  background-color: #ef4444 !important;
  border-color: #ef4444 !important;
  color: #ffffff !important;
}

.btn-danger:hover {
  background-color: #dc2626 !important;
  border-color: #dc2626 !important;
}

.table {
  color: var(--admin-text) !important;
}

.table th {
  border-color: var(--admin-border) !important;
  background-color: #eff6ff !important;
  color: var(--admin-primary-strong) !important;
}

.table td {
  border-color: var(--admin-border) !important;
  color: var(--admin-text) !important;
}

.table-hover tbody tr:hover {
  background-color: #eff6ff !important;
}

.table.table-hover tbody tr:hover > * {
  background-color: #eff6ff !important;
  color: #0f172a !important;
}

.table-dark.table-hover tbody tr:hover > * {
  background-color: #eff6ff !important;
  color: #0f172a !important;
}

.form-control,
.form-control-dark,
.form-select {
  background-color: #ffffff !important;
  border: 1px solid #bfdbfe !important;
  color: var(--admin-text) !important;
}

.form-control:focus,
.form-control-dark:focus,
.form-select:focus {
  border-color: var(--admin-primary) !important;
  box-shadow: 0 0 0 0.2rem rgba(37, 99, 235, 0.15) !important;
}

.form-control::placeholder,
.form-control-dark::placeholder {
  color: #94a3b8 !important;
}

.form-label,
.text-white {
  color: var(--admin-text) !important;
}

.border-secondary {
  border-color: var(--admin-border) !important;
}

.modal-header,
.modal-footer {
  border-color: var(--admin-border) !important;
}

.modal-title {
  color: var(--admin-primary-strong) !important;
}

.page-link {
  background-color: #ffffff !important;
  border: 1px solid #bfdbfe !important;
  color: var(--admin-primary-strong) !important;
}

.page-link:hover {
  background-color: #eff6ff !important;
  border-color: #93c5fd !important;
  color: var(--admin-primary) !important;
}

.page-item.active .page-link {
  background-color: var(--admin-primary) !important;
  border-color: var(--admin-primary) !important;
  color: #ffffff !important;
}

/* Reference-inspired layout refinements */
.sidebar {
  width: 280px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 0;
}

.main-content {
  margin-left: 280px;
}

.sidebar-shell {
  display: flex;
  flex-direction: column;
  min-height: 0;
  flex: 1;
}

.sidebar-header {
  padding: 1.6rem 1.2rem !important;
  min-height: auto !important;
  align-items: flex-start !important;
}

.sidebar-branding {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.sidebar-subtitle {
  color: #a5b4fc;
  font-size: 0.92rem;
  line-height: 1.2;
  letter-spacing: 0.02em;
}

.sidebar-title {
  color: #e0e7ff !important;
}

.sidebar-nav {
  padding: 0.5rem 0.9rem 0.8rem;
}

.nav-item {
  border-radius: 14px;
  margin: 0.22rem 0;
  padding: 0.82rem 0.95rem;
  color: #c7d2fe;
}

.nav-item .nav-icon {
  filter: grayscale(0.2);
}

.nav-item.active {
  background: linear-gradient(90deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(79, 70, 229, 0.25);
}

.nav-item.active .nav-icon,
.nav-item.active .nav-text {
  color: #ffffff;
}

.sidebar-footer {
  padding: 1rem;
  border-top: 1px solid rgba(191, 219, 254, 0.25);
}

.sidebar-cta {
  width: 100%;
  border-radius: 14px;
  font-weight: 600;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, #4f46e5 0%, #4338ca 100%) !important;
  border-color: #4f46e5 !important;
}

.sidebar-footer-links {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-footer-link {
  display: block;
  padding: 0.55rem 0.2rem;
  color: #cbd5e1;
  text-decoration: none;
  font-size: 0.95rem;
  text-align: left;
}

.sidebar-footer-link:hover {
  color: #ffffff;
  text-decoration: none;
}

.sidebar-logout-link {
  width: auto;
}

.top-header {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
  gap: 1rem;
  min-height: 78px;
  padding: 1rem 1.8rem;
  position: sticky;
  top: 0;
  z-index: 999;
}

.top-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.top-header-logo {
  width: 42px;
  height: 42px;
  object-fit: cover;
  border-radius: 10px;
}

.top-header-brand {
  min-width: 0;
}

.top-brand-title {
  color: #1d4ed8;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-size: 1.15rem;
  line-height: 1.05;
}

.top-brand-subtitle {
  color: #64748b;
  font-size: 0.8rem;
  margin-top: 0.2rem;
}

.top-header-right {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.top-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1px solid #bfdbfe;
  background: #ffffff;
  color: #1e3a8a;
  cursor: pointer;
}

.content-area {
  padding: 1.45rem 1.8rem 2.1rem;
}

.dashboard-container {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.dashboard-kpi-row .metric-card {
  min-height: 132px;
}

.kpi-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.8rem;
}

.kpi-icon {
  width: 50px;
  height: 50px;
  border-radius: 12px;
  background: #eef2ff;
  color: #3730a3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.35rem;
}

.kpi-badge {
  border-radius: 7px;
  padding: 0.2rem 0.5rem;
  font-size: 0.88rem;
  font-weight: 600;
}

.kpi-badge.positive { background: #dcfce7; color: #166534; }
.kpi-badge.neutral { background: #e2e8f0; color: #334155; }
.kpi-badge.negative { background: #fee2e2; color: #991b1b; }

.metric-label {
  color: #475569;
  font-size: 0.82rem;
  letter-spacing: 0.12em;
}

.metric-value {
  color: #0f172a;
}

.dashboard-main-grid {
  display: block;
}

.chart-container {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  padding: 1.35rem 1.35rem 1rem;
  height: auto;
}

.chart-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.chart-title {
  margin: 0;
  font-size: 2rem;
}

.chart-subtitle {
  color: #64748b;
  margin: 0.2rem 0 0;
  font-size: 0.98rem;
}

.chart-switch {
  display: inline-flex;
  padding: 0.22rem;
  border-radius: 999px;
  background: #eef2ff;
  gap: 0.2rem;
}

.chart-switch-chip {
  border: 0;
  border-radius: 999px;
  padding: 0.38rem 0.88rem;
  font-size: 0.86rem;
  font-weight: 700;
  background: transparent;
  color: #475569;
}

.chart-switch-chip.active {
  background: #ffffff;
  color: #1d4ed8;
  box-shadow: 0 2px 8px rgba(30, 64, 175, 0.12);
}

.quick-actions-title {
  font-size: 2rem;
  margin: 0.2rem 0 0.2rem;
  color: #0f172a;
}

.quick-actions {
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  margin-top: 0;
}

.quick-action-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  border-radius: 12px;
  padding: 1rem 1.1rem;
}

.quick-action-icon {
  width: 46px;
  height: 46px;
  border-radius: 10px;
  background: #eef2ff;
  color: #3730a3;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
}

.quick-action-text {
  color: #0f172a;
  font-size: 1.12rem;
  font-weight: 600;
}

.quick-action-arrow {
  color: #64748b;
  font-size: 1.35rem;
}

@media (max-width: 991.98px) {
  .sidebar {
    width: 280px;
  }
  .top-header {
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }
  .quick-actions {
    grid-template-columns: 1fr;
  }
}

/* Sidebar usability fixes */
.sidebar {
  height: 100vh;
  overflow: hidden;
  justify-content: flex-start;
}

.sidebar-shell {
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
}

.sidebar-nav {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0.4rem 0.85rem 0.7rem;
  scrollbar-gutter: stable both-edges;
}

.sidebar-nav::-webkit-scrollbar {
  width: 8px;
}

.sidebar-nav::-webkit-scrollbar-track {
  background: rgba(15, 23, 42, 0.18);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
  background: rgba(191, 219, 254, 0.45);
  border-radius: 999px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
  background: rgba(191, 219, 254, 0.7);
}

.nav-item {
  min-height: 44px;
  margin: 0.12rem 0;
  padding: 0.6rem 0.8rem;
}

.nav-icon {
  margin-right: 0.58rem;
  font-size: 0.98rem;
}

.nav-text {
  font-size: 1.01rem;
  line-height: 1.18;
}

.sidebar-footer {
  flex: 0 0 auto;
  position: relative;
  z-index: 2;
  margin-top: 0;
  padding: 0.85rem 0.9rem calc(0.85rem + env(safe-area-inset-bottom));
  border-top: 1px solid rgba(191, 219, 254, 0.28);
  background: linear-gradient(180deg, rgba(37, 99, 235, 0.06) 0%, rgba(15, 23, 42, 0.22) 100%);
}

.sidebar-cta {
  margin-bottom: 0.65rem;
  padding: 0.62rem 0.85rem;
  font-size: 1.04rem;
}

.sidebar-footer-links {
  gap: 0.08rem;
}

.sidebar-footer-link {
  padding: 0.34rem 0.15rem;
  font-size: 0.95rem;
}

/* Modern form system */
.admin-body .card {
  border-radius: 16px !important;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.06);
}

.admin-body .form-label {
  font-weight: 700;
  color: #0f172a !important;
  margin-bottom: 0.4rem;
  font-size: 1.05rem;
}

.admin-body .form-control,
.admin-body .form-control-dark,
.admin-body .form-select {
  min-height: 46px;
  border-radius: 12px !important;
  border: 1px solid #bfdbfe !important;
  background-color: #ffffff !important;
  color: #0f172a !important;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.admin-body .form-select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, #1d4ed8 50%), linear-gradient(135deg, #1d4ed8 50%, transparent 50%);
  background-position: calc(100% - 18px) calc(50% - 2px), calc(100% - 12px) calc(50% - 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 2.4rem;
}

.admin-body textarea.form-control,
.admin-body textarea.form-control-dark {
  min-height: 110px;
}

.admin-body .form-control:focus,
.admin-body .form-control-dark:focus,
.admin-body .form-select:focus,
.admin-body .form-control:active,
.admin-body .form-control-dark:active,
.admin-body .form-select:active {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #2563eb !important;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.14) !important;
}

.admin-body input:-webkit-autofill,
.admin-body input:-webkit-autofill:hover,
.admin-body input:-webkit-autofill:focus,
.admin-body textarea:-webkit-autofill,
.admin-body select:-webkit-autofill {
  -webkit-text-fill-color: #0f172a;
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  transition: background-color 5000s ease-in-out 0s;
}

.admin-body .form-control::placeholder,
.admin-body .form-control-dark::placeholder {
  color: #94a3b8 !important;
}

.admin-body .form-check-input {
  width: 1.15rem;
  height: 1.15rem;
  border: 1px solid #93c5fd;
  cursor: pointer;
}

.admin-body .form-check-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.admin-body .form-check-input:checked {
  background-color: #2563eb;
  border-color: #2563eb;
}

.admin-body .form-check-label {
  font-size: 1.03rem;
  color: #1e293b;
  cursor: pointer;
}

.admin-body .form-text {
  color: #64748b !important;
  font-size: 0.95rem;
}

.admin-body .btn {
  border-radius: 12px;
}

.admin-body .bg-black,
.admin-body .text-white.border-secondary {
  background-color: #ffffff !important;
  color: #0f172a !important;
  border-color: #bfdbfe !important;
}

/* Force light hover treatment for table-dark variants */
.admin-body .table-dark {
  --bs-table-bg: #ffffff;
  --bs-table-color: #0f172a;
  --bs-table-hover-bg: #eff6ff;
  --bs-table-hover-color: #0f172a;
  --bs-table-striped-bg: #f8fbff;
  --bs-table-striped-color: #0f172a;
  --bs-table-active-bg: #e9f2ff;
  --bs-table-active-color: #0f172a;
}

.admin-body .table.table-dark.table-hover > tbody > tr:hover > *,
.admin-body .table.table-hover > tbody > tr.clickable-row:hover > * {
  background-color: #eff6ff !important;
  color: #0f172a !important;
}

/* Workspace wizard stepper */
.wizard-breadcrumb {
  border-radius: 10px;
  background-color: #ffffff !important;
  border: 1px solid #dbeafe;
  margin-bottom: 0;
}

.wizard-breadcrumb .breadcrumb-item {
  color: #64748b;
  font-weight: 600;
}

.wizard-breadcrumb .breadcrumb-item + .breadcrumb-item::before {
  color: #94a3b8;
}

.wizard-breadcrumb .breadcrumb-item.wizard-step-active {
  color: #1d4ed8;
  background: #eff6ff;
  border-radius: 8px;
  padding: 0.15rem 0.35rem;
}

.wizard-breadcrumb .breadcrumb-item.wizard-step-complete {
  color: #334155;
}

.wizard-breadcrumb .breadcrumb-item.wizard-step-pending {
  color: #94a3b8;
}

/* Keep table action buttons in a single row */
.admin-body td.action-column {
  white-space: nowrap;
  min-width: 170px;
}

.admin-body td.action-column .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  vertical-align: middle;
}

/* Consistent index search sizing */
.admin-index-filters .index-search-group {
  display: flex;
  align-items: center;
  gap: 0.55rem;
}

.admin-index-filters .index-search-input {
  flex: 0 1 430px;
  max-width: 430px;
  min-width: 220px;
}

.admin-index-filters .index-search-group .btn {
  flex: 0 0 auto;
  white-space: nowrap;
}

.admin-index-panel {
  background: #ffffff;
  border: 1px solid #dbeafe;
  border-radius: 16px;
  padding: 1.5rem;
}

@media (max-width: 991.98px) {
  .admin-index-filters .index-search-group {
    flex-wrap: wrap;
  }

  .admin-index-filters .index-search-input {
    flex: 1 1 100%;
    max-width: 100%;
    min-width: 0;
  }
}

/* Workspace types page theming */
.workspace-types-page .workspace-types-card {
  border: 1px solid #dbeafe !important;
  border-radius: 16px !important;
  overflow: hidden;
}

.workspace-types-page .workspace-types-header {
  background: #eff6ff !important;
  border-bottom: 1px solid #dbeafe !important;
  color: #1d4ed8 !important;
  padding: 0.9rem 1.25rem;
}

.workspace-types-page .workspace-types-toggle {
  width: 100%;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 700;
  color: #1d4ed8 !important;
  border: 0;
}

.workspace-types-page .workspace-types-toggle:hover,
.workspace-types-page .workspace-types-toggle:focus {
  color: #1e40af !important;
  text-decoration: none;
  box-shadow: none;
}

.workspace-types-page .workspace-types-toggle-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: #dbeafe;
  color: #1d4ed8;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  line-height: 1;
}
