/* Extracted from speisen.html inline <style> blocks */
  .todo-calendar-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: rgba(100, 181, 246, 0.05);
    border: 1px solid #64b5f6;
    color: #64b5f6;
    border-radius: 10px;
    padding: 6px 8px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
  }
  .todo-calendar-btn:hover { background: rgba(100, 181, 246, 0.1); transform: scale(1.05); }
  .todo-calendar-btn .date-badge { font-size: 11px; font-weight: bold; color: #64b5f6; white-space: nowrap; }
  .date-picker-modal-backdrop { position: fixed; top: var(--ke-content-safe-top, var(--top-nav-height, 64px)); right: 0; bottom: 0; left: 0; background: rgba(0,0,0,0.7); display: none; align-items: center; justify-content: center; z-index: 12000; padding: 12px; padding-bottom: calc(var(--ke-content-safe-bottom, calc(var(--bottom-nav-height, 60px) + var(--footer-height, 42px))) + 12px); box-sizing: border-box; }
  .date-picker-modal-backdrop[style*="display: flex"] { display: flex !important; }
  .date-picker-modal { background: #000; border: 2px solid #4CAF50; border-radius: 12px; width: 90%; max-width: 400px; max-height: calc(100vh - var(--ke-content-safe-top, var(--top-nav-height, 64px)) - var(--ke-content-safe-bottom, calc(var(--bottom-nav-height, 60px) + var(--footer-height, 42px))) - 24px); padding: 24px; color: #fff; box-shadow: 0 10px 40px rgba(0,0,0,0.8); overflow-y: auto; }
  .weekday-grid { display: flex; flex-direction: column; gap: 12px; max-height: 500px; overflow-y: auto; padding: 4px; }
  .week-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
  .weekday-btn { position: relative; background: #333; border: 2px solid #555; border-radius: 8px; padding: 10px 6px; color: #fff; cursor: pointer; text-align: center; transition: all 0.2s; font-size: 12px; min-height: 70px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .todo-count-badge { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 4px; background: #e53935; color: #fff; font-size: 11px; font-weight: 700; border-radius: 9px; display: flex; align-items: center; justify-content: center; border: 1px solid #1b1b1b; box-shadow: 0 1px 2px rgba(0,0,0,0.5); z-index: 3; }
  .weekday-btn:hover { background: #444; border-color: #64b5f6; transform: scale(1.05); }
  .weekday-btn.today { background: rgba(255, 152, 0, 0.2); border-color: #ff9800; font-weight: bold; }
  .weekday-btn.weekend { background: rgba(100, 100, 100, 0.15); border-color: #666; opacity: 0.8; }
  .weekday-btn.weekend:hover { opacity: 1; }
  .weekday-btn .weekday-name { font-size: 11px; font-weight: bold; color: #4CAF50; }
  .weekday-btn .weekday-date { font-size: 16px; }
  .speisen-shortage-modal-backdrop {
    position: fixed;
    top: var(--ke-content-safe-top, var(--top-nav-height, 64px));
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.78);
    display: none;
    align-items: flex-start;
    justify-content: center;
    z-index: 12080;
    padding: 16px;
    padding-bottom: calc(var(--ke-content-safe-bottom, calc(var(--bottom-nav-height, 60px) + var(--footer-height, 42px))) + 16px);
    box-sizing: border-box;
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .speisen-shortage-modal {
    width: min(760px, 100%);
    max-height: calc(100vh - var(--ke-content-safe-top, var(--top-nav-height, 64px)) - var(--ke-content-safe-bottom, calc(var(--bottom-nav-height, 60px) + var(--footer-height, 42px))) - 32px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #000;
    border: 1px solid #111;
    border-radius: 14px;
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.55);
    color: #f4efe7;
    margin: auto 0;
  }
  @supports (height: 100dvh) {
    .date-picker-modal { max-height: calc(100dvh - var(--ke-content-safe-top, var(--top-nav-height, 64px)) - var(--ke-content-safe-bottom, calc(var(--bottom-nav-height, 60px) + var(--footer-height, 42px))) - 24px); }
    .speisen-shortage-modal { max-height: calc(100dvh - var(--ke-content-safe-top, var(--top-nav-height, 64px)) - var(--ke-content-safe-bottom, calc(var(--bottom-nav-height, 60px) + var(--footer-height, 42px))) - 32px); }
  }
  .speisen-shortage-modal-head {
    padding: 18px 20px 12px;
    border-bottom: 1px solid #111;
    background: linear-gradient(180deg, rgba(181, 111, 0, 0.18), rgba(26, 26, 26, 0.98));
  }
  .speisen-shortage-modal-title {
    margin: 0;
    font-size: 22px;
    line-height: 1.2;
    color: #ffd089;
  }
  .speisen-shortage-modal-subtitle {
    margin: 8px 0 0;
    color: #e9dcc7;
    font-size: 14px;
    line-height: 1.45;
  }
  .speisen-shortage-modal-body {
    padding: 16px 20px 20px;
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
  }
  .speisen-shortage-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
  }
  .speisen-shortage-item {
    background: #090909;
    border: 1px solid #111;
    border-radius: 12px;
    padding: 14px 14px 12px;
  }
  .speisen-shortage-item-head {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 10px;
  }
  .speisen-shortage-item-meta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
    flex-wrap: wrap;
    justify-content: flex-end;
  }
  .speisen-shortage-item-name {
    font-size: 16px;
    font-weight: 700;
    color: #fff3dd;
    line-height: 1.3;
  }
  .speisen-shortage-item-link {
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid rgba(255, 208, 137, 0.34);
  }
  .speisen-shortage-item-link:hover {
    color: #ffd089;
    border-bottom-color: rgba(255, 208, 137, 0.72);
  }
  .speisen-shortage-add-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 1px solid rgba(76, 175, 80, 0.42);
    border-radius: 999px;
    padding: 5px 10px;
    background: rgba(76, 175, 80, 0.12);
    color: #b9f1bb;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
  }
  .speisen-shortage-add-button:hover {
    background: rgba(76, 175, 80, 0.2);
    border-color: rgba(76, 175, 80, 0.58);
    color: #dcffdd;
  }
  .speisen-shortage-item-status {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #ffb86b;
    background: rgba(181, 111, 0, 0.16);
    border: 1px solid #111;
    border-radius: 999px;
    padding: 5px 9px;
  }
  .speisen-shortage-item-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
  }
  .speisen-shortage-stat {
    background: #141414;
    border: 1px solid #111;
    border-radius: 10px;
    padding: 10px 11px;
  }
  .speisen-shortage-stat-label {
    display: block;
    font-size: 12px;
    color: #b8aa96;
    margin-bottom: 4px;
  }
  .speisen-shortage-stat-value {
    display: block;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    line-height: 1.3;
  }
  .speisen-shortage-modal-actions {
    margin-top: 16px;
    display: flex;
    justify-content: flex-end;
  }
  .eis-plus-modal-backdrop {
    position: fixed;
    top: var(--ke-content-safe-top, var(--top-nav-height, 64px));
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(0, 0, 0, 0.78);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 13000;
    padding: 16px;
    padding-bottom: calc(var(--ke-content-safe-bottom, calc(var(--bottom-nav-height, 60px) + var(--footer-height, 42px))) + 16px);
    box-sizing: border-box;
  }
  .eis-plus-modal {
    width: min(560px, 100%);
    background: #000;
    border: 1px solid #111;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
    color: #f4efe7;
    overflow: hidden;
  }
  .eis-plus-modal-head {
    padding: 14px 16px;
    border-bottom: 1px solid #111;
    background: rgba(255, 208, 137, 0.08);
  }
  .eis-plus-modal-title {
    margin: 0;
    color: #ffd089;
    font-size: 20px;
    line-height: 1.25;
  }
  .eis-plus-modal-body {
    padding: 16px;
    line-height: 1.55;
    color: #e7dfd2;
    font-size: 15px;
  }
  .eis-plus-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 0 16px 16px;
  }
  .eis-plus-btn {
    border: 1px solid #111;
    border-radius: 10px;
    padding: 9px 14px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
  }
  .eis-plus-btn-secondary {
    background: #222;
    color: #ddd;
  }
  .eis-plus-btn-primary {
    background: #ffd089;
    color: #1a1a1a;
  }

  /* ===== Light Mode Overrides ===== */
  [data-theme="light"] .date-picker-modal {
    background: var(--ke-surface) !important;
    border-color: var(--ke-success) !important;
    color: var(--ke-text) !important;
  }
  [data-theme="light"] .weekday-btn {
    background: var(--ke-surface-2) !important;
    border-color: var(--ke-border) !important;
    color: var(--ke-text) !important;
  }
  [data-theme="light"] .weekday-btn:hover {
    background: var(--ke-surface) !important;
    border-color: var(--ke-primary) !important;
  }
  [data-theme="light"] .weekday-btn.today {
    background: rgba(255, 152, 0, 0.15) !important;
    border-color: #ff9800 !important;
  }
  [data-theme="light"] .weekday-btn.weekend {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: var(--ke-border) !important;
  }
  [data-theme="light"] .weekday-btn .weekday-name {
    color: var(--ke-success) !important;
  }
  [data-theme="light"] .weekday-btn .weekday-date {
    color: var(--ke-text) !important;
  }
  [data-theme="light"] .todo-count-badge {
    background: #e53935 !important;
    color: #fff !important;
    border-color: #e53935 !important;
  }
  [data-theme="light"] .speisen-shortage-modal {
    background: var(--ke-surface) !important;
    border-color: var(--ke-border) !important;
    color: var(--ke-text) !important;
  }
  [data-theme="light"] .speisen-shortage-modal-head {
    background: linear-gradient(180deg, rgba(181, 111, 0, 0.10), rgba(245, 245, 245, 0.98)) !important;
    border-bottom-color: var(--ke-border) !important;
  }
  [data-theme="light"] .speisen-shortage-modal-title {
    color: var(--ke-warning) !important;
  }
  [data-theme="light"] .speisen-shortage-modal-subtitle {
    color: var(--ke-text-muted) !important;
  }
  [data-theme="light"] .speisen-shortage-item {
    background: var(--ke-surface-2) !important;
    border-color: var(--ke-border) !important;
  }
  [data-theme="light"] .speisen-shortage-item-name {
    color: var(--ke-text) !important;
  }
  [data-theme="light"] .speisen-shortage-item-status {
    background: rgba(181, 111, 0, 0.12) !important;
    border-color: var(--ke-border) !important;
    color: #d97706 !important;
  }
  [data-theme="light"] .speisen-shortage-add-button {
    background: rgba(76, 175, 80, 0.15) !important;
    border-color: rgba(76, 175, 80, 0.5) !important;
    color: #16a34a !important;
  }
  [data-theme="light"] .speisen-shortage-stat {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: var(--ke-border) !important;
  }
  [data-theme="light"] .speisen-shortage-stat-label {
    color: var(--ke-text-muted) !important;
  }
  [data-theme="light"] .speisen-shortage-stat-value {
    color: var(--ke-text) !important;
  }
  [data-theme="light"] .eis-plus-modal {
    background: var(--ke-surface) !important;
    border-color: var(--ke-border) !important;
    color: var(--ke-text) !important;
  }
  [data-theme="light"] .eis-plus-modal-head {
    background: rgba(255, 208, 137, 0.12) !important;
    border-bottom-color: var(--ke-border) !important;
  }
  [data-theme="light"] .eis-plus-modal-title {
    color: var(--ke-warning) !important;
  }
  [data-theme="light"] .eis-plus-modal-body {
    color: var(--ke-text) !important;
  }
  [data-theme="light"] .eis-plus-btn-secondary {
    background: var(--ke-surface-2) !important;
    border-color: var(--ke-border) !important;
    color: var(--ke-text) !important;
  }

  @media (max-width: 640px) {
    .speisen-shortage-modal-body {
      padding: 14px;
    }
    .speisen-shortage-item-head {
      flex-direction: column;
      align-items: flex-start;
    }
    .speisen-shortage-item-meta {
      width: 100%;
      justify-content: flex-start;
    }
    .speisen-shortage-item-grid {
      grid-template-columns: 1fr;
    }
  }

          #season-config-modal .ke-form-control {
            background: #000 !important;
            color: #f1f6ff !important;
            border: 1px solid #1e3658 !important;
          }
          #season-config-modal .ke-btn:not(.ke-btn-success):not(.ke-btn-info):not(.ke-btn-primary) {
            background: #000 !important;
            border-color: #1e3658 !important;
            color: #f1f6ff !important;
          }
          .season-month-grid {
            display: grid;
            grid-template-columns: repeat(4, minmax(120px, 1fr));
            gap: 8px;
            margin-bottom: 12px;
          }
          .season-month-option {
            position: relative;
            display: flex;
            align-items: center;
            gap: 10px;
            min-height: 44px;
            padding: 9px 10px;
            border: 1px solid #2f3a46;
            border-radius: 10px;
            background: #0f1218;
            cursor: pointer;
            transition: border-color .18s ease, background .18s ease;
          }
          .season-month-option:hover {
            border-color: #5b90ff;
            background: #111827;
          }
          .season-month-option.is-active {
            border-color: #2cab58;
            background: rgba(44, 171, 88, 0.14);
          }
          .season-month-option input {
            position: absolute;
            opacity: 0;
            pointer-events: none;
          }
          .season-month-toggle {
            position: relative;
            flex: 0 0 40px;
            width: 40px;
            height: 22px;
            border-radius: 999px;
            background: #253246;
            border: 1px solid #3b4c63;
            transition: background .18s ease, border-color .18s ease;
          }
          .season-month-toggle::after {
            content: '';
            position: absolute;
            left: 2px;
            top: 2px;
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: #eef4ff;
            transition: transform .18s ease;
          }
          .season-month-option input:checked + .season-month-toggle {
            background: #1e7d3d;
            border-color: #35b75f;
          }
          .season-month-option input:checked + .season-month-toggle::after {
            transform: translateX(18px);
          }
          .season-month-name {
            color: #e6eefb;
            font-weight: 600;
            font-size: 13px;
          }
          .season-quick-buttons {
            display: grid;
            grid-template-columns: repeat(2, minmax(140px, 1fr));
            gap: 8px;
            margin-bottom: 12px;
          }
          .season-overview-table-wrap {
            overflow-x: auto;
            -webkit-overflow-scrolling: touch;
          }
          .season-overview-table {
            width: 100%;
            min-width: 860px;
            border-collapse: separate;
            border-spacing: 0;
          }
          .season-overview-table th,
          .season-overview-table td {
            border-bottom: 1px solid #223047;
            padding: 8px 6px;
            text-align: center;
          }
          .season-overview-table th {
            position: sticky;
            top: 0;
            background: #09111c;
            color: #bcd2f5;
            z-index: 1;
            font-size: 12px;
          }
          .season-overview-table td:first-child,
          .season-overview-table th:first-child {
            text-align: left;
            min-width: 240px;
            padding-left: 0;
          }
          .season-overview-title {
            color: #f5f8ff;
            font-weight: 700;
          }
          .season-overview-meta {
            color: #8ea5c5;
            font-size: 12px;
          }
          .season-overview-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 34px;
            height: 28px;
            padding: 0 8px;
            border-radius: 999px;
            background: #111a27;
            border: 1px solid #2a3b55;
            color: #d7e5ff;
            font-weight: 700;
            font-size: 12px;
          }
          .season-overview-cell {
            font-size: 12px;
            color: #8ea5c5;
            background: #000;
            min-width: 130px;
            border-left: 1px solid #1d2a3d;
          }
          .season-overview-cell.is-active {
            color: #b9f0c8;
            background: #000;
          }
          .season-overview-cell-wrap {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 4px;
            min-height: 44px;
            justify-content: center;
          }
          .season-overview-month-count {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 24px;
            height: 24px;
            border-radius: 999px;
            border: 1px solid #27476f;
            background: #000;
            color: #dbe9ff;
            font-size: 11px;
            font-weight: 700;
            padding: 0 7px;
          }
          .season-overview-cell.is-active .season-overview-month-count {
            border-color: #5bc27a;
            background: #000;
            color: #ecfff1;
          }
          .season-overview-month-preview {
            font-size: 10px;
            line-height: 1.3;
            color: #a7bdd8;
            text-align: center;
            max-width: 110px;
            white-space: nowrap;
            overflow: visible;
            word-break: normal;
          }
          .season-overview-cell.is-active .season-overview-month-preview {
            color: #daf7df;
          }
          #season-overview-detail-pop {
            position: fixed;
            z-index: 10040;
            display: none;
            max-width: min(460px, calc(100vw - 24px));
            background: #0f141c;
            color: #eaf2ff;
            border: 1px solid #1e3658;
            border-radius: 10px;
            box-shadow: 0 12px 30px rgba(0, 0, 0, 0.55);
            padding: 10px 12px;
            font-size: 12px;
            line-height: 1.4;
          }
          #season-overview-detail-pop .title {
            color: #9ecfff;
            font-weight: 700;
            margin-bottom: 6px;
          }
          #season-overview-detail-pop .body {
            color: #eaf2ff;
            white-space: normal;
            word-break: break-word;
          }
          #season-overview-detail-pop .close {
            margin-top: 8px;
            background: #000;
            color: #f1f6ff;
            border: 1px solid #1e3658;
            border-radius: 7px;
            padding: 4px 10px;
            font-size: 12px;
            cursor: pointer;
          }
          .season-overview-row.is-active-now .season-overview-title {
            color: #7ee08e;
          }
          @media (max-width: 720px) {
            .season-month-grid { grid-template-columns: repeat(2, minmax(88px, 1fr)); }
            .season-quick-buttons { grid-template-columns: 1fr; }
            .season-overview-table td:first-child,
            .season-overview-table th:first-child { min-width: 210px; }
            #season-overview-detail-pop {
              left: 12px !important;
              right: 12px;
              bottom: 12px;
              top: auto !important;
              transform: none !important;
              max-width: none;
            }
          }

