:root {
  --bg: #f4f8ff;
  --panel: #ffffff;
  --line: #d8e6f8;
  --line-soft: #edf3fb;
  --text: #0f2b46;
  --muted: #6c82a1;
  --blue: #2f66ed;
  --blue-strong: #235be3;
  --blue-soft: #eaf2ff;
  --green: #0f9f5a;
  --green-soft: #e9fbf1;
  --red: #ef2f3d;
  --red-soft: #fff0f2;
  --yellow: #a66900;
  --yellow-soft: #fff5da;
  --shadow: 0 18px 45px rgba(29, 64, 111, 0.09);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select,
textarea {
  font: inherit;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 8px 10px;
  outline: none;
}

textarea {
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(47, 102, 237, 0.12);
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

.shell {
  width: min(1380px, calc(100% - 96px));
  margin: 16px auto 32px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.hero-panel {
  padding: 18px 20px;
  border-left: 4px solid #4b8dff;
}

.hero-inner {
  display: flex;
  justify-content: space-between;
  gap: 18px;
}

.hero-panel h1 {
  font-size: 24px;
  line-height: 1.2;
  margin-bottom: 6px;
}

.hero-panel p {
  color: var(--muted);
  margin-bottom: 11px;
  font-size: 14px;
}

.hero-actions {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.pill {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  min-height: 29px;
  padding: 5px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #f8fbff;
  color: #4e6d91;
}

.btn {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  padding: 7px 12px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  white-space: nowrap;
}

.btn:hover {
  border-color: #a9c8f4;
}

.btn.primary {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
  box-shadow: 0 12px 22px rgba(47, 102, 237, 0.18);
}

.btn.primary:hover {
  background: var(--blue-strong);
}

.btn.ghost {
  background: #fff;
  color: var(--text);
}

.btn.danger {
  border-color: #ffd3d9;
  color: var(--red);
  background: var(--red-soft);
}

.btn.danger-soft {
  border-color: #ffd3d9;
  color: var(--red);
  background: #fff;
}

.btn.wide {
  width: 100%;
}

.btn.mini {
  min-height: 30px;
  padding: 5px 8px;
  border-radius: 7px;
  font-size: 13px;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 13px;
}

.stats-collapse .stats-grid {
  margin-top: 13px;
}

.collapse-summary {
  display: none;
}

.mobile-collapse summary::-webkit-details-marker {
  display: none;
}

.stat-card {
  min-height: 76px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid #4b8dff;
  border-radius: 8px;
  padding: 13px;
  box-shadow: var(--shadow);
}

.stat-card span {
  display: block;
  color: #607a9e;
  margin-bottom: 6px;
}

.stat-card strong {
  display: block;
  font-size: 24px;
  line-height: 1.15;
  margin-bottom: 6px;
}

.tabbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 13px;
  padding: 12px;
}

.tab {
  min-height: 36px;
  padding: 7px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  background: #fff;
}

.tab.active {
  color: #fff;
  background: var(--blue);
  border-color: var(--blue);
}

.work-grid {
  display: grid;
  grid-template-columns: 330px minmax(0, 1fr);
  gap: 14px;
  margin-top: 14px;
  align-items: start;
}

.side-panel,
.table-panel,
.order-result,
.query-form {
  padding: 15px;
}

.side-panel h2,
.table-panel h2,
.order-result h2 {
  margin-bottom: 5px;
  font-size: 19px;
}

.muted {
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 10px;
}

label span {
  display: block;
  color: #3f5f84;
  margin-bottom: 6px;
  font-weight: 600;
}

.api-box {
  border-top: 1px solid var(--line-soft);
  margin-top: 14px;
  padding-top: 14px;
}

.api-box h3 {
  margin-bottom: 8px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-head p {
  color: var(--muted);
  margin-bottom: 0;
}

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

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

.mobile-order-list {
  display: none;
}

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1280px;
  table-layout: auto;
  font-size: 13px;
}

#orders-table {
  min-width: 1460px;
}

#users-table {
  min-width: 1120px;
  table-layout: fixed;
}

th {
  background: #eaf2ff;
  color: #2f527a;
  text-align: left;
  padding: 9px 8px;
  font-weight: 800;
  white-space: nowrap;
  word-break: keep-all;
}

td {
  border-top: 1px solid var(--line-soft);
  padding: 8px;
  vertical-align: middle;
  white-space: nowrap;
  word-break: keep-all;
}

.detail-row td {
  color: #4d6684;
  background: #fbfdff;
  white-space: normal;
}

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

.progress-text {
  font-weight: 700;
  margin-bottom: 5px;
}

.mini-progress,
.progress {
  height: 8px;
  background: #eef4fb;
  border-radius: 999px;
  overflow: hidden;
}

.mini-progress span,
.progress span {
  display: block;
  height: 100%;
  background: var(--blue);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  min-width: 58px;
  padding: 3px 8px;
  border-radius: 999px;
  font-weight: 800;
  font-size: 12px;
  border: 1px solid var(--line);
  white-space: nowrap;
  word-break: keep-all;
  line-height: 1;
  flex: 0 0 auto;
}

.status-cell {
  min-width: 96px;
}

#orders-table th:nth-child(1),
#orders-table td:nth-child(1) {
  min-width: 150px;
}

