/* ================================================================
   GRAFIK GILLETTE - APP-SHELL.CSS
   Full-screen App Panel + Action Sheet (shell infrastructure).
   Part of the menu/navigation refactor (v4.0.0).
   Layer order: side menu 90-91 < modals 150 < panel 160/161
                < action sheet 165/166 < toasts 200.
   ================================================================ */

/* === APP PANEL: OVERLAY === */
.app-panel-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 160;
  display: none;
}
.app-panel-overlay.show {
  display: block;
  animation: appShellFadeIn 0.2s ease-out;
}

/* === APP PANEL (fills the viewport) === */
.app-panel {
  position: fixed;
  inset: 0;
  z-index: 161;
  display: none;
  flex-direction: column;
  background: var(--bg-container);
  color: var(--text-main);
}
.app-panel.show {
  display: flex;
  animation: appShellPanelIn 0.25s ease-out;
}

.app-panel-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  min-height: 56px;
  padding: 6px 10px;
  padding-top: calc(6px + env(safe-area-inset-top, 0px));
  border-bottom: 1px solid var(--border-cell);
  background: var(--bg-container);
}

.app-panel-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  text-align: center;
}

/* Icon buttons: at least 44px touch targets */
.app-panel-nav,
.app-panel-close,
.action-sheet-close {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 10px;
  border: none;
  border-radius: 10px;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s,
    transform 0.15s;
}
.app-panel-nav:hover,
.app-panel-close:hover,
.action-sheet-close:hover {
  background: var(--text-header);
  color: #fff;
}
.app-panel-nav:active,
.app-panel-close:active,
.action-sheet-close:active {
  transform: scale(0.94);
}

/* Back button: visible only when the screen stack is deeper than 1 */
.app-panel-nav {
  display: none;
}
.app-panel.has-back .app-panel-nav {
  display: inline-flex;
}

/* Panel body: full height, content centered with a sensible max width */
.app-panel-body {
  flex: 1 1 auto;
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: 16px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom, 0px));
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* === ACTION SHEET: OVERLAY === */
.action-sheet-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 165;
  display: none;
}
.action-sheet-overlay.show {
  display: block;
  animation: appShellFadeIn 0.2s ease-out;
}

/* === ACTION SHEET (desktop: centered dialog, max-width ~560px) === */
.action-sheet {
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: min(calc(100vw - 32px), 560px);
  max-height: min(85vh, 720px);
  z-index: 166;
  display: none;
  flex-direction: column;
  background: var(--bg-container);
  color: var(--text-main);
  border-radius: 16px;
  box-shadow: 0 12px 40px var(--shadow-heavy);
  overflow: hidden;
}
.action-sheet.show {
  display: flex;
  animation: appShellSheetIn 0.22s ease-out;
}

.action-sheet-header {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 52px;
  padding: 6px 10px 6px 16px;
  border-bottom: 1px solid var(--border-cell);
  background: var(--bg-container);
}

.action-sheet-title {
  flex: 1 1 auto;
  min-width: 0;
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.action-sheet-body {
  flex: 1 1 auto;
  padding: 16px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

/* Share Center tab styles */
.share-tab-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 1;
  padding: 12px;
  border: none;
  border-bottom: 2px solid transparent;
  background: var(--bg-controls);
  color: var(--text-main);
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.share-tab-btn:hover {
  background: var(--bg-info);
  color: var(--text-header);
}

.share-tab-btn.active {
  background: var(--bg-controls);
  color: var(--text-header);
  border-bottom-color: var(--text-header);
}

.share-tab-btn:active {
  transform: scale(0.97);
}

/* === SHARE CENTER === */
.action-sheet[data-screen-id='share-center'] .action-sheet-header {
  padding-left: 54px;
}

.action-sheet[data-screen-id='share-center'] .action-sheet-title {
  text-align: center;
}

.action-sheet[data-screen-id='share-center'] .action-sheet-body {
  padding: 0;
}

.share-center {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
}

.share-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: 100%;
  border-bottom: 1px solid var(--border-cell);
  background: var(--bg-controls);
}

.share-tabs .share-tab-btn {
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  text-align: center;
  line-height: 1.25;
}

.share-center-content {
  width: 100%;
  min-width: 0;
}

.share-center-panel {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 18px;
  width: 100%;
  padding: 22px;
  text-align: center;
}

.share-qr {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 240px;
  padding: 4px;
}

.share-qr img {
  display: block;
  width: min(240px, 70vw);
  height: auto;
  aspect-ratio: 1;
  border-radius: 12px;
  background: #fff;
  padding: 10px;
  box-shadow: 0 4px 18px var(--shadow-color);
}

.share-qr-error {
  width: 100%;
  padding: 18px;
  border: 1px solid rgba(192, 57, 43, 0.35);
  border-radius: 10px;
  background: rgba(192, 57, 43, 0.1);
  color: #c0392b;
  text-align: center;
  font-size: 13px;
  line-height: 1.45;
}

.share-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  width: 100%;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border-cell);
  border-radius: 12px;
  background: var(--bg-cell);
  text-align: center;
}

