:root {
  --stellantis-blue: #243782;
  --stellantis-blue-dark: #18285f;
  --ink: #142033;
  --muted: #6b7789;
  --line: #dfe5ee;
  --soft: #f3f6fa;
  --white: #ffffff;
  --danger: #b83e50;
  --font: "Segoe UI", Arial, "Microsoft YaHei", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    linear-gradient(rgba(20, 55, 107, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(20, 55, 107, 0.025) 1px, transparent 1px),
    #f3f6fa;
  background-size: 28px 28px, 28px 28px, auto;
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

[hidden] {
  display: none !important;
}

.admin-halo {
  position: fixed;
  z-index: 0;
  width: min(80vw, 1180px);
  aspect-ratio: 340 / 72;
  left: 50%;
  top: 16vh;
  transform: translateX(-50%) scale(1.08);
  background: url("assets/stell-logo-blue.svg") center / contain no-repeat;
  filter: blur(34px);
  opacity: 0.055;
  pointer-events: none;
}

.admin-topbar {
  height: 72px;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid rgba(22, 47, 80, 0.1);
  backdrop-filter: blur(18px);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 13px;
  text-decoration: none;
  color: var(--ink);
}

.admin-brand > img {
  width: 118px;
  height: auto;
}

.admin-brand-rule {
  width: 1px;
  height: 30px;
  background: var(--line);
}

.admin-brand-copy {
  display: flex;
  flex-direction: column;
}

.admin-brand-copy strong {
  font-size: 17px;
  letter-spacing: 0.12em;
}

.admin-brand-copy small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 7px;
  letter-spacing: 0.16em;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-status {
  margin-right: 8px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  color: #61758d;
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
}

.admin-status i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #3fa37b;
  box-shadow: 0 0 0 4px rgba(63, 163, 123, 0.1);
}

.ghost-button,
.secondary-admin-button,
.primary-admin-button {
  appearance: none;
  border-radius: 9px;
  padding: 9px 13px;
  cursor: pointer;
  text-decoration: none;
  font-size: 10px;
  transition:
    background 0.2s,
    border-color 0.2s,
    transform 0.2s;
}

.ghost-button,
.secondary-admin-button {
  border: 1px solid var(--line);
  color: #41546b;
  background: rgba(255, 255, 255, 0.78);
}

.ghost-button:hover,
.secondary-admin-button:hover {
  border-color: #b9c7d7;
  background: white;
}

.primary-admin-button {
  border: 1px solid var(--stellantis-blue);
  color: white;
  background: var(--stellantis-blue);
  font-weight: 700;
}

.primary-admin-button:hover {
  background: var(--stellantis-blue-dark);
  border-color: var(--stellantis-blue-dark);
}

.primary-admin-button.compact {
  padding-inline: 17px;
}

.full-width {
  width: 100%;
}

.admin-main {
  position: relative;
  z-index: 1;
}

.admin-login {
  min-height: calc(100vh - 72px);
  display: grid;
  place-items: center;
  padding: 32px 20px;
}

.login-card {
  width: min(450px, 100%);
  padding: 34px;
  border: 1px solid rgba(26, 56, 92, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 70px rgba(25, 47, 77, 0.13);
}

.login-logo {
  width: 145px;
  height: auto;
  margin-bottom: 34px;
}

.admin-eyebrow {
  color: #60738a;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.16em;
}

.login-card h1,
.workspace-header h1,
.sidebar-heading h2 {
  margin: 7px 0 8px;
  letter-spacing: -0.045em;
}

.login-card h1 {
  font-size: 30px;
}

.login-card > p {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}

.login-card label {
  display: block;
  margin-bottom: 7px;
  font-size: 10px;
  font-weight: 700;
}

.login-field {
  height: 47px;
  padding: 0 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
}

.login-field:focus-within {
  border-color: rgba(36, 55, 130, 0.5);
  box-shadow: 0 0 0 4px rgba(36, 55, 130, 0.07);
}

.login-field span {
  color: #7b89a0;
  font-size: 8px;
  font-weight: 800;
  letter-spacing: 0.1em;
}

.login-field input {
  flex: 1;
  min-width: 0;
  border: 0;
  outline: 0;
  color: var(--ink);
  background: transparent;
  font-size: 11px;
}

.login-error {
  min-height: 18px;
  margin: 7px 0 3px;
  color: var(--danger);
  font-size: 9px;
}

.login-card .primary-admin-button {
  width: 100%;
  min-height: 44px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 16px;
}

.login-note {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  color: #8190a2;
  font-size: 8px;
}

.login-note code {
  color: #40536a;
}

.admin-app {
  width: min(1560px, calc(100% - 40px));
  margin: 24px auto 60px;
  display: grid;
  grid-template-columns: 270px minmax(0, 1fr);
  gap: 20px;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 96px;
  padding: 21px;
  border: 1px solid rgba(24, 54, 90, 0.11);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 8px 30px rgba(28, 50, 78, 0.06);
}

.sidebar-heading h2 {
  font-size: 21px;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin: 18px 0;
  border: 1px solid var(--line);
  border-radius: 11px;
  overflow: hidden;
  background: var(--line);
  gap: 1px;
}

.summary-grid > div {
  padding: 12px 5px;
  text-align: center;
  background: white;
}

.summary-grid strong,
.summary-grid span {
  display: block;
}

.summary-grid strong {
  font-size: 20px;
}

.summary-grid span {
  margin-top: 2px;
  color: #7d8b9c;
  font-size: 7px;
}

.sidebar-section {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}

.sidebar-label {
  display: flex;
  justify-content: space-between;
  margin-bottom: 11px;
  color: #4b5e74;
  font-size: 9px;
  font-weight: 700;
}

.sidebar-label small {
  color: #919eac;
  font-size: 7px;
  letter-spacing: 0.08em;
}

.department-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.department-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: center;
  font-size: 9px;
}

.department-row > span {
  display: flex;
  align-items: center;
  gap: 7px;
}

.department-row i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--stellantis-blue);
}

