:root {
  color-scheme: light;
  --canvas: #f3f5f3;
  --surface: #ffffff;
  --surface-subtle: #f8faf8;
  --surface-strong: #e8eee9;
  --text: #17201b;
  --text-muted: #5d6b62;
  --border: #d4ddd6;
  --border-strong: #aebbb2;
  --primary: #176b4d;
  --primary-hover: #10583e;
  --primary-soft: #e2f2eb;
  --info: #12667a;
  --info-soft: #e2f2f5;
  --warning: #9a5a08;
  --warning-soft: #fff3d6;
  --danger: #b42318;
  --danger-hover: #8f1d15;
  --danger-soft: #fee9e7;
  --sidebar: #202722;
  --sidebar-muted: #aeb9b1;
  --focus: #0b7894;
  --shadow: 0 10px 28px rgba(23, 32, 27, 0.12);
  --sidebar-width: 244px;
  --topbar-height: 64px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
  margin: 0;
  background: var(--canvas);
  color: var(--text);
}

body {
  overflow-x: hidden;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: 0;
}

button,
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
a:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--focus) 45%, transparent);
  outline-offset: 2px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 8px;
  left: 8px;
  padding: 10px 14px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.icon {
  display: inline-block;
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  pointer-events: none;
}

.boot-screen {
  min-height: 100vh;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 20px;
}

.boot-spinner,
.button-spinner {
  width: 24px;
  height: 24px;
  border: 3px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.button-spinner {
  width: 16px;
  height: 16px;
  border-width: 2px;
}

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

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 440px) minmax(0, 1fr);
  background: var(--surface);
}

.login-panel {
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 48px clamp(28px, 5vw, 68px);
  border-right: 1px solid var(--border);
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 52px;
}

.login-brand img {
  width: 42px;
  height: 42px;
}

.brand-name {
  font-size: 1.15rem;
  font-weight: 750;
}

.brand-caption {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.login-panel h1 {
  margin: 0 0 8px;
  font-size: 1.65rem;
  line-height: 1.25;
}

.login-subtitle {
  margin: 0 0 28px;
  color: var(--text-muted);
}

.login-visual {
  position: relative;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: #e9efeb;
}

.system-map {
  width: min(680px, 82%);
  display: grid;
  grid-template-columns: repeat(3, minmax(120px, 1fr));
  align-items: center;
  gap: 24px;
}

.map-node {
  min-height: 128px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 16px 34px rgba(23, 32, 27, 0.08);
  color: var(--text-muted);
}

.map-node.primary {
  border-color: var(--primary);
  color: var(--primary);
}

.map-node .icon {
  width: 30px;
  height: 30px;
}

.app-shell {
  min-height: 100vh;
}

.sidebar {
  position: fixed;
  z-index: 30;
  inset: 0 auto 0 0;
  width: var(--sidebar-width);
  display: flex;
  flex-direction: column;
  background: var(--sidebar);
  color: #fff;
}

.sidebar-brand {
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 20px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-brand img {
  width: 34px;
  height: 34px;
}

.sidebar-brand small {
  display: block;
  color: var(--sidebar-muted);
  font-size: 0.72rem;
}

.sidebar-nav {
  display: grid;
  gap: 4px;
  padding: 18px 12px;
  overflow-y: auto;
}

.nav-button {
  width: 100%;
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--sidebar-muted);
  text-align: left;
  transition: background 180ms ease, color 180ms ease;
}

.nav-button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-button.active {
  background: #e1f0e8;
  color: #153c2d;
  font-weight: 700;
}

.sidebar-user {
  margin-top: auto;
  padding: 16px 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.avatar {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dce8e0;
  color: #244f3e;
  font-weight: 750;
}

.user-meta {
  min-width: 0;
  flex: 1;
}

.user-meta strong,
.user-meta span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-meta strong {
  font-size: 0.86rem;
}

.user-meta span {
  color: var(--sidebar-muted);
  font-size: 0.72rem;
}

.sidebar-user-actions {
  grid-column: 2;
  display: flex;
  gap: 4px;
}

.main-shell {
  min-height: 100vh;
  margin-left: var(--sidebar-width);
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  height: var(--topbar-height);
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 28px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.96);
}

.mobile-menu {
  display: none;
}

.topbar-title {
  min-width: 0;
  flex: 1;
}

.topbar-title strong,
.topbar-title span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topbar-title strong {
  font-size: 0.95rem;
}

.topbar-title span {
  color: var(--text-muted);
  font-size: 0.76rem;
}

.context-select {
  width: min(270px, 30vw);
}

.content {
  width: 100%;
  max-width: 1500px;
  margin: 0 auto;
  padding: 28px;
}

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

.page-header h1 {
  margin: 0;
  font-size: 1.55rem;
  line-height: 1.25;
}

.page-header p {
  margin: 5px 0 0;
  color: var(--text-muted);
}

.page-actions,
.toolbar,
.inline-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}