.share-preview-label {
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.share-preview-text {
  width: 100%;
  color: var(--text-main);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.share-preview-url {
  width: 100%;
  overflow-wrap: anywhere;
  word-break: break-word;
  color: var(--text-header);
  font-family: monospace;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.45;
  text-align: center;
}

.share-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
}

.share-actions .modal-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: 10px 12px;
  line-height: 1.25;
  text-align: center;
  white-space: normal;
}

@media (max-width: 480px) {
  .share-center-panel {
    gap: 14px;
    padding: 16px;
  }

  .share-tabs .share-tab-btn {
    min-height: 46px;
    padding: 9px 8px;
    font-size: 13px;
  }

  .share-qr {
    min-height: 210px;
  }

  .share-qr img {
    width: min(210px, 64vw);
  }

  .share-preview {
    padding: 12px;
  }

  .share-actions {
    gap: 8px;
  }

  .share-actions .modal-btn {
    min-height: 46px;
    padding: 9px 8px;
    font-size: 12px;
  }
}

/* === MOBILE: sheet slides from the bottom, safe-area aware === */
@media (max-width: 600px) {
  .action-sheet.show {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    transform: none;
    width: 100%;
    max-width: none;
    max-height: 88vh;
    max-height: 88dvh;
    border-radius: 16px 16px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: appShellSheetUp 0.25s ease-out;
  }
}

/* === BODY SCROLL LOCK while shell surfaces are open === */
body.app-panel-open,
body.action-sheet-open {
  overflow: hidden;
}

/* Transactional modals must remain visible above panels and action sheets. */
.modal-overlay.show {
  z-index: 170;
}

/* === KEYBOARD FOCUS (focus-visible) === */
.app-panel:focus-visible,
.action-sheet:focus-visible,
.app-panel :focus-visible,
.action-sheet :focus-visible {
  outline: 2px solid var(--text-header);
  outline-offset: 2px;
}

/* === ANIMATIONS === */
@keyframes appShellFadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes appShellPanelIn {
  from {
    opacity: 0;
    transform: translateX(24px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}
@keyframes appShellSheetIn {
  from {
    opacity: 0;
    transform: translate(-50%, -46%) scale(0.97);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}
@keyframes appShellSheetUp {
  from {
    transform: translateY(100%);
  }
  to {
    transform: translateY(0);
  }
}

/* === REDUCED MOTION === */
@media (prefers-reduced-motion: reduce) {
  .app-panel-overlay.show,
  .app-panel.show,
  .action-sheet-overlay.show,
  .action-sheet.show {
    animation: none !important;
    transition: none !important;
  }
}

/* === PRINT: shell surfaces never print === */
@media print {
  .app-panel-overlay,
  .app-panel,
  .action-sheet-overlay,
  .action-sheet {
    display: none !important;
  }
  .mobile-bottom-nav {
    display: none !important;
  }
}

/* ================================================================
   TOP BAR + PRIMARY NAV + CONTEXT TOOLBAR + MOBILE BOTTOM NAV
   (v4.0.0 menu/navigation refactor)
   ================================================================ */

/* === TOP BAR: account (left) · title (center) · menu (right) === */
#userAuthBtn {
  order: 1;
  margin-left: 0;
}
.top-bar-title {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
#appContextTitle {
  flex: 0 1 auto;
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  color: var(--text-header);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}
#menuBtn {
  order: 3;
  margin-left: auto;
}

/* === PRIMARY NAVIGATION (desktop) === */
.primary-nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 12px;
}
.primary-nav-btn {
  min-height: 44px;
  padding: 8px 18px;
  border: 1px solid var(--border-cell);
  border-radius: 12px;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.primary-nav-btn:hover {
  background: var(--bg-info);
}
.primary-nav-btn.active {
  background: var(--text-header);
  border-color: var(--text-header);
  color: #fff;
}

/* === CONTEXT TOOLBAR === */
.context-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
}
.context-row {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.context-row-date {
  width: auto;
  max-width: 100%;
  flex-wrap: nowrap;
  gap: 10px;
  justify-content: center;
}
.period-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  flex: 0 0 auto;
  min-width: 0;
}
.context-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
}
.context-period {
  min-width: 120px;
  text-align: center;
  font-size: 15px;
  font-weight: 700;
  color: var(--text-header);
}
.context-today-btn {
  min-height: 40px;
  margin-left: 0;
  white-space: nowrap;
  flex: 0 0 auto;
  padding: 8px 12px;
  font-size: 13px;
}
/* Kill leftover mobile title pseudo-elements that duplicated the app name */
#appContextTitle::before,
#appContextTitle::after,
.top-bar h1::before,
.top-bar h1::after {
  content: none !important;
  display: none !important;
}
.period-btn {
  min-width: 44px;
  min-height: 44px;
  border: none;
  border-radius: 10px;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.period-btn:hover {
  background: var(--text-header);
  color: #fff;
}
/* Month/Year segmented toggle (sits after brigade buttons) */
.range-toggle {
  display: inline-flex;
  align-items: stretch;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-cell);
  background: var(--bg-controls);
  flex-shrink: 0;
}
.range-btn {
  min-height: 36px;
  padding: 6px 14px;
  border: none;
  border-radius: 0;
  background: transparent;
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
  line-height: 1.2;
}
.range-btn + .range-btn {
  border-left: 1px solid var(--border-cell);
}
.range-btn.active {
  background: var(--text-header);
  color: #fff;
}

