.advanced-list-page {
  display: grid;
  gap: 16px;
}

.list-filter-panel {
  padding: 18px 20px;
}

.list-filter-grid {
  display: grid;
  grid-template-columns: minmax(260px, 1.4fr) repeat(4, minmax(150px, 1fr)) auto;
  gap: 12px;
  align-items: end;
}

.list-filter-grid label {
  min-width: 0;
}

.list-filter-grid label span,
.list-toolbar label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.list-filter-grid input,
.list-filter-grid select,
.list-toolbar select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--panel);
  color: var(--text);
  padding: 0 12px;
}

.search-field {
  position: relative;
}

.search-field i {
  position: absolute;
  right: 14px;
  bottom: 11px;
  color: var(--muted);
  font-style: normal;
}

.search-field input {
  padding-right: 38px;
}

.reset-filters {
  height: 42px;
  white-space: nowrap;
  padding: 0 14px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.summary-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  align-items: center;
  text-align: left;
  min-height: 72px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.52);
  padding: 13px 14px;
  color: var(--text);
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.summary-card:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 174, 0.26);
  box-shadow: 0 12px 28px rgba(37, 67, 102, 0.08);
}

.summary-card.active {
  background: rgba(20, 184, 174, 0.08);
  border-color: rgba(20, 184, 174, 0.34);
  box-shadow: 0 14px 32px rgba(20, 184, 174, 0.1);
}

.summary-card b {
  font-size: 12px;
}

.summary-card strong {
  grid-column: 2;
  font-size: 18px;
}

.status-dot,
.priority-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  background: #7a8aa2;
}

.status-dot.info,
.priority-dot.info {
  background: #2f86ff;
}

.status-dot.work,
.priority-dot.work {
  background: #14b8ae;
}

.status-dot.review,
.priority-dot.review {
  background: #a044e8;
}

.status-dot.done,
.priority-dot.done {
  background: #18b96f;
}

.status-dot.danger,
.priority-dot.danger,
.priority-dot.high {
  background: #f04444;
}

.priority-dot.medium {
  background: #f5a400;
}

.priority-dot.muted {
  background: #94a3b8;
}

.list-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.list-toolbar label {
  display: flex;
  align-items: center;
  gap: 9px;
}

.list-toolbar select {
  height: 36px;
  min-width: 112px;
}

.view-toggle {
  display: flex;
  gap: 6px;
}

.view-toggle button {
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 900;
}

.view-toggle button.active {
  background: linear-gradient(135deg, #14b8ae, #0e9b96);
  border-color: transparent;
  color: #fff;
}

.list-table-card {
  padding: 14px;
}

.list-row-card {
  display: grid;
  grid-template-columns: 34px 14px minmax(250px, 1.5fr) minmax(180px, 0.85fr) minmax(105px, 0.55fr) minmax(140px, 0.7fr) 112px 42px;
  gap: 14px;
  align-items: center;
  min-height: 82px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.54);
  padding: 14px 16px;
  margin-bottom: 10px;
  cursor: pointer;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.list-row-card:last-child {
  margin-bottom: 0;
}

.list-row-card:hover {
  transform: translateY(-1px);
  border-color: rgba(20, 184, 174, 0.24);
  box-shadow: 0 14px 30px rgba(37, 67, 102, 0.08);
}

.list-row-card:focus-visible {
  outline: 2px solid rgba(20, 184, 174, 0.55);
  outline-offset: 2px;
}

.row-check input {
  width: 20px;
  height: 20px;
  accent-color: #14b8ae;
}

.row-main {
  min-width: 0;
}

.row-main b {
  display: block;
  color: var(--text);
  font-size: 13px;
  line-height: 1.28;
}

.row-main p {
  margin: 5px 0 6px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.row-main small {
  color: var(--muted);
  font-size: 11px;
}

.row-person {
  display: grid;
  grid-template-columns: 38px 1fr;
  column-gap: 9px;
  align-items: center;
  min-width: 0;
}

.row-person span {
  grid-row: 1 / 3;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #dbf7f3;
  color: #078e86;
  font-weight: 900;
}

.row-person b {
  font-size: 12px;
  line-height: 1.25;
}

.row-person small {
  font-size: 10px;
  color: var(--muted);
  line-height: 1.3;
}

.row-center {
  justify-self: start;
  background: #f1f7ff;
  color: #577095;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
}

.row-date {
  display: grid;
  gap: 2px;
  font-size: 11px;
  color: var(--text);
  font-weight: 900;
}

.row-date em {
  font-style: normal;
  color: #f04444;
  font-size: 10px;
}

.row-date.danger {
  color: #d72f3f;
}

.status-badge {
  justify-self: start;
  border-radius: 9px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 900;
  background: #eef3f8;
  color: #60718a;
}

.status-badge.work {
  background: #dcf8ef;
  color: #078e86;
}

.status-badge.done {
  background: #dcf8ef;
  color: #12965b;
}

.status-badge.info {
  background: #e4f0ff;
  color: #287ee7;
}

.status-badge.review {
  background: #f1e4ff;
  color: #8a3ed8;
}

.status-badge.danger {
  background: #ffe8ea;
  color: #e23545;
}

.status-badge.muted {
  background: #eef1f5;
  color: #74829a;
}

.row-menu {
  width: 38px;
  height: 38px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--muted);
  font-size: 20px;
  font-weight: 900;
}

.row-menu:hover {
  background: rgba(20, 184, 174, 0.09);
  border-color: rgba(20, 184, 174, 0.18);
  color: var(--brand);
}

.list-pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
}