.department-row b {
  color: #53657a;
  font-weight: 600;
}

#liveStageSelect {
  width: 100%;
  height: 39px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  color: #34475e;
  background: white;
  font-size: 9px;
}

#applyStageButton {
  margin-top: 8px;
}

.sidebar-links {
  padding-top: 15px;
  border-top: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.sidebar-links a {
  color: #48627e;
  font-size: 9px;
  text-decoration: none;
}

.sidebar-links a:hover {
  color: var(--stellantis-blue);
}

.agenda-workspace {
  min-width: 0;
}

.workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 16px;
}

.workspace-header h1 {
  font-size: 31px;
}

.workspace-header p {
  margin: 0;
  color: var(--muted);
  font-size: 10px;
}

.workspace-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.save-state {
  margin-right: 7px;
  color: #7c8a9a;
  font-size: 8px;
}

.save-state.is-dirty {
  color: #a96b17;
}

.publish-banner {
  margin-bottom: 13px;
  padding: 13px 16px;
  border: 1px solid #dce6f2;
  border-radius: 11px;
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 15px;
}

.publish-banner div {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.publish-banner strong {
  color: #2c4562;
  font-size: 9px;
}

.publish-banner span {
  color: #7b8998;
  font-size: 8px;
}

.publish-banner > span {
  padding: 5px 8px;
  border-radius: 99px;
  background: #e9f2fa;
  color: #376a94;
  white-space: nowrap;
}

.agenda-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agenda-item {
  border: 1px solid rgba(25, 55, 91, 0.12);
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.94);
  overflow: hidden;
  box-shadow: 0 5px 18px rgba(25, 50, 80, 0.045);
}

.agenda-item-header {
  min-height: 51px;
  padding: 9px 13px 9px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid #edf1f5;
}

