﻿* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: var(--font-family-body);
}

.mobile-title,
.sidebar-title,
.modal-card-title,
.main-title,
.filters-accordion-title,
.completed-title,
.panel-title,
.search-title,
.admin-title,
.admin-section-title,
.admin-modal-title {
  font-family: var(--font-family-heading);
}

body {
  font-family: var(--font-family-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: background-color 0s ease, color 0s ease;
}
body.sidebar-open {
  overflow: hidden;
}

/* Global keyboard focus ring (material runtime) */
body.theme-material :where(
  button,
  a[href],
  input:not([type="hidden"]),
  select,
  textarea,
  [role="button"],
  .custom-select-trigger
):focus-visible {
  outline: 2px solid var(--color-focus-border);
  outline-offset: 2px;
}

/* Shared checkbox primitive.
   Keep task-card-selection-checkbox separate: it is a large bulk-select control. */
body.theme-material input[type="checkbox"]:not(.task-card-selection-checkbox) {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  margin: 0;
  border: 2px solid #d4d4d8;
  border-radius: 2px;
  background: #fff;
  box-sizing: border-box;
  position: relative;
  cursor: pointer;
  transition: border-color 0.16s ease, background-color 0.16s ease, box-shadow 0.16s ease;
}

body.theme-material input[type="checkbox"]:not(.task-card-selection-checkbox)::before {
  content: none;
}

body.theme-material input[type="checkbox"]:not(.task-card-selection-checkbox):checked {
  border-color: #2563eb;
  background: #2563eb;
}

body.theme-material input[type="checkbox"]:not(.task-card-selection-checkbox):checked::after {
  content: "";
  position: absolute;
  left: 4px;
  top: 1px;
  width: 4px;
  height: 8px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

body.theme-material input[type="checkbox"]:not(.task-card-selection-checkbox):focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.22);
}

body.theme-material input[type="checkbox"]:not(.task-card-selection-checkbox):disabled {
  border-color: #e5e7eb;
  background: #f3f4f6;
  cursor: not-allowed;
}

body.theme-material.dark-theme input[type="checkbox"]:not(.task-card-selection-checkbox) {
  border-color: #52525b;
  background: #18181b;
}

body.theme-material.dark-theme input[type="checkbox"]:not(.task-card-selection-checkbox):checked {
  border-color: #6366f1;
  background: #6366f1;
}

body.theme-material.dark-theme input[type="checkbox"]:not(.task-card-selection-checkbox):disabled {
  border-color: #475569;
  background: #1f2937;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--color-scrollbar-track);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb {
  background: var(--color-scrollbar-thumb);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: var(--color-scrollbar-thumb-hover);
}
::-webkit-scrollbar-thumb:active {
  background: var(--color-scrollbar-thumb-active);
}

html {
  scrollbar-width: thin;
  scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track);
}

/* Explicit scrollbar styling for key scroll containers (desktop + panel areas) */
:is(.main, .sidebar-scroll-wrap, .right-panel, .search-panel-body) {
  scrollbar-width: thin;
  scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track);
}

:is(.main, .sidebar-scroll-wrap, .right-panel, .search-panel-body)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

:is(.main, .sidebar-scroll-wrap, .right-panel, .search-panel-body)::-webkit-scrollbar-track {
  background: var(--color-scrollbar-track);
  border-radius: 8px;
}

:is(.main, .sidebar-scroll-wrap, .right-panel, .search-panel-body)::-webkit-scrollbar-thumb {
  background: var(--color-scrollbar-thumb);
  border-radius: 8px;
  border: 2px solid var(--color-scrollbar-track);
}

:is(.main, .sidebar-scroll-wrap, .right-panel, .search-panel-body)::-webkit-scrollbar-thumb:hover {
  background: var(--color-scrollbar-thumb-hover);
}

:is(.main, .sidebar-scroll-wrap, .right-panel, .search-panel-body)::-webkit-scrollbar-thumb:active {
  background: var(--color-scrollbar-thumb-active);
}

.mobile-topbar {
  display: none;
  height: 56px;
  background: var(--color-bg-surface);
  border-bottom: 1px solid var(--color-border-default);
  transition: background-color 0s ease, border-color 0s ease, color 0s ease;
  padding: 0 var(--space-4);
  align-items: center;
  justify-content: space-between;
  position: relative;
}

.mobile-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--size-touch-min);
  height: var(--size-touch-min);
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  color: inherit;
  position: relative;
  z-index: 1;
}
.mobile-menu-btn-icon {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: block;
  width: var(--icon-size-lg);
  height: var(--icon-size-lg);
  transition: opacity 0.2s ease;
}
.mobile-menu-btn-icon-close {
  opacity: 0;
  pointer-events: none;
}
body.sidebar-open .mobile-menu-btn-icon-burger {
  opacity: 0;
  pointer-events: none;
}
body.sidebar-open .mobile-menu-btn-icon-close {
  opacity: 1;
  pointer-events: auto;
}