.list-pagination div {
  display: flex;
  gap: 7px;
}

.list-pagination button {
  min-width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
  color: var(--muted);
  font-weight: 900;
}

.list-pagination button.active {
  background: linear-gradient(135deg, #14b8ae, #0e9b96);
  color: #fff;
  border-color: transparent;
}

.list-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.action-menu-dialog {
  padding: 18px;
  display: grid;
  gap: 8px;
  background: var(--panel);
  border-radius: 16px;
  border: 1px solid var(--line);
}

.action-menu-dialog h2 {
  font-size: 16px;
  margin: 0 0 4px;
}

.action-menu-dialog button {
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.5);
  font-weight: 800;
}

.action-menu-dialog button:hover {
  border-color: rgba(20, 184, 174, 0.28);
  background: rgba(20, 184, 174, 0.08);
}

.announcement-list-row {
  grid-template-columns: 34px 14px minmax(260px, 1.6fr) minmax(180px, 0.85fr) minmax(115px, 0.58fr) minmax(142px, 0.72fr) 118px 42px;
}

.list-row-card.is-muted {
  opacity: 0.72;
}

.list-row-card.is-overdue {
  border-color: rgba(240, 68, 68, 0.18);
}

.top-new-button {
  white-space: nowrap;
}

[data-theme="dark"] .list-filter-panel,
[data-theme="dark"] .list-table-card {
  background: linear-gradient(180deg, rgba(23, 36, 53, 0.96), rgba(18, 30, 45, 0.94));
  border-color: var(--line);
}

[data-theme="dark"] .list-filter-grid input,
[data-theme="dark"] .list-filter-grid select,
[data-theme="dark"] .list-toolbar select,
[data-theme="dark"] .view-toggle button,
[data-theme="dark"] .list-pagination button {
  background: #101c2c;
  border-color: var(--line);
  color: var(--text);
}

[data-theme="dark"] .summary-card,
[data-theme="dark"] .list-row-card {
  background: rgba(28, 42, 60, 0.52);
  border-color: var(--line);
  box-shadow: none;
}