#orders-table th:nth-child(3),
#orders-table td:nth-child(3) {
  min-width: 110px;
}

#orders-table th:nth-child(4),
#orders-table td:nth-child(4) {
  min-width: 96px;
}

#orders-table th:nth-child(10),
#orders-table td:nth-child(10) {
  min-width: 150px;
}

#users-table th:nth-child(3),
#users-table td:nth-child(3) {
  width: 92px;
  min-width: 92px;
}

#users-table th:nth-child(1),
#users-table td:nth-child(1) {
  width: 52px;
}

#users-table th:nth-child(2),
#users-table td:nth-child(2) {
  width: 105px;
}

#users-table th:nth-child(4),
#users-table td:nth-child(4) {
  width: 98px;
}

#users-table th:nth-child(5),
#users-table td:nth-child(5) {
  width: 280px;
}

#users-table th:nth-child(6),
#users-table td:nth-child(6) {
  width: 160px;
}

#users-table th:nth-child(7),
#users-table td:nth-child(7) {
  width: 330px;
}

.badge.success {
  color: var(--green);
  background: var(--green-soft);
  border-color: #bcebd1;
}

.badge.primary,
.badge.muted {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #cfe1ff;
}

.badge.warn {
  color: var(--yellow);
  background: var(--yellow-soft);
  border-color: #ffe2a0;
}

.badge.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: #ffd3d9;
}

.actions-cell,
.user-actions {
  min-width: 260px;
  white-space: normal;
}

.subtext {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 4px;
  white-space: nowrap;
}

.text-danger {
  color: var(--red);
}

.inline-form {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.inline-form select,
.inline-form input {
  min-width: 104px;
  padding: 6px 8px;
}

.order-actions-row {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  white-space: nowrap;
}

.action-copy-message,
.card-copy-message {
  min-width: 72px;
}

.user-actions {
  display: grid;
  gap: 8px;
}

.user-action-row {
  display: grid;
  gap: 8px;
}

.meta-form {
  display: grid;
  gap: 8px;
  min-width: 260px;
  white-space: normal;
}

.meta-form textarea,
.meta-form input,
.token-input {
  padding: 8px 10px;
}

.token-input {
  min-width: 280px;
  margin-bottom: 8px;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 13px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--blue);
  cursor: pointer;
  padding: 0;
  font-weight: 800;
}

.copy-toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 50;
  transform: translate(-50%, 14px);
  opacity: 0;
  pointer-events: none;
  border: 1px solid #bcebd1;
  border-radius: 8px;
  background: #e9fff2;
  color: var(--green);
  box-shadow: 0 14px 34px rgba(29, 64, 111, 0.18);
  padding: 9px 14px;
  font-size: 14px;
  font-weight: 800;
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.copy-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.copy-toast.danger {
  border-color: #ffd3d9;
  background: var(--red-soft);
  color: var(--red);
}

