/* Custom Fonts - IRANSans */
@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSans.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "IRANSans";
  src: url("../fonts/IRANSans_Bold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "IRANSans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

body {
  font-family: "IRANSans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
  background-color: #f5f5f5;
  color: #333;
  line-height: 1.6;
}

/* Ensure all text elements use IRANSans */
h1,
h2,
h3,
h4,
h5,
h6,
p,
span,
div,
a,
button,
input,
textarea,
select,
label,
table,
th,
td,
li,
ul,
ol,
strong,
em,
b,
i {
  font-family: "IRANSans", "Segoe UI", Tahoma, Geneva, Verdana, sans-serif !important;
}

/* Flash Messages */
.flash-messages {
  position: fixed;
  top: 20px;
  right: 270px; /* 250px sidebar width + 20px margin */
  z-index: 1000;
  max-width: 400px;
}

/* Responsive: on smaller screens, move messages to avoid sidebar */
@media (max-width: 768px) {
  .flash-messages {
    right: 20px;
    left: 20px;
    max-width: calc(100% - 40px);
  }
}

.alert {
  padding: 15px 20px;
  margin-bottom: 10px;
  border-radius: 5px;
  min-width: 300px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
  opacity: 1;
  transform: translateX(0);
}

.alert-success {
  background-color: #d4edda;
  color: #155724;
  border: 1px solid #c3e6cb;
}

.alert-error {
  background-color: #f8d7da;
  color: #721c24;
  border: 1px solid #f5c6cb;
}

/* Login Page */
.login-container {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-box {
  background: white;
  padding: 40px;
  border-radius: 10px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
  width: 100%;
  max-width: 400px;
}

.login-box h2 {
  text-align: center;
  margin-bottom: 30px;
  color: #333;
}

.login-box .form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #000 !important;
}

.login-box .form-group input {
  color: #000 !important;
  background-color: #fff !important;
  border: 1px solid #ddd !important;
}

.login-box .form-group input:focus {
  background-color: #fff !important;
  border-color: #4a90e2 !important;
  outline: none !important;
}

/* Dark mode styles for login inputs */
body.dark-mode .login-box .form-group input {
  background-color: #fff !important;
  color: #000 !important;
  border-color: #ddd !important;
}

body.dark-mode .login-box .form-group input:focus {
  background-color: #fff !important;
  border-color: #4a90e2 !important;
}

/* Forms */
.form-group {
  margin-bottom: 20px;
}

.form-group label {
  display: block;
  margin-bottom: 5px;
  font-weight: 500;
  color: #000;
}

.form-group input,
.form-group textarea,
.form-group select {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 5px;
  font-size: 16px;
  font-family: inherit;
  color: #000;
}

.form-group select {
  background-color: white;
  cursor: pointer;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: #4a90e2;
}

.form-group small {
  display: block;
  margin-top: 5px;
  color: #666;
  font-size: 12px;
}

.form-actions {
  display: flex;
  gap: 10px;
  margin-top: 25px;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  font-size: 16px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s;
}

.btn-primary {
  background-color: #4a90e2;
  color: white;
}

.btn-primary:hover {
  background-color: #357abd;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #5a6268;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-sm {
  padding: 5px 15px;
  font-size: 14px;
}

/* Admin Layout */
.admin-layout {
  display: flex;
  min-height: 100vh;
}

.admin-nav {
  width: 250px;
  background-color: #ffffff;
  color: #333;
  padding: 0;
  border-left: 1px solid #e0e0e0;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 100;
}

.nav-header {
  padding: 12px 20px;
  border-bottom: none;
  margin-bottom: 0;
  min-height: 53px;
  height: auto;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  box-sizing: border-box;
  overflow: hidden;
}

.nav-header h2,
.nav-header .nav-header-title {
  font-size: 20px;
  margin: 0;
  padding: 0;
  line-height: 1.25;
  display: block;
  flex-shrink: 0;
}

/* نام سازمان در سایدبار ادمین: یک خط با بی‌نقطه برای نام‌های بلند */
.nav-header .nav-org-name {
  margin: 6px 0 0;
  font-size: 0.85em;
  color: #7f8c8d;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  line-height: 1.3;
}

.nav-menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nav-menu li {
  margin-bottom: 5px;
}

.nav-menu a {
  display: block;
  padding: 12px 20px;
  color: #555;
  text-decoration: none;
  transition: background-color 0.3s;
}

.nav-menu a:hover {
  background-color: #f5f5f5;
  color: #333;
}

.nav-menu a.active {
  background-color: #e3f2fd;
  color: #2196f3;
  border-right: 3px solid #2196f3;
}

.admin-content {
  flex: 1;
  padding: 30px;
  margin-right: 250px;
  width: calc(100% - 250px);
}

/* User Layout */
.user-layout {
  display: flex;
  min-height: 100vh;
}

.user-nav {
  width: 250px;
  background-color: #ffffff;
  color: #333;
  padding: 0;
  border-left: 1px solid #e0e0e0;
  box-shadow: 2px 0 5px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  right: 0;
  height: 100vh;
  overflow-y: auto;
  flex-shrink: 0;
  z-index: 100;
}

.user-content {
  flex: 1;
  padding: 30px;
  margin-right: 250px;
  width: calc(100% - 250px);
}

/* Page Header */
.page-header {
  margin-bottom: 30px;
  display: flex !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  width: 100%;
  flex-direction: row !important;
  gap: 20px;
}

.page-header-content {
  flex: 1;
  min-width: 0;
}

.page-header > div:first-child {
  text-align: right;
  flex: 0 0 auto;
}

.page-header > div:last-child,
.page-header #header-buttons {
  display: flex !important;
  flex-direction: row !important;
  gap: 10px;
  align-items: center;
  flex: 0 0 auto;
  margin-right: auto !important;
  margin-left: 0 !important;
}

.page-header h1 {
  font-size: 28px;
  color: #333;
  margin: 0 0 12px 0;
  line-height: 1.3;
}

/* عنوان داشبورد با نام سازمان بلند: شکست خط بدون بیرون زدن */
.page-title-with-org {
  word-wrap: break-word;
  overflow-wrap: break-word;
  max-width: 100%;
  min-width: 0;
}

.page-header p {
  color: #666;
  margin-top: 5px;
}

/* استایل‌های جدید برای header داشبورد ادمین */
.page-header-info {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.welcome-message {
  margin: 0;
  color: #555;
  font-size: 16px;
  line-height: 1.5;
}

.welcome-message strong {
  color: #2196f3;
  font-weight: 600;
}

.org-info {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  color: #7f8c8d;
  font-size: 0.9em;
  line-height: 1.6;
}

.org-info-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}

.org-info-item strong {
  color: #555;
  font-weight: 600;
  margin-right: 3px;
}

.org-info-separator {
  color: #bdc3c7;
  margin: 0 4px;
}

/* دکمه dark mode در header */
.page-header .dark-mode-toggle {
  flex-shrink: 0;
  align-self: flex-start;
  margin-top: 4px;
}

/* Stats Grid */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
  margin-bottom: 30px;
}

.stat-card {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
}

.stat-number {
  font-size: 36px;
  font-weight: bold;
  color: #667eea;
}