.toolbar .input,
.toolbar .select {
  width: auto;
  min-width: 142px;
}

.toolbar .input[type="datetime-local"] {
  min-width: 188px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 24px;
}

.metric-card {
  min-height: 112px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

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

.metric-value {
  margin-top: 8px;
  font-size: 1.75rem;
  font-weight: 760;
  line-height: 1;
}

.metric-value.compact {
  font-size: 1.25rem;
  line-height: 1.2;
}

.metric-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--primary-soft);
  color: var(--primary);
}

.metric-icon.info {
  background: var(--info-soft);
  color: var(--info);
}

.section {
  margin-top: 24px;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 10px;
}

.section-header h2 {
  margin: 0;
  font-size: 1rem;
}

.table-frame {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.table-scroll {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 0.875rem;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: middle;
}

th {
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  text-transform: uppercase;
}

tbody tr {
  transition: background 160ms ease;
}

tbody tr:hover {
  background: #f6faf7;
}

tbody tr:last-child td {
  border-bottom: 0;
}

.model-artifacts-table {
  min-width: 1080px;
}

.model-artifacts-table th {
  white-space: nowrap;
}

.model-artifacts-table a {
  color: var(--primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.cell-primary {
  font-weight: 700;
}

.cell-secondary {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.82rem;
}

.uuid-copy {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-top: 2px;
  padding: 0;
  border: none;
  background: none;
  color: var(--accent, #4c8bf5);
  font-size: 0.76rem;
  cursor: pointer;
  transition: color 0.15s ease;
}

.uuid-copy:hover {
  color: var(--accent-strong, #2f6fe0);
  text-decoration: underline;
}

.uuid-copy svg {
  width: 12px;
  height: 12px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 26px;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text-muted);
  font-size: 0.74rem;
  font-weight: 700;
  white-space: nowrap;
}

.badge::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  content: "";
}

.badge.active {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge.online {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge.offline {
  background: var(--surface-strong);
  color: var(--text-muted);
}

.badge.fulfilled {
  background: var(--primary-soft);
  color: var(--primary);
}

.badge.pending {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.draft {
  background: var(--warning-soft);
  color: var(--warning);
}

.badge.disabled,
.badge.expired,
.badge.revoked,
.badge.rejected {
  background: var(--danger-soft);
  color: var(--danger);
}

.button {
  min-height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 0 14px;
  border: 1px solid transparent;
  border-radius: 5px;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, color 180ms ease;
}

.button:hover {
  background: var(--primary-hover);
}

.button.secondary {
  border-color: var(--border-strong);
  background: var(--surface);
  color: var(--text);
}

.button.secondary:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.button.danger {
  background: var(--danger);
}

.button.danger:hover {
  background: var(--danger-hover);
}

.button.ghost {
  border-color: transparent;
  background: transparent;
  color: var(--text-muted);
}

.button.ghost:hover {
  background: var(--surface-strong);
  color: var(--text);
}

.button.small {
  min-height: 34px;
  padding: 0 10px;
  font-size: 0.8rem;
}

.icon-button {
  width: 42px;
  height: 42px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text-muted);
  transition: border-color 180ms ease, background 180ms ease, color 180ms ease;
}

.icon-button.mobile-menu {
  display: none;
}

.topbar > .inline-actions {
  min-width: 0;
  flex-wrap: nowrap;
}

.topbar > .inline-actions > .field-label {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.icon-button:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.icon-button.danger {
  color: var(--danger);
}

.icon-button.danger:hover {
  border-color: var(--danger);
  color: var(--danger-hover);
}

.icon-button.on-dark {
  border-color: transparent;
  background: transparent;
  color: var(--sidebar-muted);
}

.icon-button.on-dark:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.button:disabled,
.icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.55;
}

.field {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.field label,
.field-label {
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
}

.field-hint {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.input,
.select,
.textarea {
  min-width: 0;
  max-width: 100%;
  width: 100%;
  min-height: 42px;
  padding: 8px 11px;
  border: 1px solid var(--border-strong);
  border-radius: 5px;
  background: var(--surface);
  color: var(--text);
}

.textarea {
  min-height: 90px;
  resize: vertical;
}

.input::placeholder,
.textarea::placeholder {
  color: #849087;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--focus);
}

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

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

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

.form-error {
  display: none;
  padding: 10px 12px;
  border: 1px solid #f3b7b1;
  border-radius: 5px;
  background: var(--danger-soft);
  color: var(--danger);
  font-size: 0.84rem;
}

.form-error.visible {
  display: block;
}

.empty-state {
  min-height: 260px;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 10px;
  padding: 36px;
  color: var(--text-muted);
  text-align: center;
}

.empty-state .icon {
  width: 34px;
  height: 34px;
}

.empty-state h3,
.empty-state p {
  margin: 0;
}

.empty-state h3 {
  color: var(--text);
  font-size: 1rem;
}

.pagination {
  min-height: 54px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 12px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 0.8rem;
}

.segmented {
  display: inline-flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-strong);
}

.segment {
  min-height: 34px;
  padding: 0 12px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--text-muted);
}

.segment.active {
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 1px 3px rgba(23, 32, 27, 0.12);
  font-weight: 700;
}

dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: calc(100vh - 40px);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
}

dialog.wide {
  width: min(900px, calc(100vw - 32px));
}

dialog::backdrop {
  background: rgba(15, 22, 18, 0.5);
}

.dialog-header,
.dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
}

.dialog-header {
  border-bottom: 1px solid var(--border);
}

.dialog-header h2 {
  margin: 0;
  font-size: 1rem;
}

.dialog-body {
  max-height: calc(100vh - 180px);
  padding: 20px;
  overflow-y: auto;
}

.dialog-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
  background: var(--surface-subtle);
}

.generated-keys {
  width: 100%;
  min-height: 220px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: #f6f8f6;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.82rem;
  line-height: 1.7;
  resize: vertical;
}

.toast-region {
  position: fixed;
  z-index: 80;
  right: 18px;
  bottom: 18px;
  width: min(380px, calc(100vw - 36px));
  display: grid;
  gap: 8px;
}

.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-left: 4px solid var(--primary);
  border-radius: 5px;
  background: var(--surface);
  box-shadow: var(--shadow);
  animation: toast-in 180ms ease-out;
}

.toast.error {
  border-left-color: var(--danger);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(8px); }
}