.mobile-title {
  font-size: 18px;
  font-weight: var(--font-weight-semibold);
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  max-width: calc(100% - 110px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mobile-bottom-nav {
  display: none;
}

.app-container {
  display: flex;
  flex: 1;
  min-height: 0;
  width: 100%;
}

.modal-btn {
  padding: 12px 16px;
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--text-lg);
  font-weight: var(--font-weight-medium);
  cursor: pointer;
  text-align: left;
  transition: background 0s;
}
.modal-btn-rename {
  background: var(--color-bg-muted);
  color: var(--color-text-primary);
}
.modal-btn-rename:hover {
  background: var(--color-brand-primary-soft);
  color: var(--color-brand-primary);
}
.modal-btn-delete {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}
.modal-btn-delete:hover {
  background: var(--color-danger-soft);
}

.modal-rename-form .modal-label {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: 8px;
}
.modal-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-lg);
  margin-bottom: 16px;
  box-sizing: border-box;
}
.modal-input:focus {
  outline: none;
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 2px var(--color-focus-ring);
}
.modal-form-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
}
.modal-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 12px 0;
}
.list-access-section {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--color-border-default);
}
.list-access-section .modal-label {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-primary);
  margin-bottom: 4px;
}
.list-access-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 12px 0 8px;
}
.list-access-group-title {
  font-size: var(--text-sm);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  margin: 12px 0 4px;
}
.list-access-group-title:first-child {
  margin-top: 0;
}
.list-access-checkboxes {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding-right: 8px;
  scrollbar-width: thin;
  scrollbar-color: #c8d3e6 transparent;
}

.list-access-checkboxes::-webkit-scrollbar {
  width: 8px;
}

.list-access-checkboxes::-webkit-scrollbar-track {
  background: transparent;
}

.list-access-checkboxes::-webkit-scrollbar-thumb {
  background: #c8d3e6;
  border-radius: 8px;
}

.list-access-checkboxes::-webkit-scrollbar-thumb:hover {
  background: #afbdd5;
}
.list-access-checkbox-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  padding: 6px 0;
}
.list-access-checkbox-wrap:hover {
  color: var(--color-brand-primary);
}
.list-access-checkbox-wrap input {
  width: 18px;
  height: 18px;
  cursor: pointer;
  flex-shrink: 0;
}
.modal-btn-secondary {
  background: var(--color-bg-muted) !important;
  color: var(--color-text-primary) !important;
}
.modal-btn-secondary:hover {
  background: var(--color-border-default) !important;
}
.modal-btn-primary {
  background: var(--color-brand-primary) !important;
  color: var(--color-brand-primary-foreground, var(--color-primary-foreground)) !important;
}
.modal-btn-primary:hover {
  background: var(--color-brand-primary-hover) !important;
}
.modal-confirm-text {
  margin: 0 0 20px 0;
  font-size: var(--text-lg);
  color: var(--color-text-primary);
  line-height: 1.4;
}
.modal-btn-success {
  background: var(--color-success) !important;
  color: var(--color-brand-primary-foreground) !important;
}
.modal-btn-success:hover {
  background: var(--color-success) !important;
  filter: brightness(0.95);
}
.modal-btn-danger {
  background: var(--color-danger) !important;
  color: var(--color-brand-primary-foreground) !important;
}
.modal-btn-danger:hover {
  background: var(--color-danger) !important;
}

.main {
  position: relative;
  flex: 1;
  min-height: 0;
  padding: var(--space-8);
  overflow-y: auto;
  overflow-x: hidden;
  background: #ffffff;
  transition: background-color 0s ease, color 0s ease;
}

body.theme-material #list-actions-modal {
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}

body.theme-material #list-actions-modal .modal-card {
  max-height: 86vh;
}

body.theme-material #list-actions-modal .modal-card-wide {
  max-width: 520px;
}

body.theme-material #list-actions-modal .modal-card-body {
  max-height: calc(86vh - 70px);
  overflow-y: auto;
}

body.theme-material.dark-theme .list-access-checkboxes {
  scrollbar-color: #475569 transparent;
}

body.theme-material.dark-theme .list-access-checkboxes::-webkit-scrollbar-thumb {
  background: #475569;
}

body.theme-material.dark-theme .list-access-checkboxes::-webkit-scrollbar-thumb:hover {
  background: #64748b;
}