/* Section */
.section {
  background: white;
  padding: 25px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.section h2 {
  margin-bottom: 20px;
  color: #333;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
}

/* Tables */
.table-container {
  overflow-x: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

.data-table thead {
  background-color: #667eea;
  color: white;
}

.data-table th,
.data-table td {
  padding: 12px;
  text-align: right;
  border-bottom: 1px solid #ddd;
}

.data-table tbody tr:hover {
  background-color: #f5f5f5;
}

.empty-state {
  text-align: center;
  color: #999;
  padding: 40px;
}

/* Form Container */
.form-container {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  max-width: 600px;
}

/* Report Cards */
.reports-list {
  display: grid;
  gap: 20px;
}

.report-card {
  background: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
  border-right: 4px solid #667eea;
  transition: none;
  pointer-events: auto;
}

/* Report card hover removed - user requested */
.report-card:hover {
  background: white !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1) !important;
  transform: none !important;
}

body.dark-mode .report-card:hover {
  background-color: #2d2d2d !important;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3) !important;
  transform: none !important;
}

.report-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.report-header h3 {
  color: #333;
  font-size: 18px;
}

.report-date {
  color: #666;
  font-size: 14px;
}

.report-description {
  color: #555;
  margin-bottom: 15px;
  line-height: 1.6;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.report-hours {
  color: #667eea;
  font-weight: 600;
}

/* Report Detail */
.report-detail {
  background: white;
  padding: 30px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.detail-row {
  display: flex;
  padding: 15px 0;
  border-bottom: 1px solid #eee;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  font-weight: 600;
  color: #333;
  width: 150px;
  flex-shrink: 0;
}

.detail-value {
  color: #555;
  flex: 1;
}

.detail-description {
  white-space: pre-wrap;
  line-height: 1.8;
}

/* Responsive */
@media (max-width: 768px) {
  .admin-layout,
  .user-layout {
    flex-direction: column;
  }

  .admin-nav,
  .user-nav {
    width: 100%;
    position: relative;
    height: auto;
  }

  .admin-content,
  .user-content {
    margin-right: 0;
    width: 100%;
  }

  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 15px;
    direction: rtl;
  }

  .page-header-content {
    width: 100%;
  }

  .page-header > div:first-child {
    flex: 1;
    text-align: right;
  }

  .page-header > div:last-child {
    flex-shrink: 0;
    align-self: flex-end;
  }

  .page-header h1 {
    font-size: 22px;
  }

  .org-info {
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
  }

  .org-info-separator {
    display: none;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }
}

/* Dark Mode Styles */
body.dark-mode {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

body.dark-mode .user-layout {
  background-color: #1a1a1a;
}

body.dark-mode .user-nav {
  background-color: #2d2d2d;
  border-left-color: #404040;
  color: #e0e0e0;
}

body.dark-mode .user-nav h2 {
  color: #e0e0e0;
}

body.dark-mode .nav-menu a {
  color: #e0e0e0;
}

body.dark-mode .nav-menu a:hover {
  background-color: #3d3d3d;
}

body.dark-mode .nav-menu a.active {
  background-color: #1e3a5f;
  color: #64b5f6;
  border-right-color: #64b5f6;
}

body.dark-mode .user-content {
  background-color: #1a1a1a;
}

body.dark-mode .page-header h1 {
  color: #e0e0e0;
}

body.dark-mode .page-header p {
  color: #b0b0b0;
}

/* استایل‌های dark mode برای header جدید */
body.dark-mode .welcome-message {
  color: #b0b0b0;
}

body.dark-mode .welcome-message strong {
  color: #64b5f6;
}

body.dark-mode .org-info {
  color: #95a5a6;
}

body.dark-mode .org-info-item strong {
  color: #b0b0b0;
}

body.dark-mode .org-info-separator {
  color: #555;
}

body.dark-mode .stat-card {
  background-color: #2d2d2d;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.dark-mode .stat-card h3 {
  color: #b0b0b0;
}

body.dark-mode .stat-number {
  color: #667eea;
}

body.dark-mode .section {
  background-color: #2d2d2d;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.dark-mode .section h2 {
  color: #e0e0e0;
}

body.dark-mode .report-card {
  background-color: #2d2d2d;
  border-color: #404040;
}

/* Report card hover removed - user requested */

body.dark-mode .report-header h3 {
  color: #e0e0e0;
}

body.dark-mode .report-date {
  color: #b0b0b0;
}

body.dark-mode .report-description {
  color: #b0b0b0;
}

body.dark-mode .empty-state {
  color: #b0b0b0;
}

/* Dark Mode Toggle Button */
.dark-mode-toggle {
  background: transparent;
  border: 2px solid #667eea;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  color: #667eea;
}

.dark-mode-toggle:hover {
  background-color: #667eea;
  color: white;
  transform: scale(1.1);
}

body.dark-mode .dark-mode-toggle {
  border-color: #ffa726;
  color: #ffa726;
}

body.dark-mode .dark-mode-toggle:hover {
  background-color: #ffa726;
  color: #1a1a1a;
}

body.dark-mode .btn-primary {
  background-color: #667eea;
  color: white;
}

body.dark-mode .btn-primary:hover {
  background-color: #5568d3;
}

body.dark-mode .report-hours {
  color: #64b5f6;
}

body.dark-mode .data-table {
  background: #2d2d2d;
  color: #e0e0e0;
}

body.dark-mode .data-table thead {
  background-color: #667eea;
}

body.dark-mode .data-table tbody tr:hover {
  background-color: #3d3d3d;
}

body.dark-mode .data-table th,
body.dark-mode .data-table td {
  border-bottom-color: #404040;
}

body.dark-mode .form-container {
  background-color: #2d2d2d;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

body.dark-mode .form-group label {
  color: #e0e0e0;
}

body.dark-mode .form-group input,
body.dark-mode .form-group textarea,
body.dark-mode .form-group select {
  background-color: #3d3d3d;
  border-color: #404040;
  color: #e0e0e0;
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group textarea:focus {
  border-color: #667eea;
}

/* Date Input Readonly Dark Mode */
.date-input-readonly {
  background-color: #f5f5f5;
}

body.dark-mode .date-input-readonly {
  background-color: #3d3d3d !important;
  border-color: #404040 !important;
  color: #e0e0e0 !important;
}

body.dark-mode .date-input-readonly::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
}

/* Participants Dropdown Dark Mode */
body.dark-mode .participants-dropdown-btn {
  background-color: #3d3d3d !important;
  border-color: #404040 !important;
  color: #e0e0e0 !important;
}

body.dark-mode #participants-selected-text {
  color: #e0e0e0 !important;
}

body.dark-mode .participants-dropdown {
  background-color: #2d2d2d !important;
  border-color: #404040 !important;
}

body.dark-mode .participant-item {
  background-color: #2d2d2d !important;
  border-bottom-color: #404040 !important;
}

body.dark-mode .participant-item:hover {
  background-color: #3d3d3d !important;
}

body.dark-mode .participant-item label {
  color: #e0e0e0;
}

body.dark-mode .participant-item span {
  color: #e0e0e0;
}

/* Participant Item Light Mode */
.participant-item {
  background: white;
}

.participant-item:hover {
  background: #f8f9fa !important;
}

/* Calendar Container Dark Mode */
body.dark-mode .calendar-container {
  background-color: #2d2d2d !important;
  color: #e0e0e0;
}

/* Calendar Day Names Header Dark Mode */
body.dark-mode .calendar-day-header {
  background-color: #3d3d3d !important;
  color: #e0e0e0 !important;
}

/* Calendar Empty Cells Dark Mode */
body.dark-mode .calendar-empty-cell {
  background-color: #1a1a1a !important;
}

/* Calendar Day Cell Dark Mode */
body.dark-mode .calendar-day-cell {
  color: #e0e0e0 !important;
}

body.dark-mode .calendar-day-cell-white {
  background-color: #2d2d2d !important;
  border-color: #404040 !important;
  color: #e0e0e0 !important;
}

/* Calendar Navigation Buttons Dark Mode */
body.dark-mode .calendar-nav-button {
  background-color: #667eea !important;
  color: white !important;
}

body.dark-mode .calendar-nav-button:hover {
  background-color: #5568d3 !important;
}

/* Calendar Month Header Dark Mode */
body.dark-mode .calendar-month-header {
  color: #e0e0e0 !important;
}

body.dark-mode .calendar-month-header span {
  color: #b0b0b0 !important;
}

/* Calendar Day Number Dark Mode */
body.dark-mode .calendar-day-number {
  color: #e0e0e0 !important;
}

body.dark-mode .calendar-day-jalali {
  color: #b0b0b0 !important;
}

body.dark-mode .calendar-holiday-name {
  color: #999 !important;
}

/* Calendar Day Cell Colors Dark Mode - Override inline styles */
body.dark-mode .calendar-day-cell[style*="background: white"],
body.dark-mode .calendar-day-cell-white {
  background-color: #2d2d2d !important;
  border-color: #404040 !important;
}

body.dark-mode .calendar-day-cell[style*="background: #e3f2fd"] {
  background-color: #1e3a5f !important;
  border-color: #667eea !important;
}

body.dark-mode .calendar-day-cell[style*="background: #c8e6c9"] {
  background-color: #2e4d2e !important;
  border-color: #4caf50 !important;
}

body.dark-mode .calendar-day-cell[style*="background: #ffcdd2"] {
  background-color: #4d2e2e !important;
  border-color: #f44336 !important;
}

body.dark-mode .calendar-day-cell[style*="background: #fff3e0"] {
  background-color: #4d3d2e !important;
  border-color: #ff9800 !important;
}

/* Admin Layout Dark Mode */
body.dark-mode .admin-layout {
  background-color: #1a1a1a;
}

body.dark-mode .admin-nav {
  background-color: #2d2d2d;
  border-left-color: #404040;
  color: #e0e0e0;
}

body.dark-mode .admin-nav h2 {
  color: #e0e0e0;
}

body.dark-mode .admin-nav .nav-header {
  border-bottom: none;
}

body.dark-mode .admin-nav .nav-org-name {
  color: #95a5a6;
}

body.dark-mode .admin-nav .nav-menu a {
  color: #e0e0e0;
}

body.dark-mode .admin-nav .nav-menu a:hover {
  background-color: #3d3d3d;
}

body.dark-mode .admin-nav .nav-menu a.active {
  background-color: #1e3a5f;
  color: #64b5f6;
  border-right-color: #64b5f6;
}

body.dark-mode .admin-content {
  background-color: #1a1a1a;
  color: #e0e0e0;
}

/* Flash Messages Dark Mode */
body.dark-mode .alert-success {
  background-color: #1e4620;
  color: #a5d6a7;
  border-color: #2e7d32;
}

body.dark-mode .alert-error {
  background-color: #4a1f1f;
  color: #ef9a9a;
  border-color: #c62828;
}

/* Buttons Dark Mode */
body.dark-mode .btn-secondary {
  background-color: #5a6268;
}

body.dark-mode .btn-secondary:hover {
  background-color: #6c757d;
}

body.dark-mode .btn-danger {
  background-color: #c82333;
}

body.dark-mode .btn-danger:hover {
  background-color: #dc3545;
}

/* Report Detail Dark Mode */
body.dark-mode .report-detail {
  background-color: #2d2d2d;
  color: #e0e0e0;
}

body.dark-mode .detail-label {
  color: #b0b0b0;
}

body.dark-mode .detail-value {
  color: #e0e0e0;
}

body.dark-mode .detail-row {
  border-bottom-color: #404040;
}

/* Summary Stats Section Dark Mode */
body.dark-mode .summary-stats {
  background-color: #2d2d2d !important;
  color: #e0e0e0;
}

body.dark-mode .summary-stats h3 {
  color: #e0e0e0;
}

body.dark-mode .summary-stats strong {
  color: #b0b0b0;
}

/* Process Statistics Section Dark Mode */
body.dark-mode .process-stats-section {
  background-color: #2d2d2d !important;
  color: #e0e0e0;
}

body.dark-mode .process-stats-section h3 {
  color: #e0e0e0;
}

body.dark-mode .process-stats-section h4 {
  color: #64b5f6;
  border-bottom-color: #667eea;
}

body.dark-mode .process-stats-section table {
  background-color: #1a1a1a;
}

body.dark-mode .process-stats-section table thead tr {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body.dark-mode .process-stats-section table tbody tr {
  background-color: #1a1a1a;
}

body.dark-mode .process-stats-section table tbody tr:nth-child(even) {
  background-color: #2d2d2d;
}

body.dark-mode .process-stats-section table tbody td {
  color: #e0e0e0;
  border-bottom-color: #404040;
}

body.dark-mode .process-stats-section table tfoot tr {
  background: linear-gradient(135deg, #3d2e1f 0%, #5a3d2a 100%);
}

body.dark-mode .process-stats-section table tfoot td {
  color: #e0e0e0;
}

body.dark-mode .process-stats-section .document-badge {
  background-color: #1e3a5f !important;
  color: #64b5f6 !important;
}

/* Idle Periods Section Dark Mode */
body.dark-mode .idle-periods-section {
  background-color: #2d2d2d !important;
  border-right-color: #ff9800 !important;
  color: #e0e0e0;
}

body.dark-mode .idle-periods-section h3 {
  color: #ff9800;
}

body.dark-mode .idle-periods-section p {
  color: #b0b0b0;
}

body.dark-mode .idle-periods-section table tfoot tr {
  background-color: #3d3d3d !important;
}

body.dark-mode .idle-periods-section table tfoot td {
  color: #e0e0e0;
}

/* Idle vs Overtime Section Dark Mode */
body.dark-mode .idle-overtime-section {
  background-color: #2d2d2d !important;
  color: #e0e0e0;
}

/* Idle Periods Section Light Mode */
.idle-periods-section {
  background-color: white;
}

/* Idle Overtime Section Light Mode */
.idle-overtime-section {
  background-color: white;
}

/* Info Box Light Mode */
.idle-overtime-section .info-box {
  background-color: white;
}

/* Difference Box Light Mode */
.idle-overtime-section .difference-box {
  background-color: #f5f5f5;
}

/* Idle Total Row Light Mode */
.idle-total-row {
  background-color: #f5f5f5;
}

/* Info Box Dark Mode */
body.dark-mode .idle-overtime-section .info-box {
  background-color: #1a1a1a !important;
}

/* Difference Box Dark Mode */
body.dark-mode .idle-overtime-section .difference-box {
  background-color: #2d2d2d !important;
}

body.dark-mode .idle-overtime-section h3 {
  color: #e0e0e0;
}

body.dark-mode .idle-overtime-section .info-box {
  background-color: #1a1a1a !important;
  color: #e0e0e0;
}

body.dark-mode .idle-overtime-section .difference-box {
  background-color: #2d2d2d !important;
  color: #e0e0e0;
}

/* Disallowed Activities Section Dark Mode */
body.dark-mode .disallowed-activities-section {
  background-color: #3d2d2d !important;
  border-right-color: #f44336 !important;
  color: #e0e0e0;
}

body.dark-mode .disallowed-activities-section h3 {
  color: #f44336;
}

body.dark-mode .disallowed-activities-section p {
  color: #b0b0b0;
}

body.dark-mode .disallowed-activities-section table tfoot tr {
  background-color: #4a2d2d !important;
}

body.dark-mode .disallowed-activities-section table tfoot td {
  color: #e0e0e0;
}

/* Modal Dark Mode */
body.dark-mode #idleReasonModal,
body.dark-mode #disallowedReasonModal {
  background: rgba(0, 0, 0, 0.8);
}

body.dark-mode #idleReasonModal > div,
body.dark-mode #disallowedReasonModal > div {
  background-color: #2d2d2d;
  color: #e0e0e0;
}

body.dark-mode #idleReasonModal h3,
body.dark-mode #disallowedReasonModal h3 {
  color: #e0e0e0;
}

body.dark-mode #idleReasonModal p,
body.dark-mode #disallowedReasonModal p {
  color: #b0b0b0;
}

body.dark-mode #idleReasonModal strong,
body.dark-mode #disallowedReasonModal strong {
  color: #e0e0e0;
}