/* Per-view visibility:
   Dashboard → brigade only (no period, no range toggle);
   Calendar/Table → brigade + range toggle + period */
.context-toolbar[data-view='dashboard'] .context-row-date,
.context-toolbar[data-view='dashboard'] .range-toggle {
  display: none;
}

/* === MOBILE BOTTOM NAV (visible ≤700px only) === */
.mobile-bottom-nav {
  display: none;
}

@media (max-width: 700px) {
  .primary-nav {
    display: none;
  }
  .mobile-bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 80;
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    gap: 4px;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    background: var(--bg-container);
    border-top: 1px solid var(--border-cell);
    box-shadow: 0 -6px 18px var(--shadow-color);
  }
  /* Keep application content clear of the bottom nav */
  body {
    padding-bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  }
  /* Keep toasts above the bottom nav */
  .toast-container {
    bottom: calc(84px + env(safe-area-inset-bottom, 0px));
  }
  /* Edit palette owns the bottom edge in edit mode */
  body.edit-active .mobile-bottom-nav {
    display: none;
  }
  #appContextTitle {
    font-size: 17px;
  }
  .context-row-date {
    max-width: 100%;
    gap: 6px;
  }
  .context-period {
    min-width: 0;
    font-size: 14px;
  }
  .context-today-btn {
    min-height: 36px;
    padding: 6px 10px;
    font-size: 12px;
  }
  .range-btn {
    min-height: 34px;
    padding: 5px 10px;
    font-size: 12px;
  }
  .context-row-brigade {
    gap: 8px;
  }
}

.mobile-nav-btn {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-height: 48px;
  padding: 4px 6px;
  border: none;
  border-radius: 12px;
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}
.mnb-icon {
  font-size: 20px;
  line-height: 1;
}
.mobile-nav-btn.active {
  color: var(--text-header);
  background: var(--bg-controls);
}

/* === FOCUS VISIBILITY (new navigation controls) === */
.primary-nav-btn:focus-visible,
.mobile-nav-btn:focus-visible,
.period-btn:focus-visible,
.range-btn:focus-visible,
.top-bar .icon-btn:focus-visible {
  outline: 2px solid var(--text-header);
  outline-offset: 2px;
}

/* === REDUCED MOTION (new controls) === */
@media (prefers-reduced-motion: reduce) {
  .primary-nav-btn,
  .period-btn,
  .range-btn,
  .mobile-nav-btn {
    transition: none !important;
  }
}

/* ================================================================
   SIDE DRAWER (v4.0.0): menu items with title+description,
   privacy role=switch with .ui-switch, temporary panel notes
   ================================================================ */

/* Menu item text block (title + optional description) */
.mi-text {
  flex: 1 1 auto;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
  text-align: left;
}
.mi-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.25;
}
.mi-desc {
  font-size: 12px;
  line-height: 1.3;
  color: var(--text-muted);
  white-space: normal;
}

/* Privacy quick switch */
.menu-item-switch {
  cursor: pointer;
}
.ui-switch {
  flex: 0 0 auto;
  position: relative;
  width: 40px;
  height: 22px;
  border-radius: 11px;
  background: var(--border-cell);
  transition: background 0.2s;
}
.ui-switch-knob {
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35);
  transition: transform 0.2s;
}
.menu-item-switch[aria-checked='true'] .ui-switch {
  background: var(--text-header);
}
.menu-item-switch[aria-checked='true'] .ui-switch-knob {
  transform: translateX(18px);
}

/* Settings panel switches (role="switch" + .st-switch) */
.st-switch[aria-checked='true'] .ui-switch {
  background: var(--text-header);
}
.st-switch[aria-checked='true'] .ui-switch-knob {
  transform: translateX(18px);
}

