/* 運籌公告後台 */
.ops-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.ops-header {
  position: sticky;
  top: 0;
  z-index: 40;
  border-bottom: 1px solid var(--hub-border-subtle);
  background: var(--hub-header-bg-scrolled);
  backdrop-filter: blur(12px);
}

.ops-header-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 18px var(--hub-page-pad-x);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.ops-header-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.ops-back {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid var(--hub-border);
  background: var(--hub-surface-card);
  color: var(--hub-accent);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.ops-eyebrow {
  margin: 0 0 2px;
  font-size: 12px;
  color: var(--hub-text-soft);
  letter-spacing: 0.04em;
}

.ops-header h1 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
}

.ops-main {
  flex: 1;
  max-width: 1100px;
  width: 100%;
  margin: 0 auto;
  padding: 24px var(--hub-page-pad-x) 40px;
}

.ops-hint {
  margin: 0 0 16px;
  color: var(--hub-text-muted);
  font-size: 14px;
  line-height: 1.5;
}

.ops-alert {
  margin-bottom: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 14px;
  border: 1px solid #f5c2c7;
  background: #fff5f5;
  color: #842029;
}

.ops-alert.is-success {
  border-color: #b8ddd6;
  background: #edf7f4;
  color: #134e4a;
}

.ops-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--hub-border);
  border-radius: 14px;
  background: var(--hub-surface-card);
}

.ops-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.ops-table th,
.ops-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--hub-border-subtle);
  vertical-align: top;
}

.ops-table th {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--hub-text-soft);
  background: var(--hub-surface);
}

.ops-table tr:last-child td {
  border-bottom: none;
}

.ops-empty {
  text-align: center;
  color: var(--hub-text-muted);
  padding: 32px 14px !important;
}

.ops-title-cell strong {
  display: block;
  margin-bottom: 4px;
}

.ops-title-cell span {
  color: var(--hub-text-muted);
  font-size: 13px;
  line-height: 1.4;
}

.ops-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.ops-badge--live { background: #d1fae5; color: #065f46; }
.ops-badge--draft { background: #f3f4f6; color: #4b5563; }
.ops-badge--scheduled { background: #dbeafe; color: #1e40af; }
.ops-badge--expired { background: #fee2e2; color: #991b1b; }

.ops-schedule {
  font-size: 13px;
  color: var(--hub-text-muted);
  line-height: 1.45;
  white-space: nowrap;
}

.ops-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.ops-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: 1px solid var(--hub-border);
  background: var(--hub-surface);
  color: var(--hub-text);
  cursor: pointer;
  font-family: inherit;
}

.ops-icon-btn:hover {
  border-color: var(--hub-accent);
  color: var(--hub-accent);
}

.ops-icon-btn--danger:hover {
  border-color: #dc3545;
  color: #dc3545;
}

.v16-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: 10px;
  border: none;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
}

.v16-btn-primary {
  background: var(--hub-accent);
  color: #fff;
}

.v16-btn-primary:hover {
  background: var(--hub-accent-deep);
}

/* Modal */
.ops-modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(28, 43, 40, 0.45);
}

.ops-modal[hidden] {
  display: none;
}

.ops-modal-card {
  width: min(560px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  padding: 22px 24px;
  border-radius: 16px;
  background: #fff;
  box-shadow: 0 20px 50px rgba(13, 46, 42, 0.18);
}

.ops-modal-card h2 {
  margin: 0 0 18px;
  font-size: 20px;
}

.ops-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ops-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--hub-text);
}

.ops-input,
.ops-textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--hub-border);
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  margin-bottom: 8px;
}

.ops-textarea {
  resize: vertical;
  min-height: 80px;
}

.ops-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.ops-field-hint {
  margin: -4px 0 8px;
  font-size: 12px;
  color: var(--hub-text-soft);
}

.ops-check {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0 4px;
  font-size: 14px;
}

.ops-picker {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-bottom: 4px;
}

.ops-picker[hidden],
#ops-audience-targets-wrap[hidden] {
  display: none;
}

.ops-picker-search {
  margin-bottom: 0;
}

.ops-picker-list {
  max-height: 220px;
  overflow-y: auto;
  border: 1px solid var(--hub-border);
  border-radius: 10px;
  background: var(--hub-surface);
  padding: 6px 8px;
}

.ops-picker-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 6px;
  border-radius: 8px;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

.ops-picker-item:hover {
  background: var(--hub-accent-soft);
}

.ops-picker-item input {
  margin-top: 2px;
  flex-shrink: 0;
}

.ops-picker-item strong {
  display: block;
  font-weight: 600;
  color: var(--hub-text);
}

.ops-picker-item span {
  display: block;
  font-size: 12px;
  color: var(--hub-text-muted);
  margin-top: 2px;
}

.ops-picker-empty {
  padding: 16px 8px;
  text-align: center;
  color: var(--hub-text-muted);
  font-size: 13px;
}

.ops-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 12px;
}

@media (max-width: 720px) {
  .ops-form-row {
    grid-template-columns: 1fr;
  }

  .ops-table th:nth-child(4),
  .ops-table td:nth-child(4),
  .ops-table th:nth-child(6),
  .ops-table td:nth-child(6) {
    display: none;
  }
}