body.dark-mode #idleReasonModal label,
body.dark-mode #disallowedReasonModal label {
  color: #e0e0e0;
}

body.dark-mode #idleReasonModal select,
body.dark-mode #idleReasonModal textarea,
body.dark-mode #disallowedReasonModal textarea {
  background-color: #3d3d3d;
  border-color: #404040;
  color: #e0e0e0;
}

body.dark-mode #idleReasonModal .meeting-info {
  background-color: #1e4620 !important;
  border-right-color: #4caf50 !important;
}

body.dark-mode #idleReasonModal .remaining-time-section {
  background-color: #3d2e1f !important;
  border-right-color: #ff9800 !important;
}

body.dark-mode #idleReasonModal .remaining-time-section strong {
  color: #ff9800;
}

body.dark-mode #idleReasonModal .remaining-time-section small {
  color: #b0b0b0;
}

/* Process Row Hover Dark Mode */
body.dark-mode .process-row:hover {
  background-color: #3d3d3d !important;
}

/* Progress Bar Background Dark Mode */
body.dark-mode .progress-bar-bg {
  background-color: #404040 !important;
}

/* Process Details Table Dark Mode */
body.dark-mode .process-details-table {
  background-color: #1a1a1a !important;
}

body.dark-mode .process-details-table thead tr {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

body.dark-mode .process-activity-row {
  background-color: #1a1a1a !important;
}

body.dark-mode .process-activity-row:nth-child(even) {
  background-color: #2d2d2d !important;
}

body.dark-mode .process-activity-row td {
  color: #e0e0e0 !important;
  border-bottom-color: #404040 !important;
}

body.dark-mode .process-total-row {
  background: linear-gradient(135deg, #3d2e1f 0%, #5a3d2a 100%) !important;
}

body.dark-mode .process-total-row td {
  color: #e0e0e0 !important;
}

/* Modal Content Dark Mode */
body.dark-mode .modal-content {
  background-color: #2d2d2d !important;
  color: #e0e0e0;
}

/* Start Meeting Modal (جلسه – زمان شروع) */
.start-meeting-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}
.start-meeting-modal__box {
  background: white;
  border-radius: 12px;
  padding: 24px;
  min-width: 320px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}
.start-meeting-modal__title {
  margin: 0 0 16px 0;
  font-size: 18px;
  color: #333;
}
.start-meeting-modal__subject {
  color: #666;
  margin: 0 0 16px 0;
  font-size: 14px;
}
.start-meeting-modal__field {
  margin-bottom: 16px;
}
.start-meeting-modal__label {
  display: block;
  margin-bottom: 6px;
  font-weight: 600;
  color: #333;
}
.start-meeting-modal__input {
  width: 100%;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 14px;
  background: #fff;
  color: #333;
}
.start-meeting-modal__actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}
body.dark-mode .start-meeting-modal__box {
  background: #2d2d2d;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}
body.dark-mode .start-meeting-modal__title {
  color: #e0e0e0;
}
body.dark-mode .start-meeting-modal__subject {
  color: #b0b0b0;
}
body.dark-mode .start-meeting-modal__label {
  color: #b0b0b0;
}
body.dark-mode .start-meeting-modal__input {
  background: #1a1a1a;
  border-color: #404040;
  color: #e0e0e0;
}
body.dark-mode .start-meeting-modal__input:focus {
  border-color: #64b5f6;
  outline: none;
}

/* Detail Row Dark Mode */
body.dark-mode .detail-row {
  border-bottom-color: #404040;
}

/* Summary Stats Grid Dark Mode */
body.dark-mode .summary-stats > div {
  color: #e0e0e0;
}

body.dark-mode .summary-stats > div strong {
  color: #b0b0b0;
}

/* Idle Periods Table Dark Mode */
body.dark-mode .idle-periods-section table tbody tr {
  background-color: #2d2d2d;
}

body.dark-mode .idle-periods-section table tbody tr:hover {
  background-color: #3d3d3d;
}

body.dark-mode .idle-periods-section table tbody td {
  color: #e0e0e0;
  border-bottom-color: #404040;
}

/* Disallowed Activities Table Dark Mode */
body.dark-mode .disallowed-activities-section table tbody tr {
  background-color: #2d2d2d;
}

body.dark-mode .disallowed-activities-section table tbody tr:hover {
  background-color: #3d3d3d;
}

/* Meeting Participant Item Dark Mode */
body.dark-mode .meeting-participant-item {
  background-color: #3d3d3d !important;
  color: #e0e0e0 !important;
}

/* Meeting Description Box Dark Mode */
body.dark-mode .meeting-description-box {
  background-color: #2d2d2d !important;
  color: #e0e0e0 !important;
}

/* Meeting Form Section Dark Mode */
body.dark-mode .meeting-form-section {
  background-color: #2d2d2d !important;
}

/* Meeting Add Participant Form Dark Mode */
body.dark-mode .section form select {
  background-color: #2d2d2d !important;
  color: #e0e0e0 !important;
  border-color: #555 !important;
}

body.dark-mode .section form select option {
  background-color: #2d2d2d !important;
  color: #e0e0e0 !important;
}

body.dark-mode .section div[style*="border-top"] {
  border-top-color: #555 !important;
}

/* Meeting Leave Button Dark Mode */
body.dark-mode .section div[style*="background: #fff3cd"] {
  background-color: #3d3d1a !important;
  border-color: #666 !important;
}

body.dark-mode .section div[style*="background: #fff3cd"] p {
  color: #e0e0e0 !important;
}

body.dark-mode .section button[style*="background-color: #ffc107"] {
  background-color: #ff9800 !important;
  color: #fff !important;
  border-color: #ff9800 !important;
}

body.dark-mode .section button[style*="background-color: #ffc107"]:hover {
  background-color: #f57c00 !important;
}

/* Meeting Timer Section Dark Mode */
body.dark-mode .meeting-timer-section {
  background-color: #2d2d2d !important;
  border-right-color: #4caf50 !important;
}

body.dark-mode .meeting-timer-section h3 {
  color: #e0e0e0 !important;
}

body.dark-mode #timer-display {
  color: #66bb6a !important;
}

body.dark-mode .timer-status-text {
  color: #b0b0b0 !important;
}

body.dark-mode .timer-content {
  color: #e0e0e0;
}

body.dark-mode .disallowed-activities-section table tbody td {
  color: #e0e0e0;
  border-bottom-color: #404040;
}

/* Process Details Row Dark Mode */
body.dark-mode .process-details-row {
  background-color: #1a1a1a !important;
}

body.dark-mode .process-details-row td {
  background-color: #1a1a1a !important;
}

/* Text Colors Dark Mode */
body.dark-mode .summary-stats span[style*="color: #666"],
body.dark-mode .summary-stats span[style*="color: #999"],
body.dark-mode .summary-stats span[style*="color: #333"],
body.dark-mode .summary-stats span[style*="color: #555"] {
  color: #b0b0b0 !important;
}

body.dark-mode .process-stats-section span[style*="color: #999"],
body.dark-mode .process-stats-section span[style*="color: #666"],
body.dark-mode .process-stats-section span[style*="color: #333"] {
  color: #b0b0b0 !important;
}

