* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f6f7f9;
  color: #1f2933;
  font-family:
    -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei",
    sans-serif;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid #d8dee6;
  background: #ffffff;
}

h1 {
  margin: 0;
  font-size: 20px;
  line-height: 1.3;
}

p {
  margin: 6px 0 0;
  color: #667085;
}

.tabs {
  display: flex;
  gap: 8px;
  padding: 12px 24px;
  border-bottom: 1px solid #d8dee6;
  background: #ffffff;
  overflow-x: auto;
}

.tab,
.button {
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid #cfd6df;
  border-radius: 6px;
  background: #ffffff;
  color: #26313d;
  cursor: pointer;
}

.tab.active,
.button.primary {
  border-color: #1f6feb;
  background: #1f6feb;
  color: #ffffff;
}

.button.danger {
  border-color: #d92d20;
  color: #b42318;
}

.button.ghost {
  background: #f8fafc;
}

main {
  padding: 20px 24px 48px;
}

.panel {
  display: none;
}

.panel.active {
  display: block;
}

.toolbar,
.form-row,
.filters {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
}

.form-row {
  padding: 14px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
}

label {
  display: grid;
  gap: 5px;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

input,
select,
textarea {
  width: 180px;
  min-height: 34px;
  padding: 7px 9px;
  border: 1px solid #cfd6df;
  border-radius: 6px;
  background: #ffffff;
  color: #1f2933;
}

textarea {
  width: 420px;
  min-height: 86px;
  resize: vertical;
}

.wide {
  width: 320px;
}

.narrow {
  width: 92px;
}

.table-wrap {
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
  overflow: auto;
}

table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

th,
td {
  padding: 10px 9px;
  border-bottom: 1px solid #edf0f3;
  text-align: left;
  vertical-align: top;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f9fafb;
  color: #475467;
  font-size: 12px;
}

td input,
td select,
td textarea {
  width: 100%;
}

td textarea {
  min-height: 58px;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #eef2f6;
  color: #364152;
  font-size: 12px;
  font-weight: 700;
}

.badge.failed,
.badge.rejected {
  background: #fff1f0;
  color: #b42318;
}

.badge.pending,
.badge.running {
  background: #fff7e6;
  color: #93370d;
}

.badge.succeeded,
.badge.approved {
  background: #ecfdf3;
  color: #027a48;
}

.badge.merged {
  background: #eef4ff;
  color: #3538cd;
}

.empty {
  padding: 24px;
  color: #667085;
  text-align: center;
}

.message {
  margin-bottom: 14px;
  padding: 10px 12px;
  border: 1px solid #bdd7ff;
  border-radius: 8px;
  background: #eff6ff;
  color: #1849a9;
}

.message.error {
  border-color: #fecdca;
  background: #fff1f0;
  color: #b42318;
}

.message.loading {
  border-color: #b9d6ff;
  background: #eff6ff;
  color: #175cd3;
}

a {
  color: #175cd3;
}

@media (max-width: 720px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  main,
  .tabs,
  .topbar {
    padding-right: 14px;
    padding-left: 14px;
  }

  input,
  select,
  textarea,
  .wide {
    width: 100%;
  }

  .topic-entry-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .bottle-review-wall {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.management-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.management-header h2 {
  margin: 0 0 6px;
  font-size: 22px;
}

.management-header p {
  margin: 0;
  color: #667085;
  line-height: 1.6;
}

.management-actions,
.period-tabs {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.unsaved-indicator {
  color: #b54708;
  font-size: 13px;
  font-weight: 700;
}

.hot-filters,
.analytics-filters {
  margin-bottom: 16px;
}

.hot-table input[type="checkbox"] {
  width: 19px;
  height: 19px;
  cursor: pointer;
}

.hot-selected-row {
  background: #fff8ed;
}

.period-tabs {
  margin-bottom: 14px;
}

.analytics-table-wrap {
  overflow-x: auto;
}

.analytics-table {
  min-width: 1180px;
}

.rank-cell,
.numeric-cell {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.rank-cell {
  font-weight: 800;
  color: #b54708;
}

.loading-state {
  color: #475467;
}

.error-state {
  color: #b42318;
  background: #fff1f0;
  border-color: #fecdca;
}

@media (max-width: 900px) {
  .management-header {
    flex-direction: column;
  }
}

.raw-toolbar,
.raw-wall-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}

.raw-toolbar-title,
.raw-wall-title {
  font-size: 18px;
  font-weight: 800;
  color: #1f2933;
}

.raw-wall-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
}

.raw-batch-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.inline-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  font-size: 13px;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.topic-entry-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.topic-entry-card {
  display: grid;
  gap: 8px;
  min-height: 120px;
  padding: 16px;
  border: 1px solid #d8dee6;
  border-radius: 12px;
  background: #ffffff;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.topic-entry-card:hover {
  border-color: #1f6feb;
  box-shadow: 0 8px 20px rgba(31, 111, 235, 0.08);
}

.topic-entry-name {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.35;
}

.topic-entry-meta {
  color: #667085;
  font-size: 12px;
}

.topic-entry-counts {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: auto;
}

.topic-entry-pending {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #fff7e6;
  color: #93370d;
  font-size: 12px;
  font-weight: 700;
}

.topic-entry-added {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: #ecfdf3;
  color: #027a48;
  font-size: 12px;
  font-weight: 700;
}

.bottle-review-wall {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  padding: 14px;
  border: 1px solid #d8dee6;
  border-radius: 12px;
  background: #ffffff;
  max-height: calc(100vh - 260px);
  overflow: auto;
}

.button.is-disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.bottle-review-card {
  position: relative;
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 12px 10px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #fcfcfd;
  cursor: pointer;
}

.bottle-review-card.selected {
  border-color: #1f6feb;
  box-shadow: inset 0 0 0 1px #1f6feb;
  background: #f5f9ff;
}

.bottle-item-card {
  transition: border-color 140ms ease, background-color 140ms ease, box-shadow 140ms ease;
}

.bottle-item-card:hover {
  border-color: #b98a5c;
  background: #fffdf9;
  box-shadow: inset 0 0 0 1px rgba(139, 91, 48, 0.16);
}

.bottle-item-card.selected,
.bottle-item-card.selected:hover {
  border-color: #8b5b30;
  background: #fff8ed;
  box-shadow: inset 0 0 0 1px #8b5b30;
}

.bottle-item-card .bottle-review-icon {
  cursor: default;
}

.bottle-item-card .bottle-review-name,
.bottle-item-card .bottle-item-meta {
  cursor: pointer;
}

.bottle-selection-marker {
  position: absolute;
  top: 8px;
  right: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #8b5b30;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  pointer-events: none;
}

.bottle-selection-marker[hidden] {
  display: none;
}

.bottle-review-check {
  position: absolute;
  top: 8px;
  left: 8px;
}

.bottle-review-check input {
  width: auto;
  min-height: auto;
}

.bottle-review-icon {
  width: 42px;
  height: 58px;
  margin-top: 8px;
  border: 3px solid #c7d2e0;
  border-radius: 16px 16px 10px 10px;
  background: linear-gradient(180deg, #eef4ff 0%, #ffffff 55%, #f8fafc 100%);
  box-shadow: inset 0 -8px 0 rgba(199, 210, 224, 0.35);
}

.bottle-review-icon::before {
  content: "";
  display: block;
  width: 16px;
  height: 8px;
  margin: -5px auto 0;
  border: 3px solid #c7d2e0;
  border-bottom: 0;
  border-radius: 8px 8px 0 0;
  background: #eef4ff;
}

.bottle-review-name-wrap,
.bottle-review-name,
.bottle-review-name-input {
  width: 100%;
  text-align: center;
}

.bottle-review-name {
  min-height: 36px;
  padding: 4px 2px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #1f2933;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
  cursor: text;
}

button.bottle-review-name {
  display: block;
  font-family: inherit;
  appearance: none;
}

.editable-name {
  transition: background 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

.editable-name:hover,
.editable-name:focus-visible {
  outline: none;
  background: #f5f9ff;
  box-shadow: inset 0 0 0 1px #c7d2e0;
  color: #155eef;
}

.bottle-review-name-input {
  min-height: 34px;
  padding: 6px 8px;
  border: 1px solid #1f6feb;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
}

.bottle-display-name-input {
  width: 100%;
  min-height: 36px;
  padding: 6px 8px;
  border: 1px solid #1f6feb;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 700;
  text-align: center;
}

.bottle-display-name-input[aria-invalid="true"],
.raw-display-name-input[aria-invalid="true"] {
  border-color: #d92d20;
}

.bottle-edit-hint,
.bottle-edit-error {
  margin-top: 4px;
  font-size: 11px;
  line-height: 1.35;
  text-align: left;
}

.bottle-edit-hint {
  color: #667085;
}

.bottle-edit-error {
  color: #b42318;
  font-weight: 700;
}

.bottle-review-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 4px;
  width: 100%;
}

.bottle-review-actions .button {
  min-height: 28px;
  padding: 0 4px;
  font-size: 12px;
}

.bottle-review-actions.raw-edit-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.bottle-review-card.is-busy {
  background: #f8fafc;
}

@media (max-width: 1200px) {
  .topic-entry-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .bottle-review-wall {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.bottle-item-card {
  cursor: default;
}

.bottle-item-card.editing {
  border-color: #1f6feb;
  box-shadow: inset 0 0 0 1px #1f6feb;
  background: #f5f9ff;
}

.bottle-item-meta {
  width: 100%;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
  text-align: center;
}

.bottle-initial-check {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 28px;
  color: #364152;
  font-size: 12px;
  font-weight: 700;
}

.bottle-initial-check input {
  width: auto;
  min-height: auto;
}

.initial-display-limit-note {
  margin: 10px 0 14px;
  padding: 10px 12px;
  border: 1px solid #e7d5bc;
  border-radius: 10px;
  background: #fffaf2;
  color: #6b5a48;
  font-size: 13px;
  font-weight: 700;
}

.initial-display-limit-note.warning {
  border-color: #f4c790;
  background: #fff4e5;
  color: #9a4f0b;
}

.bottle-batch-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
  padding: 9px 10px;
  border: 1px solid #eadfd2;
  border-radius: 10px;
  background: #fbfaf8;
  opacity: 0.72;
  transition: opacity 140ms ease, border-color 140ms ease, background-color 140ms ease;
}

.bottle-batch-toolbar.has-selection {
  border-color: #caa77f;
  background: #fffaf2;
  opacity: 1;
}

.bottle-batch-toolbar .button {
  min-height: 32px;
  padding: 6px 10px;
}

.bottle-item-edit-fields {
  display: grid;
  gap: 6px;
  width: 100%;
}

.bottle-item-field {
  width: 100%;
  font-size: 11px;
}

.bottle-item-field input,
.bottle-item-field select {
  width: 100%;
  min-height: 30px;
  padding: 5px 7px;
  font-size: 12px;
}

.bottle-add-panel {
  margin-bottom: 14px;
  padding: 14px;
  border: 1px solid #d8dee6;
  border-radius: 8px;
  background: #ffffff;
}

.bottle-add-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.bottle-add-body {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 10px;
}

.bottle-add-batch {
  display: grid;
  gap: 10px;
}

.bottle-add-batch-label {
  width: 100%;
}

.bottle-add-batch textarea {
  width: 100%;
  min-height: 72px;
}

#bottlesPanel .bottle-review-wall {
  max-height: calc(100vh - 320px);
}

#bottlesPanel .bottle-review-actions {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

#bottlesPanel .bottle-item-card:not(.editing) .bottle-review-actions {
  grid-template-columns: 1fr;
}

@media (max-width: 720px) {
  #bottlesPanel .bottle-review-wall {
    max-height: calc(100vh - 360px);
  }
}

.manual-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.45);
}

