/* Dark Mode Styles using company colors */
/* Primary accent: #007FFF (blue) */
/* Company grey: #161616 */

body.dark-mode {
  background-color: #161616;
  color: #f5f5f5;
}

/* MUI component overrides for dark mode */
body.dark-mode .MuiPaper-root {
  background-color: #242424;
  color: #f5f5f5;
}

body.dark-mode .MuiAppBar-root {
  background-color: #1a1a1a;
  color: #f5f5f5;
}

body.dark-mode .MuiIconButton-root {
  color: #f5f5f5;
}

body.dark-mode .MuiButton-root {
  color: #f5f5f5;
}

body.dark-mode .MuiButton-contained {
  background-color: #007FFF;
  color: #ffffff;
}

body.dark-mode .MuiButton-outlined {
  border-color: #007FFF;
  color: #007FFF;
}

body.dark-mode .MuiTypography-root {
  color: #f5f5f5;
}

body.dark-mode .MuiInputBase-root,
body.dark-mode .MuiInputLabel-root {
  color: #e0e0e0;
}

body.dark-mode .MuiSwitch-switchBase.Mui-checked {
  color: #007FFF;
}

body.dark-mode .MuiSwitch-switchBase.Mui-checked + .MuiSwitch-track {
  background-color: rgba(0, 127, 255, 0.5);
}

body.dark-mode .MuiDivider-root {
  background-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .MuiCard-root,
body.dark-mode .MuiCardContent-root {
  background-color: #242424;
}

body.dark-mode .MuiTableCell-root {
  color: #f5f5f5;
  border-bottom-color: rgba(255, 255, 255, 0.12);
}

body.dark-mode .MuiTabs-root {
  background-color: #1a1a1a;
}

body.dark-mode .MuiTab-root {
  color: rgba(255, 255, 255, 0.7);
}

body.dark-mode .MuiTab-root.Mui-selected {
  color: #007FFF;
}

/* Dashboard sidebar in dark mode */
body.dark-mode .MuiDrawer-paper {
  background-color: #1a1a1a;
  color: #f5f5f5;
}

body.dark-mode .MuiListItem-root {
  color: #f5f5f5;
}

body.dark-mode .MuiSvgIcon-root {
  color: #f5f5f5;
}

/* Highlight active menu items with primary color */
body.dark-mode .MuiListItem-root.Mui-selected {
  background-color: rgba(0, 127, 255, 0.15);
}

body.dark-mode .MuiListItem-root.Mui-selected .MuiSvgIcon-root,
body.dark-mode .MuiListItem-root.Mui-selected .MuiTypography-root {
  color: #007FFF;
}

/* Form inputs in dark mode */
body.dark-mode .MuiOutlinedInput-root {
  background-color: rgba(255, 255, 255, 0.05);
}

body.dark-mode .MuiOutlinedInput-notchedOutline {
  border-color: rgba(255, 255, 255, 0.3);
}

body.dark-mode .MuiOutlinedInput-root:hover .MuiOutlinedInput-notchedOutline {
  border-color: rgba(255, 255, 255, 0.5);
}

body.dark-mode .MuiOutlinedInput-root.Mui-focused .MuiOutlinedInput-notchedOutline {
  border-color: #007FFF;
}

/* Table styling for dark mode */
body.dark-mode .MuiTable-root {
  background-color: #242424;
}

body.dark-mode .MuiTableHead-root {
  background-color: #1a1a1a;
}

body.dark-mode .MuiTableRow-root:hover {
  background-color: rgba(0, 127, 255, 0.08);
}

/* Make sure the content is readable */
body.dark-mode .MuiTypography-colorTextSecondary {
  color: rgba(255, 255, 255, 0.7);
}

/* Dialog styling */
body.dark-mode .MuiDialog-paper {
  background-color: #242424;
  color: #f5f5f5;
}

/* Menu styling */
body.dark-mode .MuiMenu-paper {
  background-color: #242424;
  color: #f5f5f5;
}

body.dark-mode .MuiMenuItem-root {
  color: #f5f5f5;
}

body.dark-mode .MuiMenuItem-root:hover {
  background-color: rgba(0, 127, 255, 0.08);
}

/* Make primary color elements stand out */
body.dark-mode .MuiLinearProgress-barColorPrimary {
  background-color: #007FFF;
}

body.dark-mode .MuiCircularProgress-colorPrimary {
  color: #007FFF;
}