body.dark-mode .idle-periods-section span[style*="color: #999"],
body.dark-mode .idle-periods-section span[style*="color: #666"],
body.dark-mode .idle-periods-section p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode .disallowed-activities-section span[style*="color: #999"],
body.dark-mode .disallowed-activities-section span[style*="color: #333"],
body.dark-mode .disallowed-activities-section p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode .idle-overtime-section div[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode .modal-content p[style*="color: #666"],
body.dark-mode .modal-content small[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode .modal-content span[style*="color: #999"] {
  color: #999 !important;
}

/* Activity Table Cells Dark Mode */
body.dark-mode .process-activity-row td[style*="color: #666"],
body.dark-mode .process-activity-row td[style*="color: #333"] {
  color: #e0e0e0 !important;
}

body.dark-mode .process-total-row td[style*="color: #333"] {
  color: #e0e0e0 !important;
}

body.dark-mode .disallowed-activities-section td[style*="color: #333"] {
  color: #e0e0e0 !important;
}

/* Profile Page Dark Mode - Tab Buttons */
body.dark-mode .tab-button {
  color: #b0b0b0 !important;
}

body.dark-mode .tab-button:hover {
  color: #64b5f6 !important;
  background-color: rgba(100, 181, 246, 0.1) !important;
}

/* Override inline styles for tab buttons in dark mode */
body.dark-mode button.tab-button[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode button.tab-button[style*="color: #2196f3"] {
  color: #64b5f6 !important;
  border-bottom-color: #64b5f6 !important;
}

/* Tab container border in dark mode */
body.dark-mode div[style*="border-bottom: 2px solid #e0e0e0"] {
  border-bottom-color: #404040 !important;
}

/* Profile Tabs Nav - Dark Mode */
body.dark-mode .profile-tabs-nav {
  background: #2d2d2d !important;
  border-color: #404040 !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.3) !important;
}

body.dark-mode .profile-tab-link {
  color: #b0b0b0 !important;
}

body.dark-mode .profile-tab-link:hover {
  color: #64b5f6 !important;
  background: rgba(100, 181, 246, 0.1) !important;
}

body.dark-mode .profile-tab-link.active {
  color: #64b5f6 !important;
  border-bottom-color: #64b5f6 !important;
  background: rgba(100, 181, 246, 0.08) !important;
}

/* Tab visibility — toggled via Jinja class instead of inline style */
.tab-content { display: block; }
.tab-content--hidden { display: none !important; }

/* Non-system activity fields toggle in admin edit user form */
.non-system-fields-wrap { display: flex; gap: 20px; flex-wrap: wrap; }
.non-system-fields-wrap--hidden { display: none !important; }

/* Profile Page Dark Mode - Info Tab Content */
body.dark-mode .tab-content {
  background-color: #1a1a1a;
}

body.dark-mode .tab-content .section {
  background-color: #2d2d2d;
}

/* Profile Page Dark Mode - Info Section Text Colors */
body.dark-mode .section span[style*="color: #666"],
body.dark-mode .section span[style*="color: #333"] {
  color: #b0b0b0 !important;
}

body.dark-mode .section span[style*="color: #999"] {
  color: #808080 !important;
}

/* Profile Page Dark Mode - Stats Cards in Profile */
body.dark-mode .stat-card[style*="background"] {
  background-color: #2d2d2d !important;
}

body.dark-mode .stat-card .stat-number[style*="color: #4caf50"] {
  color: #4caf50 !important;
}

body.dark-mode .stat-card .stat-number[style*="color: #f44336"] {
  color: #f44336 !important;
}

body.dark-mode .stat-card .stat-number[style*="color: #ff9800"] {
  color: #ff9800 !important;
}

body.dark-mode .stat-card .stat-number[style*="color: #667eea"] {
  color: #667eea !important;
}

/* Profile Page Dark Mode - Comparison Section */
body.dark-mode .section h3[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode .section p[style*="color: #667eea"] {
  color: #667eea !important;
}

body.dark-mode .section p[style*="color: #4caf50"] {
  color: #4caf50 !important;
}

body.dark-mode .section p[style*="color: #f44336"] {
  color: #f44336 !important;
}

body.dark-mode .section span[style*="color: #4caf50"] {
  color: #4caf50 !important;
}

body.dark-mode .section span[style*="color: #f44336"] {
  color: #f44336 !important;
}

/* Profile Page Dark Mode - Settings Tab */
body.dark-mode .section p[style*="color: #999"] {
  color: #b0b0b0 !important;
}

body.dark-mode .section p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Profile Page Dark Mode - Process Permissions Table */
body.dark-mode .section table tbody td[style*="color: #333"] {
  color: #e0e0e0 !important;
}

body.dark-mode .section table tbody td[style*="color: #f44336"] {
  color: #f44336 !important;
}

body.dark-mode .section table tbody td[style*="color: #4caf50"] {
  color: #4caf50 !important;
}

/* Profile Page Dark Mode - Reports Tab */
body.dark-mode .section table tbody td[style*="color: #f44336"] {
  color: #f44336 !important;
}

body.dark-mode .section table tbody td[style*="color: #4caf50"] {
  color: #4caf50 !important;
}

body.dark-mode .section table tbody td[style*="color: #ff9800"] {
  color: #ff9800 !important;
}

body.dark-mode .section table tbody td[style*="font-weight: bold"] {
  color: #e0e0e0 !important;
}

/* Profile Page Dark Mode - Calendar Tab */
body.dark-mode .section p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Profile Page Dark Mode - Idle Management Tab */
body.dark-mode .section table tbody td span[style*="color: #333"] {
  color: #e0e0e0 !important;
}

body.dark-mode .section table tbody td span[style*="color: #999"] {
  color: #b0b0b0 !important;
}

body.dark-mode .section table tbody td span[style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Profile Page Dark Mode - Meeting Reports Tab */
body.dark-mode .section .meeting-item {
  background-color: #2d2d2d;
  border-color: #404040;
}

body.dark-mode .section .meeting-item:hover {
  background-color: #3d3d3d;
}

/* Profile Page Dark Mode - Overtime Management Tab */
body.dark-mode .section .overtime-item {
  background-color: #2d2d2d;
  border-color: #404040;
}

body.dark-mode .section .overtime-item:hover {
  background-color: #3d3d3d;
}

/* Profile Page Dark Mode - Badge Colors */
body.dark-mode .badge {
  color: #e0e0e0;
}

body.dark-mode .badge-success {
  background-color: #2e4d2e;
  color: #4caf50;
}

body.dark-mode .badge-danger {
  background-color: #4d2e2e;
  color: #f44336;
}

body.dark-mode .badge-warning {
  background-color: #4d3d2e;
  color: #ff9800;
}

body.dark-mode .badge-info {
  background-color: #1e3a5f;
  color: #64b5f6;
}

/* Badge Sizes */
.badge-sm {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  line-height: 1.2;
}

/* Profile Page Dark Mode - Approval Status Colors */
body.dark-mode .approval-status-pending {
  color: #ff9800 !important;
}

body.dark-mode .approval-status-approved {
  color: #4caf50 !important;
}

body.dark-mode .approval-status-rejected {
  color: #f44336 !important;
}

/* Profile Page Dark Mode - General Overrides for Inline Styles */
body.dark-mode
  [style*="color: #333"]:not([style*="color: #3333"]):not(
    [style*="color: #33333"]
  ) {
  color: #e0e0e0 !important;
}

body.dark-mode [style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode [style*="color: #999"] {
  color: #808080 !important;
}

/* Profile Page Dark Mode - Keep specific colors (green, red, orange, blue) */
body.dark-mode [style*="color: #4caf50"],
body.dark-mode [style*="color: #f44336"],
body.dark-mode [style*="color: #ff9800"],
body.dark-mode [style*="color: #667eea"],
body.dark-mode [style*="color: #2196f3"],
body.dark-mode [style*="color: #64b5f6"] {
  /* Keep original colors - don't override */
}

/* Profile Page Dark Mode - Section borders */
body.dark-mode .section[style*="border-right: 4px solid #f44336"] {
  border-right-color: #f44336 !important;
}

body.dark-mode .section[style*="border-right: 4px solid #ff9800"] {
  border-right-color: #ff9800 !important;
}

body.dark-mode .section[style*="border-right: 4px solid #4caf50"] {
  border-right-color: #4caf50 !important;
}

/* Profile Page Dark Mode - Table cell borders */
body.dark-mode table[style*="border: 1px solid #e0e0e0"] {
  border-color: #404040 !important;
}

body.dark-mode td[style*="border: 1px solid #e0e0e0"] {
  border-color: #404040 !important;
}

/* Profile Page Dark Mode - Additional fixes for specific elements */
body.dark-mode .section h2 {
  color: #e0e0e0 !important;
}

body.dark-mode .section h3 {
  color: #e0e0e0 !important;
}

body.dark-mode .section h4 {
  color: #b0b0b0 !important;
}

body.dark-mode .section p {
  color: #b0b0b0 !important;
}

body.dark-mode .section label {
  color: #e0e0e0 !important;
}

body.dark-mode .section input[type="text"],
body.dark-mode .section input[type="date"],
body.dark-mode .section textarea,
body.dark-mode .section select {
  background-color: #3d3d3d !important;
  border-color: #404040 !important;
  color: #e0e0e0 !important;
}

body.dark-mode .section input[type="text"]:focus,
body.dark-mode .section input[type="date"]:focus,
body.dark-mode .section textarea:focus,
body.dark-mode .section select:focus {
  border-color: #667eea !important;
  outline: none !important;
}

/* Profile Page Dark Mode - Links */
body.dark-mode .section a {
  color: #64b5f6 !important;
}

body.dark-mode .section a:hover {
  color: #90caf9 !important;
}

/* Profile Page Dark Mode - Buttons in sections */
body.dark-mode .section .btn {
  background-color: #667eea !important;
  color: white !important;
}

body.dark-mode .section .btn:hover {
  background-color: #5568d3 !important;
}

body.dark-mode .section .btn-secondary {
  background-color: #5a6268 !important;
}

body.dark-mode .section .btn-danger {
  background-color: #c82333 !important;
}

body.dark-mode .section .btn-sm {
  background-color: #667eea !important;
}

/* Settings Tab Dark Mode - Section Background */
body.dark-mode #tab-settings .section[style*="background: #fff"],
body.dark-mode #tab-settings .section[style*="background-color: #fff"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
  border-color: #404040 !important;
}

/* Settings Tab Dark Mode - Form Background */
body.dark-mode #tab-settings form[style*="background: #f5f5f5"],
body.dark-mode #tab-settings form[style*="background-color: #f5f5f5"] {
  background-color: #1a1a1a !important;
  background: #1a1a1a !important;
}

/* Settings Tab Dark Mode - Table Header Row */
body.dark-mode
  #tab-settings
  table
  thead
  tr[style*="background: linear-gradient"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
}

/* Settings Tab Dark Mode - Process Group Row */
body.dark-mode #tab-settings table tbody tr[style*="background: #e3f2fd"] {
  background-color: #1e3a5f !important;
  background: #1e3a5f !important;
  border-top-color: #64b5f6 !important;
}

body.dark-mode #tab-settings table tbody tr[style*="background: #e3f2fd"] td {
  border-color: #404040 !important;
}

body.dark-mode
  #tab-settings
  table
  tbody
  tr[style*="background: #e3f2fd"]
  span[style*="color: #1976d2"] {
  color: #64b5f6 !important;
}

body.dark-mode
  #tab-settings
  table
  tbody
  tr[style*="background: #e3f2fd"]
  span[style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Settings Tab Dark Mode - Table Body Rows */
body.dark-mode #tab-settings table tbody tr[style*="background: white"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
}

body.dark-mode #tab-settings table tbody tr[style*="background: #f8f9fa"] {
  background-color: #1a1a1a !important;
  background: #1a1a1a !important;
}

body.dark-mode #tab-settings table tbody tr td {
  border-color: #404040 !important;
  color: #e0e0e0 !important;
}

