/* Operations console: the approved 188px navigation and paper dashboard. */
.operations-page { --wide: min(1490px, calc(100vw - 52px)); }
.operations-page .site-header, .operations-page .site-header.is-scrolled { width: 100%; height: 66px; padding: 0 28px; left: 0; transform: none; border: 0; border-bottom: 1px solid var(--line); border-radius: 0; background: rgba(246, 241, 232, .97); box-shadow: none; grid-template-columns: 190px 1fr auto; }
.operations-page .site-nav { justify-content: start; }
.operations-page .site-nav::before { content: '管理控制台 / 账号与运营'; color: var(--muted); font-size: 12px; }
.operations-page .site-nav > a { display: none; }
.operations-page .site-particle-field { opacity: .15; }
.operations-page .site-footer { margin-top: 12px; padding: 16px 0 22px; }
.operations-page .operations-shell { display: grid; grid-template-columns: 188px minmax(0, 1fr); gap: 14px; padding: 84px 0 0; font-size: 13px; line-height: 1.5; animation: none; overflow-wrap: normal; }
.oc-sidebar { background: rgba(248, 243, 233, .94); border: 1px solid var(--line); padding: 14px 11px; align-self: start; position: sticky; top: 84px; min-height: calc(100vh - 112px); }
.oc-nav-label { padding: 8px 9px 7px; color: var(--muted); font-size: 11px; letter-spacing: .12em; }
.oc-nav-item { display: flex; align-items: center; gap: 8px; padding: 8px 9px; min-height: 38px; border-left: 2px solid transparent; color: #625e56; font-size: 13px; white-space: nowrap; }
.oc-nav-item > span { font: 10px ui-monospace, monospace; color: var(--muted); }
.oc-nav-item small { font-size: 10px; margin-left: auto; color: var(--warm); }
a.oc-nav-item:hover { background: #ede6d9; color: var(--text); }
.oc-nav-item[aria-current] { border-left-color: var(--text); background: #e7dfd1; font-weight: 700; color: var(--text); }
.oc-pending { color: #898173; cursor: default; }
.oc-nav-divider { border-top: 1px solid var(--line); margin-top: 12px !important; padding-top: 15px; }
.oc-sidebar-foot { display: grid; gap: 7px; margin: 24px 9px 0; border-top: 1px solid var(--line); padding-top: 14px; font-size: 11px; color: var(--muted); }
.oc-sidebar-foot a { min-height: 32px; display: flex; align-items: center; }
.oc-sidebar-foot a:hover { color: var(--text); text-decoration: underline; }
.oc-main { min-width: 0; display: grid; grid-template-columns: minmax(0, 1fr) 250px; gap: 10px; align-content: start; align-items: start; }
.oc-pagebar, .oc-feedback, .oc-metrics, .oc-bottom-grid { grid-column: 1 / -1; }
.oc-pagebar { display: flex; align-items: center; gap: 12px; min-height: 48px; }
.operations-shell .oc-pagebar h1 { margin-right: auto; font: 600 29px/1.25 'Songti SC', STSong, serif; }
.oc-page-actions { display: flex; gap: 8px; }
.operations-shell button, .operations-shell .button { min-height: 36px; border-radius: 2px; padding: 7px 12px; font-size: 13px; white-space: nowrap; transition: background .16s, border-color .16s; }
.operations-shell button:hover { border-color: var(--text); background: #e9e0d0; }
.operations-shell button.oc-primary, .operations-shell button[type=submit] { color: var(--bg); background: var(--text); border-color: var(--text); }
.operations-shell button.oc-primary:hover, .operations-shell button[type=submit]:hover { background: #413e36; }
.operations-shell button:disabled { cursor: not-allowed; }
.oc-feedback:has(.feedback:empty) { display: none; }
.oc-feedback > .feedback { margin: 0; font-size: 12px; }
.oc-feedback > .feedback:not(.error) { color: var(--muted); font-size: 11px; }
.oc-feedback .error { padding: 8px 12px; }
.oc-metrics { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; }
.oc-metric { display: grid; align-content: start; gap: 5px; min-width: 0; min-height: 100px; padding: 13px 14px; background: rgba(251,247,239,.82); border-top: 2px solid var(--text); }
.oc-metric-warm { border-color: var(--warm); }
.oc-metric > span { color: var(--muted); font-size: 12px; }
.oc-metric strong { font: 500 27px/1.2 'Songti SC', STSong, serif; white-space: nowrap; }
.oc-metric small { color: var(--muted); font-size: 11px; text-wrap: pretty; }
.oc-main-grid { display: contents; }
.oc-accounts { grid-column: 1; grid-row: 4; }
.oc-tasks { grid-column: 1; grid-row: 5; }
.oc-panel { padding: 14px; border: 1px solid var(--line); background: rgba(250,246,237,.96); min-width: 0; scroll-margin-top: 82px; }
.oc-panel-head { display: flex; align-items: center; gap: 8px; min-height: 40px; padding-bottom: 10px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.operations-shell .oc-panel-head h2 { margin-right: auto; font-size: 16px; font-weight: 650; white-space: nowrap; }
.oc-panel-head > span { color: var(--muted); font-size: 11px; }
.operations-shell .oc-search { min-width: 100px; flex: 0 1 170px; }
.operations-shell .oc-search input { font-size: 12px; min-height: 34px; padding: 6px 9px; border-radius: 2px; }
.operations-shell .oc-panel-head select { width: auto; max-width: 132px; font-size: 12px; min-height: 34px; padding: 6px 7px; border-radius: 2px; }
.oc-table-wrap { width: 100%; overflow: auto; }
.oc-account-table { min-width: 680px; }
.oc-task-table { min-width: 670px; }
.oc-account-table th:nth-child(1) { width: 19%; }
.oc-account-table th:nth-child(2) { width: 19%; }
.oc-account-table th:nth-child(3) { width: 21%; }
.oc-account-table th:nth-child(4) { width: 14%; }
.oc-account-table th:nth-child(5) { width: 16%; }
.oc-account-table th:nth-child(6) { width: 11%; }
.operations-shell th { padding: 10px 6px; font-size: 11px; font-weight: 500; color: var(--muted); white-space: nowrap; }
.operations-shell td { height: 64px; padding: 9px 6px; font-size: 12px; vertical-align: middle; overflow-wrap: normal; }
.operations-shell tbody tr:hover { background: rgba(231,223,209,.32); }
.operations-shell td small { display: block; font-size: 10px; color: var(--muted); margin-top: 4px; }
.oc-user { display: flex; align-items: center; gap: 8px; }
.oc-user > div { min-width: 0; }
.oc-user strong { display: block; overflow-wrap: anywhere; }
.oc-avatar { flex: 0 0 28px; width: 28px; height: 28px; border: 1px solid var(--text); border-radius: 50%; display: grid; place-items: center; background: var(--surface-raised); font-size: 11px; }
.oc-badge { display: inline-flex; align-items: center; min-height: 23px; padding: 2px 6px; border: 1px solid var(--line); font-size: 10px; color: var(--muted); white-space: nowrap; }
.oc-badge.ok { color: #486c14; border-color: #97ad72; background: #eef4e4; }
.oc-badge.warm { color: #805328; border-color: #b99b72; background: #f7ecdc; }
.oc-badge.danger { color: #923f33; border-color: #c99e96; background: #fae6e0; }
.oc-task-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: pretty; overflow-wrap: anywhere; }
.oc-nowrap { white-space: nowrap; }
.oc-meter, .oc-capacity-meter { height: 4px; margin-top: 6px; background: #ddd3c4; overflow: hidden; }
.oc-meter i, .oc-capacity-meter i { display: block; height: 100%; background: var(--text); }
.oc-meter i.warm, .oc-capacity-meter i.warm { background: var(--warm); }
[data-unavailable] { background: repeating-linear-gradient(120deg, #dfd6c8, #dfd6c8 5px, #eee7db 5px, #eee7db 10px); }
.oc-row-actions { display: flex; flex-wrap: wrap; gap: 2px; }
.operations-shell .oc-row-actions button, .operations-shell .oc-task-table button { min-height: 32px; border: 0; background: transparent; padding: 4px 5px; font-size: 12px; }
.operations-shell .oc-row-actions button:hover, .operations-shell .oc-task-table button:hover { background: #e7dfd1; text-decoration: underline; text-underline-offset: 4px; }
.oc-side-stack { display: contents; }
.oc-side-stack > section:first-child { grid-column: 2; grid-row: 4; }
.oc-side-stack > section:last-child { grid-column: 2; grid-row: 5; }
.oc-status-row { display: grid; grid-template-columns: 7px minmax(0,1fr) auto; gap: 8px; align-items: center; min-height: 42px; border-bottom: 1px solid #e1d8ca; font-size: 12px; }
.oc-status-row:last-child { border: 0; }
.oc-status-row i { width: 6px; height: 6px; border-radius: 50%; background: var(--warm); }
.oc-status-row i.ok { background: #52791b; }
.oc-status-row small { font-size: 10px; color: var(--muted); }
.oc-capacity-heading { display: flex; gap: 6px; justify-content: space-between; align-items: baseline; margin-top: 14px; }
.oc-capacity-heading strong { font: 500 26px 'Songti SC', STSong, serif; }
.oc-capacity-heading > span { color: var(--muted); font-size: 10px; }
.oc-capacity-meter { height: 6px; }
.oc-storage-breakdown { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin: 12px 0 0; font-size: 10px; }
.oc-storage-breakdown dt { color: var(--muted); }
.oc-storage-breakdown dd { margin: 3px 0 0; }
.oc-storage-breakdown div:nth-child(2) dt { display: none; }
.oc-inline-error { color: #923f33; background: #fae6e0; padding: 9px; margin-top: 10px !important; font-size: 12px; }
.operations-shell .oc-module-message { color: var(--muted); font-size: 12px; margin-top: 10px; text-wrap: pretty; }
.oc-module-message:empty { display: none; }
.oc-empty-row td { height: 128px; text-align: center; color: var(--muted); }
.oc-empty-row strong { display: block; color: var(--text); font-size: 14px; margin-bottom: 7px; }
.oc-accounts .oc-table-wrap { min-height: 0; }
.oc-table-footer { display: flex; justify-content: space-between; gap: 8px; align-items: center; padding-top: 10px; font-size: 11px; color: var(--muted); }
.oc-pagination { display: flex; align-items: center; gap: 8px; }
.operations-shell .oc-pagination button { min-height: 32px; min-width: 32px; padding: 4px; }
.oc-tasks { margin-top: 0; }
.oc-task-table th:first-child { width: 34%; }
.oc-task-table th:nth-child(5) { width: 16%; }
.operations-shell .oc-task-open { text-align: left; white-space: normal; font-weight: 650; text-wrap: pretty; overflow-wrap: anywhere; justify-content: start; }
.oc-task-id { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-task-table td { height: 58px; }
.oc-bottom-grid { display: grid; grid-template-columns: minmax(0, 1fr) 30%; gap: 10px; }
.oc-config-summary { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 10px; margin-top: 12px; }
.oc-config-summary > div { min-width: 0; }
.oc-config-summary span { display: block; color: var(--muted); font-size: 11px; margin-bottom: 5px; }
.oc-config-summary strong { display: block; border: 1px solid var(--line); background: var(--surface-raised); padding: 7px 9px; font-size: 12px; font-weight: 400; overflow-wrap: anywhere; }
.oc-queue-row { min-height: 34px; display: flex; align-items: center; justify-content: space-between; font-size: 12px; }
.oc-queue-row strong { color: var(--muted); font-size: 12px; font-weight: 500; }
.operations-shell [data-shared-host]:not(:empty) { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 14px; }
.oc-dialog { border: 1px solid var(--line); color: var(--text); background: #f8f3e9; padding: 18px; max-height: calc(100dvh - 36px); overflow: auto; box-shadow: 0 20px 80px #1d1c1830; }
.oc-dialog::backdrop { background: rgba(29,28,24,.25); backdrop-filter: blur(2px); }
.oc-create-dialog { width: min(620px, calc(100vw - 24px)); }
.oc-inspector-dialog { width: min(760px, calc(100vw - 24px)); height: calc(100dvh - 28px); margin: 14px 14px 14px auto; }
.oc-dialog-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.oc-dialog [data-create] > button { margin-top: 16px; }
.oc-dialog [data-inspector] > [data-notice] { position: sticky; top: -18px; z-index: 1; }
.oc-dialog [data-task-detail] { margin-top: 18px; }
.oc-dialog pre { font: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.oc-dialog [data-task-detail] > * + * { margin-top: 10px; }
.operations-shell #oc-overview { scroll-margin-top: 82px; }
@media (max-width: 1240px) {
  .oc-main { display: block; }
  .oc-main > * + * { margin-top: 10px; }
  .oc-main-grid { display: grid; }
  .oc-main-grid { grid-template-columns: minmax(0,1fr); }
  .oc-side-stack { display: grid; grid-template-columns: 1fr 1fr; }
  .oc-accounts, .oc-side-stack > section:first-child, .oc-side-stack > section:last-child { grid-column: auto; grid-row: auto; }
  .oc-metric { padding: 11px; }
}
@media (max-width: 960px) {
  .operations-page { --wide: calc(100vw - 24px); }
  .operations-page .operations-shell { grid-template-columns: 156px minmax(0,1fr); gap: 10px; }
  .oc-sidebar { padding: 10px 6px; }
  .oc-nav-item { font-size: 12px; padding-left: 5px; gap: 5px; }
  .oc-pending { flex-wrap: wrap; }
  .oc-metrics { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .oc-bottom-grid { grid-template-columns: minmax(0,1fr); }
  .oc-pagebar { flex-wrap: wrap; }
}
@media (max-width: 760px) {
  .operations-page .site-header, .operations-page .site-header.is-scrolled { height: 62px; padding: 0 12px; grid-template-columns: 1fr auto; gap: 8px; }
  .operations-page .menu-toggle, .operations-page .site-nav { display: none; }
  .operations-page .operations-shell { display: block; padding-top: 74px; }
  .oc-sidebar { position: static; min-height: 0; padding: 8px; margin-bottom: 12px; }
  .oc-sidebar nav { display: flex; gap: 4px; overflow-x: auto; }
  .oc-nav-item { flex: 0 0 auto; padding: 7px 10px; min-height: 36px; font-size: 12px; }
  .oc-nav-item > span, .oc-nav-label, .oc-sidebar-foot { display: none; }
  .oc-pending { flex-wrap: nowrap; }
  .oc-pagebar { gap: 10px; }
  .operations-shell .oc-pagebar h1 { font-size: 25px; flex: 1 0 100%; }
  .oc-page-actions { width: 100%; }
  .operations-shell .oc-pagebar > .oc-search { flex: 1 0 100%; }
  .oc-page-actions .oc-primary { margin-left: auto; }
  .oc-metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
  .oc-metric:last-child { grid-column: 1 / -1; grid-template-columns: 1fr auto; min-height: 62px; }
  .oc-metric:last-child strong { grid-row: 1 / 3; grid-column: 2; }
  .oc-panel { padding: 12px; }
  .oc-side-stack { grid-template-columns: 1fr; }
  .oc-config-summary { grid-template-columns: 1fr; }
  .oc-config-summary > div { display: flex; align-items: center; gap: 8px; }
  .oc-config-summary span { flex: 0 0 90px; margin: 0; }
  .oc-config-summary strong { flex: 1; }
  .oc-table-footer { flex-wrap: wrap; }
  .oc-dialog { padding: 14px; }
  .oc-inspector-dialog { margin: 12px; width: calc(100vw - 24px); }
  .oc-dialog .ops-fields { grid-template-columns: 1fr; }
  .oc-dialog-top { align-items: start; }
  .oc-dialog .toolbar { flex-wrap: wrap; }
}
