﻿:root {
  color-scheme: light;
  --ink: #102033;
  --muted: #5f7187;
  --paper: #eef7ff;
  --surface: #ffffff;
  --line: #cfe1f2;
  --teal: #1687c7;
  --green: #2aa876;
  --coral: #e36d5d;
  --gold: #e4a84c;
  --steel: #5578a5;
  --shadow: 0 18px 50px rgba(30, 86, 138, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(120deg, rgba(64, 156, 255, 0.16), transparent 40%),
    linear-gradient(160deg, rgba(42, 198, 198, 0.12), transparent 44%),
    linear-gradient(180deg, #f8fcff 0%, var(--paper) 100%);
  color: var(--ink);
  font-family: "Microsoft YaHei", "Noto Sans SC", "PingFang SC", sans-serif;
  text-align: center;
}

.app {
  width: min(1520px, calc(100vw - 20px));
  margin: 0 auto;
  padding-top: 18px;
}

button,
input,
select {
  font: inherit;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 112px;
  padding: 22px 24px;
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(18, 59, 109, 0.08), rgba(42, 198, 198, 0.08)),
    rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  text-align: left;
}

.brand {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.eyebrow {
  margin: 0 0 6px;
  color: #496b8d;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin: 0;
}

h1 {
  font-size: 30px;
  line-height: 1.15;
  letter-spacing: 0;
  color: #0d2b4c;
}

.subtle {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

h2 {
  font-size: 17px;
  line-height: 1.3;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

.icon-button,
.segmented button {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  color: var(--ink);
  cursor: pointer;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.icon-button {
  display: grid;
  place-items: center;
  min-width: 42px;
  height: 42px;
  border-radius: 8px;
  font-weight: 800;
}

.icon-button:disabled {
  cursor: wait;
  opacity: 0.68;
}

.icon-button.wide {
  min-width: 58px;
}

.sync-button.is-syncing {
  animation: spin 900ms linear infinite;
}

.icon-button:hover,
.segmented button:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 135, 199, 0.55);
}

main {
  padding: 0 0 36px;
}

.snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel,
.filters,
.table-section {
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(207, 225, 242, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.metric {
  min-height: 118px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 7px;
  text-align: center;
  overflow: hidden;
}

.metric span,
.metric small,
.panel-head span,
.table-head p,
footer {
  color: var(--muted);
  font-size: 12px;
}

.metric small {
  display: none;
}

.metric strong {
  font-size: clamp(30px, 4vw, 48px);
  line-height: 1;
  letter-spacing: 0;
}

.main-metric {
  color: white;
  background: linear-gradient(135deg, #123b6d 0%, #1687c7 58%, #2ac6c6 100%);
}

.main-metric span,
.main-metric small {
  color: rgba(255, 255, 255, 0.72);
}

.attention strong {
  color: var(--coral);
}

.span-metric {
  grid-column: auto;
}

.expired-metric {
  cursor: pointer;
  background:
    linear-gradient(135deg, rgba(227, 109, 93, 0.10), rgba(232, 246, 255, 0.86)),
    rgba(255, 255, 255, 0.9);
}

.expired-metric:focus-visible {
  outline: 3px solid rgba(227, 109, 93, 0.22);
  outline-offset: 3px;
}

.expired-metric:hover,
.expired-metric:focus-visible {
  border-color: rgba(227, 109, 93, 0.48);
  transform: translateY(-1px);
}

.expiry-metric {
  position: relative;
  cursor: pointer;
  overflow: visible;
}

.expiry-metric:focus-visible {
  outline: 3px solid rgba(22, 135, 199, 0.22);
  outline-offset: 3px;
}

.expiry-metric:hover,
.expiry-metric:focus-visible {
  border-color: rgba(22, 135, 199, 0.48);
  transform: translateY(-1px);
}

.expiry-tooltip {
  position: absolute;
  right: 50%;
  top: calc(100% + 12px);
  z-index: 10;
  width: min(360px, 86vw);
  padding: 14px;
  border: 1px solid rgba(22, 135, 199, 0.26);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 20px 55px rgba(30, 86, 138, 0.18);
  color: var(--ink);
  opacity: 0;
  pointer-events: none;
  transform: translate(50%, -4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.expiry-metric:hover .expiry-tooltip,
.expiry-metric:focus-visible .expiry-tooltip,
.expiry-metric:focus-within .expiry-tooltip {
  opacity: 1;
  transform: translate(50%, 0);
}

.expiry-tooltip::before {
  content: "";
  position: absolute;
  top: -7px;
  right: calc(50% - 7px);
  width: 14px;
  height: 14px;
  background: white;
  border-left: 1px solid rgba(22, 135, 199, 0.26);
  border-top: 1px solid rgba(22, 135, 199, 0.26);
  transform: rotate(45deg);
}

.expiry-tooltip-title {
  margin-bottom: 9px;
  color: var(--teal);
  font-size: 14px;
  font-weight: 900;
}

.expiry-tooltip-list {
  display: grid;
  gap: 8px;
  max-height: 260px;
  overflow: auto;
}

.expiry-tooltip-item {
  display: grid;
  gap: 3px;
  padding: 8px;
  border-radius: 7px;
  background: #eef8ff;
  text-align: center;
}

.expiry-tooltip-item b {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.expiry-tooltip-item span,
.expiry-tooltip-foot,
.expiry-empty {
  color: var(--muted);
  font-size: 12px;
}

.expiry-tooltip-foot {
  margin-top: 10px;
  font-weight: 800;
}

.filters {
  display: grid;
  grid-template-columns: repeat(4, minmax(150px, 1fr)) minmax(112px, 0.45fr);
  gap: 12px;
  padding: 14px;
  margin-bottom: 18px;
  align-items: end;
}

.filters label {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
  text-align: center;
}

.filters span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  padding: 0 12px;
  outline: none;
  text-align: center;
  text-align-last: center;
}

input::placeholder {
  text-align: center;
}

input:focus,
select:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(22, 135, 199, 0.14);
}

.clear-filter-button {
  min-height: 40px;
  border: 1px solid rgba(22, 135, 199, 0.32);
  border-radius: 8px;
  background: linear-gradient(180deg, #edf8ff 0%, #dff1ff 100%);
  color: #0a6ca4;
  font-weight: 900;
  cursor: pointer;
  box-shadow: 0 8px 18px rgba(22, 135, 199, 0.10);
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease, box-shadow 140ms ease;
}

.clear-filter-button:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 135, 199, 0.62);
  background: linear-gradient(180deg, #e5f4ff 0%, #cfeaff 100%);
  box-shadow: 0 10px 20px rgba(22, 135, 199, 0.14);
}

.clear-filter-button:focus-visible {
  outline: 3px solid rgba(22, 135, 199, 0.18);
  outline-offset: 2px;
}

.board-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 18px;
}

.panel {
  padding: 18px;
  min-height: 270px;
}

.quick-nav {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
  padding: 18px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(207, 225, 242, 0.95);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.quick-nav-head {
  display: flex;
  justify-content: center;
  align-items: baseline;
  gap: 12px;
  text-align: center;
}

.quick-nav-head span {
  color: var(--muted);
  font-size: 12px;
}

.quick-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 430px) minmax(180px, 230px) minmax(0, 1fr);
  align-items: end;
  gap: 18px;
  width: 100%;
}

.quick-search,
.expiry-date-control {
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}

.quick-search span,
.expiry-date-control span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.quick-search {
  justify-self: start;
  width: 100%;
  max-width: 430px;
}

.expiry-date-control {
  justify-self: start;
  width: 100%;
  max-width: 230px;
}

.quick-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  min-width: 0;
}

.quick-actions-row {
  display: grid;
  grid-template-columns: minmax(112px, 1fr) auto minmax(112px, 1fr);
  align-items: center;
  gap: 14px;
}

.quick-actions-row .quick-actions {
  grid-column: 2;
}

.quick-clear-button {
  grid-column: 3;
  justify-self: end;
  min-width: 146px;
  padding: 0 18px;
}

.quick-chip {
  min-height: 38px;
  padding: 0 18px;
  border: 1px solid #cfe1f2;
  border-radius: 999px;
  background: #f7fbff;
  color: var(--ink);
  font-weight: 800;
  cursor: pointer;
  transition: transform 140ms ease, background 140ms ease, border-color 140ms ease, color 140ms ease;
}

.quick-chip:hover {
  transform: translateY(-1px);
  border-color: rgba(22, 135, 199, 0.55);
}

.quick-chip.active {
  background: #123b6d;
  border-color: #123b6d;
  color: white;
}

.quick-chip[data-quick="domesticTrademark"],
.quick-chip[data-quick="overseasTrademark"] {
  background: #e7f4ff;
  color: #246d9f;
}

.quick-chip[data-quick="copyright"] {
  background: #e8f8f4;
  color: #247b69;
}

.quick-chip[data-quick="design"] {
  background: #eef3ff;
  color: #4f67ac;
}

.quick-chip[data-quick="utility"] {
  background: #eaf6ff;
  color: #0f6fa8;
}

.quick-chip[data-quick="domain"] {
  background: #f0f5ff;
  color: #526fa8;
}

.quick-chip[data-quick="overseas"] {
  background: #e8f7fb;
  color: #237c91;
}

.quick-chip.warning {
  background: #fff6df;
  color: #a76c17;
}

.quick-chip.success {
  background: #e8f8f0;
  color: #18835a;
}

.quick-chip.danger {
  background: #fff0ee;
  color: #bd5748;
}

.quick-chip.active,
.quick-chip[data-quick].active {
  background: #123b6d;
  border-color: #123b6d;
  color: white;
}

.panel-head,
.table-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
  text-align: center;
}

.table-title {
  display: grid;
  gap: 4px;
  justify-items: center;
}

.table-head .quick-search {
  max-width: 360px;
}

.table-head .expiry-date-control {
  max-width: 190px;
}

.bar-list {
  display: grid;
  gap: 11px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(82px, 138px) minmax(110px, 1fr) 44px;
  align-items: center;
  gap: 12px;
  min-height: 30px;
  text-align: center;
}

.bar-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.track {
  height: 11px;
  border-radius: 999px;
  background: #deebf7;
  overflow: hidden;
}

.fill {
  display: block;
  height: 100%;
  width: var(--w, 0%);
  max-width: 100%;
  border-radius: inherit;
  background: var(--bar-color, var(--teal));
}

.bar-tone-0 {
  --bar-color: #1687c7;
}

.bar-tone-1 {
  --bar-color: #2ac6c6;
}

.bar-tone-2 {
  --bar-color: #5578a5;
}

.bar-tone-3 {
  --bar-color: #4aa3df;
}

.bar-tone-4 {
  --bar-color: #2aa876;
}

.bar-tone-5 {
  --bar-color: #7b8fd6;
}

.bar-tone-6 {
  --bar-color: #3b9fc2;
}

.bar-tone-7 {
  --bar-color: #6aa5e8;
}

.metric.expired-metric {
  background:
    linear-gradient(135deg, rgba(227, 109, 93, 0.14), rgba(255, 255, 255, 0.95)),
    rgba(255, 255, 255, 0.92);
  border-color: rgba(227, 109, 93, 0.24);
}

.metric.expiry-metric {
  background:
    linear-gradient(135deg, rgba(243, 146, 132, 0.12), rgba(255, 255, 255, 0.96)),
    rgba(255, 255, 255, 0.92);
  border-color: rgba(243, 146, 132, 0.20);
}

.bar-value {
  color: var(--muted);
  font-size: 12px;
  text-align: center;
}

.timeline {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  align-items: end;
  gap: 8px;
  min-height: 208px;
}

.month {
  display: grid;
  align-items: end;
  justify-items: center;
  gap: 7px;
  min-height: 188px;
}

.month-bar {
  width: 100%;
  max-width: 30px;
  height: var(--h, 8px);
  min-height: 8px;
  border-radius: 6px 6px 2px 2px;
  background: linear-gradient(180deg, #1687c7, #2ac6c6);
}

.month small {
  color: var(--muted);
  font-size: 10px;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.table-section {
  padding: 18px;
}

.segmented {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(231, 244, 255, 0.9);
  justify-content: center;
}

.segmented button {
  min-height: 34px;
  min-width: 72px;
  border-radius: 6px;
  font-size: 13px;
}

.quick-nav .quick-actions {
  justify-content: center;
}

tbody tr.clickable-row {
  cursor: pointer;
}

tbody tr.clickable-row:hover td {
  background: #f4fbff;
}

.segmented button.active {
  background: #123b6d;
  color: white;
  border-color: #123b6d;
}

.table-wrap {
  width: 100%;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

table {
  width: 100%;
  min-width: 1220px;
  border-collapse: collapse;
  background: white;
}

th,
td {
  padding: 12px 14px;
  text-align: center;
  border-bottom: 1px solid #e4eef8;
  font-size: 13px;
  vertical-align: middle;
}

th {
  white-space: nowrap;
}

td.nowrap-cell {
  white-space: nowrap;
  word-break: keep-all;
}

td.name-cell {
  width: 142px;
  max-width: 142px;
  white-space: normal;
  word-break: break-word;
  line-height: 1.35;
}

.expiring-row.flash-row {
  animation: expiryPulse 1.15s ease-in-out 4;
}

.expiring-row.flash-row td {
  background: #eef8ff;
}

.expired-row.flash-row {
  animation: expiredPulse 1.15s ease-in-out 4;
}

.expired-row.flash-row td {
  background: #fff1ee;
}

@keyframes expiryPulse {
  0% {
    box-shadow: inset 0 0 0 0 rgba(22, 135, 199, 0);
  }

  35% {
    box-shadow: inset 0 0 0 999px rgba(22, 135, 199, 0.14);
  }

  70% {
    box-shadow: inset 0 0 0 999px rgba(42, 198, 198, 0.12);
  }

  100% {
    box-shadow: inset 0 0 0 0 rgba(22, 135, 199, 0);
  }
}

@keyframes expiredPulse {
  0% {
    box-shadow: inset 0 0 0 0 rgba(227, 109, 93, 0);
  }

  35% {
    box-shadow: inset 0 0 0 999px rgba(227, 109, 93, 0.15);
  }

  100% {
    box-shadow: inset 0 0 0 0 rgba(227, 109, 93, 0);
  }
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f9ff;
  color: var(--muted);
  font-size: 12px;
}

.serial-col {
  width: 64px;
  color: var(--muted);
  font-weight: 900;
}

td:first-child {
  max-width: 80px;
}

td:nth-child(2) {
  max-width: 260px;
  font-weight: 800;
  text-align: center;
}

.pagination-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 14px 4px 0;
}

.page-size-control,
.pager-control {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  color: var(--muted);
  font-size: 13px;
}

#pageSizeSelect {
  width: auto;
  min-width: 112px;
  min-height: 34px;
  border-radius: 8px;
}

.pager-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-size: 20px;
  line-height: 1;
}

.pager-button:disabled {
  color: #9fb4c8;
  cursor: not-allowed;
  background: #edf5fc;
}

.page-input-wrap {
  display: inline-flex;
  align-items: center;
}

#pageInput {
  width: 54px;
  min-height: 34px;
  padding: 0 6px;
  border-radius: 8px;
  font-weight: 800;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 999px;
  background: #e8f4ff;
  color: #236d9f;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.status-active {
  background: #e6f8f2;
  color: #147d60;
}

.status-inactive {
  background: #fff0ee;
  color: #bd5748;
}

.territory-domestic {
  background: #e7f4ff;
  color: #246d9f;
}

.territory-overseas {
  background: #e9f8fb;
  color: #237c91;
}

.entity-active,
.entity-domestic,
.entity-tone-0 {
  background: #e8f4ff;
  color: #236d9f;
}

.entity-tone-1 {
  background: #e8f8f4;
  color: #247b69;
}

.entity-tone-2 {
  background: #eff5ff;
  color: #526fa8;
}

.entity-tone-3 {
  background: #e8f7fb;
  color: #237c91;
}

.entity-tone-4 {
  background: #f0f5ff;
  color: #5a63a8;
}

.entity-tone-5 {
  background: #eaf6ff;
  color: #0f6fa8;
}

.trademarkType-tone-0,
.trademarkCategory-tone-0 {
  background: #e7f4ff;
  color: #1f6fa8;
}

.trademarkType-tone-1,
.trademarkCategory-tone-1 {
  background: #e8f8f4;
  color: #16755f;
}

.trademarkType-tone-2,
.trademarkCategory-tone-2 {
  background: #fff4df;
  color: #a76510;
}

.trademarkType-tone-3,
.trademarkCategory-tone-3 {
  background: #eef1ff;
  color: #5362b4;
}

.trademarkType-tone-4,
.trademarkCategory-tone-4 {
  background: #fff0ee;
  color: #bd5748;
}

.trademarkType-tone-5,
.trademarkCategory-tone-5 {
  background: #e9f8fb;
  color: #20798e;
}

.trademarkType-tone-6,
.trademarkCategory-tone-6 {
  background: #f4eeff;
  color: #7460b8;
}

.trademarkType-tone-7,
.trademarkCategory-tone-7 {
  background: #eef8e5;
  color: #587f14;
}

.status-empty,
.territory-empty,
.trademarkType-empty,
.trademarkCategory-empty,
.entity-empty {
  background: #eef3f7;
  color: #6a7e93;
}

.trademark-category-cell .badge {
  min-width: 42px;
}

td .badge {
  max-width: min(100%, 260px);
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-list {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.attachment-link,
.attachment-more,
.attachment-empty {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  max-width: 132px;
  padding: 0 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.attachment-link {
  border: 1px solid rgba(22, 135, 199, 0.22);
  background: #e8f4ff;
  color: #236d9f;
}

.attachment-link:hover {
  border-color: rgba(22, 135, 199, 0.48);
  transform: translateY(-1px);
}

.attachment-link.disabled,
.attachment-empty {
  border: 1px solid rgba(207, 225, 242, 0.95);
  background: #eef3f7;
  color: #6a7e93;
}

.attachment-more {
  background: #e8f7fb;
  color: #237c91;
}

.badge.coral {
  background: #fff0ee;
  color: #bd5748;
}

.badge.steel {
  background: #e8f4ff;
  color: #236d9f;
}

.empty {
  padding: 34px;
  text-align: center;
  color: var(--muted);
}

footer {
  padding: 0 clamp(18px, 4vw, 54px) 30px;
  text-align: center;
}

.login-page {
  display: grid;
  place-items: center;
  padding: 28px;
}

.login-shell {
  width: min(560px, 100%);
  padding: 0;
}

.login-card {
  display: grid;
  justify-items: center;
  gap: 18px;
  padding: 34px;
  border: 1px solid rgba(207, 225, 242, 0.95);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow);
  text-align: center;
}

.login-card p {
  color: var(--muted);
  line-height: 1.8;
}

.login-card small {
  color: var(--muted);
}

.login-button {
  min-height: 44px;
  padding: 0 22px;
  border: 1px solid rgba(22, 135, 199, 0.24);
  border-radius: 999px;
  background: #123b6d;
  color: white;
  font-weight: 900;
  text-decoration: none;
  cursor: pointer;
}

.login-button:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 30;
  max-width: min(380px, calc(100vw - 44px));
  padding: 12px 14px;
  border: 1px solid rgba(22, 135, 199, 0.24);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 50px rgba(30, 86, 138, 0.18);
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition: opacity 160ms ease, transform 160ms ease;
}

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

.toast.success {
  border-color: rgba(93, 139, 67, 0.34);
  color: #2f6b42;
}

.toast.error {
  border-color: rgba(227, 109, 93, 0.38);
  color: #bd5748;
}

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

@media (max-width: 1080px) {
  .snapshot,
  .filters {
    grid-template-columns: 1fr 1fr;
  }

  .quick-actions-row {
    grid-template-columns: 1fr;
  }

  .quick-actions-row .quick-actions,
  .quick-clear-button {
    grid-column: 1;
  }

  .quick-clear-button {
    justify-self: center;
  }

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

  .main-metric,
  .span-metric {
    grid-column: auto;
  }
}

@media (max-width: 720px) {
  .topbar,
  .table-head,
  .panel-head {
    flex-direction: column;
  }

  .snapshot,
  .filters,
  .board-grid,
  .quick-toolbar {
    grid-template-columns: 1fr;
  }

  .quick-search,
  .expiry-date-control {
    justify-self: stretch;
    max-width: none;
  }

  .main-metric {
    grid-column: auto;
  }

  .span-metric {
    grid-column: auto;
  }

  .top-actions,
  .segmented {
    width: 100%;
  }

  .top-actions {
    justify-content: flex-start;
    margin-left: 0;
  }

  .segmented {
    grid-auto-flow: row;
    grid-template-columns: repeat(3, 1fr);
  }

  .icon-button {
    flex: 1;
  }

  .pagination-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .page-size-control,
  .pager-control {
    width: 100%;
  }

  .bar-row {
    grid-template-columns: minmax(72px, 118px) 1fr 38px;
    gap: 9px;
  }
}



.column-filter-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
}

.column-filter-trigger:hover,
.column-filter-trigger.active {
  color: #123b6d;
}

.column-filter-trigger.active .filter-caret {
  color: #0f8fc5;
}

.filter-caret {
  font-size: 10px;
  color: #7e9ab6;
}

.column-filter-panel {
  position: fixed;
  z-index: 50;
  width: 260px;
  padding: 12px;
  border: 1px solid rgba(174, 204, 230, 0.95);
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 18px 45px rgba(30, 86, 138, 0.22);
}

.column-filter-panel.hidden {
  display: none;
}

.column-filter-title {
  margin-bottom: 10px;
  color: #123b6d;
  font-size: 14px;
  font-weight: 900;
}

.column-filter-field {
  display: grid;
  gap: 5px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.column-filter-field select,
.column-filter-field input {
  width: 100%;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fcff;
  color: var(--ink);
  font-weight: 700;
}

.column-filter-options {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  max-height: 132px;
  overflow: auto;
  padding: 4px 0 8px;
}

.column-filter-options button {
  border: 1px solid rgba(22, 135, 199, 0.2);
  border-radius: 999px;
  background: #e8f4ff;
  color: #236d9f;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.column-filter-options button:hover {
  border-color: rgba(22, 135, 199, 0.5);
  background: #dff0ff;
}

.column-filter-options button.selected {
  border-color: #1687c7;
  background: linear-gradient(135deg, #1687c7, #22b8c7);
  color: #fff;
  box-shadow: 0 6px 16px rgba(22, 135, 199, 0.22);
}

.column-filter-empty {
  color: var(--muted);
  font-size: 12px;
}

.column-filter-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid #e4eef8;
}

.column-filter-actions button {
  min-height: 32px;
  border-radius: 8px;
  padding: 0 12px;
  font-weight: 900;
  cursor: pointer;
}

.column-filter-ghost {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
}

.column-filter-primary {
  border: 1px solid #1687c7;
  background: linear-gradient(135deg, #1687c7, #22b8c7);
  color: #fff;
}