.stage-number {
  width: 29px;
  height: 29px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: white;
  background: var(--stellantis-blue);
  font-size: 8px;
  font-weight: 800;
}

.agenda-item-title {
  min-width: 0;
}

.agenda-item-title strong {
  display: block;
  font-size: 11px;
}

.agenda-item-title span {
  display: block;
  margin-top: 2px;
  color: #8190a0;
  font-size: 8px;
}

.agenda-item-controls {
  margin-left: auto;
  display: flex;
  gap: 4px;
}

.icon-admin-button {
  appearance: none;
  width: 28px;
  height: 28px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: white;
  color: #66788b;
  cursor: pointer;
}

.icon-admin-button:hover {
  border-color: #adbdcf;
  color: var(--stellantis-blue);
}

.icon-admin-button.delete:hover {
  border-color: #e2b8c0;
  color: var(--danger);
}

.agenda-fields {
  padding: 15px 16px 17px;
  display: grid;
  grid-template-columns: 0.7fr 0.9fr 0.7fr 0.7fr 1.4fr 1.1fr;
  gap: 10px;
}

.field-group {
  min-width: 0;
}

.field-group.full {
  grid-column: 1 / -1;
}

.field-group.span-2 {
  grid-column: span 2;
}

.field-group label {
  display: block;
  margin-bottom: 5px;
  color: #708094;
  font-size: 7px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  border: 1px solid #dfe6ee;
  border-radius: 8px;
  outline: 0;
  color: #24374d;
  background: #fbfcfe;
  font-size: 9px;
}

.field-group input,
.field-group select {
  height: 35px;
  padding: 0 9px;
}

.field-group textarea {
  min-height: 58px;
  padding: 8px 9px;
  resize: vertical;
  line-height: 1.55;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: rgba(36, 55, 130, 0.42);
  box-shadow: 0 0 0 3px rgba(36, 55, 130, 0.05);
  background: white;
}

.add-stage-button {
  appearance: none;
  width: 100%;
  min-height: 48px;
  margin-top: 12px;
  border: 1px dashed #c7d4e2;
  border-radius: 13px;
  color: #526b84;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 10px;
}

.add-stage-button span {
  font-size: 18px;
  font-weight: 300;
}

.add-stage-button:hover {
  border-color: #7b9bb9;
  background: white;
  color: var(--stellantis-blue);
}

.admin-toast {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 20px;
  padding: 10px 15px;
  border-radius: 9px;
  background: #17284a;
  color: white;
  font-size: 9px;
  opacity: 0;
  transform: translate(-50%, 8px);
  pointer-events: none;
  transition:
    opacity 0.2s,
    transform 0.2s;
}

.admin-toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1120px) {
  .admin-app {
    grid-template-columns: 230px minmax(0, 1fr);
  }

  .agenda-fields {
    grid-template-columns: repeat(4, 1fr);
  }

  .field-group.span-2 {
    grid-column: span 1;
  }

  .workspace-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .admin-topbar {
    height: 62px;
    padding: 0 13px;
  }

  .admin-brand > img {
    width: 78px;
  }

  .admin-brand-rule,
  .admin-status {
    display: none;
  }

  .admin-brand-copy small {
    font-size: 6px;
  }

  .ghost-button {
    padding: 8px 10px;
  }

  .admin-app {
    width: calc(100% - 22px);
    margin-top: 12px;
    display: flex;
    flex-direction: column;
  }

  .admin-sidebar {
    position: static;
    width: 100%;
  }

  .agenda-workspace {
    width: 100%;
  }

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

  .agenda-fields {
    grid-template-columns: repeat(2, 1fr);
  }

  .field-group.full {
    grid-column: 1 / -1;
  }

  .field-group.span-2 {
    grid-column: span 2;
  }
}