[data-theme="dark"] .summary-card:hover,
[data-theme="dark"] .list-row-card:hover {
  background: rgba(34, 50, 71, 0.58);
  border-color: rgba(173, 195, 222, 0.22);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .summary-card.active {
  background: rgba(24, 196, 181, 0.14);
  border-color: rgba(24, 196, 181, 0.34);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .row-person span {
  background: rgba(24, 196, 181, 0.14);
  color: #5ee4d6;
}

[data-theme="dark"] .row-center {
  background: #20324a;
  color: #aebbd0;
}

[data-theme="dark"] .row-date {
  color: var(--text);
}

[data-theme="dark"] .status-badge {
  background: #20324a;
  color: #aebbd0;
}

[data-theme="dark"] .status-badge.work,
[data-theme="dark"] .status-badge.done {
  background: rgba(24, 196, 181, 0.14);
  color: #5ee4d6;
}

[data-theme="dark"] .status-badge.info {
  background: rgba(80, 150, 255, 0.14);
  color: #8dbbff;
}

[data-theme="dark"] .status-badge.review {
  background: rgba(160, 68, 232, 0.15);
  color: #d2a5ff;
}

[data-theme="dark"] .status-badge.danger {
  background: rgba(240, 68, 68, 0.14);
  color: #ff9ba5;
}

[data-theme="dark"] .action-menu-dialog {
  background: linear-gradient(180deg, #172435, #121e2d);
  border-color: var(--line);
}

[data-theme="dark"] .action-menu-dialog button {
  background: rgba(28, 42, 60, 0.58);
  border-color: var(--line);
  color: var(--text);
}

[data-theme="dark"] .action-menu-dialog button:hover {
  background: var(--surface-hover);
  border-color: rgba(24, 196, 181, 0.28);
}

@media (max-width: 1180px) {
  .list-filter-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .reset-filters {
    width: 100%;
  }

  .summary-strip {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .list-row-card {
    grid-template-columns: 28px 12px minmax(220px, 1fr) minmax(150px, 0.8fr) 96px 118px 106px 38px;
    gap: 10px;
  }

  .row-center,
  .row-date {
    font-size: 10px;
  }
}

@media (max-width: 760px) {
  .advanced-list-page {
    padding-left: 14px !important;
    padding-right: 14px !important;
    gap: 12px;
  }

  .top-new-button {
    padding: 9px 11px;
    font-size: 0;
  }

  .top-new-button::after {
    content: "+";
    font-size: 18px;
  }

  .list-filter-panel {
    padding: 14px;
    border-radius: 16px;
  }

  .list-filter-grid {
    grid-template-columns: 1fr 1fr;
    gap: 10px;
  }

  .list-filter-grid .search-field {
    grid-column: 1 / -1;
  }

  .list-filter-grid label span {
    font-size: 10px;
  }

  .list-filter-grid input,
  .list-filter-grid select {
    height: 40px;
  }

  .summary-strip {
    display: flex;
    overflow-x: auto;
    gap: 10px;
    margin-left: -14px;
    margin-right: -14px;
    padding-left: 14px;
    padding-right: 14px;
    scroll-snap-type: x mandatory;
  }

  .summary-card {
    min-width: 142px;
    scroll-snap-align: start;
    min-height: 66px;
  }

  .list-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .list-toolbar label {
    justify-content: space-between;
  }

  .view-toggle {
    display: none;
  }

  .list-table-card {
    padding: 10px;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  .list-row-card,
  .announcement-list-row {
    display: grid;
    grid-template-columns: 14px 1fr 38px;
    gap: 8px;
    align-items: start;
    min-height: 0;
    padding: 14px;
    margin-bottom: 10px;
    background: var(--panel);
    border-radius: 16px;
  }

  .row-check {
    display: none;
  }

  .priority-dot {
    margin-top: 6px;
  }

  .row-main {
    grid-column: 2;
    grid-row: 1;
  }

  .row-main b {
    font-size: 14px;
  }

  .row-main p {
    font-size: 12px;
  }

  .row-person {
    grid-column: 2;
    grid-row: 2;
    display: block;
  }

  .row-person span {
    display: none;
  }

  .row-person b {
    font-size: 12px;
  }

  .row-center {
    grid-column: 2;
    grid-row: 3;
    justify-self: start;
  }

  .row-date {
    grid-column: 2;
    grid-row: 4;
  }

  .status-badge {
    grid-column: 2;
    grid-row: 5;
    justify-self: start;
  }

  .row-menu {
    grid-column: 3;
    grid-row: 1;
    width: 34px;
    height: 34px;
  }

  .list-pagination {
    display: grid;
    gap: 10px;
    text-align: center;
  }

  .list-pagination div {
    justify-content: center;
  }

  .list-pagination span {
    font-size: 11px;
  }

  .reset-filters {
    grid-column: 1 / -1;
  }

  .action-menu-dialog {
    width: 100%;
  }
}
