/* ----------------------------------------------------
   General Styles
---------------------------------------------------- */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: #f4f4f9;
    color: #333;
    line-height: 1.6;
    transition: background-color 0.3s, color 0.3s;
  }
  
  body.dark-mode {
    background-color: #121212;
    color: #f4f4f9;
  }
  
  /* Header remains solid FFA600 */
  header {
    background-color: #FFA600;
    color: white;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  }
  
  /* Timer Container: Darker background for a cooler look */
  #timer-container {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0, 0, 0, 0.3); /* Slightly dark overlay */
    padding: 0.5rem 1rem;
    border-radius: 20px;
  }
  
  #timer-display {
    font-size: 1.2rem;
    font-weight: bold;
  }
  
  /* Timer Buttons Styling */
  #timer-container button {
    background: transparent;
    border: 1px solid white;
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: background 0.3s;
  }
  
  #timer-container button:hover {
    background: rgba(255, 255, 255, 0.2);
  }
  
  /* Header Buttons (e.g. New Entry, Admin Panel, Logout) */
  .header-buttons {
    display: flex;
    gap: 0.5rem;
  }
  
  .header-buttons button {
    background-color: rgb(21, 21, 30);
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s, transform 0.2s, color 0.3s;
    font-size: 1rem;
  }
  
  .header-buttons button:hover {
    background-color: rgb(30, 30, 45);
    transform: scale(1.05);
  }
  
  .header-buttons button:active {
    background-color: rgb(15, 15, 22);
  }
  
  body.dark-mode .header-buttons button {
    background-color: rgb(50, 50, 65);
    color: white;
  }
  
  body.dark-mode .header-buttons button:hover {
    background-color: rgb(60, 60, 80);
  }
  
  body.dark-mode .header-buttons button:active {
    background-color: rgb(40, 40, 55);
  }
  
  /* Container */
  .container {
    max-width: 1000px;
    margin: 2rem auto;
    padding: 2rem;
    background: white;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    transition: background-color 0.3s, color 0.3s;
  }
  
  body.dark-mode .container {
    background: #1e1e1e;
    box-shadow: none;
  }
  
  /* Tables */
  table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
  }
  
  th,
  td {
    text-align: left;
    padding: 1rem;
    border: 1px solid #ddd;
    transition: background-color 0.3s, color 0.3s;
  }
  
  th {
    background-color: #FFA600;
    color: white;
    cursor: pointer;
  }
  
  th:hover {
    background-color: #e69500;
  }
  
  tr:nth-child(even) {
    background-color: #f9f9f9;
  }
  
  body.dark-mode th {
    background-color: #FFA600;
  }
  
  body.dark-mode tr:nth-child(even) {
    background-color: #2a2a2a;
  }
  
  /* Actions in a table cell */
  td .actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-start;
  }
  
  /* Buttons */
  button {
    background-color: #FFA600;
    color: white;
    border: none;
    cursor: pointer;
    font-weight: bold;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.3s;
  }
  
  button:hover {
    background-color: #e69500;
  }
  
  body.dark-mode button {
    background-color: #FFA600;
  }
  
  body.dark-mode button:hover {
    background-color: #e69500;
  }
  
  /* Inputs and Textareas for text-based fields (including date/datetime-local) */
  input[type="text"],
  input[type="password"],
  input[type="email"],
  input[type="date"],
  input[type="datetime-local"],
  textarea {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    line-height: normal;
    box-sizing: border-box;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  }
  
  input:focus,
  textarea:focus {
    border-color: #FFA600;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 166, 0, 0.5);
  }
  
  body.dark-mode
    input[type="text"],
  body.dark-mode
    input[type="password"],
  body.dark-mode
    input[type="email"],
  body.dark-mode
    input[type="date"],
  body.dark-mode
    input[type="datetime-local"],
  body.dark-mode
    textarea {
    background-color: #2a2a2a;
    color: #f4f4f9;
    border-color: #444444;
  }
  
  /* Specific styling for checkboxes */
  input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    padding: 0;
  }
  
  /* Checkbox container to ensure proper layout */
  .checkbox-container {
    display: block;
    margin-bottom: 1rem;
  }
  
  /* Dark Mode Toggle */
  #dark-mode-toggle {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 40px;
    height: 40px;
    background-color: #FFA600;
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, box-shadow 0.3s;
  }
  
  #dark-mode-toggle:hover {
    background-color: #e69500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
  }
  
  /* Modals */
  .modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
  }
  
  /* Increase modal size vertically */
  .modal-content {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 800px;
    min-height: 600px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s, color 0.3s;
  }
  
  body.dark-mode .modal-content {
    background: #1e1e1e;
    color: #f4f4f9;
    box-shadow: none;
  }
  
  .close-btn {
    background: red;
    color: white;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: 4px;
    float: right;
    transition: background-color 0.3s;
  }
  
  .close-btn:hover {
    background: darkred;
  }
  
  .modal-content canvas {
    width: 100%;
    height: 600px;
  }
  
  /* Label + input stacking in modals */
  .form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 1rem;
  }
  
  /* Add matching styles for <select> */
  select {
    margin-bottom: 1rem;
    padding: 0.5rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    width: 100%;
    transition: background-color 0.3s, color 0.3s, border-color 0.3s;
  }
  
  select:focus {
    border-color: #FFA600;
    outline: none;
    box-shadow: 0 0 5px rgba(255, 166, 0, 0.5);
  }
  
  body.dark-mode select {
    background-color: #2a2a2a;
    color: #f4f4f9;
    border-color: #444444;
  }
  
  /* Extra label styling */
  .form-group label {
    margin-bottom: 0.25rem;
    font-weight: bold;
  }
  
  /* ==================
     REPORT FILTER FORM
  ================== */
  .report-filter-form {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center; /* Vertically center the filter fields */
  }
  
  .filter-group {
    display: flex;
    flex-direction: column;
    min-width: 160px;
  }
  
  .filter-group label {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
  }
  
  .filter-group select,
  .filter-group input[type="date"] {
    font-size: 0.9rem;
    padding: 0.4rem;
    border: 1px solid #ddd;
    border-radius: 4px;
    width: 100%;
    box-sizing: border-box;
  }
  
  .report-filter-form button[type="submit"] {
    background-color: #FFA600;
    color: #fff;
    font-weight: bold;
    cursor: pointer;
    border: none;
    border-radius: 4px;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: background-color 0.3s ease;
    align-self: flex-start;
  }
  
  .report-filter-form button[type="submit"]:hover {
    background-color: #e69500;
  }
  
  /* ==================
     DARK MODE FOR CHOICES.JS
  ================== */
  .choices__inner {
    background-color: #fff;
    border: 1px solid #ddd;
    color: #333;
    transition: background-color 0.3s, color 0.3s;
  }
  
  .choices__list--dropdown {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
  }
  
  .choices__list--dropdown .choices__item {
    background-color: #fff;
    color: #333;
  }
  
  .choices__list--dropdown .choices__item.is-highlighted {
    background-color: #efefef;
    color: #333;
  }
  
  body.dark-mode .choices__inner {
    background-color: #2a2a2a;
    border-color: #444444;
    color: #f4f4f9;
  }
  
  body.dark-mode .choices__list--dropdown {
    background-color: #2a2a2a;
    border-color: #444444;
    color: #f4f4f9;
  }
  
  body.dark-mode .choices__list--dropdown .choices__item {
    background-color: #2a2a2a;
    color: #f4f4f9;
  }
  
  body.dark-mode .choices__list--dropdown .choices__item.is-highlighted {
    background-color: #444444;
    color: #ffffff;
  }
  
  /* ==================
     DARK MODE FOR QUILL
  ================== */
  .ql-container.ql-snow {
    background-color: #fff;
    color: #000;
    transition: background-color 0.3s, color 0.3s;
  }
  
  .ql-toolbar.ql-snow {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
  }
  
  .ql-editor {
    min-height: 100px;
    background-color: #fff;
    color: #000;
  }
  
  body.dark-mode .ql-container.ql-snow {
    background-color: #2a2a2a;
    color: #f4f4f9;
    border-color: #444444;
  }
  
  body.dark-mode .ql-toolbar.ql-snow {
    background-color: #2a2a2a;
    border-color: #444444;
  }
  
  body.dark-mode .ql-toolbar.ql-snow .ql-picker {
    color: #f4f4f9;
  }
  
  body.dark-mode .ql-editor {
    background-color: #2a2a2a;
    color: #f4f4f9;
    border-color: #444444;
  }
  
  /* ==================
     GRAPH SECTION STYLES
  ================== */
  .graph-section {
    margin: 2rem 0;
  }
  
  .graph-section h3 {
    text-align: center;
    margin-bottom: 1rem;
  }
  
  .graph-button-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
  }
  
  /* Dark Mode Calendar Picker Icons */
  body.dark-mode input[type="date"]::-webkit-calendar-picker-indicator,
  body.dark-mode input[type="datetime-local"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
  }
  
  /* =========================
     CONFIRMATION MODAL CHECKBOX
  ========================= */
  #confirm-work-modal .form-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin: 1rem 0;
  }
  