@media (max-width: 480px) {
  .admin-topbar-actions .ghost-button:first-of-type {
    display: none;
  }

  .login-card {
    padding: 25px 20px;
  }

  .login-logo {
    width: 122px;
  }

  .agenda-fields {
    grid-template-columns: 1fr;
  }

  .field-group.span-2 {
    grid-column: auto;
  }
}

/* ===== 内容管理（下架/恢复）===== */

.view-tabs {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.view-tabs .secondary-admin-button.is-active {
  background: var(--stellantis-blue);
  border-color: var(--stellantis-blue);
  color: var(--white);
}

.post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.post-item {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.post-item.is-hidden {
  background: #faf5f6;
  border-color: #e8d3d8;
}

.post-item.is-hidden .post-text,
.post-item.is-hidden .post-thumbs {
  opacity: 0.55;
}

.post-main {
  flex: 1;
  min-width: 0;
}

.post-item-header {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  font-size: 13px;
  color: var(--muted);
}

.post-item-header strong {
  color: var(--ink);
  font-size: 14px;
}

.post-type-tag {
  font-style: normal;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  font-size: 12px;
}

.post-hidden-tag {
  font-style: normal;
  padding: 2px 8px;
  border-radius: 999px;
  background: #f7e7ea;
  border: 1px solid #e8c4cc;
  color: var(--danger);
  font-size: 12px;
  font-weight: 600;
}

.post-text {
  margin: 8px 0 0;
  font-size: 14px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.post-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.post-thumb {
  width: 84px;
  height: 84px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--soft);
  flex: none;
}

.post-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.post-actions {
  display: flex;
  align-items: center;
  flex: none;
}

.post-empty {
  padding: 32px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 720px) {
  .post-item {
    flex-direction: column;
  }

  .post-actions {
    flex-direction: row;
    width: 100%;
  }

  .post-actions button {
    flex: 1;
    min-height: 44px;
    font-size: 14px;
  }
}

/* ===== 上热门 ===== */

@media (min-width: 721px) {
  .post-actions {
    flex-direction: column;
    gap: 8px;
  }
}

.post-item.is-featured {
  border-color: #f0c46a;
  box-shadow: 0 0 0 1px rgba(240, 196, 106, 0.45);
}

.post-like-tag {
  font-style: normal;
  color: #b83e50;
  font-size: 12px;
  font-weight: 600;
}

.post-featured-tag {
  font-style: normal;
  padding: 2px 8px;
  border-radius: 999px;
  background: #fdf3df;
  border: 1px solid #f0c46a;
  color: #8a6116;
  font-size: 12px;
  font-weight: 600;
}

/* ===== 完全删除按钮 ===== */

.post-delete-button {
  color: var(--danger);
  border-color: #e8c4cc;
}

.post-delete-button:hover {
  background: #f9eef1;
}

/* ===== 行程管理 ===== */

.trip-plates {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
  padding: 16px 18px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 14px;
}

.plate-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  flex: 1;
  min-width: 180px;
}

.plate-field label {
  font-size: 12px;
  color: var(--muted);
}

.plate-field input {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 16px;
  letter-spacing: 0.04em;
}

.trip-search {
  margin-bottom: 14px;
}

.trip-search input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  font-size: 14px;
}

.trip-cars {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.trip-car {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
}

.trip-car-head {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.trip-car-head strong {
  font-size: 16px;
}

.trip-plate {
  font-size: 13px;
  padding: 3px 10px;
  border-radius: 8px;
  background: #eef4fa;
  border: 1px solid var(--line);
  letter-spacing: 0.06em;
}

.trip-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--muted);
}

.trip-progress {
  height: 5px;
  border-radius: 3px;
  background: var(--soft);
  margin: 12px 0 14px;
  overflow: hidden;
}

.trip-progress span {
  display: block;
  height: 100%;
  background: #2e7d32;
  border-radius: 3px;
  transition: width 0.3s ease;
}

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

/* .trip-person 样式已拆分为 main + remove */