.main-watermark {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.main-watermark-line {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 1px;
  background: var(--color-border-default);
}

.main-title {
  font-size: var(--text-3xl);
  transition: color 0s ease;
  font-weight: var(--font-weight-semibold);
  margin-bottom: 20px;
  position: relative;
  z-index: 1;
}

@keyframes refreshSpin {
  to { transform: rotate(360deg); }
}

.add-task-input {
  width: 100%;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  padding: 14px 20px;
  font-size: 16px;
  margin-bottom: 20px;
  color: var(--color-text-secondary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  transition: background-color 0s ease, border-color 0s ease, color 0s ease;
}

.add-task-input:hover {
  background: var(--color-bg-surface-alt);
}

.add-task-input .add-task-plus {
  font-size: var(--text-2xl);
  font-weight: var(--font-weight-semibold);
  line-height: 1;
  margin-left: auto;
}

@keyframes taskCardNew {
  0% { background: var(--color-success-soft); box-shadow: inset 4px 0 0 var(--color-success); }
  100% { background: var(--color-bg-surface); box-shadow: none; }
}

.due-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.due-row input[type="date"],
.due-row input[type="time"] {
  padding: 8px 12px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
}
.due-row input[type="date"] { min-width: 140px; }
.due-row input[type="time"] { min-width: 80px; }
.due-clear-btn {
  padding: 6px 10px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text-muted);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}
.due-clear-btn:hover {
  background: var(--color-bg-muted);
  color: var(--color-text-primary);
}

.due-picker-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.due-picker-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-size: var(--text-md);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.due-picker-btn:hover {
  border-color: var(--color-focus-border);
  background: var(--color-bg-surface-alt);
}
.due-picker-arrow {
  font-size: 10px;
  opacity: 0.7;
}
.due-picker-wrap .due-clear-btn {
  flex-shrink: 0;
}

#due-picker-modal.open {
  align-items: center;
  padding: 20px;
}
.modal-due-picker {
  max-width: 320px;
}
.modal-due-picker-body {
  padding: 12px 20px 20px;
  gap: 12px;
}
.due-picker-calendar {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.due-picker-month-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
}
.due-picker-nav {
  padding: 2px 6px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--color-text-primary);
  font-size: 14px;
  cursor: pointer;
}
.due-picker-nav:hover {
  background: var(--color-bg-muted);
}
#due-month-label {
  font-weight: 600;
  font-size: 12px;
}
.due-picker-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
  font-size: 10px;
  color: var(--color-text-muted);
  text-align: center;
}
.due-picker-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.due-picker-day {
  aspect-ratio: 1;
  min-width: 28px;
  min-height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  border-radius: var(--radius-sm);
}
.due-picker-day-empty {
  visibility: hidden;
}
.due-picker-day-btn {
  border: none;
  background: transparent;
  color: var(--color-text-primary);
  cursor: pointer;
  transition: background 0.15s;
}
.due-picker-day-btn:hover {
  background: var(--color-bg-muted);
}
.due-picker-day-btn.today {
  font-weight: 600;
  color: var(--color-brand-primary);
}
.due-picker-day-btn.selected {
  background: var(--color-brand-primary);
  color: var(--color-brand-primary-foreground);
}
.due-picker-time {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--color-bg-muted);
}
.due-picker-time-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--color-text-muted);
}
.due-picker-time-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.due-time-chip {
  padding: 6px 12px;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.due-time-chip:hover {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-primary-soft);
}
.due-time-chip.selected {
  border-color: var(--color-brand-primary);
  background: var(--color-brand-primary-soft);
  color: var(--color-brand-primary);
}
.modal-due-picker-actions {
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid var(--color-bg-muted);
  justify-content: space-between;
}
.modal-due-picker-actions .modal-btn-primary:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.due-picker-time-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.task-tags-chip-wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  align-content: flex-start;
  justify-content: flex-start;
  gap: 8px;
  padding: 8px 12px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  min-height: 44px;
  transition: border-color 0s ease, box-shadow 0s ease;
}
.task-tags-chip-wrap:hover {
  border-color: var(--color-focus-border);
}
.task-tags-chip-wrap:focus-within {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 2px var(--color-focus-ring);
}
.task-tags-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 0 1 auto;
  min-width: 0;
}
.task-tags-chip-wrap .chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--text-sm);
  color: var(--color-brand-primary);
  background: var(--color-brand-primary-soft);
  padding: 4px 8px 4px 10px;
  border-radius: var(--radius-md);
  border: 1px solid color-mix(in srgb, var(--color-brand-primary) 30%, transparent);
}
.task-tags-chip-wrap .chip-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--color-brand-primary);
  cursor: pointer;
  border-radius: var(--radius-md);
  font-size: var(--text-md);
  line-height: 1;
}
.task-tags-chip-wrap .chip-remove:hover {
  background: var(--color-brand-primary-soft);
  color: var(--color-brand-accent);
}
.task-tags-chip-wrap .task-tags-select {
  flex: 1 1 180px;
  min-width: 160px;
  width: auto;
  height: auto;
  border: none;
  outline: none;
  padding: 4px 0;
  font-size: var(--text-md);
  background: transparent;
}
.task-tags-select {
  cursor: pointer;
  color: var(--color-text-primary);
  text-align: left;
  text-align-last: left;
}
.label-hint {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  font-weight: normal;
}

.completed-title {
  margin-top: 40px;
  margin-bottom: 14px;
  font-size: 16px;
  color: var(--color-text-secondary);
  transition: color 0s ease;
}

.completed .task-title {
  text-decoration: line-through;
  color: var(--color-text-muted);
}

body.selection-mode .main {
  padding-bottom: max(80px, 60px + env(safe-area-inset-bottom, 0px));
}