body.dark-mode #tab-settings table tbody tr td[style*="color: #1976d2"] {
  color: #64b5f6 !important;
}

body.dark-mode #tab-settings table tbody tr td[style*="color: #999"] {
  color: #808080 !important;
}

body.dark-mode #tab-settings table tbody tr td[style*="color: #4caf50"] {
  color: #4caf50 !important;
}

/* Settings Tab Dark Mode - Document Badge */
body.dark-mode
  #tab-settings
  table
  tbody
  tr
  td
  span[style*="background: #e3f2fd"] {
  background-color: #1e3a5f !important;
  background: #1e3f5f !important;
}

body.dark-mode
  #tab-settings
  table
  tbody
  tr
  td
  span[style*="border: 2px solid #1976d2"] {
  border-color: #64b5f6 !important;
}

body.dark-mode
  #tab-settings
  table
  tbody
  tr
  td
  span[style*="background: rgba(25, 118, 210, 0.1)"] {
  background-color: rgba(100, 181, 246, 0.2) !important;
}

body.dark-mode
  #tab-settings
  table
  tbody
  tr
  td
  span[style*="border: 1px solid #1976d2"] {
  border-color: #64b5f6 !important;
}

/* Settings Tab Dark Mode - Table Header Borders */
body.dark-mode #tab-settings table thead th[style*="border: 1px solid #ddd"] {
  border-color: #404040 !important;
}

/* Settings Tab Dark Mode - Checkbox */
body.dark-mode #tab-settings input[type="checkbox"] {
  filter: invert(1) hue-rotate(180deg);
  opacity: 0.8;
}

body.dark-mode #tab-settings input[type="checkbox"]:checked {
  opacity: 1;
}

/* Settings Tab Dark Mode - Buttons in Form */
body.dark-mode #tab-settings form button[style*="background: #6c757d"],
body.dark-mode #tab-settings form button[style*="background-color: #6c757d"] {
  background-color: #5a6268 !important;
  background: #5a6268 !important;
}

body.dark-mode #tab-settings form button[style*="background-color: #4caf50"] {
  background-color: #4caf50 !important;
}

body.dark-mode #tab-settings form button[style*="background-color: #f44336"] {
  background-color: #f44336 !important;
}

body.dark-mode #tab-settings form button[style*="background-color: #388e3c"] {
  background-color: #388e3c !important;
}

body.dark-mode #tab-settings form button[style*="background-color: #d32f2f"] {
  background-color: #d32f2f !important;
}

body.dark-mode #tab-settings form span[style*="color: #666"] {
  color: #808080 !important;
}

/* Settings Tab Dark Mode - Status Badges */
body.dark-mode #tab-settings span[style*="background: #4caf50"] {
  background-color: #2e4d2e !important;
  background: #2e4d2e !important;
}

body.dark-mode #tab-settings span[style*="background: #f44336"] {
  background-color: #4d2e2e !important;
  background: #4d2e2e !important;
}

/* Settings Tab Dark Mode - Action Buttons */
body.dark-mode #tab-settings form button[style*="background-color: #667eea"] {
  background-color: #667eea !important;
}

body.dark-mode #tab-settings form button[style*="background-color: #dc3545"] {
  background-color: #c82333 !important;
}

body.dark-mode #tab-settings form button[style*="background-color: #6c757d"] {
  background-color: #5a6268 !important;
}

/* Settings Tab Dark Mode - Text Colors */
body.dark-mode #tab-settings p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode #tab-settings h3 {
  color: #e0e0e0 !important;
}

/* Idle Management Tab Dark Mode */
body.dark-mode #tab-idle-management .section {
  background-color: #2d2d2d !important;
}

body.dark-mode
  #tab-idle-management
  table
  thead
  tr[style*="background: #f5f5f5"] {
  background-color: #3d3d3d !important;
  background: #3d3d3d !important;
}

body.dark-mode #tab-idle-management table thead th {
  color: #e0e0e0 !important;
  border-color: #404040 !important;
}

body.dark-mode #tab-idle-management table tbody tr {
  border-bottom-color: #404040 !important;
}

body.dark-mode #tab-idle-management table tbody tr td {
  border-color: #404040 !important;
  color: #e0e0e0 !important;
}

body.dark-mode
  #tab-idle-management
  table
  tbody
  tr
  td
  span[style*="color: #333"] {
  color: #e0e0e0 !important;
}

body.dark-mode
  #tab-idle-management
  table
  tbody
  tr
  td
  span[style*="color: #999"] {
  color: #b0b0b0 !important;
}

body.dark-mode #tab-idle-management div[style*="background: #f9f9f9"] {
  background-color: #1a1a1a !important;
  background: #1a1a1a !important;
  color: #b0b0b0 !important;
}

body.dark-mode #tab-idle-management p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Meeting Reports Tab Dark Mode */
body.dark-mode #tab-meeting-reports .section[style*="background: white"],
body.dark-mode #tab-meeting-reports .section[style*="background-color: white"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
}

body.dark-mode #tab-meeting-reports h3 {
  color: #e0e0e0 !important;
}

body.dark-mode #tab-meeting-reports p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode #tab-meeting-reports table tbody tr td {
  color: #e0e0e0 !important;
}

body.dark-mode #tab-meeting-reports table tbody tr td[style*="color: #999"] {
  color: #b0b0b0 !important;
}

body.dark-mode #tab-meeting-reports p[style*="color: #999"] {
  color: #b0b0b0 !important;
}

/* Overtime Management Tab Dark Mode */
body.dark-mode #tab-overtime-management .section[style*="background: white"],
body.dark-mode
  #tab-overtime-management
  .section[style*="background-color: white"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
}

body.dark-mode #tab-overtime-management h3 {
  color: #e0e0e0 !important;
}

body.dark-mode #tab-overtime-management p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode #tab-overtime-management table tbody tr td {
  color: #e0e0e0 !important;
}

body.dark-mode
  #tab-overtime-management
  table
  tbody
  tr
  td[style*="color: #ff9800"] {
  color: #ff9800 !important;
}

body.dark-mode
  #tab-overtime-management
  table
  tbody
  tr
  td[style*="color: #999"] {
  color: #b0b0b0 !important;
}

/* Reports Tab Dark Mode - Statistics Cards */
body.dark-mode
  #tab-reports
  div[style*="background: white"][style*="color: #333"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
  color: #e0e0e0 !important;
}

body.dark-mode
  #tab-reports
  div[style*="background: white"]
  h3[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode
  #tab-reports
  div[style*="background: white"]
  p[style*="color: #333"] {
  color: #e0e0e0 !important;
}

body.dark-mode
  #tab-reports
  div[style*="background: white"]
  p[style*="color: #999"] {
  color: #b0b0b0 !important;
}

body.dark-mode #tab-reports div[style*="background: white"] {
  border-color: #404040 !important;
}

body.dark-mode #tab-reports div[style*="background: #9e9e9e"] {
  background-color: #808080 !important;
  background: #808080 !important;
}

/* Reports Tab Dark Mode - Table */
body.dark-mode #tab-reports table {
  background-color: #2d2d2d !important;
}

body.dark-mode #tab-reports table thead th[style*="border: 1px solid #ddd"] {
  border-color: #404040 !important;
}

body.dark-mode #tab-reports table tbody tr[style*="background: white"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
}

body.dark-mode #tab-reports table tbody tr[style*="background: #f8f9fa"] {
  background-color: #1a1a1a !important;
  background: #1a1a1a !important;
}

body.dark-mode #tab-reports table tbody tr td {
  color: #e0e0e0 !important;
  border-color: #404040 !important;
}

body.dark-mode
  #tab-reports
  table
  tbody
  tr
  td[style*="border: 1px solid #e0e0e0"] {
  border-color: #404040 !important;
}

body.dark-mode #tab-reports table tbody tr td span[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode #tab-reports table tbody tr:hover {
  background-color: #3d3d3d !important;
}

/* Calendar Tab Dark Mode */
body.dark-mode #tab-calendar .section {
  background-color: #2d2d2d !important;
}

body.dark-mode #tab-calendar h2 {
  color: #e0e0e0 !important;
}

/* Calendar Container Background */
body.dark-mode #work-calendar[style*="background: white"] {
  background-color: #1a1a1a !important;
  background: #1a1a1a !important;
}

/* Calendar Empty Cells */
body.dark-mode #work-calendar div[style*="background: #f9f9f9"] {
  background-color: #1a1a1a !important;
  background: #1a1a1a !important;
}

/* Calendar Day Cells - Normal Days */
body.dark-mode
  #work-calendar
  div[style*="background: white"][style*="border: 1px solid #e0e0e0"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
  border-color: #404040 !important;
  border: 1px solid #404040 !important;
}

/* Calendar Day Cells - Today */
body.dark-mode #work-calendar div[style*="background: #e3f2fd"] {
  background-color: #1e3a5f !important;
  background: #1e3a5f !important;
  border-color: #64b5f6 !important;
  border: 2px solid #64b5f6 !important;
}

/* Calendar Day Cells - Holidays */
body.dark-mode #work-calendar div[style*="background: #fff3e0"] {
  background-color: #4d3d2e !important;
  background: #4d3d2e !important;
  border-color: #ff9800 !important;
  border: 1px solid #ff9800 !important;
}

/* Calendar Day Cells - Has Report */
body.dark-mode #work-calendar div[style*="background: #c8e6c9"] {
  background-color: #2e4d2e !important;
  background: #2e4d2e !important;
  border-color: #4caf50 !important;
  border: 1px solid #4caf50 !important;
}

/* Calendar Day Cells - Absent */
body.dark-mode #work-calendar div[style*="background: #ffcdd2"] {
  background-color: #4d2e2e !important;
  background: #4d2e2e !important;
  border-color: #f44336 !important;
  border: 1px solid #f44336 !important;
}

/* Calendar Day Number Text */
body.dark-mode #work-calendar div[style*="color: #333"] {
  color: #e0e0e0 !important;
}

body.dark-mode #work-calendar div[style*="color: #2196f3"] {
  color: #64b5f6 !important;
}

/* Calendar Jalali Date Text */
body.dark-mode #work-calendar div[style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Calendar Status Text */
body.dark-mode #work-calendar div[style*="color: #999"] {
  color: #808080 !important;
}

body.dark-mode #work-calendar div[style*="color: #4caf50"] {
  color: #4caf50 !important;
}

body.dark-mode #work-calendar div[style*="color: #f44336"] {
  color: #f44336 !important;
}

