    /* style.css */

    * {
      box-sizing: border-box;
    }

    #actionBar {
      display: flex;
      align-items: center;
      justify-content: space-between;
      background: #0f0f13;
      padding: 10px;
      gap: 10px;
      position: relative;
      z-index: 999;
    }

    #listTitleContainer {
      flex-grow: 1;
      text-align: center;
    }

    .left-buttons {
      display: flex;
      gap: 10px;
      flex-shrink: 0;
    }

    .right-buttons {
      flex-shrink: 0;
      margin-left: auto;
    }

    #currentListName {
      margin: 0;
      font-size: 3vh;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
      max-width: 70%;
      cursor: default;
    }

    .top-actions {
      display: flex;
      align-items: center;
      justify-content: space-between;
      padding: 10px;
      gap: 10px;
      width: 100%;
    }


    .right-buttons button,
    .left-buttons button,
    #addNewListItem,
    #settingsCog,
    .toggle-btn {
      padding: 8px 12px;
      font-size: 16px;
      height: 40px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      border-radius: 6px;
      background: #3498db;
      color: white;
      border: none;
    }


    body {
      margin: 0;
      font-family: 'Segoe UI', sans-serif;
      background: #121417;
      color: #ffd6d6;
      display: flex;
      height: 100vh;
      overflow: hidden;
    }

    button {
      padding: 6px 12px;
      margin: 4px;
      border: none;
      border-radius: 4px;
      cursor: pointer;
      background: #3498db;
      color: #fff;
    }

    button:hover {
      background: #2980b9;
    }

    input,
    textarea {
      background: #333;
      color: #fff;
      border: 1px solid #555;
      border-radius: 4px;
      padding: 6px;
      width: 100%;
    }

    .custom-checkbox {
      display: inline-flex;
      align-items: center;
      background: #29292d;
      border: 1px solid #555;
      padding: 10px 14px;
      border-radius: 6px;
      cursor: pointer;
      user-select: none;
      gap: 10px;
    }

    .custom-checkbox input[type="checkbox"] {
      appearance: none;
      width: 24px;
      height: 24px;
      border: 2px solid #aaa;
      border-radius: 4px;
      background-color: #333;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      position: relative;
    }

    .custom-checkbox input[type="checkbox"]::before {
      content: "✓";
      font-size: 16px;
      color: #fff;
      display: none;
    }

    .custom-checkbox input[type="checkbox"]:checked::before {
      display: block;
    }


    .custom-checkbox span {
      font-size: 16px;
      color: #ffd6d6;
    }

    a {
      color: #58a6ff;
      text-decoration: none;
    }

    a:hover {
      text-decoration: underline;
    }

    /* Layout */
    #sidebar,
    #upcoming {
      background: #1b1b1f;
      padding-top: 1%;
      width: 240px;
      overflow: hidden;
      flex-shrink: 0;
      transition: width 0.3s ease;
      position: relative;
    }

    #sidebar.collapsed,
    #upcoming.collapsed {
      width: 0;
      padding: 0;
      border: none;
    }

    #main {
      flex: 1;
      display: flex;
      flex-direction: column;
      min-width: 0;
      overflow: hidden;
      transition: margin 0.3s ease;
      /* Optional smoothness */
    }

    .toggle-btn:hover {
      background: #2980b9;
    }

    #toggleSidebar {
      left: 0%;
    }

    #toggleUpcoming {
      right: 0%;
    }

    /* Header */
    header {
      background: #0f0f13;
      color: #ffd6d6;
      padding: 10px;
      display: flex;
      align-items: center;
    }

    /* Lists Panel */
    #lists,
    #upcomingList,
    #currentList {
      list-style: none;
      padding: 0;
      margin: 0;
    }

    #lists li,
    #upcomingList li,
    #currentList li {
      padding: 8px 12px;
      cursor: pointer;
      border-bottom: 1px solid #333;
      position: relative;
    }

    #lists li.active {
      background: #333;
    }

    #lists li .list-actions {
      position: absolute;
      right: 10px;
      top: 50%;
      transform: translateY(-50%);
      font-size: 14px;
      opacity: 0.7;
    }

    .list-actions .edit-icon {
      color: #3498db;
      opacity: 0.7;
    }

    #lists li .list-actions span {
      margin-left: 5px;
      cursor: pointer;
    }

    #lists li .list-actions .edit-icon:hover {
      opacity: 1;
    }

    #lists li .list-actions .delete-icon:hover {
      opacity: 1;
      color: #e74c3c;
    }

    #editTask {
      background-color: #2980b9;
    }

    #editTask:hover {
      background-color: #3498db;
    }
    /* Nesting Indent */
    .nested {
      padding-left: 20px;
      opacity: 0.85;
    }

    /* Task Table */
    table {
      width: 100%;
      border-collapse: collapse;
      table-layout: fixed;
    }

    th,
    td {
      padding: 10px;
      border-bottom: 1px solid #333;
      word-wrap: break-word;
    }

    tr.checked td {
      text-decoration: line-through;
      color: #999;
      background: #121417;
    }

    tr:hover {
      background: #2e2e2e;
    }

    .delete-btn {
      background: #e74c3c;
      color: white;
    }

    .delete-btn:hover {
      background: #c0392b;
    }

    .drag-handle {
      cursor: grab;
      margin-right: 8px;
    }

    /* Collapsible Side Sections */
    .section-header {
      display: flex;
      align-items: center;
      justify-content: space-between;
      cursor: pointer;
      padding: 10px;
    }

    .section-header h3 {
      margin: 0;
      background: #0f0f13;
      width: 100%;
    }

    .section-content {
      max-height: 500px;
      overflow: auto;
      transition: max-height .3s ease;
    }

    .collapsed+.section-content {
      max-height: 0;
    }

    /* Modals */
    .modal {
      display: none;
      position: fixed;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      background: rgba(0, 0, 0, 0.6);
      justify-content: center;
      align-items: center;
      z-index: 2000;
    }

    .modal-content {
      background: #1e1e1e;
      padding: 20px;
      border-radius: 8px;
      max-width: 490px;
      flex-direction: column;
      width: 100%;
      max-height: 90%;
      overflow: auto;
    }

    .modal-content h3 {
      text-align: center;
      margin-bottom: 15px;
    }

    .modal-content input,
    .modal-content textarea,
    .modal-content .accordion,
    .modal-content .panel,
    .modal-content label {
      margin-bottom: 12px;
      width: 100%;
    }

    /* Width Fix for all form inputs */
    .modal-content input,
    .modal-content textarea {
      width: 100%;
    }

    /* Unified modal buttons */
    .modal-content button {
      width: auto;
      min-width: 100px;
      margin: 6px 4px 0 0;
    }

    .modal-button-grid {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: center;
      margin-top: 10px;
    }

    .modal-button-grid button {
      background: #3498db;
      color: white;
      flex: 1 1 calc(50% - 10px);
      min-width: 100px;
      text-align: center;
    }

    .modal-button-grid button:hover {
      background: #2980b9;
    }

    .modal-content button.cancel-button {
      display: block;
      margin: 15px auto 0 auto;
      background: #e74c3c;
    }

    .note-box {
      border: 1px solid #ccc;
      background: #323232;
      padding: 10px;
      margin-bottom: 10px;
      max-height: 100px;
      overflow-y: auto;
      white-space: pre-wrap;
      font-family: monospace;
    }
    .modal-actions button {
      margin-right: 10px; padding: 6px 12px; font-size: 16px;
    }    
    
    .clear-btn {
      background: #e74c3c;
      color: white;
      border: 1px solid #555;
      border-left: none;
      border-radius: 0 6px 6px 0;
      font-size: 18px;
      width: 42px;
      height: 40px; /* Match input height */
      padding: 2px;
      display: flex;
      align-items: center;
      justify-content: center;
      vertical-align: middle;
      position:relative;
      top: -2px;
    }
    
    .clear-btn:hover {
      background: #c0392b;
    }
    
    #upcomingHeader {

      padding: 10px;
      margin: 10px 0;
    }

    .cancel-button {
      background: #e74c3c;
      color: white;
    }

    .cancel-button:hover {
      background: #c0392b;
    }

    .accordion {
      background: #29292d;
      box-sizing: border-box;
      padding: 10px;
      cursor: pointer;
      border: none;
      text-align: left;
      outline: none;
      width: 100%;
      margin-top: 10px;
    }

    .accordion:after {
      content: '+';
      float: right;
    }

    .accordion.active:after {
      content: '–';
    }

    .panel {
      max-height: 0;
      overflow: hidden;
      width: 100%;
      transition: max-height .2s ease-out;
      box-sizing: border-box;
    }

    /* Export Modal Styles */
    .export-option {
      background: #29292d;
      padding: 15px;
      margin: 10px 0;
      border-radius: 4px;
      cursor: pointer;
    }

    .export-option:hover {
      background: #3a3a3d;
    }

    .date-input-row, .time-input-row {
      display: flex;
      align-items: center;      /* vertical align */
      gap: 0;                    /* no gap */
    }
    
    .date-input-row input[type="date"],
    .date-input-row .clear-btn
    .time-input-row input[type="time"],
    .time-input-row .clear-btn {
      height: 42px;              /* same height */
      font-size: 16px;           /* same text size */
      border: 1px solid #555;
      padding: 0 12px;
      margin: 0;                 /* remove margin */
    }
    
    .date-input-row input[type="date"],
    .time-input-row input[type="time"] {
      -webkit-appearance: none;
      appearance: none;
      border-right: none;
      border-radius: 20px 0 0 20px;
      background: #333;
      color: #fff;
      flex: 1;
      line-height: 1.2;
    }
    
    .date-input-row .clear-btn,
    .time-input-row .clear-btn {
      border-left: none;
      border-radius: 0 20px 20px 0;
      background: #e74c3c;
      color: #fff;
      width: 42px;
      display: flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      line-height: 1;
    }
    
    .date-input-row .clear-btn:hover,
    .time-input-row .clear-btn:hover {
      background: #c0392b;
    }

    .glow {
      box-shadow: 0 0 8px 2px rgba(255, 215, 0, 0.7); /* subtle golden glow */
      transition: box-shadow 0.3s ease-in-out;
      z-index: 10;
      animation: pulseGlow 1.5s ease-in-out infinite;
    }


    @media (max-width: 768px) {

      #sidebar,
      #upcoming {
        position: fixed;
        top: 0;
        bottom: 0;
        height: 100%;
        width: 80%;
        max-width: 300px;
        z-index: 3000;
        background: #1b1b1f;
        transition: transform 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.5);
      }

      #sidebar {
        left: 0;
        transform: translateX(-100%);
      }

      #sidebar.active {
        transform: translateX(0);
      }

      #upcoming {
        right: 0;
        transform: translateX(100%);
      }

      #upcoming.active {
        transform: translateX(0);
      }

      #main {
        flex: 1;
        overflow: hidden;
      }

      .modal {
        z-index: 4000;
        /* Ensure modals stay above the side panels */
      }

      .modal-button-grid button {
        flex: 1 1 100%;
      }

      /* Optional: Dark backdrop when a sidebar is open */
      .overlay-backdrop {
        content: "";
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        z-index: 2500;
      }

      #currentListName {
        font-size: 2.2vh;
        max-width: 100%;
        white-space: normal; /* allow wrapping */
        overflow-wrap: break-word;
        text-overflow: clip;
        padding: 0 5px;
        line-height: 1.2em;
      }

      #listTitleContainer {
        flex-grow: 1;
        text-align: left;
        display: flex;
        justify-content: center;
        align-items: center;
        padding: 0 8px;
      }

      #listTitleMobile {
        animation: fadeOutAndCollapse 1.8s forwards;
        animation-delay: 5s;
        overflow: hidden;
        text-align: center;
        font-size: 3vh;
        font-weight: bold;
        padding: 8px 12px;
        border-bottom: 1px solid #ccc;
        word-break: break-word;
        width: 100%;
      }
      
    }

    /* === Light Mode Overrides === */