/* Drawer keyboard focus */
.side-menu:focus-visible {
  outline: 2px solid var(--text-header);
  outline-offset: -2px;
}
.side-menu :focus-visible {
  outline: 2px solid var(--text-header);
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  .ui-switch,
  .ui-switch-knob {
    transition: none !important;
  }
}

/* ================================================================
   SETTINGS PANEL (v4.0.0): cards, segmented controls, switch and
   color rows, live appearance preview
   ================================================================ */

.settings-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.settings-card {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 12px 16px;
  text-align: left;
  font: inherit;
  color: var(--text-main);
  background: var(--bg-controls);
  border: 1px solid var(--border-cell);
  border-radius: 12px;
  transition: border-color 0.15s;
}
button.settings-card {
  cursor: pointer;
}
button.settings-card:hover {
  border-color: var(--text-header);
}
.settings-card .sc-icon {
  width: 30px;
  font-size: 1.3rem;
  line-height: 1;
  text-align: center;
}
.settings-card .sc-body {
  flex: 1;
  min-width: 0;
}
.settings-card .sc-title {
  font-size: 15px;
  font-weight: 600;
}
.settings-card .sc-arrow {
  color: var(--text-muted);
  font-size: 1.2rem;
}
.settings-card.is-disabled {
  opacity: 0.55;
}

.settings-section {
  display: flex;
  flex-direction: column;
  gap: 18px;
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
}
.st-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.st-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}
.seg {
  display: flex;
  overflow: hidden;
  background: var(--bg-controls);
  border: 1px solid var(--border-cell);
  border-radius: 10px;
}
.seg-btn {
  flex: 1 1 0;
  min-width: 0;
  min-height: 44px;
  padding: 10px 6px;
  font: inherit;
  font-size: 14px;
  color: var(--text-main);
  background: transparent;
  border: none;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background 0.15s;
}
.seg-btn + .seg-btn {
  border-left: 1px solid var(--border-cell);
}
.seg-btn.active {
  font-weight: 600;
  color: #fff;
  background: var(--text-header);
}
.st-row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  min-height: 52px;
  padding: 10px 14px;
  font: inherit;
  color: var(--text-main);
  background: var(--bg-controls);
  border: 1px solid var(--border-cell);
  border-radius: 12px;
}
button.st-row {
  cursor: pointer;
}
.st-row-label {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  text-align: left;
}
.st-switch {
  text-align: left;
}
.st-hex {
  font-size: 12px;
  font-family: monospace;
  color: var(--text-muted);
}
.st-color {
  width: 44px;
  height: 36px;
  padding: 2px;
  background: var(--bg-controls);
  border: 1px solid var(--border-cell);
  border-radius: 8px;
  cursor: pointer;
}
.st-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border: 1px dashed var(--border-cell);
  border-radius: 12px;
}
.st-cell {
  display: grid;
  place-items: center;
  width: 52px;
  height: 40px;
  font-size: 13px;
  font-weight: 700;
  background: var(--pc, #cccccc);
  color: var(--pc-text, #ffffff);
  border: 1px solid rgba(0, 0, 0, 0.15);
  border-radius: 8px;
}
.st-preview.skin-strip .st-cell {
  background: var(--bg-controls);
  color: var(--text-main);
  border-left: 6px solid var(--pc, #cccccc);
}
.st-preview.skin-quiet .st-cell {
  background: var(--bg-controls);
  color: var(--text-main);
  border: 2px solid var(--pc, #cccccc);
}

@media (max-width: 600px) {
  .settings-card,
  .st-row {
    padding: 10px 12px;
  }
  .st-cell {
    width: 46px;
    height: 36px;
  }
}

.settings-cards :focus-visible,
.settings-section :focus-visible {
  outline: 2px solid var(--text-header);
  outline-offset: 2px;
}

/* === SETTINGS: STATUS INDICATORS === */
.st-perm {
  display: inline-block;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
}
.st-perm-ok {
  background: #dcfce7;
  color: #166534;
}
.st-perm-info {
  background: #e0f2fe;
  color: #075985;
}
.st-perm-warn {
  background: #fef9c3;
  color: #854d0e;
}
.st-perm-error {
  background: #fee2e2;
  color: #991b1b;
}

/* === SETTINGS: NUMBER INPUT === */
.st-number {
  width: 80px;
  padding: 8px 10px;
  border: 1px solid var(--border-cell);
  border-radius: 8px;
  background: var(--bg-controls);
  color: var(--text-main);
  font: inherit;
  font-size: 14px;
  text-align: center;
}

/* === SETTINGS: MONOSPACE VALUE === */
.st-mono {
  font-family: monospace;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-header);
}

/* === SETTINGS: HINT TEXT === */
.st-hint {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

@media (prefers-reduced-motion: reduce) {
  .settings-card,
  .seg-btn {
    transition: none !important;
  }
}

/* ================================================================
   ACCESSIBILITY BODY CLASSES (v4.0.0)
   Applied via js/core.js applyAccessibilityPreferences().
   ================================================================ */

/* --- Reduce motion: disable nonessential transitions and animations --- */
body.reduce-motion,
body.reduce-motion *,
body.reduce-motion *::before,
body.reduce-motion *::after {
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: 0.01ms !important;
  scroll-behavior: auto !important;
}

/* --- Large text: increase primary UI text without breaking calendar --- */
body.large-text {
  font-size: 112.5%;
}
body.large-text .app-panel-title {
  font-size: 22px;
}
body.large-text #appContextTitle {
  font-size: 24px;
}
body.large-text .settings-card .sc-title {
  font-size: 16px;
}
body.large-text .st-row-label {
  font-size: 15px;
}
body.large-text .primary-nav-btn {
  font-size: 15px;
}
body.large-text .seg-btn {
  font-size: 15px;
}
body.large-text .mobile-nav-btn {
  font-size: 12px;
}
body.large-text .mnb-icon {
  font-size: 22px;
}
body.large-text .context-label {
  font-size: 14px;
}
body.large-text .context-period {
  font-size: 17px;
}

/* --- Compact cells: reduce cell height and spacing --- */
body.compact-cells .day-cell {
  min-height: 52px;
  padding: 3px;
}
body.compact-cells .calendar {
  gap: 2px;
}
body.compact-cells .st-preview .st-cell {
  width: 40px;
  height: 32px;
  font-size: 11px;
}
body.compact-cells .st-cell {
  width: 36px;
  height: 28px;
  font-size: 11px;
}
body.compact-cells .dash-stat-card {
  gap: 8px;
}
body.compact-cells .dash-stat-card .dsc-value {
  font-size: 13px;
}
body.compact-cells .info-section {
  gap: 6px;
}
/* FAQ and About panels use the existing app-panel styles */

/* Day Editor styles */
.info-grid {
  display: grid;
  gap: 12px;
  margin-top: 12px;
}
.day-action-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
  gap: 8px;
}
.day-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 8px;
  border: 1px solid var(--border-cell);
  border-radius: 8px;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 12px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s,
    border-color 0.15s;
}
.day-action-btn:hover {
  background: var(--bg-info);
}
.day-action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.day-action-btn:disabled:hover {
  background: var(--bg-controls);
}
.day-action-icon {
  font-size: 18px;
  line-height: 1;
}
.day-action-label {
  font-size: 12px;
  text-align: center;
}

/* Add-shift modal: global small text must not override button contrast. */
.add-shift-modal-btn small {
  color: inherit;
}

/* Unified per-day notes list (free-form + before/after overtime notes),
   rendered inside the day info panel's note card. */
.day-note-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin: 10px 0 12px;
}