.server-toast {
  display: none;
}

@media (min-width: 721px) {
  .hero-actions {
    flex-wrap: nowrap;
  }

  #orders-table th:last-child,
  #orders-table td.actions-cell,
  #users-table th:last-child,
  #users-table td.user-actions {
    position: sticky;
    right: 0;
    z-index: 2;
    background: #f6faff;
    box-shadow: -18px 0 24px rgba(34, 61, 99, 0.16);
  }

  #orders-table th:last-child,
  #users-table th:last-child {
    z-index: 3;
    background: #dceaff;
    text-align: right;
  }

  #orders-table td.actions-cell,
  #users-table td.user-actions {
    border-left: 2px solid #8db8ff;
  }

  #orders-table .actions-cell {
    width: 326px;
    min-width: 326px;
    max-width: 326px;
    text-align: right;
    white-space: nowrap;
  }

  #orders-table .actions-cell .inline-form {
    margin-top: 0;
  }

  #users-table .meta-form {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    white-space: nowrap;
  }

  #users-table .meta-form input[name="note"] {
    flex: 0 0 190px;
    min-width: 0;
    width: 190px;
    padding: 7px 9px;
  }

  #users-table .user-actions {
    display: table-cell;
    width: 330px;
    min-width: 330px;
    max-width: 330px;
    text-align: right;
    white-space: nowrap;
  }

  #users-table .user-action-row {
    display: inline-flex;
    align-items: center;
    justify-content: flex-end;
    gap: 6px;
  }

  #users-table .user-action-row .inline-form {
    flex: 0 0 auto;
    gap: 6px;
    margin-top: 0;
    flex-wrap: nowrap;
  }

  #users-table .user-actions input[type="number"] {
    min-width: 0;
    width: 84px;
  }

  #users-table .user-actions input[type="password"] {
    min-width: 0;
    width: 96px;
  }

  #users-table .meta-form .btn,
  #users-table .user-actions .btn {
    min-height: 32px;
    padding: 5px 8px;
    border-radius: 7px;
    font-size: 13px;
  }
}

.order-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 10px 11px;
}

.order-card-head,
.order-card-actions,
.card-status-form {
  display: flex;
  gap: 10px;
}

.order-card-head {
  align-items: center;
  justify-content: space-between;
}

.order-card-head .badge {
  margin-top: 1px;
}

.order-no {
  max-width: min(100%, 220px);
  text-align: left;
  overflow-wrap: anywhere;
}

.order-card-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.order-card-main strong {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.order-card-main span {
  color: var(--text);
  font-weight: 800;
  white-space: nowrap;
}

.order-card-progress {
  margin-top: 7px;
}

.order-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

.order-card-note {
  margin: 7px 0 0;
  color: #315172;
  font-size: 12px;
  line-height: 1.45;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  word-break: break-word;
}

.order-card-actions {
  align-items: center;
  margin-top: 8px;
}

.card-query-link {
  flex: 0 0 auto;
}

.card-status-form {
  flex: 1;
  align-items: center;
}

.card-status-form select {
  min-width: 0;
  padding: 7px 9px;
}

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

.pagination-summary {
  color: var(--muted);
  font-size: 14px;
}

.pagination-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.page-btn {
  min-width: 36px;
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #fff;
  color: var(--text);
  font-weight: 700;
  white-space: nowrap;
}

.page-btn.active {
  border-color: var(--blue);
  background: var(--blue);
  color: #fff;
}

.page-btn.disabled {
  color: #9aadbf;
  background: #f8fbff;
  cursor: not-allowed;
}

.alert {
  margin-top: 18px;
  padding: 13px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #fff;
}

.alert.success {
  color: var(--green);
  border-color: #bcebd1;
  background: var(--green-soft);
}

.alert.danger {
  color: var(--red);
  border-color: #ffd3d9;
  background: var(--red-soft);
}

.password-pop {
  position: relative;
}

.password-pop summary {
  list-style: none;
}

.password-pop summary::-webkit-details-marker {
  display: none;
}

.pop-form {
  position: absolute;
  z-index: 5;
  top: 48px;
  right: 0;
  width: 280px;
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

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

.login-card {
  width: min(440px, 100%);
  padding: 34px;
  position: relative;
  overflow: hidden;
}

.brand-line {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: #4b8dff;
}

.login-card h1 {
  font-size: 34px;
  margin-bottom: 10px;
}

.eyebrow {
  color: #7c91ad;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0;
  margin-bottom: 8px;
}

.soft-link {
  text-align: center;
  color: var(--blue);
  font-weight: 700;
}

.query-shell {
  width: min(980px, calc(100% - 90px));
  margin: 48px auto 36px;
}

.query-header h1 {
  font-size: 26px;
  margin-bottom: 14px;
}

.query-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: end;
}

.order-result {
  margin-top: 20px;
}

.result-head,
.progress-top,
.video-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.result-head p,
.videos-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.status-notice {
  margin-top: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  color: #315172;
  padding: 9px 11px;
  font-size: 13px;
  font-weight: 700;
}

.status-notice.primary {
  color: var(--blue);
  background: var(--blue-soft);
  border-color: #cfe1ff;
}

.status-notice.success {
  color: var(--green);
  background: var(--green-soft);
  border-color: #bcebd1;
}

.status-notice.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: #ffd3d9;
}