body.dark-mode #work-calendar div[style*="color: #ff9800"] {
  color: #ff9800 !important;
}

/* Calendar Day Cell Hover Effect */
body.dark-mode #work-calendar div[style*="cursor: pointer"]:hover {
  background-color: #3d3d3d !important;
  opacity: 0.9;
}

body.dark-mode #work-calendar div[style*="background: #e3f2fd"]:hover {
  background-color: #2e4a6f !important;
}

body.dark-mode #work-calendar div[style*="background: #c8e6c9"]:hover {
  background-color: #3e5d3e !important;
}

body.dark-mode #work-calendar div[style*="background: #fff3e0"]:hover {
  background-color: #5d4d3e !important;
}

body.dark-mode #work-calendar div[style*="background: #ffcdd2"]:hover {
  background-color: #5d3e3e !important;
}

/* Calendar Grid Container */
body.dark-mode #work-calendar > div {
  background-color: #1a1a1a !important;
}

/* Calendar Day Header Row */
body.dark-mode #work-calendar div[style*="background-color: #f5f5f5"],
body.dark-mode #work-calendar div[style*="background: #f5f5f5"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
  color: #e0e0e0 !important;
}

/* Calendar Day Header Text */
body.dark-mode
  #work-calendar
  div[style*="font-weight: bold"][style*="color: #333"] {
  color: #e0e0e0 !important;
}

/* Calendar - Force text colors in all day cells */
body.dark-mode #work-calendar > div > div {
  color: #e0e0e0 !important;
}

/* Calendar - Day number in cells */
body.dark-mode #work-calendar div[style*="font-size: 16px"] {
  color: #e0e0e0 !important;
}

/* Calendar - Jalali date text */
body.dark-mode
  #work-calendar
  div[style*="font-size: 11px"][style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Calendar - Status text */
body.dark-mode #work-calendar div[style*="font-size: 10px"] {
  color: #e0e0e0 !important;
}

/* Calendar - Holiday name text */
body.dark-mode
  #work-calendar
  div[style*="font-size: 9px"][style*="color: #999"] {
  color: #808080 !important;
}

/* Calendar - Admin hint text */
body.dark-mode
  #work-calendar
  div[style*="font-style: italic"][style*="color: #999"] {
  color: #808080 !important;
}

/* Calendar - Add button text */
body.dark-mode
  #work-calendar
  div[style*="color: #2196f3"]:not([style*="background"]) {
  color: #64b5f6 !important;
}

/* Calendar - Ensure all text is visible */
body.dark-mode #work-calendar div {
  color: inherit;
}

/* Calendar - Better contrast for holiday cells */
body.dark-mode #work-calendar div[style*="background: #fff3e0"] div {
  color: #ffcc80 !important;
}

body.dark-mode
  #work-calendar
  div[style*="background: #fff3e0"]
  div[style*="color: #666"] {
  color: #ffcc80 !important;
}

body.dark-mode
  #work-calendar
  div[style*="background: #fff3e0"]
  div[style*="color: #999"] {
  color: #ffb74d !important;
}

/* Calendar - Better contrast for today cell */
body.dark-mode #work-calendar div[style*="background: #e3f2fd"] div {
  color: #90caf9 !important;
}

body.dark-mode
  #work-calendar
  div[style*="background: #e3f2fd"]
  div[style*="color: #333"] {
  color: #90caf9 !important;
}

body.dark-mode
  #work-calendar
  div[style*="background: #e3f2fd"]
  div[style*="color: #666"] {
  color: #90caf9 !important;
}

/* Calendar - Better contrast for report cells */
body.dark-mode #work-calendar div[style*="background: #c8e6c9"] div {
  color: #a5d6a7 !important;
}

body.dark-mode
  #work-calendar
  div[style*="background: #c8e6c9"]
  div[style*="color: #666"] {
  color: #a5d6a7 !important;
}

body.dark-mode
  #work-calendar
  div[style*="background: #c8e6c9"]
  div[style*="color: #999"] {
  color: #81c784 !important;
}

/* Calendar - Better contrast for absent cells */
body.dark-mode #work-calendar div[style*="background: #ffcdd2"] div {
  color: #ef9a9a !important;
}

body.dark-mode
  #work-calendar
  div[style*="background: #ffcdd2"]
  div[style*="color: #666"] {
  color: #ef9a9a !important;
}

body.dark-mode
  #work-calendar
  div[style*="background: #ffcdd2"]
  div[style*="color: #999"] {
  color: #e57373 !important;
}

/* Manage Breaks Page - Shift Info Card Dark Mode */
body.dark-mode div[style*="background: #f0f0f0"][style*="padding: 15px"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
  color: #e0e0e0 !important;
}

body.dark-mode
  div[style*="background: #f0f0f0"][style*="padding: 15px"]
  strong {
  color: #b0b0b0 !important;
}

/* Holiday Calendar Page Dark Mode */
body.dark-mode
  div[style*="background: white"][style*="border-radius: 8px"][style*="padding: 20px"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
}

body.dark-mode
  div[style*="background: white"][style*="border-radius: 8px"][style*="padding: 20px"]
  h2 {
  color: #e0e0e0 !important;
}

body.dark-mode
  div[style*="background: white"][style*="border-radius: 8px"][style*="padding: 20px"]
  p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Weekly Holiday Buttons Dark Mode */
body.dark-mode button[style*="background: #e0e0e0"] {
  background-color: #3d3d3d !important;
  background: #3d3d3d !important;
  color: #e0e0e0 !important;
  border-color: #404040 !important;
}

body.dark-mode button[style*="background: #ff9800"] {
  background-color: #ff9800 !important;
  background: #ff9800 !important;
  color: white !important;
}

body.dark-mode button[style*="background: #e0e0e0"]:hover {
  /* Hover disabled - no style changes */
}

/* Calendar Container Dark Mode */
body.dark-mode #holiday-calendar {
  background-color: #1a1a1a !important;
}

/* Calendar Day Header Dark Mode */
body.dark-mode #holiday-calendar div[style*="background: #f5f5f5"] {
  background-color: #3d3d3d !important;
  background: #3d3d3d !important;
  color: #e0e0e0 !important;
}

body.dark-mode
  #holiday-calendar
  div[style*="color: #666"][style*="font-weight: bold"] {
  color: #e0e0e0 !important;
}

/* Calendar Empty Cells Dark Mode */
body.dark-mode #holiday-calendar div[style*="background: #f9f9f9"] {
  background-color: #1a1a1a !important;
  background: #1a1a1a !important;
}

/* Calendar Day Cells Dark Mode - Normal Days */
body.dark-mode
  #holiday-calendar
  div[style*="background: white"][style*="border: 1px solid #e0e0e0"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
  border-color: #404040 !important;
  border: 1px solid #404040 !important;
}

/* Calendar Day Cells Dark Mode - Today */
body.dark-mode #holiday-calendar div[style*="background: #e3f2fd"] {
  background-color: #1e3a5f !important;
  background: #1e3a5f !important;
  border-color: #64b5f6 !important;
  border: 2px solid #64b5f6 !important;
}

/* Calendar Day Cells Dark Mode - Holidays */
body.dark-mode #holiday-calendar div[style*="background: #fff3e0"] {
  background-color: #4d3d2e !important;
  background: #4d3d2e !important;
  border-color: #ff9800 !important;
  border: 1px solid #ff9800 !important;
}

/* Calendar Day Number Text Dark Mode */
body.dark-mode #holiday-calendar div[style*="color: #333"] {
  color: #e0e0e0 !important;
}

body.dark-mode #holiday-calendar div[style*="color: #2196f3"] {
  color: #64b5f6 !important;
}

/* Calendar Jalali Date Text Dark Mode */
body.dark-mode #holiday-calendar div[style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Calendar Status Text Dark Mode */
body.dark-mode #holiday-calendar div[style*="color: #999"] {
  color: #808080 !important;
}

body.dark-mode #holiday-calendar div[style*="color: #ff9800"] {
  color: #ff9800 !important;
}

/* Calendar Month Header Dark Mode */
body.dark-mode #holiday-calendar h3 {
  color: #e0e0e0 !important;
}

body.dark-mode #holiday-calendar h3 span[style*="color: #666"] {
  color: #b0b0b0 !important;
}

/* Calendar Navigation Buttons Dark Mode */
body.dark-mode #holiday-calendar button[style*="background: #2196f3"] {
  background-color: #2196f3 !important;
  background: #2196f3 !important;
}

/* Calendar Day Cell Hover Dark Mode - Disabled */
body.dark-mode #holiday-calendar div[onclick]:hover {
  /* Hover disabled - no style changes */
}

body.dark-mode #holiday-calendar div[style*="background: white"]:hover {
  /* Hover disabled - no style changes */
}

body.dark-mode #holiday-calendar div[style*="background: #fff3e0"]:hover {
  /* Hover disabled - no style changes */
}

/* Holiday Calendar - Better text contrast in day cells */
body.dark-mode #holiday-calendar div[onclick] div[style*="color: #333"] {
  color: #e0e0e0 !important;
}

body.dark-mode #holiday-calendar div[onclick] div[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode #holiday-calendar div[onclick] div[style*="color: #999"] {
  color: #808080 !important;
}

/* Holiday Calendar - Page Header Dark Mode */
body.dark-mode .page-header p {
  color: #b0b0b0 !important;
}

/* Additional Dark Mode Fixes for All Tabs */
body.dark-mode .tab-content .section {
  background-color: #2d2d2d !important;
}

body.dark-mode .tab-content .section h2,
body.dark-mode .tab-content .section h3 {
  color: #e0e0e0 !important;
}

body.dark-mode .tab-content .section p {
  color: #b0b0b0 !important;
}

/* Table borders in all tabs */
body.dark-mode .tab-content table th[style*="border: 1px solid #ddd"],
body.dark-mode .tab-content table td[style*="border: 1px solid #ddd"] {
  border-color: #404040 !important;
}

body.dark-mode
  .tab-content
  table
  tbody
  tr[style*="border-bottom: 1px solid #e0e0e0"] {
  border-bottom-color: #404040 !important;
}

/* Empty state messages */
body.dark-mode .tab-content p[style*="color: #999"],
body.dark-mode .tab-content span[style*="color: #999"] {
  color: #b0b0b0 !important;
}

/* Buttons in tabs */
body.dark-mode .tab-content button[style*="background: #4caf50"],
body.dark-mode .tab-content button[style*="background-color: #4caf50"] {
  background-color: #4caf50 !important;
  background: #4caf50 !important;
}

