/* Minotaurus Dashboard Theme - High-Contrast Dark Glassmorphism Styling */

:root {
  --bg-dark: #0b0f19;
  --bg-card: rgba(30, 41, 59, 0.85);
  --bg-sidebar: #0f172a;
  --bg-topbar: rgba(15, 23, 42, 0.95);
  --bg-input: #1e293b;
  --border-color: rgba(255, 255, 255, 0.15);
  --border-glow: rgba(59, 130, 246, 0.5);
  --text-primary: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #94a3b8;
  --primary-accent: #3b82f6;
  --primary-hover: #2563eb;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --info: #06b6d4;
  --sidebar-width: 260px;
  --topbar-height: 65px;
  --transition-speed: 0.25s;
}

/* Global Reset & High Contrast Typography */
body {
  background-color: var(--bg-dark) !important;
  color: var(--text-primary) !important;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
  margin: 0;
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3, .h4, .h5, .h6 {
  color: #ffffff !important;
}

p, span, label, div {
  color: var(--text-primary);
}

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

/* Layout Wrapper */
.app-wrapper {
  display: flex;
  min-height: 100vh;
}

/* Top Navbar */
.top-navbar {
  position: fixed;
  top: 0;
  right: 0;
  left: var(--sidebar-width);
  height: var(--topbar-height);
  background: var(--bg-topbar);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color);
  z-index: 1020;
  transition: left var(--transition-speed) ease;
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
}

/* Sidebar Navigation */
.sidebar-nav {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-width);
  background-color: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  z-index: 1030;
  transition: transform var(--transition-speed) ease, width var(--transition-speed) ease;
  display: flex;
  flex-direction: column;
}

.sidebar-header {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  padding: 0 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.sidebar-brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: #ffffff !important;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-brand i {
  color: var(--primary-accent);
  font-size: 1.5rem;
}

.sidebar-menu {
  padding: 1rem 0;
  flex: 1;
  overflow-y: auto;
}

.nav-section-title {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8 !important;
  padding: 0.75rem 1.5rem 0.35rem;
  font-weight: 600;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.75rem 1.5rem;
  color: #cbd5e1 !important;
  text-decoration: none;
  font-weight: 500;
  transition: all var(--transition-speed) ease;
  border-left: 3px solid transparent;
}

.sidebar-link:hover {
  color: #ffffff !important;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-link.active {
  color: #ffffff !important;
  background: rgba(59, 130, 246, 0.2);
  border-left-color: var(--primary-accent);
}

.sidebar-link i {
  font-size: 1.15rem;
  width: 24px;
  text-align: center;
}

/* Main Content Area */
.main-content {
  margin-left: var(--sidebar-width);
  margin-top: var(--topbar-height);
  padding: 2rem;
  flex: 1;
  min-width: 0;
  max-width: 100%;
  transition: margin-left var(--transition-speed) ease;
}

/* Glassmorphism Cards */
.card-glass {
  background: var(--bg-card) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border-color) !important;
  border-radius: 0.75rem;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  color: var(--text-primary) !important;
}

.card-glass:hover {
  border-color: rgba(59, 130, 246, 0.5) !important;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45), 0 0 15px rgba(59, 130, 246, 0.2);
}

.stat-icon-wrapper {
  width: 50px;
  height: 50px;
  border-radius: 0.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
}