.progress-card {
  margin-top: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px;
}

.progress-top strong {
  font-size: 21px;
}

.progress {
  height: 9px;
  margin: 10px 0;
}

.progress-foot {
  text-align: right;
  color: var(--muted);
}

.info-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.info-grid div,
.content-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fbff;
  padding: 11px 12px;
}

.info-grid span,
.content-box span {
  display: block;
  color: var(--muted);
  font-size: 13px;
  margin-bottom: 6px;
}

.content-box {
  margin-top: 12px;
}

.content-box p {
  margin-bottom: 0;
  white-space: pre-wrap;
}

.issue-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  margin-top: 12px;
  padding: 12px;
}

.issue-box h3 {
  margin-bottom: 8px;
}

.issue-list {
  display: grid;
  gap: 8px;
}

.issue-list article {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: #f8fbff;
  padding: 9px 10px;
}

.issue-list strong,
.issue-list span {
  display: block;
}

.issue-list span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 12px;
}

.videos-head {
  margin-top: 18px;
}

.videos-head h3 {
  margin-bottom: 6px;
}

.video-grid {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

.video-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}

.video-item video {
  width: 100%;
  max-height: 680px;
  display: block;
  background: #0b1422;
}

.video-meta {
  padding: 11px 12px;
}

.video-meta strong,
.video-meta span {
  display: block;
}

.video-meta span {
  color: var(--muted);
  margin-top: 4px;
  font-size: 13px;
}

.video-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  margin-left: 8px;
  padding: 2px 7px;
  border-radius: 999px;
  border: 1px solid var(--line);
  font-style: normal;
  font-size: 12px;
  font-weight: 800;
  vertical-align: middle;
}

.video-tag.danger {
  color: var(--red);
  background: var(--red-soft);
  border-color: #ffd3d9;
}

.video-empty {
  border: 1px solid var(--line);
  border-radius: 8px;
}

.feedback-admin-grid-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}

.feedback-admin-item {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfdff;
}

.feedback-admin-item > a {
  display: block;
  aspect-ratio: 4 / 3;
  background: #eef4fb;
}

.feedback-admin-item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.feedback-admin-item > div {
  display: grid;
  gap: 3px;
  padding: 8px 9px;
}

.feedback-admin-item strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.feedback-admin-item span,
.feedback-admin-item small,
.feedback-file-hint {
  color: var(--muted);
  font-size: 12px;
}

.feedback-admin-item small {
  font-size: 11px;
}

.feedback-admin-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.feedback-admin-meta form {
  flex: 0 0 auto;
}

.feedback-admin-meta .btn {
  min-height: 26px;
  padding: 3px 7px;
  font-size: 12px;
}