body.dark-mode .tab-content button[style*="background: #f44336"],
body.dark-mode .tab-content button[style*="background-color: #f44336"] {
  background-color: #f44336 !important;
  background: #f44336 !important;
}

/* Status colors - keep original colors */
body.dark-mode .tab-content span[style*="color: #4caf50"],
body.dark-mode .tab-content span[style*="color: #f44336"],
body.dark-mode .tab-content span[style*="color: #ff9800"],
body.dark-mode .tab-content span[style*="color: #2196f3"] {
  /* Keep original colors */
}

/* Font weights */
body.dark-mode .tab-content td[style*="font-weight: bold"],
body.dark-mode .tab-content span[style*="font-weight: bold"] {
  color: #e0e0e0 !important;
}

body.dark-mode
  .tab-content
  td[style*="font-weight: bold"][style*="color: #2196f3"] {
  color: #64b5f6 !important;
}

/* Profile Page Dark Mode - Stats Cards Container */
body.dark-mode div[style*="background: #f9f9f9"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
}

body.dark-mode div[style*="background-color: #f9f9f9"] {
  background-color: #2d2d2d !important;
}

/* Pause/Resume Button Styles */
.btn-pause-resume {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
}

.btn-pause-resume:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

.btn-pause {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
  color: white !important;
}

.btn-pause:hover {
  background: linear-gradient(135deg, #f57c00 0%, #e65100 100%) !important;
  box-shadow: 0 4px 12px rgba(255, 152, 0, 0.4) !important;
}

.btn-resume {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%) !important;
  color: white !important;
}

.btn-resume:hover {
  background: linear-gradient(135deg, #388e3c 0%, #2e7d32 100%) !important;
  box-shadow: 0 4px 12px rgba(76, 175, 80, 0.4) !important;
}

/* Pause History Container */
.pause-history-container {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pause-item:hover {
  transform: translateX(-4px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  border-color: #2196f3 !important;
}

/* Dark Mode - Pause/Resume Buttons */
body.dark-mode .btn-pause {
  background: linear-gradient(135deg, #ff9800 0%, #f57c00 100%) !important;
}

body.dark-mode .btn-resume {
  background: linear-gradient(135deg, #4caf50 0%, #388e3c 100%) !important;
}

body.dark-mode .pause-history-container {
  background-color: #2d2d2d !important;
  border-color: #404040 !important;
}

body.dark-mode .pause-history-container h4 {
  color: #e0e0e0 !important;
}

body.dark-mode .pause-item {
  background-color: #1a1a1a !important;
  border-color: #404040 !important;
}

body.dark-mode .pause-item:hover {
  border-color: #64b5f6 !important;
}

body.dark-mode .pause-item span {
  color: #b0b0b0 !important;
}

body.dark-mode .pause-item strong {
  color: #e0e0e0 !important;
}

body.dark-mode .timer-status-text span[style*="background: #fff3cd"] {
  background-color: #3d2e1f !important;
  border-color: #ff9800 !important;
}

body.dark-mode .timer-status-text span[style*="background: #e8f5e9"] {
  background-color: #1e3a1e !important;
  border-color: #4caf50 !important;
}

/* Dark Mode - Pause Duration Badge */
body.dark-mode span[style*="background: #e3f2fd"] {
  background-color: #1e3a5f !important;
  color: #64b5f6 !important;
}

body.dark-mode span[style*="background: #fff3cd"] {
  background-color: #3d2e1f !important;
  color: #ffb74d !important;
}

/* Backup Management Dark Mode */
body.dark-mode .section div[style*="background: #f5f5f5"] {
  background-color: #2d2d2d !important;
  background: #2d2d2d !important;
}

body.dark-mode .section div[style*="background-color: #f5f5f5"] {
  background-color: #2d2d2d !important;
}

body.dark-mode .section p[style*="color: #666"] {
  color: #b0b0b0 !important;
}

body.dark-mode .section code {
  background-color: #1a1a1a;
  color: #64b5f6;
  padding: 2px 6px;
  border-radius: 3px;
}

body.dark-mode .section ul {
  color: #b0b0b0;
}

body.dark-mode .section h3 {
  color: #e0e0e0;
}

body.dark-mode .btn-warning {
  background-color: #ff9800;
  color: #fff;
}

body.dark-mode .btn-warning:hover {
  background-color: #fb8c00;
}

/* Upload Excel Page Dark Mode */
.upload-guide-box {
  background: #e3f2fd;
  padding: 20px;
  border-radius: 8px;
  margin-bottom: 20px;
}

body.dark-mode .upload-guide-box {
  background-color: #1e3a5f !important;
  background: #1e3a5f !important;
  border: 1px solid #64b5f6 !important;
}

body.dark-mode .upload-guide-box h3 {
  color: #e0e0e0 !important;
}

body.dark-mode .upload-guide-box h3[style*="margin-top: 0"] {
  color: #e0e0e0 !important;
}

body.dark-mode .upload-guide-box p {
  color: #b0b0b0 !important;
}

body.dark-mode .upload-guide-box ul {
  color: #b0b0b0 !important;
}

body.dark-mode .upload-guide-box li {
  color: #b0b0b0 !important;
}

body.dark-mode .upload-guide-box strong {
  color: #64b5f6 !important;
}

.upload-example-table {
  border-collapse: collapse;
  width: 100%;
  margin-top: 10px;
}

.upload-example-table thead tr {
  background: #1976d2;
  color: white;
}

body.dark-mode .upload-example-table thead tr {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
}

.upload-example-table th,
.upload-example-table td {
  padding: 8px;
  border: 1px solid #ddd;
}

body.dark-mode .upload-example-table th,
body.dark-mode .upload-example-table td {
  border-color: #404040 !important;
}

body.dark-mode .upload-example-table tbody tr {
  background-color: #2d2d2d !important;
}

body.dark-mode .upload-example-table tbody tr:nth-child(even) {
  background-color: #1a1a1a !important;
}

body.dark-mode .upload-example-table tbody td {
  color: #e0e0e0 !important;
}

/* Override inline styles for upload guide box in dark mode */
body.dark-mode div[style*="background: #e3f2fd"],
body.dark-mode div[style*="background-color: #e3f2fd"] {
  background-color: #1e3a5f !important;
  background: #1e3a5f !important;
  border: 1px solid #64b5f6 !important;
}

body.dark-mode div[style*="background: #e3f2fd"] h3,
body.dark-mode div[style*="background-color: #e3f2fd"] h3 {
  color: #e0e0e0 !important;
}

body.dark-mode div[style*="background: #e3f2fd"] p,
body.dark-mode div[style*="background-color: #e3f2fd"] p {
  color: #b0b0b0 !important;
}

body.dark-mode div[style*="background: #e3f2fd"] ul,
body.dark-mode div[style*="background-color: #e3f2fd"] ul {
  color: #b0b0b0 !important;
}

body.dark-mode div[style*="background: #e3f2fd"] li,
body.dark-mode div[style*="background-color: #e3f2fd"] li {
  color: #b0b0b0 !important;
}

body.dark-mode div[style*="background: #e3f2fd"] strong,
body.dark-mode div[style*="background-color: #e3f2fd"] strong {
  color: #64b5f6 !important;
}

/* Override inline styles for table in dark mode */
body.dark-mode table[style*="border-collapse: collapse"] {
  border-collapse: collapse !important;
}

body.dark-mode
  table[style*="border-collapse: collapse"]
  thead
  tr[style*="background: #1976d2"],
body.dark-mode
  table[style*="border-collapse: collapse"]
  thead
  tr[style*="background-color: #1976d2"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  background-color: transparent !important;
  color: white !important;
}

body.dark-mode
  table[style*="border-collapse: collapse"]
  thead
  tr[style*="color: white"] {
  color: white !important;
}

body.dark-mode
  table[style*="border-collapse: collapse"]
  th[style*="border: 1px solid #ddd"],
body.dark-mode
  table[style*="border-collapse: collapse"]
  td[style*="border: 1px solid #ddd"] {
  border-color: #404040 !important;
  border: 1px solid #404040 !important;
}

body.dark-mode table[style*="border-collapse: collapse"] tbody tr {
  background-color: #2d2d2d !important;
}

body.dark-mode
  table[style*="border-collapse: collapse"]
  tbody
  tr:nth-child(even) {
  background-color: #1a1a1a !important;
}

body.dark-mode table[style*="border-collapse: collapse"] tbody td {
  color: #e0e0e0 !important;
  background-color: transparent !important;
}

/* Additional overrides for any remaining inline styles */
body.dark-mode .form-container div[style*="background"] {
  background-color: #1e3a5f !important;
  background: #1e3a5f !important;
}

body.dark-mode .form-container div[style*="background"] h3,
body.dark-mode .form-container div[style*="background"] p,
body.dark-mode .form-container div[style*="background"] ul,
body.dark-mode .form-container div[style*="background"] li {
  color: #b0b0b0 !important;
}

body.dark-mode .form-container div[style*="background"] h3 {
  color: #e0e0e0 !important;
}

body.dark-mode .form-container div[style*="background"] strong {
  color: #64b5f6 !important;
}

body.dark-mode
  .form-container
  table[style*="border-collapse"]
  thead
  tr[style*="background"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  background-color: transparent !important;
}

body.dark-mode
  .form-container
  table[style*="border-collapse"]
  thead
  tr[style*="color: white"] {
  color: white !important;
}

body.dark-mode .form-container table[style*="border-collapse"] tbody tr {
  background-color: #2d2d2d !important;
}

body.dark-mode
  .form-container
  table[style*="border-collapse"]
  tbody
  tr:nth-child(even) {
  background-color: #1a1a1a !important;
}

body.dark-mode .form-container table[style*="border-collapse"] tbody td {
  color: #e0e0e0 !important;
  background-color: transparent !important;
}

body.dark-mode
  .form-container
  table[style*="border-collapse"]
  th[style*="border"],
body.dark-mode
  .form-container
  table[style*="border-collapse"]
  td[style*="border"] {
  border-color: #404040 !important;
}

/* Ultimate overrides for upload guide box - highest specificity */
body.dark-mode .admin-content .form-container .upload-guide-box,
body.dark-mode main .form-container .upload-guide-box,
body.dark-mode .admin-layout .admin-content .form-container .upload-guide-box {
  background-color: #1e3a5f !important;
  background: #1e3a5f !important;
  border: 1px solid #64b5f6 !important;
}

body.dark-mode .admin-content .form-container .upload-guide-box h3,
body.dark-mode main .form-container .upload-guide-box h3,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-guide-box
  h3 {
  color: #e0e0e0 !important;
}

body.dark-mode .admin-content .form-container .upload-guide-box p,
body.dark-mode main .form-container .upload-guide-box p,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-guide-box
  p {
  color: #b0b0b0 !important;
}

body.dark-mode .admin-content .form-container .upload-guide-box ul,
body.dark-mode main .form-container .upload-guide-box ul,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-guide-box
  ul {
  color: #b0b0b0 !important;
}

body.dark-mode .admin-content .form-container .upload-guide-box li,
body.dark-mode main .form-container .upload-guide-box li,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-guide-box
  li {
  color: #b0b0b0 !important;
}

body.dark-mode .admin-content .form-container .upload-guide-box strong,
body.dark-mode main .form-container .upload-guide-box strong,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-guide-box
  strong {
  color: #64b5f6 !important;
}

/* Ultimate overrides for upload example table */
body.dark-mode .admin-content .form-container .upload-example-table thead tr,
body.dark-mode main .form-container .upload-example-table thead tr,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-example-table
  thead
  tr {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  background-color: transparent !important;
  color: white !important;
}

body.dark-mode .admin-content .form-container .upload-example-table tbody tr,
body.dark-mode main .form-container .upload-example-table tbody tr,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-example-table
  tbody
  tr {
  background-color: #2d2d2d !important;
}

body.dark-mode
  .admin-content
  .form-container
  .upload-example-table
  tbody
  tr:nth-child(even),
body.dark-mode
  main
  .form-container
  .upload-example-table
  tbody
  tr:nth-child(even),
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-example-table
  tbody
  tr:nth-child(even) {
  background-color: #1a1a1a !important;
}

body.dark-mode .admin-content .form-container .upload-example-table tbody td,
body.dark-mode main .form-container .upload-example-table tbody td,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-example-table
  tbody
  td {
  color: #e0e0e0 !important;
  background-color: transparent !important;
}

body.dark-mode .admin-content .form-container .upload-example-table th,
body.dark-mode main .form-container .upload-example-table th,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-example-table
  th,
body.dark-mode .admin-content .form-container .upload-example-table td,
body.dark-mode main .form-container .upload-example-table td,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  .upload-example-table
  td {
  border-color: #404040 !important;
}

/* ULTIMATE OVERRIDE - Force dark mode for any div with #e3f2fd background */
body.dark-mode div[style*="#e3f2fd"],
body.dark-mode div[style*="background: #e3f2fd"],
body.dark-mode div[style*="background-color: #e3f2fd"],
body.dark-mode div[style*="rgb(227, 242, 253)"] {
  background-color: #1e3a5f !important;
  background: #1e3a5f !important;
  border: 1px solid #64b5f6 !important;
}

body.dark-mode div[style*="#e3f2fd"] h3,
body.dark-mode div[style*="background: #e3f2fd"] h3,
body.dark-mode div[style*="background-color: #e3f2fd"] h3 {
  color: #e0e0e0 !important;
}

body.dark-mode div[style*="#e3f2fd"] p,
body.dark-mode div[style*="background: #e3f2fd"] p,
body.dark-mode div[style*="background-color: #e3f2fd"] p {
  color: #b0b0b0 !important;
}

body.dark-mode div[style*="#e3f2fd"] ul,
body.dark-mode div[style*="background: #e3f2fd"] ul,
body.dark-mode div[style*="background-color: #e3f2fd"] ul,
body.dark-mode div[style*="#e3f2fd"] li,
body.dark-mode div[style*="background: #e3f2fd"] li,
body.dark-mode div[style*="background-color: #e3f2fd"] li {
  color: #b0b0b0 !important;
}

body.dark-mode div[style*="#e3f2fd"] strong,
body.dark-mode div[style*="background: #e3f2fd"] strong,
body.dark-mode div[style*="background-color: #e3f2fd"] strong {
  color: #64b5f6 !important;
}

/* Override table styles */
body.dark-mode div[style*="#e3f2fd"] table thead tr[style*="#1976d2"],
body.dark-mode
  div[style*="background: #e3f2fd"]
  table
  thead
  tr[style*="#1976d2"],
body.dark-mode
  div[style*="background-color: #e3f2fd"]
  table
  thead
  tr[style*="#1976d2"] {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
}

body.dark-mode div[style*="#e3f2fd"] table tbody tr,
body.dark-mode div[style*="background: #e3f2fd"] table tbody tr,
body.dark-mode div[style*="background-color: #e3f2fd"] table tbody tr {
  background-color: #2d2d2d !important;
}

body.dark-mode div[style*="#e3f2fd"] table tbody tr:nth-child(even),
body.dark-mode div[style*="background: #e3f2fd"] table tbody tr:nth-child(even),
body.dark-mode
  div[style*="background-color: #e3f2fd"]
  table
  tbody
  tr:nth-child(even) {
  background-color: #1a1a1a !important;
}

body.dark-mode div[style*="#e3f2fd"] table tbody td,
body.dark-mode div[style*="background: #e3f2fd"] table tbody td,
body.dark-mode div[style*="background-color: #e3f2fd"] table tbody td {
  color: #e0e0e0 !important;
  border-color: #404040 !important;
}

body.dark-mode div[style*="#e3f2fd"] table th,
body.dark-mode div[style*="background: #e3f2fd"] table th,
body.dark-mode div[style*="background-color: #e3f2fd"] table th {
  border-color: #404040 !important;
  color: white !important;
}

/* Enhanced Dark Mode for Upload Excel Page - Comprehensive Fix */
body.dark-mode .admin-content .form-container {
  background-color: #2d2d2d !important;
  color: #e0e0e0 !important;
}

body.dark-mode .admin-content .form-container .form-group small {
  color: #999 !important;
}

body.dark-mode .admin-content .form-container select option {
  background-color: #3d3d3d !important;
  color: #e0e0e0 !important;
}

body.dark-mode .admin-content .form-container input[type="file"] {
  color: #e0e0e0 !important;
}

body.dark-mode
  .admin-content
  .form-container
  input[type="file"]::file-selector-button {
  background-color: #667eea !important;
  color: white !important;
  border: none !important;
  padding: 8px 16px !important;
  border-radius: 4px !important;
  cursor: pointer !important;
}

body.dark-mode
  .admin-content
  .form-container
  input[type="file"]::file-selector-button:hover {
  background-color: #5568d3 !important;
}

/* Force override for upload-guide-box with highest specificity */
body.dark-mode #upload-guide-box,
body.dark-mode .admin-layout .admin-content .form-container #upload-guide-box,
body.dark-mode main.admin-content .form-container #upload-guide-box {
  background-color: #1e3a5f !important;
  background: #1e3a5f !important;
  border: 1px solid #64b5f6 !important;
  color: #e0e0e0 !important;
}

body.dark-mode #upload-guide-box h3,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  #upload-guide-box
  h3 {
  color: #e0e0e0 !important;
}

body.dark-mode #upload-guide-box p,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  #upload-guide-box
  p {
  color: #b0b0b0 !important;
}

body.dark-mode #upload-guide-box ul,
body.dark-mode #upload-guide-box li,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  #upload-guide-box
  ul,
body.dark-mode
  .admin-layout
  .admin-content
  .form-container
  #upload-guide-box
  li {
  color: #b0b0b0 !important;
}

body.dark-mode #upload-guide-box strong {
  color: #64b5f6 !important;
}

body.dark-mode #upload-guide-box .upload-example-table thead tr {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
  color: white !important;
}

body.dark-mode #upload-guide-box .upload-example-table th {
  background: transparent !important;
  color: white !important;
  border-color: #404040 !important;
}

body.dark-mode #upload-guide-box .upload-example-table tbody tr {
  background-color: #2d2d2d !important;
}