.manual-modal {
  width: min(520px, 100%);
  padding: 18px;
  border: 1px solid #d8dee6;
  border-radius: 12px;
  background: #ffffff;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
}

.manual-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.manual-modal-header h2 {
  margin: 0;
  font-size: 18px;
}

.manual-modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
}

.manual-modal-body {
  display: grid;
  gap: 12px;
}

.manual-modal-body label,
.manual-batch-label {
  width: 100%;
}

.manual-modal-body input,
.manual-modal-body textarea {
  width: 100%;
}

.manual-modal-body textarea {
  min-height: 180px;
}

.manual-modal-message {
  margin-top: 12px;
  padding: 10px 12px;
  border: 1px solid #bdd7ff;
  border-radius: 8px;
  background: #eff6ff;
  color: #1849a9;
  font-size: 13px;
}

.manual-modal-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 16px;
}

.search-control {
  display: flex;
  align-items: flex-end;
  flex-wrap: wrap;
  gap: 8px;
}

.search-control label {
  min-width: 220px;
}

.search-control input {
  width: 260px;
}

.search-clear-button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.compact-toolbar {
  justify-content: flex-start;
}

.topic-entry-hit {
  color: #344054;
  font-size: 12px;
  line-height: 1.4;
}

.duplicate-summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.raw-wall-controls {
  display: contents;
}