.day-note-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--border-cell);
  border-radius: 8px;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.4;
  text-align: left;
}

.day-note-icon {
  flex: 0 0 auto;
  font-size: 14px;
  line-height: 1.4;
}

.day-note-text {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  cursor: pointer;
  border-radius: 4px;
}

.day-note-text:hover {
  background: var(--bg-hover);
}

.day-note-text:focus-visible {
  outline: 2px solid var(--text-header);
  outline-offset: 2px;
}

.day-note-edit-input {
  width: 100%;
  padding: 2px 4px;
  border: 1px solid var(--border-cell);
  border-radius: 6px;
  background: var(--bg-container);
  color: var(--text-main);
  font-size: 13px;
  font-family: inherit;
}

.day-note-text strong {
  color: var(--text-header);
  font-size: 12px;
}

.day-note-remove {
  flex: 0 0 auto;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  border-radius: 6px;
}

.day-note-remove:hover {
  color: var(--text-main);
  background: var(--bg-hover);
}

.privacy-disable-btn {
  padding: 8px 16px;
  border: 1px solid var(--border-cell);
  border-radius: 8px;
  background: var(--bg-controls);
  color: var(--text-main);
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}
.privacy-disable-btn:hover {
  background: var(--bg-info);
}

/* === ABOUT PANEL === */
.about-content {
  text-align: center;
  line-height: 1.6;
}

.about-content p {
  margin: 10px 0;
}

.about-content a {
  color: var(--text-header);
  text-decoration: underline;
  transition: filter 0.15s;
}

.about-content a:hover {
  filter: brightness(1.2);
}

.about-content a:focus-visible {
  outline: 2px solid var(--text-header);
  outline-offset: 2px;
  border-radius: 3px;
}

.about-content button#about-check-update {
  margin-top: 16px;
}

/* === SETTINGS WARNING BLOCK === */
.st-warning {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(243, 156, 18, 0.12);
  border-left: 4px solid #f39c12;
  color: var(--text-main);
}