body.dark-mode
  #upload-guide-box
  .upload-example-table
  tbody
  tr:nth-child(even) {
  background-color: #1a1a1a !important;
}

body.dark-mode #upload-guide-box .upload-example-table tbody td {
  color: #e0e0e0 !important;
  border-color: #404040 !important;
  background-color: transparent !important;
}

/* User Header Styles */
.simple-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
  min-height: 53.11px;
  height: 53.11px;
  margin: 0;
  background-color: #ffffff;
  border-bottom: 1px solid #e0e0e0;
  border-radius: 0;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
  position: fixed;
  top: 0;
  left: 0;
  right: 250px;
  z-index: 100;
  box-sizing: border-box;
}

.header-left-section {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
}

.user-name {
  font-size: 18px;
  font-weight: 600;
  color: #333;
}

.date-time-info {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #666;
}

.date-time-info #current-time {
  font-family: monospace;
  font-weight: 500;
}

.date-time-info #current-date {
  font-size: 12px;
}

.header-right-items {
  display: flex;
  align-items: center;
  gap: 15px;
}

.dark-mode-toggle-btn {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #666;
  transition: color 0.2s ease;
  position: relative;
  z-index: 101;
  pointer-events: auto;
}

.dark-mode-toggle-btn:hover {
  color: #333;
}

.dark-mode-toggle-btn svg {
  width: 20px;
  height: 20px;
}

.avatar-container {
  position: relative;
  display: inline-block;
}

.simple-avatar {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #e0e0e0;
  display: block;
  image-rendering: -webkit-optimize-contrast;
  image-rendering: crisp-edges;
}

.simple-avatar-placeholder {
  width: 45px;
  height: 45px;
  border-radius: 50%;
  background: #667eea;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 600;
}

.avatar-edit-overlay {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 20px;
  height: 20px;
  background: #667eea;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid white;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.avatar-container:hover .avatar-edit-overlay {
  opacity: 1;
}

.avatar-container:hover .simple-avatar,
.avatar-container:hover .simple-avatar-placeholder {
  opacity: 0.8;
  transition: opacity 0.3s ease;
}

body.dark-mode .simple-header {
  background-color: #2d2d2d;
  border-bottom-color: #404040;
  color: #e0e0e0;
}

body.dark-mode .user-name {
  color: #e0e0e0;
}

body.dark-mode .date-time-info {
  color: #b0b0b0;
}

body.dark-mode .date-time-info #current-time {
  color: #b0b0b0;
}

body.dark-mode .date-time-info #current-date {
  color: #b0b0b0;
}

body.dark-mode .simple-avatar {
  border-color: #404040;
}

body.dark-mode .simple-avatar-placeholder {
  border-color: #404040;
}

body.dark-mode .avatar-edit-overlay {
  background: #667eea;
  border-color: #2d2d2d;
}

body.dark-mode .dark-mode-toggle-btn {
  color: #e0e0e0;
}

body.dark-mode .dark-mode-toggle-btn:hover {
  color: #fff;
}

@media (max-width: 768px) {
  .simple-header {
    right: 0;
  }
}