.trip-person-name {
  font-size: 14px;
  color: var(--ink);
  font-weight: 600;
}

.trip-person-room {
  font-size: 11px;
  color: var(--muted);
  flex: 1;
}

.trip-person-state {
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

.trip-person.is-boarded {
  background: #e8f5e9;
  border-color: #a5d6a7;
}

.trip-person.is-boarded .trip-person-state {
  color: #2e7d32;
  font-weight: 700;
}

@media (max-width: 720px) {
  .trip-people {
    grid-template-columns: 1fr;
  }

  .trip-person {
    min-height: 44px;
  }
}

/* ===== 房间管理 ===== */

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
}

.room-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
}

.room-card-head {
  display: flex;
  gap: 8px;
  align-items: center;
}

.room-number-input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.room-people {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.room-person {
  font-size: 13px;
  color: var(--ink);
  background: var(--soft);
  border-radius: 8px;
  padding: 5px 10px;
}

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

/* ===== 房间管理: 添加/编辑 ===== */

.room-add-bar {
  grid-column: 1 / -1;
  display: flex;
  gap: 8px;
}

.room-add-bar input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 15px;
}

.room-card-head .icon-admin-button.delete {
  flex: none;
}

.room-person {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.room-car {
  font-style: normal;
  font-size: 10px;
  color: var(--stellantis-blue);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 5px;
  background: var(--soft);
}

.room-person-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
}

.room-person-remove:hover {
  color: var(--danger);
}

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

.room-add-person {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px dashed var(--line);
  display: flex;
  gap: 6px;
}

.room-add-person input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 10px;
  font-size: 14px;
}

.room-add-person select {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 7px 6px;
  font-size: 13px;
  background: var(--white);
}

/* ===== 房型/行程加人 ===== */

.room-add-bar select,
.room-type-select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  background: var(--white);
}

.room-type-select {
  flex: none;
  max-width: 118px;
}

.trip-add-person {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  display: flex;
  gap: 8px;
}

.trip-add-person input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 14px;
}

/* ===== 行程人员删除 ===== */

.trip-person {
  display: flex;
  align-items: stretch;
  gap: 0;
}

.trip-person-main {
  appearance: none;
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: var(--soft);
  padding: 9px 12px;
  cursor: pointer;
  text-align: left;
  font: inherit;
}

.trip-person-remove {
  appearance: none;
  border: 1px solid var(--line);
  border-radius: 0 10px 10px 0;
  background: var(--soft);
  color: var(--muted);
  width: 34px;
  cursor: pointer;
  font-size: 15px;
}

.trip-person-remove:hover {
  color: var(--danger);
  background: #f9eef1;
}

.trip-person.is-boarded .trip-person-main,
.trip-person.is-boarded .trip-person-remove {
  background: #e8f5e9;
  border-color: #a5d6a7;
}

.trip-person.is-boarded .trip-person-remove {
  border-left-color: #a5d6a7;
}

/* ===== 入住/退房 ===== */

.room-checkin-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
}

.room-checkin-state {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--soft);
  border: 1px solid var(--line);
  color: var(--muted);
  margin-right: auto;
}

.room-checkin-state.is-in {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
  font-weight: 700;
}

.room-checkin-state.is-out {
  background: #fdf3df;
  border-color: #f0c46a;
  color: #8a6116;
  font-weight: 700;
}

.room-checkin-row .ghost-button.compact {
  font-size: 12px;
  padding: 5px 10px;
}

.room-checkin-row .ghost-button.is-active-checkin {
  background: #e8f5e9;
  border-color: #a5d6a7;
  color: #2e7d32;
}

.room-checkin-row .ghost-button.is-active-checkout {
  background: #fdf3df;
  border-color: #f0c46a;
  color: #8a6116;
}

/* 输入框自动填充时也保持白底(与普通状态一致) */