.stat-icon-primary { background: rgba(59, 130, 246, 0.2); color: #60a5fa !important; }
.stat-icon-success { background: rgba(16, 185, 129, 0.2); color: #34d399 !important; }
.stat-icon-warning { background: rgba(245, 158, 11, 0.2); color: #fbbf24 !important; }
.stat-icon-danger  { background: rgba(239, 68, 68, 0.2); color: #f87171 !important; }

/* High-Contrast Inputs, Selects, & Form Controls */
.form-control,
.form-select,
.input-group-text {
  background-color: var(--bg-input) !important;
  color: #ffffff !important;
  border: 1px solid var(--border-color) !important;
}

.form-control::placeholder {
  color: #94a3b8 !important;
  opacity: 1;
}

.form-control:focus,
.form-select:focus {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border-color: var(--primary-accent) !important;
  box-shadow: 0 0 0 0.25rem rgba(59, 130, 246, 0.25) !important;
}

/* Select Option High Contrast */
select option {
  background-color: #0f172a !important;
  color: #ffffff !important;
}

/* Tables Styling */
.table-dark-custom {
  --bs-table-bg: transparent;
  --bs-table-color: #f8fafc;
  --bs-table-border-color: var(--border-color);
  color: #f8fafc !important;
}

.table-dark-custom th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #94a3b8 !important;
  border-bottom: 1px solid var(--border-color) !important;
  padding: 1rem;
}

.table-dark-custom td {
  padding: 0.9rem 1rem;
  vertical-align: middle;
  color: #f8fafc !important;
}

.table-dark-custom tbody tr:hover {
  background: rgba(255, 255, 255, 0.05) !important;
}

/* Modals High-Contrast Dark */
.modal-content {
  background-color: #0f172a !important;
  color: #ffffff !important;
  border: 1px solid var(--border-color) !important;
}

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

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

/* Dropdown Menus */
.dropdown-menu {
  background-color: #0f172a !important;
  border: 1px solid var(--border-color) !important;
}

.dropdown-item {
  color: #cbd5e1 !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
  background-color: rgba(59, 130, 246, 0.2) !important;
  color: #ffffff !important;
}

/* Badges */
.badge-role-admin { background: rgba(239, 68, 68, 0.25) !important; color: #fca5a5 !important; border: 1px solid rgba(239, 68, 68, 0.4); }
.badge-role-operator { background: rgba(245, 158, 11, 0.25) !important; color: #fde047 !important; border: 1px solid rgba(245, 158, 11, 0.4); }
.badge-role-user { background: rgba(59, 130, 246, 0.25) !important; color: #93c5fd !important; border: 1px solid rgba(59, 130, 246, 0.4); }

/* Status Pulsing Dot */
.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.status-dot-active { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-dot-inactive { background: var(--danger); }

/* Skeleton Loaders */
.skeleton {
  background: linear-gradient(90deg, rgba(255,255,255,0.05) 25%, rgba(255,255,255,0.15) 50%, rgba(255,255,255,0.05) 75%);
  background-size: 200% 100%;
  animation: skeleton-loading 1.5s infinite;
  border-radius: 4px;
}
@keyframes skeleton-loading {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Collapsed Sidebar Mode */
body.sidebar-collapsed .sidebar-nav {
  transform: translateX(-100%);
}
body.sidebar-collapsed .top-navbar,
body.sidebar-collapsed .main-content {
  left: 0;
  margin-left: 0;
}

@media (max-width: 991.98px) {
  .sidebar-nav {
    transform: translateX(-100%);
  }
  .top-navbar,
  .main-content {
    left: 0;
    margin-left: 0;
  }
  body.sidebar-mobile-open .sidebar-nav {
    transform: translateX(0);
  }
}

/* Nav Pills Custom Filter Bar */
.nav-pills-custom .nav-link {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-color);
  color: #94a3b8;
  transition: all 0.2s ease;
  border-radius: 0.375rem;
}

.nav-pills-custom .nav-link:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #ffffff;
}

.nav-pills-custom .nav-link.active {
  background: var(--primary-accent) !important;
  color: #ffffff !important;
  font-weight: 600;
  border-color: var(--primary-accent) !important;
  box-shadow: 0 0 10px rgba(59, 130, 246, 0.4);
}

/* Custom Dark Pagination */
.pagination .page-link {
  background-color: #0f172a !important;
  color: #cbd5e1 !important;
  border-color: var(--border-color) !important;
}

.pagination .page-link:hover {
  background-color: #1e293b !important;
  color: #ffffff !important;
}

.pagination .page-item.active .page-link {
  background-color: var(--primary-accent) !important;
  border-color: var(--primary-accent) !important;
  color: #ffffff !important;
  font-weight: 600;
}

.pagination .page-item.disabled .page-link {
  background-color: #0b0f19 !important;
  color: #64748b !important;
  border-color: var(--border-color) !important;
}