.duplicate-badge {
  justify-content: center;
  max-width: 100%;
  white-space: normal;
  text-align: center;
}

.duplicate-reference {
  display: block;
  max-width: 100%;
  color: #7a271a;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
  overflow-wrap: anywhere;
}

.badge.official-duplicate,
.official-duplicate {
  background: #fff1f0;
  color: #b42318;
}

.badge.raw-duplicate,
.raw-duplicate {
  background: #fff7e6;
  color: #93370d;
}

.bottle-review-card.has-duplicate {
  border-left: 4px solid #f79009;
}

.bottle-review-card.duplicate-official {
  border-left-color: #d92d20;
  background: #fffafa;
}

.bottle-review-card.duplicate-raw {
  background: #fffdf7;
}

.duplicate-status-host,
.duplicate-details-host,
.raw-duplicate-details-host {
  margin: 10px 0;
}

.duplicate-status-alert,
.duplicate-status-clear,
.duplicate-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid #fecdca;
  background: #fff1f0;
  color: #b42318;
}

.duplicate-status-clear {
  border-color: #d8dee6;
  background: #f8fafc;
  color: #475467;
}

.duplicate-summary.has-duplicates {
  border: 2px solid #d92d20;
  box-shadow: 0 3px 12px rgba(180, 35, 24, 0.12);
}