.completed-load-more-wrap {
  margin-top: 16px;
  margin-bottom: 24px;
  text-align: center;
}
.completed-load-more-btn {
  padding: 10px 24px;
  font-size: var(--text-md);
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-surface);
  color: var(--color-text-primary);
  cursor: pointer;
}
.completed-load-more-btn:hover {
  background: var(--color-bg-surface-alt);
  border-color: var(--color-border-default);
}

@keyframes save-spin {
  to { transform: rotate(360deg); }
}

.panel-section {
  margin-bottom: 20px;
  padding: 16px 18px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-surface-alt);
  transition: background-color 0s ease, border-color 0s ease, color 0s ease;
}

.panel-section label {
  display: block;
  font-weight: var(--font-weight-semibold);
  margin-bottom: 8px;
}

.assignees-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}
.assignee-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 8px 4px 4px;
  border-radius: var(--radius-md);
  background: var(--color-bg-muted);
  border: 1px solid var(--color-border-default);
  font-size: var(--text-base);
}
.assignee-chip-avatar {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--color-brand-accent-soft) 0%, var(--color-brand-primary-soft) 100%);
  color: var(--color-brand-accent);
  font-family: var(--font-family-body);
  font-size: var(--text-xs);
  font-weight: var(--font-weight-semibold);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.assignee-chip-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.assignee-chip-remove {
  width: 22px;
  height: 22px;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--color-text-secondary);
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.assignee-chip-remove:hover {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}
.assignee-select {
  width: 100%;
  max-width: 260px;
}

.panel-section input,
.panel-section textarea,
.panel-section select {
  width: 100%;
  padding: var(--space-3);
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  transition: background-color 0s ease, border-color 0s ease, color 0s ease;
  background: var(--color-bg-surface);
}
.panel-section .field-with-prefix input {
  border-radius: 0 !important;
  border: none !important;
  box-shadow: none !important;
}
.panel-section .task-tags-chip-wrap #task-tags-input,
.panel-section .task-tags-chip-wrap #task-tags-input:focus,
.panel-section .task-tags-chip-wrap .task-tags-select,
.panel-section .task-tags-chip-wrap .task-tags-select:focus {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

textarea {
  min-height: 90px;
  resize: none;
  font-size: var(--text-lg);
  line-height: 1.4;
}

.char-counter {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  text-align: right;
  margin-top: 4px;
}

.panel-section-task-summary > label {
  margin-bottom: 12px;
  font-weight: 600;
  color: var(--color-text-primary);
}
.task-summary {
  padding: 0;
  border-radius: 12px;
  background: var(--color-bg-surface);
  border: 1px solid var(--color-border-default);
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow: hidden;
}
.task-summary-group {
  padding: 12px 16px;
}
.task-summary-group-single {
  padding: 12px 16px;
}
.task-summary-row {
  display: grid;
  grid-template-columns: 115px 1fr;
  gap: 12px;
  align-items: start;
  padding: 8px 0;
  border-bottom: 1px solid var(--color-border-strong);
  line-height: 1.45;
}
.task-summary-row:last-child {
  border-bottom: none;
}
.task-summary-label {
  font-size: 12px;
  color: var(--color-text-secondary);
  font-weight: 500;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}
.task-summary-icon {
  flex-shrink: 0;
  width: 14px;
  height: 14px;
  opacity: 0.7;
}
.task-summary-icon-flag {
  opacity: 1;
}
.task-summary-value {
  font-size: 14px;
  color: var(--color-text-primary);
  word-break: break-word;
  min-width: 0;
}
.task-summary-priority-badge {
  display: inline-block;
  width: fit-content;
  padding: 2px 10px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 12px;
}
.task-summary-priority-1 { background: var(--color-danger-soft); color: var(--color-danger); }
.task-summary-priority-2 { background: color-mix(in srgb, var(--chart-5) 16%, transparent); color: var(--chart-5); }
.task-summary-priority-3 { background: var(--color-success-soft); color: var(--color-success); }
.task-summary-tags-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.task-summary-tag-chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--color-text-secondary);
  background: var(--color-bg-muted);
  border-radius: 8px;
}
.task-summary-assignees-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.task-summary-assignees-wrap .task-summary-assignee-chip + .task-summary-assignee-chip {
  margin-left: 8px;
}
.task-summary-tags-wrap .task-summary-tag-chip + .task-summary-tag-chip {
  margin-left: 8px;
}
.task-summary-assignee-chip {
  display: inline-block;
  padding: 2px 8px;
  font-size: 12px;
  color: var(--color-text-secondary);
  background: var(--color-bg-muted);
  border-radius: 8px;
}

.address-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 12px 0;
}

.field-required {
  color: var(--color-danger);
}

.field-login-toggle-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.field-login-toggle-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

.toggle-switch {
  position: relative;
  width: 44px;
  height: 24px;
  padding: 0;
  border: none;
  background: none;
  cursor: pointer;
  border-radius: 12px;
}

.toggle-switch-track {
  position: absolute;
  inset: 0;
  background: var(--color-border-default);
  border-radius: 12px;
  transition: background 0.2s ease;
}

.toggle-switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--color-bg-surface);
  border-radius: 50%;
  box-shadow: var(--shadow-1);
  transition: transform 0.2s ease;
}