.busy-bar {
  position: fixed;
  z-index: 60;
  top: 0;
  left: var(--sidebar-width);
  right: 0;
  height: 3px;
  overflow: hidden;
  background: var(--primary-soft);
}

.busy-bar::after {
  position: absolute;
  width: 35%;
  height: 100%;
  background: var(--primary);
  content: "";
  animation: progress 1s ease-in-out infinite;
}

@keyframes progress {
  from { transform: translateX(-100%); }
  to { transform: translateX(390%); }
}

.sidebar-backdrop {
  display: none;
}

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

  .login-page {
    grid-template-columns: minmax(340px, 48%) 1fr;
  }

  .system-map {
    grid-template-columns: 1fr;
    width: min(280px, 76%);
  }

  .map-node {
    min-height: 100px;
  }
}

@media (max-width: 820px) {
  .sidebar {
    transform: translateX(-100%);
    transition: transform 200ms ease;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .sidebar-backdrop.visible {
    position: fixed;
    z-index: 25;
    inset: 0;
    display: block;
    border: 0;
    background: rgba(15, 22, 18, 0.45);
  }

  .main-shell {
    margin-left: 0;
  }

  .busy-bar {
    left: 0;
  }

  .mobile-menu {
    display: inline-grid;
  }

  .icon-button.mobile-menu {
    display: inline-grid;
  }

  .topbar {
    padding: 0 16px;
  }

  .content {
    padding: 20px 16px;
  }

  .context-select {
    width: min(220px, 38vw);
    min-width: 150px;
  }

  .login-page {
    width: 100%;
    max-width: 100vw;
    display: block;
    overflow-x: hidden;
  }

  .login-panel {
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    border-right: 0;
  }

  .login-visual {
    display: none;
  }
}

@media (max-width: 600px) {
  .metrics-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .page-header {
    align-items: stretch;
    flex-direction: column;
  }

  .page-actions .button {
    flex: 1;
  }

  .toolbar,
  .toolbar .inline-actions,
  .toolbar form {
    width: 100%;
  }

  .toolbar .input,
  .toolbar .select,
  .toolbar .input[type="datetime-local"] {
    width: 100%;
    min-width: 0;
  }

  .topbar-title span {
    display: none;
  }

  .topbar > .topbar-title {
    display: none;
  }

  .topbar > .inline-actions {
    flex: 1;
  }

  .topbar > .inline-actions > .topbar-title {
    min-width: 0;
    max-width: calc(100vw - 155px);
  }

  .context-select {
    width: min(220px, calc(100vw - 155px));
    min-width: 0;
    max-width: none;
  }

  .login-panel {
    padding: 32px 24px;
  }

  .login-panel form {
    min-width: 0;
    width: 100%;
  }

  .login-brand {
    margin-bottom: 38px;
  }

  .dialog-body {
    padding: 16px;
  }
}

/* 
   刻意复用既有 CSS 变量而不引入新配色，保证与后台其余页面在同一套设计令牌下。
   公告正文来自服务端纯文本（服务端已拒收标记与控制字符），此处用 pre-wrap 保留
   换行分段，绝不做任何 HTML 解析。 */
.ios-card-list {
  display: grid;
  gap: 14px;
}

.ios-card {
  position: relative;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 1px 2px rgba(23, 32, 27, 0.04), 0 8px 24px rgba(23, 32, 27, 0.06);
  overflow: hidden;
}

/* 左侧 4px 强调条按严重级别着色，是卡片唯一的语义化色彩。 */
.ios-card::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 4px;
  background: var(--border-strong);
  content: "";
}