.light body {
  background: #ffffff;
  color: #000000;
}

.light #actionBar,
.light header,
.light .section-header h3 {
  background: #aaaaaa;
  color: #000000;
}

.light .right-buttons button,
.light .left-buttons button,
.light #addNewListItem,
.light #settingsCog,
.light .toggle-btn,
.light button {
  background: #3498db;
  color: #ffffff;
}

.light button:hover {
  background: #2980b9;
  color: #ffffff;
}

.light input,
.light textarea {
  background: #ffffff;
  color: #000000;
  border: 1px solid #ccc;
}

.light .custom-checkbox {
  background: #f2f2f2;
  border-color: #bbb;
}

.light .custom-checkbox input[type="checkbox"] {
  background-color: #ffffff;
  border-color: #aaa;
}

.light .custom-checkbox span {
  color: #000000;
}

.light a {
  color: #0066cc;
}

.light a:hover {
  text-decoration: underline;
}

.light #sidebar,
.light #upcoming {
  background: #dedcdc;
  color: #000;
}

.light #lists li,
.light #upcomingList li,
.light #currentList li {
  background: #ffffff;
  color: #000000;
  border-bottom: 1px solid #ddd;
}

.light #lists li.active {
  background: #e0e0e0;
}

.light .list-actions .edit-icon,
.light .list-actions .delete-icon {
  color: #333;
}