.toggle-switch[aria-checked="true"] .toggle-switch-track {
  background: var(--color-brand-primary);
}

.toggle-switch[aria-checked="true"] .toggle-switch-thumb {
  transform: translateX(20px);
}

.toggle-switch:hover .toggle-switch-track {
  background: var(--color-text-muted);
}

.toggle-switch[aria-checked="true"]:hover .toggle-switch-track {
  background: var(--color-brand-primary-hover);
}

.field input:focus {
  background: var(--color-bg-surface);
  border-color: var(--color-brand-primary);
  outline: none;
}

@keyframes savedFlash {
  0% { background: var(--color-success-soft); }
  100% { background: var(--color-bg-surface); }
}

@media (max-width: 900px) {
  /* Prevent iOS auto-zoom on form focus (happens when font-size < 16px). */
  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea,
  .custom-select-trigger {
    font-size: 16px !important;
  }

  html {
    overflow: hidden;
    height: 100%;
    overscroll-behavior: none;
  }
  body {
    height: 100%;
    min-height: 100dvh;
    overscroll-behavior: none;
  }
  .mobile-topbar {
    display: none;
  }

  .mobile-bottom-nav {
    position: fixed;
    left: max(22px, env(safe-area-inset-left, 0px));
    right: max(22px, env(safe-area-inset-right, 0px));
    bottom: max(14px, env(safe-area-inset-bottom, 0px));
    z-index: 2400;
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    align-items: center;
    min-height: 58px;
    padding: 4px 8px;
    border: 1px solid var(--color-border-strong);
    border-radius: 30px;
    background: var(--color-bg-surface-alt);
    box-shadow: none;
    touch-action: manipulation;
  }

  .mobile-bottom-nav.is-hidden-in-task {
    display: none;
  }

  .mobile-bottom-nav:not([data-bound="1"]) {
    pointer-events: none;
  }

  .mobile-bottom-nav-item,
  .mobile-bottom-nav-add {
    appearance: none;
    -webkit-appearance: none;
    border: none;
    background: transparent;
    color: #172554;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
    font-family: var(--font-family-body);
    touch-action: manipulation;
    user-select: none;
  }

  .mobile-bottom-nav-item,
  .mobile-bottom-nav-add {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    min-width: 0;
    min-height: 50px;
    padding: 2px 1px 0;
    color: #7e8aa3;
  }

  .mobile-bottom-nav-add {
    z-index: 1;
  }

  .mobile-bottom-nav-add .mobile-bottom-nav-icon {
    width: 40px;
    height: 40px;
    margin-top: -5px;
    border: 1px solid var(--color-brand-primary);
    border-radius: 999px;
    background: var(--color-brand-primary);
    box-shadow: none;
    color: #ffffff;
  }

  .mobile-bottom-nav-item.is-active {
    color: var(--color-brand-primary);
  }

  .mobile-bottom-nav-item.is-active .mobile-bottom-nav-icon {
    border-radius: 999px;
    background: transparent;
  }

  .mobile-bottom-nav-icon {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
  }

  .mobile-bottom-nav-icon svg {
    width: 22px;
    height: 22px;
    display: block;
  }

  .mobile-bottom-nav-label {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 11px;
    line-height: 12px;
    font-weight: 500;
  }

  .mobile-bottom-nav-add svg {
    width: 25px;
    height: 25px;
    display: block;
    color: currentColor;
  }

  .mobile-bottom-nav-badge {
    position: absolute;
    top: 3px;
    right: calc(50% - 20px);
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 999px;
    background: #2563eb;
    color: #ffffff;
    font-size: 10px;
    line-height: 16px;
    font-weight: 700;
    text-align: center;
  }

  .mobile-profile-menu {
    position: fixed;
    right: 10px;
    bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    z-index: 2450;
    display: none;
    width: min(260px, calc(100vw - 20px));
    padding: 8px;
    border: 1px solid rgba(219, 228, 241, 0.95);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.18);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  .mobile-profile-menu.open {
    display: grid;
    gap: 4px;
  }

  .mobile-profile-menu-item {
    appearance: none;
    -webkit-appearance: none;
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 12px;
    border: none;
    border-radius: 10px;
    background: transparent;
    color: #0f172a;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    text-align: left;
    cursor: pointer;
  }

  .mobile-profile-menu-item svg {
    width: 18px;
    height: 18px;
    flex: 0 0 18px;
  }

  .mobile-profile-menu-item:active,
  .mobile-profile-menu-item:hover {
    background: #f1f5f9;
  }

  .mobile-profile-menu-item-danger {
    color: #dc2626;
  }

  .app-container {
    padding-top: 0;
    min-height: 100vh;
    min-height: 100dvh;
    overflow: hidden;
  }
  .main {
    -webkit-overflow-scrolling: touch;
    min-height: 0;
    flex: 1;
    overscroll-behavior-y: contain;
    overscroll-behavior-x: none;
    scroll-padding-top: env(safe-area-inset-top, 0px);
  }

  .main {
    padding: var(--space-5);
    padding-top: max(20px, 14px + env(safe-area-inset-top, 0px));
  }

  textarea {
    min-height: 100px;
  }

  .task-tags-chip-wrap {
    min-height: 48px;
    padding: 10px 14px;
  }
  .task-tags-chip-wrap .chip {
    padding: 6px 10px 6px 12px;
    font-size: var(--text-base);
  }
  .task-tags-chip-wrap .chip-remove {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    margin: -4px -4px -4px 0;
  }
  .task-tags-chip-wrap #task-tags-input {
    font-size: 16px;
    min-height: 32px;
  }
  .task-tags-chip-wrap .task-tags-select {
    font-size: 16px;
    min-width: 140px;
    width: auto;
    height: auto;
  }

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

  .completed-load-more-wrap {
    padding: 16px 20px 24px;
    padding-bottom: max(120px, calc(80px + env(safe-area-inset-bottom, 0px)));
  }
  .completed-load-more-btn {
    padding: 14px 32px;
    font-size: 16px;
    min-height: 48px;
    -webkit-tap-highlight-color: transparent;
  }
  .main {

    padding-bottom: max(120px, calc(96px + env(safe-area-inset-bottom, 0px)));
  }
}