.plate-field input:-webkit-autofill,
.plate-field input:-webkit-autofill:hover,
.plate-field input:-webkit-autofill:focus,
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset;
  -webkit-text-fill-color: var(--ink);
  caret-color: var(--ink);
  transition: background-color 9999s ease-out;
}

/* ===== 行程管理·一键上下车 ===== */
.trip-bulk-actions {
  display: flex;
  gap: 8px;
  margin: 10px 0 12px;
}

.trip-bulk {
  appearance: none;
  flex: 1;
  border: 1px solid rgba(31, 119, 173, 0.35);
  border-radius: 9px;
  background: #eaf4fb;
  color: #17639c;
  font-size: 11px;
  font-weight: 700;
  padding: 8px 6px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.trip-bulk:hover {
  background: #dbeefb;
}

.trip-bulk:active {
  transform: scale(0.98);
}

.trip-bulk.is-reset {
  border-color: rgba(120, 120, 120, 0.3);
  background: #f3f4f2;
  color: #6a7268;
}

.trip-bulk.is-reset:hover {
  background: #e9eae7;
}

/* ===== 后台·自绘确认弹窗 ===== */
.admin-confirm {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(10, 22, 36, 0.44);
  backdrop-filter: blur(3px);
}

.admin-confirm[hidden] {
  display: none;
}

.admin-confirm-card {
  width: min(360px, 100%);
  background: #ffffff;
  border-radius: 16px;
  padding: 20px 18px 16px;
  box-shadow: 0 24px 60px rgba(5, 27, 50, 0.28);
}

.admin-confirm-card p {
  margin: 0 0 16px;
  font-size: 13px;
  line-height: 1.6;
  color: #22313f;
}

.admin-confirm-actions {
  display: flex;
  gap: 10px;
}

.admin-confirm-actions button {
  appearance: none;
  flex: 1;
  border: 1px solid rgba(14, 47, 80, 0.14);
  border-radius: 10px;
  background: #f4f6f4;
  color: #4b5a66;
  font-size: 13px;
  font-weight: 700;
  padding: 9px 0;
  cursor: pointer;
}

.admin-confirm-actions button.is-danger {
  border-color: rgba(198, 62, 50, 0.4);
  background: #c63e32;
  color: #ffffff;
}

.admin-confirm-actions button.is-danger:hover {
  background: #b23428;
}

/* ===== 行程管理·当前段横幅 ===== */
.trip-leg-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 10px 0 14px;
  padding: 10px 14px;
  border: 1px dashed rgba(31, 119, 173, 0.4);
  border-radius: 11px;
  background: #eef6fc;
}

.trip-leg-banner b {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #17639c;
}

.trip-leg-banner span {
  font-size: 13px;
  font-weight: 700;
  color: #10344f;
}

/* ===== 行程管理·分段查看 ===== */
.trip-leg-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 10px 0 14px;
  flex-wrap: wrap;
}

.trip-leg-select {
  display: flex;
  align-items: center;
  gap: 8px;
}

.trip-leg-select b {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: #5a6b78;
}

.trip-leg-select select {
  border: 1px solid rgba(14, 47, 80, 0.18);
  border-radius: 9px;
  background: white;
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 700;
  color: #10344f;
  cursor: pointer;
}

.trip-leg-row .trip-leg-banner {
  margin: 0;
  flex: 1;
  min-width: 200px;
}

.trip-leg-banner.is-readonly {
  border-color: rgba(150, 120, 60, 0.45);
  background: #faf4e6;
}

.trip-leg-banner.is-readonly b {
  color: #9a6d1f;
}

.trip-person.is-readonly .trip-person-main {
  cursor: default;
}

.trip-person.is-readonly .trip-person-state {
  color: #6a7268;
}

/* ===== 行程管理·发车按钮 ===== */
.trip-depart-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 12px;
}