.light #lists li .list-actions span {
  color: #333;
}

.light th,
.light td {
  color: #000000;
  background-color:#f2f2f2;
  border-bottom: 1px solid #ccc;
}

.light tr.checked td {
  background: #f8f8f8;
  color: #888888;
}

.light tr:hover {
  background: #eeeeee;
  color: #000000;
}

.light .modal {
  background: rgba(255, 255, 255, 0.85);
}

.light .modal-content {
  background: #ffffff;
  color: #000000;
}

.light .modal-content h3 {
  color: #000000;
}

.light .modal-content label {
  color: #000000;
}

.light .accordion {
  background: #aaaaaa;
  color: #000000;
}

.light .export-option {
  background: #aaaaaa;
  color: #000000;
}

.light .export-option:hover {
  background: #e0e0e0;
}

.light .cancel-button {
  background: #e74c3c;
  color: #ffffff;
}

.light .cancel-button:hover {
  background: #c0392b;
}

.light .drag-handle {
  color: #000000;
}

.light .date-input-row input[type="date"],
.light .time-input-row input[type="time"] {
  background: #fff;
  color: #000;
  border-color: #ccc;
}

.light .clear-btn {
  background: #e74c3c;
  color: #fff;
  border-color: #ccc;
}

/* Make sure nested or inherited styles don’t fall back to dark-mode */
.light .section-content,
.light .panel,
.light .nested {
  background: #b5b5b5;
  color: #000000;
}

@keyframes fadeOutAndCollapse {
  0% {
    opacity: 1;
    height: auto;
    padding: 8px 12px;
  }
  100% {
    opacity: 0;
    height: 0;
    padding: 0;
    margin: 0;
  }
}

@keyframes pulseGlow {
  0% { box-shadow: 0 0 6px 2px rgba(255, 215, 0, 0.6); }
  50% { box-shadow: 0 0 12px 3px rgba(255, 215, 0, 0.9); }
  100% { box-shadow: 0 0 6px 2px rgba(255, 215, 0, 0.6); }
}