@media (max-width: 900px) {
  body.theme-material.dark-theme .mobile-bottom-nav {
    border-color: rgba(51, 65, 85, 0.95);
    background: var(--color-bg-surface);
    box-shadow: none;
  }

  body.theme-material.dark-theme .mobile-bottom-nav-item,
  body.theme-material.dark-theme .mobile-bottom-nav-add {
    color: #a7b0c0;
  }

  body.theme-material.dark-theme .mobile-bottom-nav-item.is-active {
    color: #3b82f6;
  }

  body.theme-material.dark-theme .mobile-bottom-nav-item.is-active .mobile-bottom-nav-icon {
    background: transparent;
  }

  body.theme-material.dark-theme .mobile-bottom-nav-add .mobile-bottom-nav-icon {
    border-color: #3b82f6;
    background: #3b82f6;
    color: #ffffff;
    box-shadow: none;
  }

  body.theme-material.dark-theme .mobile-profile-menu {
    border-color: rgba(51, 65, 85, 0.95);
    background: rgba(15, 23, 42, 0.98);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.42);
  }

  body.theme-material.dark-theme .mobile-profile-menu-item {
    color: #e2e8f0;
  }

  body.theme-material.dark-theme .mobile-profile-menu-item:active,
  body.theme-material.dark-theme .mobile-profile-menu-item:hover {
    background: rgba(148, 163, 184, 0.14);
  }

  body.theme-material.dark-theme .mobile-profile-menu-item-danger {
    color: #f87171;
  }
}

.panel-section {
  margin-bottom: 24px;
}

.address-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.address-row .field {
  margin-bottom: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
}

.field-with-prefix {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--color-border-default);
  border-radius: var(--radius-md);
  background: var(--color-bg-surface);
  overflow: hidden;
  transition: border-color 0s ease, box-shadow 0s ease, background-color 0s ease;
}
.field-with-prefix:focus-within {
  border-color: var(--color-brand-primary);
  box-shadow: 0 0 0 3px var(--color-focus-ring);
}
.field-prefix {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  padding: 10px 12px;
  font-size: var(--text-base);
  font-weight: var(--font-weight-semibold);
  color: var(--color-text-secondary);
  background: var(--color-bg-surface-alt);
  border-right: 1px solid var(--color-border-default);
  min-width: 44px;
  justify-content: center;
  border-radius: 0 !important;
  box-shadow: none;
}
.field-with-prefix input {
  flex: 1;
  min-width: 0;
  border: none !important;
  background: transparent;
  padding: 10px 14px;
  font-size: var(--text-md);
  color: var(--color-text-primary);
  border-radius: 0 !important;
  box-shadow: none;
}
.field-with-prefix input::placeholder {
  color: var(--color-text-muted);
}
.field-with-prefix input:focus {
  outline: none;
}

.address-row .field-with-prefix .field-prefix {
  padding: 8px 10px;
  font-size: var(--text-sm);
  min-width: 38px;
}
.address-row .field-with-prefix input {
  padding: 8px 10px;
  font-size: var(--text-md);
}

.field-label {
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
  font-weight: var(--font-weight-medium);
}

.switch-row {
  display: flex;
  gap: 10px;
}

.switch-ip {
  flex: 2;
}

.switch-port {
  flex: 1;
}

.switch-qinq-row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