.feedback-public-link {
  margin-top: 10px;
}

.feedback-page {
  padding-bottom: 10px;
}

.feedback-timeline {
  display: grid;
  gap: 8px;
  margin-top: 18px;
}

.feedback-day {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 18px;
  align-items: stretch;
}

.feedback-axis {
  position: relative;
  min-height: 100%;
  padding-top: 7px;
  text-align: right;
}

.feedback-date {
  display: block;
  padding-right: 29px;
  color: #607a9e;
  font-weight: 700;
  white-space: nowrap;
}

.feedback-axis-line {
  position: absolute;
  top: 34px;
  right: 17px;
  bottom: -22px;
  width: 2px;
  background: #cddbee;
}

.feedback-day:last-child .feedback-axis-line {
  bottom: 14px;
}

.feedback-group {
  position: relative;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(29, 64, 111, 0.08);
  padding: 10px;
}

.feedback-axis-dot {
  position: absolute;
  top: 34px;
  right: 10px;
  z-index: 1;
  width: 14px;
  height: 14px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 0 2px #8db8ff;
}

.feedback-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(118px, 1fr));
  gap: 8px;
}

.feedback-thumb {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  padding: 0;
  min-width: 0;
  border: 0;
  overflow: hidden;
  border-radius: 6px;
  background: #eef4fb;
  cursor: zoom-in;
}

.feedback-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #eef4fb;
  transition: transform 0.18s ease;
}

.feedback-thumb:hover img {
  transform: scale(1.025);
}

.feedback-load-state {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 34px;
  gap: 8px;
  color: var(--muted);
}

.feedback-load-state button {
  min-width: 92px;
}

.feedback-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid #d8e4f4;
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin 0.75s linear infinite;
}

.feedback-empty {
  padding: 56px 20px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
}

.feedback-sentinel {
  height: 1px;
}

body.modal-open {
  overflow: hidden;
}

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

.image-modal[hidden] {
  display: none;
}

.image-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 28px;
}

.image-modal-backdrop {
  position: absolute;
  inset: 0;
  border: 0;
  background: rgba(9, 22, 40, 0.72);
  cursor: zoom-out;
}

.image-modal-panel {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 10px;
  width: min(1060px, 100%);
  max-height: calc(100vh - 56px);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.image-modal-close {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: rgba(6, 14, 27, 0.72);
  color: #fff;
  cursor: pointer;
  font-size: 24px;
  line-height: 1;
}

.image-modal-nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 50%;
  background: rgba(6, 14, 27, 0.62);
  color: #fff;
  cursor: pointer;
  font-size: 34px;
  line-height: 0.8;
  transform: translateY(-50%);
}

.image-modal-nav[hidden] {
  display: none;
}

.image-modal-prev {
  left: 18px;
}

.image-modal-next {
  right: 18px;
}

.image-modal-panel img {
  display: block;
  width: 100%;
  max-height: calc(100vh - 140px);
  object-fit: contain;
  border-radius: 6px;
  background: #0b1422;
}