.trip-depart {
  appearance: none;
  width: 100%;
  border: 1px solid rgba(46, 125, 50, 0.45);
  border-radius: 9px;
  background: #2e7d32;
  color: #ffffff;
  font-size: 12px;
  font-weight: 800;
  padding: 9px 6px;
  cursor: pointer;
  transition: background 0.15s, transform 0.1s;
}

.trip-depart:hover {
  background: #276b2b;
}

.trip-depart:active {
  transform: scale(0.98);
}

.trip-departed-flag {
  flex: 1;
  padding: 8px 10px;
  border-radius: 9px;
  background: #e5f3e6;
  color: #2e7d32;
  font-size: 12px;
  font-weight: 800;
}

.trip-depart-row .trip-bulk {
  flex: 0 0 auto;
  width: auto;
  padding: 8px 14px;
}

/* ===== 晚宴互动 ===== */
.game-panels {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.game-panel {
  border: 1px solid rgba(31, 110, 173, 0.16);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.75);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.game-panel h2 {
  margin: 0;
  font-size: 16px;
}

.game-panel-tip {
  margin: 0;
  font-size: 12px;
  color: #6d8295;
  line-height: 1.5;
}

.game-score-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(128px, 1fr));
  gap: 10px;
}

.game-score-card {
  border: 1px solid rgba(31, 110, 173, 0.14);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  background: #fff;
}

.game-score-card b {
  font-size: 13px;
  color: #33475a;
}

.game-score-card strong {
  font-size: 26px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: #1f6ead;
}

.game-score-btns {
  display: flex;
  gap: 6px;
}

.game-score-btns button {
  appearance: none;
  border: 1px solid rgba(31, 110, 173, 0.3);
  background: #f2f8fd;
  color: #1f6ead;
  border-radius: 8px;
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.game-score-btns button:active {
  background: #e2effa;
}

.game-draw-result {
  border: 1px dashed rgba(31, 110, 173, 0.3);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-size: 15px;
  color: #5b7085;
  background: #fff;
}

.game-draw-result b {
  display: block;
  font-size: 26px;
  color: #17324a;
  margin-bottom: 2px;
}

.game-draw-result small {
  color: #7d90a2;
}

.game-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.game-history {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.game-history-item {
  font-size: 12px;
  color: #5b7085;
  border: 1px solid rgba(31, 110, 173, 0.14);
  border-radius: 999px;
  padding: 3px 10px;
  background: #fff;
}

.game-history-item time {
  color: #98a9b8;
  margin-left: 4px;
}

.game-timer-display {
  font-size: 44px;
  font-weight: 800;
  text-align: center;
  font-variant-numeric: tabular-nums;
  color: #33475a;
  padding: 6px 0 2px;
}

.game-timer-display.is-running {
  color: #1f6ead;
}

.game-timer-presets {
  display: flex;
  gap: 8px;
}

.game-timer-presets button {
  appearance: none;
  flex: 1;
  border: 1px solid rgba(31, 110, 173, 0.3);
  background: #f2f8fd;
  color: #1f6ead;
  border-radius: 10px;
  padding: 9px 0;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.game-timer-presets button:active {
  background: #e2effa;
}

.game-timer-custom {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: 8px;
}

.game-timer-custom input {
  border: 1px solid rgba(31, 110, 173, 0.24);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 13px;
  background: #fff;
}

.game-buzz-state {
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  font-size: 16px;
  font-weight: 700;
  color: #7d90a2;
  background: #f3f6fa;
}

.game-buzz-state.is-open {
  color: #b06a00;
  background: #fff6e3;
}

.game-buzz-state.is-won {
  color: #147a4d;
  background: #e8f9f0;
}

@media (max-width: 980px) {
  .game-panels {
    grid-template-columns: 1fr;
  }
}

.admin-icp {
  text-align: center;
  padding: 18px 0 26px;
}

.admin-icp a {
  font-size: 11px;
  color: #98a9b8;
  text-decoration: none;
  letter-spacing: 0.5px;
}