.duplicate-details {
  overflow: hidden;
  border: 1px solid #d8dee6;
  border-radius: 10px;
  background: #fff;
}

.duplicate-details.has-groups {
  border-color: #fda29b;
}

.duplicate-details-toggle {
  width: 100%;
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border: 0;
  background: #fff8f7;
  color: #7a271a;
  font-weight: 800;
  cursor: pointer;
}

.duplicate-details.no-groups .duplicate-details-toggle {
  background: #f8fafc;
  color: #475467;
}

.duplicate-group-list {
  display: grid;
  gap: 10px;
  padding: 12px;
}

.duplicate-group {
  border-left: 5px solid #d92d20;
  border-radius: 8px;
  background: #fffafa;
  padding: 10px 12px;
}

.duplicate-group-title {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.duplicate-group-items {
  display: grid;
  gap: 6px;
}

.duplicate-location {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #fed7d2;
  border-radius: 7px;
  background: #fff;
  color: #7a271a;
  text-align: left;
  cursor: pointer;
}

.duplicate-empty {
  padding: 14px;
  color: #475467;
}

.bottle-review-card.has-duplicate {
  border: 2px solid #d92d20;
  box-shadow: inset 0 0 0 1px rgba(217, 45, 32, 0.1);
}

.bottle-review-card.has-duplicate.duplicate-official {
  background: #fff1f0;
}

.bottle-review-card.has-duplicate.duplicate-raw {
  border-color: #f79009;
  background: #fff7e6;
  box-shadow: inset 0 0 0 1px rgba(247, 144, 9, 0.14);
}

.official-card-duplicate,
.official-card-status {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 5px;
  max-width: 100%;
}

.bottle-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 36px;
  margin-top: 12px;
}

.submission-subtabs,
.submission-filters,
.submission-review-actions,
.submission-items-toolbar,
.submission-contact-box {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.submission-subtabs,
.submission-filters {
  margin-bottom: 14px;
}

.submission-filters input {
  min-width: min(320px, 100%);
}

.submission-list {
  display: grid;
  gap: 14px;
}

.submission-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  padding: 16px;
  border: 1px solid #d8dee6;
  border-radius: 12px;
  background: #fff;
}

.submission-card.is-test {
  border-left: 4px solid #f79009;
}

.submission-card-main h3 {
  margin: 8px 0 4px;
}

.submission-card-main p {
  margin: 6px 0 0;
  color: #667085;
}

.submission-card-main .badge + .badge {
  margin-left: 6px;
}

.submission-detail {
  grid-column: 1 / -1;
  display: grid;
  gap: 14px;
  padding-top: 14px;
  border-top: 1px solid #eaecf0;
}

.submission-detail textarea {
  width: 100%;
  min-height: 88px;
}

.submission-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.submission-compare-grid > div,
.submission-contact-box {
  padding: 12px;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  background: #f9fafb;
}

.submission-compare-grid span,
.submission-compare-grid strong {
  display: block;
  margin-bottom: 6px;
}