/* Light mode overrides for calendar buttons and date badges */
[data-theme="light"] .todo-calendar-btn {
  background: rgba(37, 99, 235, 0.08) !important;
  border-color: var(--ke-primary) !important;
  color: var(--ke-primary) !important;
}
[data-theme="light"] .todo-calendar-btn:hover {
  background: rgba(37, 99, 235, 0.15) !important;
}
[data-theme="light"] .todo-calendar-btn .date-badge {
  color: var(--ke-primary) !important;
}
[data-theme="light"] .weekday-btn {
  background: var(--ke-surface-2) !important;
  border-color: var(--ke-border) !important;
  color: var(--ke-text) !important;
}
[data-theme="light"] .weekday-btn:hover {
  background: var(--ke-surface-3) !important;
}
[data-theme="light"] .weekday-btn.today {
  background: rgba(255, 152, 0, 0.15) !important;
  border-color: #ff9800 !important;
}
[data-theme="light"] .weekday-btn .weekday-name {
  color: var(--ke-success) !important;
}
[data-theme="light"] .weekday-btn .weekday-date {
  color: var(--ke-text) !important;
}
[data-theme="light"] .date-picker-modal {
  background: var(--ke-surface) !important;
  color: var(--ke-text) !important;
  border-color: var(--ke-border) !important;
}