.st-warning-title {
  font-size: 13px;
  font-weight: 700;
  color: #f39c12;
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.st-warning-title::before {
  content: '⚠️';
  font-size: 15px;
}

.st-warning-body {
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

/* === FACTORY EDITOR BAR === */
#factoryEditorBar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  background: var(--bg-container);
  border-top: 1px solid var(--border-cell);
  z-index: 200;
  padding: 0 16px;
  box-sizing: border-box;
}

#factoryEditorContext {
  flex: 1;
  min-width: 200px;
  font-size: 14px;
  color: var(--text-main);
  display: flex;
  gap: 16px;
}

#factoryEditorTools {
  display: flex;
  gap: 8px;
}

.factory-tool-btn {
  width: 36px;
  height: 36px;
  border: 2px solid var(--border-cell);
  border-radius: 4px;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s ease;
}

.factory-tool-btn.active {
  border-color: var(--text-header);
  background: var(--bg-info);
  color: var(--text-header);
}

.factory-tool-btn:hover:not(.active) {
  background: var(--bg-hover);
  border-color: var(--text-main);
}

#factoryEditorExitBtn {
  width: 36px;
  height: 36px;
  border: none;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 18px;
  border-radius: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}

#factoryEditorExitBtn:hover {
  background: var(--bg-danger);
  color: var(--text-danger);
}

/* === ACTIVE FACTORY EDITOR VISUAL STATE === */
body.factory-editor-active {
  background: linear-gradient(rgba(230, 126, 34, 0.08), rgba(230, 126, 34, 0.08)), var(--bg-body);
}

body.factory-editor-active .container {
  outline: 4px solid #e67e22;
  outline-offset: -4px;
  box-shadow:
    0 0 0 4px rgba(230, 126, 34, 0.18),
    0 12px 40px var(--shadow-color);
}

body.factory-editor-active .top-bar {
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(230, 126, 34, 0.12);
  box-shadow: inset 4px 0 0 #e67e22;
}

body.factory-editor-active #factoryEditorBar {
  min-height: 58px;
  height: auto;
  gap: 14px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom, 0px));
  border-top: 4px solid #e67e22;
  background: var(--bg-container);
  box-shadow: 0 -8px 24px rgba(230, 126, 34, 0.28);
}

body.factory-editor-active #factoryEditorContext {
  color: var(--text-main);
  font-weight: 600;
}

body.factory-editor-active #factoryEditorContext strong {
  color: #e67e22;
}

body.factory-editor-active .factory-tool-btn {
  border-color: rgba(230, 126, 34, 0.55);
}

body.factory-editor-active .factory-tool-btn.active {
  border-color: #f1c40f;
  background: #e67e22;
  color: #fff;
  box-shadow:
    0 0 0 3px rgba(241, 196, 15, 0.4),
    0 3px 10px rgba(0, 0, 0, 0.24);
  transform: translateY(-1px);
}

body.factory-editor-active #factoryEditorExitBtn {
  border: 1px solid rgba(192, 57, 43, 0.55);
  background: rgba(192, 57, 43, 0.12);
  color: #c0392b;
}

body.factory-editor-active .mobile-bottom-nav {
  display: none;
}

body.factory-editor-active {
  padding-bottom: calc(74px + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 700px) {
  body.factory-editor-active #factoryEditorBar {
    flex-wrap: wrap;
    justify-content: center;
    gap: 7px 10px;
    padding: 7px 10px calc(7px + env(safe-area-inset-bottom, 0px));
  }

  body.factory-editor-active #factoryEditorContext {
    flex: 1 1 100%;
    min-width: 0;
    justify-content: center;
    gap: 8px;
    font-size: 12px;
    text-align: center;
  }

  body.factory-editor-active #factoryEditorTools {
    flex: 0 1 auto;
  }

  body.factory-editor-active .factory-tool-btn,
  body.factory-editor-active #factoryEditorExitBtn {
    width: 40px;
    height: 40px;
  }

  body.factory-editor-active {
    padding-bottom: calc(112px + env(safe-area-inset-bottom, 0px));
  }
}

@media (prefers-reduced-motion: reduce) {
  body.factory-editor-active .factory-tool-btn.active {
    transform: none;
  }
}

/* === ADMIN CENTER TABS === */
.admin-tab-btn {
  flex: 1;
  padding: 12px 8px;
  border: none;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all 0.15s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.admin-tab-btn.active {
  color: var(--text-header);
  border-bottom-color: var(--text-header);
  background: var(--bg-container);
}

.admin-tab-btn:hover:not(.active) {
  background: var(--bg-hover);
  color: var(--text-header);
}

/* === ADMIN CENTER CONTENT === */
#adminCenterContent {
  padding: 16px;
  overflow-y: auto;
}

/* === DANGER BUTTONS === */
.admin-danger-btn {
  background: #dc2626;
  color: #ffffff !important;
  border: 1px solid #b91c1c;
}