/* -------------------------------
   FILTER ROW & DROPDOWNS (No Labels)
--------------------------------- */
.filter-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
  }
  
  /* Style the select elements within the filter row */
  .filter-row select,
  .filter-row .choices__inner {
    min-width: 180px;
    max-width: 220px;
    font-size: 0.9rem;
    line-height: 1.2;
    padding: 0.35rem 0.5rem;
    height: auto !important;
    box-sizing: border-box;
  }

  /* Authentication status container */
.auth-status {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 5px;
  background-color: #f9f9f9;
  font-family: Arial, sans-serif;
  font-size: 14px;
  color: #333;
}

/* The "lamp" indicator */
.auth-status .indicator {
  display: inline-block;
  width: 20px;      /* Wider circle */
  height: 20px;
  border-radius: 50%;
  margin-right: 8px;
  border: 1px solid #ccc;
}

/* When connected: green lamp and text */
.auth-status.connected .indicator {
  background-color: #4caf50; /* Green */
}
.auth-status.connected .status-text::before {
  content: "Connected";
  font-weight: bold;
}

/* When disconnected: red lamp and text */
.auth-status.disconnected .indicator {
  background-color: #f44336; /* Red */
}
.auth-status.disconnected .status-text::before {
  content: "Disconnected";
  font-weight: bold;
}


/* Specific styles for the login container */
.login-container {
  background-color: #fff;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: center;
  width: 300px;
  margin: 50px auto; /* Center horizontally */
}

.login-container h1 {
  margin-bottom: 20px;
  color: #333; /* Match the general text color */
}

.login-container form {
  display: flex;
  flex-direction: column;
}

.login-container input {
  margin-bottom: 10px;
  padding: 10px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 1rem;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}

.login-container input:focus {
  border-color: #FFA600; /* Match the focus color */
  outline: none;
  box-shadow: 0 0 5px rgba(255, 166, 0, 0.5);
}

.login-container button {
  padding: 10px;
  border: none;
  border-radius: 4px;
  background-color: #FFA600; /* Match the button color */
  color: #fff;
  cursor: pointer;
  transition: background-color 0.3s;
}

.login-container button:hover {
  background-color: #e69500; /* Match the hover color */
}

#microsoft-login-btn {
  margin-top: 10px;
  background-color: #2b579a;
}

#microsoft-login-btn:hover {
  background-color: #1a3a6e;
}