.image-modal-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.image-modal-meta strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1100px) {
  .stats-grid,
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

@media (max-width: 720px) {
  .shell,
  .query-shell {
    width: min(100% - 16px, 100%);
    margin-top: 8px;
  }

  .shell {
    display: flex;
    flex-direction: column;
  }

  .panel {
    box-shadow: 0 10px 26px rgba(29, 64, 111, 0.08);
  }

  .hero-inner,
  .panel-head,
  .result-head,
  .video-meta {
    flex-direction: column;
    align-items: stretch;
  }

  .work-grid {
    display: contents;
  }

  .side-panel {
    order: 1;
  }

  .alert {
    order: 2;
    margin-top: 10px;
  }

  .hero-panel {
    order: 3;
  }

  .stats-collapse {
    order: 4;
  }

  .tabbar {
    order: 5;
  }

  .table-panel {
    order: 6;
  }

  .mobile-collapse {
    margin-top: 10px;
  }

  .collapse-summary {
    min-height: 42px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-weight: 800;
    box-shadow: 0 10px 26px rgba(29, 64, 111, 0.08);
  }

  .collapse-summary strong {
    color: var(--blue);
    font-size: 13px;
    overflow-wrap: anywhere;
    text-align: right;
  }

  .mobile-collapse[open] .collapse-summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
  }

  .hero-panel {
    padding: 0;
    border-left: 0;
  }

  .hero-inner {
    gap: 10px;
    padding: 12px;
    border: 1px solid var(--line);
    border-top: 0;
    border-bottom-left-radius: 8px;
    border-bottom-right-radius: 8px;
    background: #fff;
  }

  .hero-panel p {
    display: none;
  }

  .pill-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .pill {
    min-width: 0;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 12px;
    justify-content: center;
  }

  .hero-actions {
    justify-content: stretch;
  }

  .hero-actions .btn,
  .hero-actions form,
  .password-pop,
  .table-search {
    width: 100%;
  }

  .hero-panel h1,
  .login-card h1 {
    font-size: 22px;
    margin-bottom: 8px;
  }

  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 8px;
  }

  .stat-card {
    min-height: 0;
    padding: 10px;
  }

  .stat-card strong {
    font-size: 22px;
    margin-bottom: 4px;
  }

  .tabbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    margin-top: 10px;
    padding: 8px;
  }

  .tab {
    min-width: 0;
    min-height: 36px;
    padding: 7px 4px;
    font-size: 13px;
  }

  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel,
  .table-panel,
  .order-result,
  .query-form,
  .login-card {
    padding: 12px;
  }

  .side-panel h2,
  .table-panel h2,
  .order-result h2 {
    font-size: 20px;
    margin-bottom: 5px;
  }

  .side-panel .muted {
    font-size: 12px;
  }

  .form-stack {
    gap: 10px;
  }

  .side-panel .form-stack {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .side-panel .form-stack label:first-child,
  .side-panel .form-stack label:nth-child(4),
  .side-panel .form-stack .wide,
  .side-panel .api-box {
    grid-column: 1 / -1;
  }

  label span {
    margin-bottom: 5px;
    font-size: 13px;
  }

  input,
  select,
  textarea {
    padding: 9px 10px;
  }

  .side-panel textarea {
    height: 54px;
    min-height: 54px;
  }

  .panel-head {
    gap: 10px;
    margin-bottom: 12px;
  }

  .orders-table-wrap {
    display: none;
  }

  .mobile-order-list {
    display: grid;
    gap: 8px;
  }

  .order-card-head {
    gap: 8px;
  }

  .order-no {
    max-width: 230px;
    font-size: 13px;
  }

  .order-card {
    padding: 9px 10px;
  }

  .order-card-head .badge {
    min-height: 24px;
    min-width: 52px;
    padding: 3px 8px;
    font-size: 12px;
  }

  .order-card-actions {
    display: grid;
    grid-template-columns: 46px 72px minmax(0, 1fr);
    align-items: center;
    gap: 7px;
  }

  .card-query-link,
  .card-copy-message {
    min-width: 0;
    min-height: 32px;
    padding: 5px 8px;
  }

  .card-status-form {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 7px;
  }

  .card-status-form select {
    padding: 6px 8px;
  }

  .card-status-form .btn {
    min-height: 32px;
    padding: 5px 8px;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
  }

  .pagination-actions {
    justify-content: flex-start;
  }

  .page-btn {
    min-width: 0;
    min-height: 30px;
    padding: 5px 8px;
    font-size: 13px;
  }

  .query-shell {
    width: min(100% - 12px, 100%);
    margin-top: 6px;
    margin-bottom: 28px;
  }

  .query-header h1 {
    font-size: 18px;
    line-height: 1.15;
    margin-bottom: 8px;
  }

  .query-header .eyebrow {
    display: none;
  }

  .query-form {
    padding: 8px;
  }

  .query-form .query-grid {
    grid-template-columns: minmax(0, 1fr) 58px;
    gap: 6px;
    align-items: end;
  }

  .query-form label span {
    font-size: 12px;
    margin-bottom: 4px;
  }

  .query-form input {
    min-height: 34px;
    padding: 7px 9px;
    font-size: 13px;
  }

  .query-form .btn {
    min-height: 34px;
    padding: 6px 8px;
    font-size: 13px;
  }

  .order-result {
    margin-top: 8px;
    padding: 10px;
  }

  .result-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px;
    align-items: center;
  }

  .result-head h2 {
    font-size: 18px;
    margin-bottom: 0;
  }

  .result-head .badge {
    min-height: 24px;
    min-width: 52px;
    padding: 3px 8px;
    font-size: 12px;
  }

  .progress-card {
    margin-top: 8px;
    padding: 8px;
  }

  .progress-top {
    gap: 8px;
  }

  .progress-top span,
  .progress-foot {
    font-size: 12px;
  }

  .progress-top strong {
    font-size: 17px;
  }

  .progress {
    height: 6px;
    margin: 5px 0;
  }

  .info-grid {
    gap: 6px;
    margin-top: 8px;
  }

  .info-grid div,
  .content-box {
    padding: 7px 8px;
  }

  .info-grid div:first-child {
    grid-column: 1 / -1;
  }

  .info-grid span,
  .content-box span {
    font-size: 11px;
    margin-bottom: 3px;
  }

  .info-grid strong {
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .content-box {
    margin-top: 8px;
  }

  .content-box p {
    font-size: 12px;
    line-height: 1.38;
  }

  .videos-head {
    margin-top: 10px;
  }

  .videos-head h3 {
    margin-bottom: 0;
    font-size: 16px;
  }

  .video-grid {
    gap: 8px;
    margin-top: 6px;
  }

  .video-item video {
    max-height: 170px;
  }

  .video-meta {
    flex-direction: row;
    align-items: center;
    padding: 7px 8px;
    gap: 6px;
    font-size: 12px;
  }

  .video-meta > div {
    min-width: 0;
  }

  .video-meta strong {
    overflow-wrap: anywhere;
  }

  .video-meta span {
    font-size: 11px;
    margin-top: 2px;
  }

  .video-meta .btn {
    flex: 0 0 74px;
    min-height: 30px;
    padding: 4px 7px;
    font-size: 12px;
  }

  .video-empty {
    padding: 18px;
    font-size: 13px;
  }

  .pop-form {
    position: static;
    width: 100%;
    margin-top: 10px;
  }

  .feedback-admin-grid-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .feedback-admin-item > div {
    padding: 7px 8px;
  }

  .feedback-page {
    padding-bottom: 18px;
  }

  .feedback-timeline {
    gap: 4px;
    margin-top: 12px;
    padding: 0 10px 0 8px;
  }

  .feedback-day {
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 10px;
  }

  .feedback-axis {
    padding-top: 5px;
  }

  .feedback-date {
    padding-right: 24px;
    font-size: 12px;
  }

  .feedback-axis-line {
    top: 29px;
    right: 12px;
    bottom: -14px;
  }

  .feedback-day:last-child .feedback-axis-line {
    bottom: 12px;
  }

  .feedback-group {
    padding: 7px;
    border-radius: 7px;
  }

  .feedback-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
  }

  .feedback-axis-dot {
    top: 29px;
    right: 8px;
    width: 12px;
    height: 12px;
    border-width: 3px;
  }

  .feedback-thumb {
    border-radius: 5px;
  }

  .feedback-load-state {
    min-height: 32px;
    font-size: 12px;
  }

  .image-modal {
    padding: 10px;
  }

  .image-modal-panel {
    max-height: calc(100vh - 20px);
    padding: 8px;
  }

  .image-modal-nav {
    width: 36px;
    height: 36px;
    font-size: 28px;
  }

  .image-modal-prev {
    left: 10px;
  }

  .image-modal-next {
    right: 10px;
  }

  .image-modal-panel img {
    max-height: calc(100vh - 100px);
  }

  .image-modal-meta {
    gap: 8px;
  }

  .image-modal-meta strong {
    font-size: 12px;
  }
}