.admin-danger-btn {
  background: #dc2626;
  color: #ffffff !important;
  border: 1px solid #b91c1c;
}

.admin-danger-btn:hover {
  background: #b91c1c;
  color: #ffffff !important;
  border-color: #991b1b;
}

/* === EXPORT YEAR LIST === */
.export-year-item {
  margin: 4px 0;
}

.export-year-btn {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--border-cell);
  border-radius: 6px;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  transition: all 0.15s ease;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.export-year-btn.active,
.export-year-btn:hover {
  background: var(--bg-info);
  border-color: var(--text-header);
  color: var(--text-header);
}

.export-year-btn:hover {
  background: var(--bg-hover);
}

/* UI skin segment can wrap on narrow screens */
.seg.seg-wrap {
  flex-wrap: wrap;
}
.st-hint {
  margin: 0 0 8px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.35;
}

/* === UI MODE VISIBILITY === */
body.ui-mode-simple .advanced-only {
  display: none !important;
}

/* === DRIVE SYNC OPTIONS PANEL (v4.1) ===
   Styles for the panel opened by openDriveSyncOptionsPanel() in js/sync.js.
   Consolidates: sync mode toggle (auto/manual), local/remote diff table,
   Upload/Download actions. Rendered inside the standard app-panel body. */

.drive-sync-options-panel {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 560px;
  margin: 0 auto;
}

.dso-section {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.dso-section-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- Mode selector (radio-styled rows) --- */
.dso-mode-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dso-mode-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  background: var(--bg-controls);
  border: 1px solid var(--border-cell);
  border-radius: 12px;
  cursor: pointer;
  transition:
    border-color 0.15s,
    background 0.15s;
}

.dso-mode-row:hover {
  border-color: var(--text-header);
}

.dso-mode-row.active {
  border-color: var(--text-header);
  background: var(--bg-info-card);
}

.dso-mode-row input[type='radio'] {
  margin-top: 2px;
  accent-color: var(--text-header);
  cursor: pointer;
}

.dso-mode-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
  flex: 1;
}

.dso-mode-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
}

.dso-mode-desc {
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-muted);
}

/* --- Actions row (Upload / Download) --- */
.dso-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.dso-actions .modal-btn {
  flex: 1 1 0;
  min-width: 120px;
  min-height: 44px;
  padding: 10px 14px;
  font-size: 14px;
  font-weight: 600;
}

/* --- Diff table --- */
.dso-diff {
  background: var(--bg-cell);
  border: 1px solid var(--border-cell);
  border-radius: 12px;
  padding: 12px 14px;
}

.dso-diff-loading,
.dso-diff-error {
  padding: 8px 4px;
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

.dso-diff-error {
  color: #c0392b;
}

.dso-diff-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.dso-diff-table thead th {
  padding: 6px 8px;
  text-align: right;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-cell);
}

.dso-diff-table thead th:first-child {
  text-align: left;
}

.dso-diff-table tbody td {
  padding: 8px;
  text-align: right;
  color: var(--text-main);
  border-bottom: 1px solid var(--border-cell);
}

.dso-diff-table tbody tr:last-child td {
  border-bottom: none;
}

.dso-diff-table tbody td:first-child {
  text-align: left;
  font-weight: 600;
}

.dso-diff-eq {
  color: var(--text-muted);
  font-weight: 700;
}

.dso-diff-local {
  color: #e67e22;
  font-weight: 700;
  white-space: nowrap;
}

.dso-diff-remote {
  color: #3498db;
  font-weight: 700;
  white-space: nowrap;
}

.dso-diff-meta {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--border-cell);
  font-size: 12px;
  line-height: 1.5;
  color: var(--text-muted);
}

.dso-diff-meta b {
  color: var(--text-main);
  font-weight: 600;
}

@media (max-width: 480px) {
  .dso-mode-row {
    padding: 10px 12px;
  }
  .dso-mode-title {
    font-size: 13px;
  }
  .dso-mode-desc {
    font-size: 11px;
  }
  .dso-diff-table {
    font-size: 12px;
  }
  .dso-diff-table thead th,
  .dso-diff-table tbody td {
    padding: 6px 4px;
  }
}

/* ================================================================
   NOTES VIEW PANEL (v4.2)
   Full-screen panel listing all notes across dates.
   ================================================================ */

.notes-view-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 720px;
  margin: 0 auto;
}

.notes-filter-bar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-controls);
  border: 1px solid var(--border-cell);
  border-radius: 10px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.notes-filter-topline {
  display: flex;
  gap: 8px;
  align-items: stretch;
}

.notes-filter-search {
  flex: 1 1 auto;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-cell);
  border-radius: 8px;
  background: var(--bg-container);
  color: var(--text-main);
  font-size: 14px;
  font-family: inherit;
}