.ios-card.severity-info::before {
  background: var(--info);
}

.ios-card.severity-warning::before {
  background: var(--warning);
}

.ios-card.severity-critical::before {
  background: var(--danger);
}

.ios-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.ios-card-heading {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  margin: 0;
  font-size: 1.02rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.35;
}

.ios-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 2px 9px;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  white-space: nowrap;
}

.ios-chip.info {
  background: var(--info-soft);
  color: var(--info);
}

.ios-chip.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

.ios-chip.critical {
  background: var(--danger-soft);
  color: var(--danger);
}

.ios-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 600;
  white-space: nowrap;
}

.ios-status::before {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--border-strong);
  content: "";
}

.ios-status.live {
  color: var(--primary);
}

.ios-status.live::before {
  background: var(--primary);
}

.ios-card-body {
  margin: 10px 0 0;
  color: var(--text);
  font-size: 0.92rem;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.ios-card-foot {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.ios-meta {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.ios-card-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-left: auto;
}

/* iOS 风格的胶囊按钮：无边框、浅底、按压时轻微内缩。 */
.ios-action {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 0 13px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-strong);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 650;
  transition: background 0.15s ease, transform 0.1s ease;
}

.ios-action:hover {
  background: color-mix(in srgb, var(--surface-strong) 70%, var(--border-strong));
}

.ios-action:active {
  transform: scale(0.97);
}

.ios-action.danger {
  background: var(--danger-soft);
  color: var(--danger);
}

.ios-action.danger:hover {
  background: color-mix(in srgb, var(--danger-soft) 70%, var(--danger));
  color: var(--surface);
}

.ios-hint {
  margin: 0 0 14px;
  padding: 12px 16px;
  border-radius: 14px;
  background: var(--surface-subtle);
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.55;
}

.ios-hint.warning {
  background: var(--warning-soft);
  color: var(--warning);
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* 公告列表 iOS 风格卡片 - 作者：花落｜MIT */
.announcement-list {
  display: grid;
  gap: 16px;
  padding: 0;
}

.announcement-card {
  background: #ffffff;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  border-left: 4px solid #E7E1D7;
  transition: box-shadow 0.2s ease;
}

.announcement-card:hover {
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

.announcement-card.severity-info {
  border-left-color: #5C9EE8;
}

.announcement-card.severity-warning {
  border-left-color: #F5A623;
}

.announcement-card.severity-critical {
  border-left-color: #C4612F;
}

.announcement-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.announcement-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.announcement-sequence {
  font-size: 13px;
  font-weight: 600;
  color: #8E8E93;
  font-family: 'SF Mono', 'Menlo', monospace;
}

.announcement-severity {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: #F2F2F7;
  color: #1F2421;
}

.announcement-severity.info {
  background: #E3F2FD;
  color: #1976D2;
}

.announcement-severity.warning {
  background: #FFF3E0;
  color: #E65100;
}

.announcement-severity.critical {
  background: #F2E3D6;
  color: #C4612F;
}

/* 展示位置胶囊。刻意用中性灰蓝，避免和 severity（蓝/橙/红）抢视觉权重——
   位置是投放开关，不是紧急程度。作者：花落｜MIT */
.announcement-placement {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
  background: #F2F2F7;
  color: #6B7280;
}

.announcement-placement.gate {
  background: #EDEBFE;
  color: #5B4BC4;
}

.announcement-placement.app {
  background: #E6F4EA;
  color: #2E7D5B;
}

.announcement-placement svg {
  width: 14px;
  height: 14px;
}

.announcement-status {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.announcement-status.draft {
  background: #F2F2F7;
  color: #8E8E93;
}

.announcement-status.active {
  background: #E8F5E9;
  color: #2E7D32;
}

.announcement-status.inactive {
  background: #FFEBEE;
  color: #C62828;
}

.announcement-status svg {
  width: 14px;
  height: 14px;
}

.announcement-actions {
  display: flex;
  gap: 4px;
}

.announcement-title {
  font-size: 17px;
  font-weight: 600;
  color: #1F2421;
  margin: 0 0 8px 0;
  line-height: 1.4;
}

.announcement-body {
  font-size: 15px;
  color: #5C635D;
  line-height: 1.5;
  margin: 0 0 12px 0;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.announcement-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 13px;
  color: #8E8E93;
  padding-top: 8px;
  border-top: 1px solid #F2F2F7;
}

.announcement-footer span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.announcement-footer svg {
  width: 14px;
  height: 14px;
  opacity: 0.7;
}

.announcement-publish-row {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid #F2F2F7;
}

@media (max-width: 768px) {
  .announcement-card {
    padding: 12px;
  }

  .announcement-title {
    font-size: 16px;
  }

  .announcement-body {
    font-size: 14px;
  }
}