.submission-items-toolbar {
  justify-content: space-between;
}

.submission-review-list {
  display: grid;
  gap: 6px;
  max-height: 420px;
  overflow: auto;
}

.submission-review-item {
  display: grid;
  grid-template-columns: auto 36px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px;
  border: 1px solid #eaecf0;
  border-radius: 8px;
}

.submission-review-item input[type="checkbox"] {
  width: auto;
}

.submission-review-item em {
  color: #b42318;
  font-size: 12px;
}

.submission-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.submission-contact-box strong {
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .submission-card,
  .submission-compare-grid {
    grid-template-columns: 1fr;
  }

  .submission-review-item {
    grid-template-columns: auto 28px minmax(0, 1fr);
  }

  .submission-review-item em {
    grid-column: 3;
  }
}
.announcement-admin-list {
  display: grid;
  gap: 18px;
}

.announcement-admin-card {
  display: grid;
  gap: 14px;
  padding: 20px;
  border: 1px solid #ded8ce;
  border-radius: 16px;
  background: #fff;
}

.announcement-admin-card-head,
.announcement-admin-actions,
.announcement-order-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.announcement-admin-time {
  margin-left: 10px;
  color: #756f66;
  font-size: 13px;
}

.announcement-admin-card textarea {
  width: 100%;
  min-height: 180px;
  resize: vertical;
  white-space: pre-wrap;
}

.announcement-preview {
  padding: 14px 16px;
  border-radius: 12px;
  background: #fffaf1;
}

.announcement-preview h3 {
  margin: 14px 0 8px;
}

.announcement-preview div {
  white-space: pre-wrap;
  line-height: 1.75;
}
/* Public administrator authentication and trusted-device controls. */
[hidden] { display: none !important; }
.auth-gate { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at top, #fff5f5, #f4efec 62%); }
.auth-card { width: min(100%, 460px); padding: 34px; border: 1px solid #e2d5d2; border-radius: 20px; background: #fff; box-shadow: 0 22px 70px rgba(70, 43, 43, 0.12); }
.auth-card h1 { margin: 6px 0 8px; font-size: 30px; }
.auth-card > p { color: #766b67; line-height: 1.6; }
.auth-eyebrow { margin: 0; color: #ad3439 !important; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.auth-form { display: grid; gap: 14px; }
.auth-form label, .security-form label { display: grid; gap: 7px; color: #534a46; font-size: 13px; font-weight: 700; }
.auth-form input, .security-form input { min-height: 44px; padding: 10px 12px; border: 1px solid #d7ceca; border-radius: 9px; font: inherit; }
.auth-wide { width: 100%; justify-content: center; margin-top: 10px; }
.auth-divider { display: flex; align-items: center; gap: 10px; margin: 24px 0 18px; color: #8d827d; font-size: 11px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; height: 1px; background: #e6dfdc; }
.auth-error { min-height: 20px; margin: 14px 0 0; color: #a8262e !important; font-weight: 700; }
.topbar-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.security-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.security-card { padding: 22px; border: 1px solid #ded6d2; border-radius: 14px; background: #fff; }
.security-card h2 { margin: 0 0 12px; font-size: 19px; }
.security-card p { color: #746a66; line-height: 1.6; }
.security-card dl { display: grid; grid-template-columns: 110px 1fr; gap: 8px 14px; }
.security-card dt { color: #8a7f7a; }
.security-card dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.security-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.security-heading p { margin: 3px 0 0; font-size: 12px; }
.device-list { display: grid; gap: 9px; margin-top: 16px; }
.device-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px; border: 1px solid #e5dfdc; border-radius: 10px; background: #faf8f7; }
.device-row > div { display: grid; gap: 3px; }
.device-row span, .device-row small { color: #7f7470; }
.device-row.revoked { opacity: .62; }
.security-form { display: grid; gap: 12px; }
.security-events { display: grid; gap: 5px; max-height: 340px; overflow: auto; }
.security-events p { display: flex; justify-content: space-between; gap: 12px; margin: 0; padding: 8px 0; border-bottom: 1px solid #eee9e7; font-size: 12px; }
.security-events span { color: #827772; text-align: right; }
@media (max-width: 800px) {
  .security-grid { grid-template-columns: 1fr; }
  .security-heading, .device-row { align-items: stretch; flex-direction: column; }
  .auth-card { padding: 24px 18px; }
}