.notes-advanced-toggle {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 56px;
  padding: 8px 12px;
  border: 1px solid var(--border-cell);
  border-radius: 8px;
  background: var(--bg-container);
  color: var(--text-main);
  font-size: 14px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.notes-advanced-toggle:hover {
  border-color: var(--text-header);
  background: var(--bg-info);
}

.notes-advanced-toggle.has-active {
  border-color: var(--accent);
  background: rgba(255, 87, 34, 0.08);
}

.notes-advanced-toggle .nat-icon {
  font-size: 15px;
  line-height: 1;
}

.notes-advanced-toggle .nat-caret {
  font-size: 10px;
  color: var(--text-muted);
}

.notes-filter-advanced {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid var(--border-cell);
  animation: notesFilterExpand 0.15s ease-out;
}

@keyframes notesFilterExpand {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.notes-filter-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.notes-filter-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1 1 140px;
  min-width: 0;
}

.notes-filter-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.notes-filter-item select,
.notes-filter-item input[type='date'] {
  padding: 8px 10px;
  border: 1px solid var(--border-cell);
  border-radius: 6px;
  background: var(--bg-container);
  color: var(--text-main);
  font: inherit;
  font-size: 13px;
}

.notes-display-toggle {
  align-self: center;
  padding: 8px 16px;
  border: 1px solid var(--border-cell);
  border-radius: 8px;
  background: var(--bg-controls);
  color: var(--text-main);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.notes-display-toggle:hover {
  background: var(--bg-info);
  border-color: var(--text-header);
}

.notes-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.note-list-row {
  display: grid;
  grid-template-columns: 140px auto 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  background: var(--bg-cell);
  border: 1px solid var(--border-cell);
  border-radius: 10px;
  transition: border-color 0.15s;
}

.note-list-row:hover {
  border-color: var(--text-header);
}

.note-list-date {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
}

.note-list-chips {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
}

.note-list-brigade {
  display: inline-block;
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}

.note-list-brigade.b-A {
  background: var(--brig-A);
}
.note-list-brigade.b-B {
  background: var(--brig-B);
}
.note-list-brigade.b-C {
  background: var(--brig-C);
}
.note-list-brigade.b-D {
  background: var(--brig-D);
}

.note-list-chips .shift-chip {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  text-align: center;
}
.note-list-chips .shift-chip.R {
  background: var(--color-R);
  color: var(--color-R-text, #fff);
}
.note-list-chips .shift-chip.P {
  background: var(--color-P);
  color: var(--color-P-text, #fff);
}
.note-list-chips .shift-chip.N {
  background: var(--color-N);
  color: var(--color-N-text, #fff);
}

.shift-chip-free {
  min-width: 22px;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  border: 1px dashed var(--border-cell);
}

.note-list-tag {
  font-size: 14px;
  padding: 2px 4px;
  border-radius: 4px;
}

.note-list-text {
  font-size: 14px;
  color: var(--text-main);
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  min-width: 0;
  overflow-wrap: anywhere;
}

.note-list-text:hover {
  background: var(--bg-hover, var(--bg-controls));
}

.note-list-text:focus-visible {
  outline: 2px solid var(--text-header);
  outline-offset: 2px;
}

.note-list-empty-text {
  color: var(--text-muted);
  font-style: italic;
}

.note-list-edit-input {
  width: 100%;
  padding: 4px 6px;
  border: 1px solid var(--text-header);
  border-radius: 4px;
  background: var(--bg-container);
  color: var(--text-main);
  font: inherit;
  font-size: 14px;
}

.note-list-actions {
  display: flex;
  gap: 4px;
  flex-shrink: 0;
}

.note-list-jump,
.note-list-delete {
  width: 32px;
  height: 32px;
  border: none;
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 15px;
  cursor: pointer;
  transition:
    background 0.15s,
    color 0.15s;
}

.note-list-jump:hover {
  background: var(--bg-info);
  color: var(--text-header);
}

.note-list-delete:hover {
  background: rgba(192, 57, 43, 0.15);
  color: #c0392b;
}

.notes-empty-state {
  padding: 40px 20px;
  text-align: center;
  color: var(--text-muted);
  background: var(--bg-cell);
  border: 2px dashed var(--border-cell);
  border-radius: 10px;
}

.notes-empty-state p {
  margin: 0 0 12px;
  font-size: 15px;
}

/* Mobile: stack row vertically on narrow screens */
@media (max-width: 600px) {
  .note-list-row {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'date actions'
      'chips chips'
      'text text';
    gap: 8px;
  }
  .note-list-date {
    grid-area: date;
  }
  .note-list-chips {
    grid-area: chips;
  }
  .note-list-text {
    grid-area: text;
  }
  .note-list-actions {
    grid-area: actions;
  }

  .notes-filter-search {
    font-size: 13px;
  }
}