body.theme-material .notifications-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2500;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 23, 42, 0.2);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
body.theme-material .notifications-modal-overlay.open {
  display: flex;
}
body.theme-material .notifications-modal-card {
  width: min(92vw, 640px);
  max-height: min(86vh, 820px);
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid var(--color-border-default);
  background: var(--color-bg-surface);
  box-shadow: 0 12px 36px rgba(15, 23, 42, 0.18);
}
body.theme-material .notifications-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: var(--app-modal-header-padding);
  min-height: var(--app-modal-header-min-height);
}
body.theme-material .notifications-modal-title-wrap {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
body.theme-material .notifications-modal-title-icon {
  background: rgba(59, 130, 246, 0.12);
  color: var(--color-brand-primary);
}
.notifications-title {
  margin: 0;
}
body.theme-material .notifications-close {
  padding: 0;
}
body.theme-material .notifications-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 18px 24px 16px;
}
body.theme-material .notifications-body {
  scrollbar-width: thin;
  scrollbar-color: #c3cee0 transparent;
}
body.theme-material .notifications-body::-webkit-scrollbar {
  width: 8px;
}
body.theme-material .notifications-body::-webkit-scrollbar-track {
  background: transparent;
}
body.theme-material .notifications-body::-webkit-scrollbar-thumb {
  background: #c3cee0;
  border-radius: 999px;
}
body.theme-material .notifications-body::-webkit-scrollbar-thumb:hover {
  background: #a8b6cf;
}
body.theme-material .notifications-push-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.notifications-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
}
.notifications-btn-icon svg {
  display: block;
  width: 20px;
  height: 20px;
}

.notifications-btn-label {
  min-width: 0;
}
.notifications-empty {
  color: var(--color-text-muted);
  font-size: 15px;
  padding: 32px 0;
  text-align: center;
}
.notifications-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.notifications-list li {
  margin: 0;
  padding: 0;
}
body.theme-material .notification-item {
  display: block;
  width: 100%;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: rgba(248, 250, 252, 0.5);
  margin-bottom: 12px;
  padding: 0;
  cursor: pointer;
  text-align: left;
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
  color: inherit;
  font-size: 14px;
  line-height: 1.4;
}
body.theme-material .notification-item-body {
  position: relative;
  min-height: 92px;
  display: grid;
  grid-template-columns: 52px 1fr auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
}
body.theme-material .notification-item-icon-wrap {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}
body.theme-material .notification-item-icon-wrap.comment-reply {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}
body.theme-material .notification-item-icon {
  width: 22px;
  height: 22px;
}
body.theme-material .notification-item-main {
  min-width: 0;
}
body.theme-material .notification-item-title {
  font-size: 15px;
  line-height: 1.2;
  font-weight: 500;
  color: #1f2937;
  margin-bottom: 6px;
}
body.theme-material .notification-item-title .highlight {
  color: #3b82f6;
}
body.theme-material .notification-item-title .highlight-reply {
  color: #f59e0b;
}
body.theme-material .notification-item-address {
  font-size: 14px;
  line-height: 1.2;
  color: #64748b;
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
body.theme-material .notification-item-time {
  font-size: 13px;
  line-height: 1.2;
  color: #64748b;
}
body.theme-material .notification-item-unread-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  margin-top: 10px;
  background: #3b82f6;
}
body.theme-material .notification-item:not(.unread) .notification-item-unread-dot {
  opacity: 0;
}
body.theme-material .notification-item:hover {
  border-color: #c9d5e7;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.08);
}
body.theme-material .notification-item.unread {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.2);
}
body.theme-material .notification-item.unread:hover {
  border-color: #a9c3ef;
  background: #e8f0fc;
}
body.theme-material.dark-theme .notifications-modal-card {
  background: #111827;
  border-color: #1e293b;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.5);
}
body.theme-material.dark-theme .notification-item {
  border-color: #1e293b;
  background: rgba(30, 41, 59, 0.5);
}
body.theme-material.dark-theme .notification-item.unread {
  background: rgba(59, 130, 246, 0.05);
  border-color: rgba(59, 130, 246, 0.2);
}
body.theme-material.dark-theme .notification-item-title {
  color: #e2e8f0;
}
body.theme-material.dark-theme .notification-item-address,
body.theme-material.dark-theme .notification-item-time {
  color: #94a3b8;
}
body.theme-material.dark-theme .notification-item-icon-wrap {
  background: rgba(59, 130, 246, 0.2);
  color: #3b82f6;
}
body.theme-material.dark-theme .notification-item-icon-wrap.comment-reply {
  background: rgba(245, 158, 11, 0.2);
  color: #f59e0b;
}
body.theme-material.dark-theme .notification-item-title .highlight {
  color: #3b82f6;
}
body.theme-material.dark-theme .notification-item-title .highlight-reply {
  color: #f59e0b;
}
body.theme-material.dark-theme .notifications-body {
  scrollbar-color: #64748b transparent;
}
body.theme-material.dark-theme .notifications-body::-webkit-scrollbar-thumb {
  background: #64748b;
}
body.theme-material.dark-theme .notifications-body::-webkit-scrollbar-thumb:hover {
  background: #94a3b8;
}

@media (max-width: 640px) {
  body.theme-material .notifications-modal-overlay {
    padding: 20px 12px;
    align-items: center;
  }
  body.theme-material .notifications-modal-card {
    width: min(100%, 560px);
    max-height: min(82vh, 700px);
  }
  body.theme-material .notification-item-title,
  body.theme-material .notification-item-address {
    font-size: 14px;
  }
  body.theme-material .notification-item-time {
    font-size: 12px;
  }
}

.notifications-badge {
  position: absolute;
  top: 2px;
  right: 2px;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  font-size: 10px;
  font-weight: 600;
  line-height: 16px;
  text-align: center;
  color: var(--color-brand-primary-foreground);
  background: var(--color-danger);
  border-radius: 8px;
  display: none;
}
.notifications-badge:not([data-count="0"]):not([data-count=""]) {
  display: inline-block;
}

#theme-toggle-btn .theme-icon {
  display: inline-block;
}

#staff-list {
  margin-bottom: 16px;
}

.toast-viewport {
  position: fixed;
  left: 50%;
  transform: translateX(-50%);
  bottom: 20px;
  z-index: 9999;
  width: min(92vw, 480px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  border-radius: 12px;
  padding: 10px 14px;
  border: 1px solid var(--color-border-default);
  background: #f8fafc;
  color: #0f172a;
  box-shadow: none;
  opacity: 0;
  transform: translateY(10px) scale(0.98);
  transition: transform 0.22s ease, opacity 0.22s ease;
  width: min(480px, 92vw);
  max-width: 100%;
  pointer-events: auto;
}

.toast.show {
  opacity: 1;
  transform: translateY(0) scale(1);
}

.toast-icon-wrap {
  width: 22px;
  height: 22px;
  min-width: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.toast-icon-wrap svg {
  width: 22px;
  height: 22px;
  display: block;
}

.toast-content {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.toast-title {
  font-size: 18px;
  line-height: 1.1;
  font-weight: 600;
  font-family: var(--font-family-body);
  letter-spacing: -0.02em;
}

.toast-description {
  font-size: 13px;
  line-height: 1.35;
  font-weight: 400;
  font-family: var(--font-family-body);
  color: inherit;
  overflow-wrap: anywhere;
}

.toast--error {
  background: #fef2f2;
  color: #dc2626;
  border-color: #f5c4c4;
}

.toast--success {
  background: #d1fae5;
  color: #065f46;
  border-color: #10b981;
}

.toast--warning {
  background: #ffedd5;
  color: #c2410c;
  border-color: #fb923c;
}

.toast--info {
  background: #eef2ff;
  color: #3730a3;
  border-color: #c7d2fe;
}

body.dark-theme .toast {
  box-shadow: none;
}

body.dark-theme .toast--error {
  background: rgba(127, 29, 29, 0.32);
  border-color: rgba(248, 113, 113, 0.35);
  color: #fca5a5;
}

body.dark-theme .toast--success {
  background: rgba(6, 78, 59, 0.33);
  border-color: rgba(52, 211, 153, 0.35);
  color: #6ee7b7;
}

body.dark-theme .toast--warning {
  background: rgba(154, 52, 18, 0.32);
  border-color: rgba(251, 146, 60, 0.52);
  color: #fdba74;
}

body.dark-theme .toast--info {
  background: rgba(30, 58, 138, 0.35);
  border-color: rgba(96, 165, 250, 0.35);
  color: #93c5fd;
}

@media (max-width: 900px) {
  .toast-viewport {
    left: 16px;
    right: 16px;
    transform: none;
    bottom: max(16px, env(safe-area-inset-bottom, 0px));
    width: auto;
    align-items: stretch;
  }
  .toast {
    width: 100%;
    min-height: 72px;
    border-radius: 10px;
    padding: 12px 14px;
    gap: 10px;
  }
  .toast-icon-wrap {
    width: 22px;
    height: 22px;
    min-width: 22px;
  }
  .toast-icon-wrap svg {
    width: 18px;
    height: 18px;
  }
  .toast-title {
    font-size: 22px;
  }
  .toast-description {
    font-size: 16px;
  }
}

body.dark-theme {
  background: var(--color-bg-page);
  color: var(--color-text-primary);
  color-scheme: dark;
}

body:not(.dark-theme) {
  color-scheme: light;
}

html:has(body.dark-theme) {
  scrollbar-color: var(--color-scrollbar-thumb) var(--color-scrollbar-track);
  scrollbar-width: thin;
}

body.dark-theme ::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
body.dark-theme ::-webkit-scrollbar-track {
  background: var(--color-scrollbar-track);
}
body.dark-theme ::-webkit-scrollbar-thumb {
  background: var(--color-scrollbar-thumb);
  border-radius: var(--radius-md);
  border: 2px solid var(--color-scrollbar-track);
}
body.dark-theme ::-webkit-scrollbar-thumb:hover {
  background: var(--color-scrollbar-thumb-hover);
}

body.dark-theme .completed-title {
  color: var(--color-text-secondary);
}

.panel-created-by {
  display: flex;
  align-items: center;
  gap: 10px;
}

.panel-created-by-avatar {
  width: 30px;
  height: 30px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: #fff;
  background: linear-gradient(135deg, var(--avatar-start, #3b82f6), var(--avatar-end, #2563eb));
  box-shadow: 0 4px 10px rgba(37, 99, 235, 0.22);
}

.panel-created-by-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text-primary, #0f172a);
}
