.admin-shell {
  --admin-ink: #182027;
  --admin-muted: #66727b;
  --admin-faint: #929ca3;
  --admin-line: #dfe4e7;
  --admin-page: #f5f7f8;
  --admin-surface: #fff;
  --admin-soft: #eef2f4;
  --admin-accent: #2864dc;
  --admin-accent-soft: #edf3ff;
  --admin-green: #24765f;
  --admin-green-soft: #e8f4ef;
  --admin-amber: #8a5a1d;
  --admin-amber-soft: #fff3df;
  --admin-danger: #b2443b;
  color-scheme: light;
  display: grid;
  width: 100%;
  max-width: 100%;
  min-height: 100dvh;
  grid-template-columns: 176px minmax(0, 1fr);
  overflow-x: hidden;
  color: var(--admin-ink);
  background: var(--admin-page);
}

.admin-shell *,
.admin-shell *::before,
.admin-shell *::after { box-sizing: border-box; letter-spacing: 0; }
.admin-shell button,
.admin-shell input,
.admin-shell textarea { font: inherit; }
.admin-shell .sidebar { position: sticky; top: 0; display: flex; width: 176px; height: 100dvh; flex-direction: column; border: 0; border-right: 1px solid #29343c; padding: 22px 12px; color: #dfe6ea; background: #202a31; }
.admin-shell .brand { padding: 0 10px; color: #fff; font-size: 16px; font-weight: 800; }
.admin-shell .admin-ip-context { display: grid; min-width: 0; gap: 4px; margin: 18px 4px 0; border: 1px solid #3a4851; border-radius: 6px; padding: 9px 10px; background: #29353d; }
.admin-shell .admin-ip-context > span { color: #8f9ca4; font-size: 10px; }
.admin-shell .admin-ip-context > strong,
.admin-shell .admin-ip-select { overflow: hidden; color: #fff; font-size: 12px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .admin-ip-switch { color: #8eb4ff; font-size: 10px; }
.admin-shell .admin-nav-disabled { display: block; min-height: 38px; border-radius: 6px; padding: 10px 12px; color: #53616a; font-size: 12px; font-weight: 600; cursor: not-allowed; }
.admin-shell .admin-nav { display: grid; gap: 3px; margin-top: 25px; }
.admin-shell .admin-nav a { min-height: 38px; border-radius: 6px; padding: 10px 12px; color: #9eabb3; font-size: 12px; font-weight: 600; }
.admin-shell .admin-nav a:hover { color: #fff; background: #29353d; }
.admin-shell .admin-nav a.active { color: #fff; background: #34424b; }

.admin-sidebar-footer { display: grid; gap: 9px; margin-top: auto; padding: 14px 10px 0; border-top: 1px solid #344149; color: #9eabb3; font-size: 11px; }
.admin-logout { width: max-content; border: 0; padding: 0; color: #cbd4d8; background: transparent; font-size: 11px; cursor: pointer; }
.admin-logout:hover { color: #fff; }

.admin-login-page { display: grid; min-height: 100dvh; place-items: center; padding: 24px; background: #f5f7f8; }
.admin-login-panel { width: min(420px, 100%); padding: 38px; border: 1px solid #dfe4e7; border-radius: 8px; background: #fff; box-shadow: 0 18px 55px #18202712; }
.admin-login-kicker { color: #2864dc; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.admin-login-panel h1 { margin: 14px 0 5px; color: #182027; font-size: 26px; line-height: 1.2; }
.admin-login-subtitle { margin: 0 0 26px; color: #66727b; font-size: 12px; }
.admin-login-form { display: grid; gap: 16px; }
.admin-login-form label { display: grid; gap: 7px; color: #66727b; font-size: 12px; font-weight: 700; }
.admin-login-form input:not([type="hidden"]) { width: 100%; height: 44px; border: 1px solid #dfe4e7; border-radius: 6px; padding: 0 12px; color: #182027; background: #fff; font-size: 15px; outline: none; }
.admin-login-form input:focus { border-color: #2864dc; box-shadow: 0 0 0 3px #2864dc18; }
.admin-login-submit { height: 44px; margin-top: 4px; border: 1px solid #2864dc; border-radius: 6px; color: #fff; background: #2864dc; font-size: 13px; font-weight: 800; cursor: pointer; }
.admin-login-submit:hover { background: #2058c6; }
.admin-login-error { margin: 0 0 16px; border-radius: 5px; padding: 10px 12px; color: #a43f39; background: #fff0ee; font-size: 12px; }

.admin-shell .admin-main { width: 100%; max-width: 1440px; min-width: 0; margin: 0 auto; padding: 28px 28px 48px; }
.admin-shell .admin-page-head,
.admin-shell .ip-admin-topbar,
.admin-shell .catalog-admin-topbar { display: flex; min-height: 40px; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 18px; }
.admin-shell .admin-page-head > div { display: flex; min-width: 0; align-items: baseline; gap: 9px; }
.admin-shell .admin-page-head h1,
.admin-shell .ip-admin-topbar h1,
.admin-shell .catalog-admin-topbar h1 { margin: 0; color: var(--admin-ink); font-size: 23px; font-weight: 800; line-height: 1.2; }
.admin-shell .admin-page-head span { color: var(--admin-muted); font-size: 12px; }
.admin-shell .primary,
.admin-shell .secondary { display: inline-flex; min-height: 38px; align-items: center; justify-content: center; border-radius: 6px; padding: 0 14px; font-size: 12px; font-weight: 700; white-space: nowrap; cursor: pointer; }
.admin-shell .primary { border: 1px solid var(--admin-accent); color: #fff; background: var(--admin-accent); }
.admin-shell .secondary { border: 1px solid var(--admin-line); color: var(--admin-ink); background: var(--admin-surface); }
.admin-shell .primary:hover { background: #2058c6; }
.admin-shell .secondary:hover { border-color: #aeb8be; background: var(--admin-soft); }

.admin-shell .admin-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); overflow: hidden; margin: 0 0 12px; border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-surface); }
.admin-shell .admin-stats > div { display: flex; min-width: 0; min-height: 58px; align-items: center; justify-content: space-between; gap: 10px; border-right: 1px solid var(--admin-line); padding: 0 16px; }
.admin-shell .admin-stats > div:last-child { border-right: 0; }
.admin-shell .admin-stats span { color: var(--admin-muted); font-size: 11px; }
.admin-shell .admin-stats strong { margin: 0; color: var(--admin-ink); font-size: 18px; font-variant-numeric: tabular-nums; }
.admin-shell .feishu-write-guard { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0 0 12px; border: 1px solid #e5b8b8; border-radius: 7px; padding: 12px 16px; background: #fff8f8; }
.admin-shell .feishu-write-guard > div { display: grid; gap: 3px; }
.admin-shell .feishu-write-guard strong { color: #8d2020; font-size: 14px; }
.admin-shell .feishu-write-guard span { color: var(--admin-muted); font-size: 12px; }
.admin-shell .feishu-write-guard.is-enabled { border-color: #d59797; background: #fff1f1; }

.admin-shell .project-panel,
.admin-shell .catalog-admin-layout,
.admin-shell .ip-list-panel { min-width: 0; overflow: visible; border: 1px solid var(--admin-line); border-radius: 7px; background: var(--admin-surface); }
.admin-shell .admin-toolbar,
.admin-shell .catalog-actions { min-height: 58px; border-bottom: 1px solid var(--admin-line); padding: 9px 12px; background: var(--admin-surface); }
.admin-shell .admin-search { display: grid; width: min(520px, 100%); grid-template-columns: minmax(0, 1fr) auto; gap: 7px; padding: 0; border: 0; }
.admin-shell .admin-search input,
.admin-shell .catalog-search input,
.admin-shell .catalog-create > input[type="text"] { min-width: 0; min-height: 38px; border: 1px solid var(--admin-line); border-radius: 6px; padding: 0 11px; color: var(--admin-ink); background: var(--admin-page); font-size: 12px; outline: none; }
.admin-shell .admin-search input:focus,
.admin-shell .catalog-search input:focus,
.admin-shell .catalog-create > input[type="text"]:focus { border-color: var(--admin-accent); background: var(--admin-surface); box-shadow: 0 0 0 2px #2864dc18; }

.project-table-head,
.project-summary { display: grid; grid-template-columns: minmax(220px, 2fr) minmax(100px, .8fr) 56px 72px 76px 56px minmax(300px, auto); align-items: center; gap: 12px; }
.project-table-head,
.ip-table-head,
.taxonomy-table-head,
.member-table-head { min-height: 34px; border-bottom: 1px solid var(--admin-line); padding: 0 14px; color: var(--admin-faint); background: #fafbfb; font-size: 11px; font-weight: 700; }
.admin-shell .project-list { display: grid; }
.admin-shell .project-row { min-width: 0; border-bottom: 1px solid var(--admin-line); }
.admin-shell .project-row:last-child { border-bottom: 0; }
.admin-shell .project-summary { min-height: 64px; padding: 9px 14px; }
.admin-shell .project-cover { display: grid; width: 40px; height: 40px; flex: 0 0 40px; overflow: hidden; place-items: center; border-radius: 6px; color: #6b7680; background: var(--admin-soft); font-size: 12px; font-weight: 800; }
.admin-shell .project-cover img { width: 100%; height: 100%; object-fit: contain; }
.admin-shell .project-summary > .project-cover { grid-column: 1; grid-row: 1; }
.admin-shell .project-identity { display: grid; min-width: 0; grid-column: 1; grid-row: 1; gap: 2px; padding-left: 52px; }
.admin-shell .project-identity span { overflow: hidden; color: var(--admin-muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .project-identity h2 { overflow: hidden; margin: 0; color: var(--admin-ink); font-size: 13px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .project-fact span { display: block; color: var(--admin-faint); font-size: 11px; }
.admin-shell .project-fact b { display: block; margin-top: 2px; font-size: 11px; font-weight: 700; }
.admin-shell .status { display: inline-flex; width: max-content; max-width: 100%; align-items: center; border-radius: 5px; padding: 4px 7px; color: var(--admin-amber); background: var(--admin-amber-soft); font-size: 11px; font-weight: 700; white-space: nowrap; }
.admin-shell .status.success { color: var(--admin-green); background: var(--admin-green-soft); }
.admin-shell .status.muted { color: var(--admin-muted); background: var(--admin-soft); }
.admin-shell .project-sync { font-size: 11px; font-weight: 700; white-space: nowrap; }
.admin-shell .sync-ok { color: var(--admin-green); }
.admin-shell .sync-pending { color: var(--admin-amber); }
.admin-shell .sync-error { color: #b44d46; }
.project-row-actions,
.ip-row-actions,
.taxonomy-row-actions { display: flex; justify-content: flex-end; gap: 5px; }
.project-row-actions { min-width: 0; flex-wrap: wrap; }
.project-row-actions form { display: contents; }
.project-row-actions a,
.ip-row-actions a { display: inline-flex; min-height: 30px; align-items: center; border: 1px solid var(--admin-line); border-radius: 5px; padding: 0 9px; color: var(--admin-muted); background: var(--admin-surface); font-size: 11px; font-weight: 700; }
.project-row-actions a.primary,
.ip-row-actions a.primary { border-color: var(--admin-accent); color: #fff; background: var(--admin-accent); }
.project-row-actions button,
.ip-row-actions button,
.taxonomy-row-actions form button,
.taxonomy-row-actions button,
.row-panel > header button { min-height: 30px; border: 1px solid var(--admin-line); border-radius: 5px; padding: 0 9px; color: var(--admin-muted); background: var(--admin-surface); font-size: 11px; font-weight: 700; cursor: pointer; }
.project-row-actions button:hover,
.project-row-actions button.is-active,
.ip-row-actions button:hover,
.ip-row-actions button.is-active,
.taxonomy-row-actions form button:hover,
.taxonomy-row-actions form button.is-active,
.taxonomy-row-actions button:hover,
.taxonomy-row-actions button.is-active { border-color: var(--admin-accent); color: var(--admin-accent); background: var(--admin-accent-soft); }
.project-row-actions .row-action-toggle { color: var(--admin-amber); }
.project-row-actions .row-action-danger { border-color: #efd5d2; color: #b44d46; }
.project-row-actions .row-action-danger:hover { border-color: #d79a94; color: #9e3933; background: #fff2f0; }

.admin-shell .row-panel { border-top: 1px solid var(--admin-line); padding: 14px; background: #f8fafb; }
.admin-shell .row-panel[hidden] { display: none; }
.admin-shell .row-panel > header { display: flex; min-height: 30px; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.admin-shell .row-panel > header h3 { margin: 0; font-size: 12px; }
.admin-shell .row-panel > header > div { display: grid; min-width: 0; gap: 3px; }
.admin-shell .row-panel > header > div > span { color: var(--admin-faint); font-size: 10px; }
.admin-shell .row-panel > header button { border: 0; background: transparent; }
.admin-shell .price-editor-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; padding: 0; }
.admin-shell .price-editor-row { display: grid; min-width: 0; grid-template-columns: minmax(70px, 1fr) 100px 52px; align-items: center; gap: 6px; border: 1px solid var(--admin-line); border-radius: 6px; padding: 6px; background: var(--admin-surface); }
.admin-shell .price-editor-row b { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .price-editor-row input,
.admin-shell .ip-profile-form input,
.admin-shell .taxonomy-editor input { min-width: 0; height: 34px; border: 1px solid var(--admin-line); border-radius: 5px; padding: 0 8px; color: var(--admin-ink); background: var(--admin-surface); font-size: 12px; }
.admin-shell .price-editor-row .secondary { min-height: 34px; padding: 0 9px; }
.admin-shell .status-editor-list { display: grid; gap: 6px; min-width: 0; }
.admin-shell .status-editor-empty { margin: 0; border: 1px dashed var(--admin-line); border-radius: 6px; padding: 18px; color: var(--admin-muted); background: var(--admin-surface); font-size: 11px; text-align: center; }
.admin-shell .status-editor-row { display: grid; min-width: 0; grid-template-columns: minmax(170px, 1.5fr) minmax(130px, 1fr) minmax(130px, 1fr) auto; align-items: end; gap: 8px; border: 1px solid var(--admin-line); border-radius: 6px; padding: 8px; background: var(--admin-surface); }
.admin-shell .status-editor-identity { display: grid; min-width: 0; align-content: center; gap: 3px; min-height: 34px; }
.admin-shell .status-editor-identity b { overflow: hidden; color: var(--admin-ink); font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .status-editor-identity span { overflow: hidden; color: var(--admin-muted); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .status-editor-field { display: grid; min-width: 0; gap: 4px; color: var(--admin-muted); font-size: 10px; font-weight: 700; }
.admin-shell .status-editor-field .custom-select-trigger { width: 100%; min-width: 0; min-height: 34px; }
.admin-shell .status-editor-row > .secondary { min-height: 34px; padding: 0 10px; }
.admin-shell .toggle-control { display: inline-flex !important; width: max-content; align-items: center; gap: 7px !important; margin: 0; color: var(--admin-ink) !important; }
.admin-shell .toggle-control > button { position: relative; width: 32px; height: 18px; border: 0; border-radius: 9px; padding: 0; background: #cbd2d6; cursor: pointer; }
.admin-shell .toggle-control > button span { position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #fff; box-shadow: none; }
.admin-shell .toggle-control > button.is-on { background: var(--admin-accent); }
.admin-shell .toggle-control > button.is-on span { transform: translateX(14px); }
.admin-shell .toggle-control b { font-size: 11px; }
.admin-shell .project-danger-action,
.admin-shell .ip-danger-action { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--admin-line); }
.admin-shell .danger-link { border: 0; padding: 0; color: #b24e48; background: transparent; font-size: 11px; cursor: pointer; }

.admin-shell .pagination { display: flex; justify-content: flex-end; gap: 5px; border-top: 1px solid var(--admin-line); padding: 10px 12px; }
.admin-shell .pagination a,
.admin-shell .pagination .current { min-width: 30px; border: 1px solid var(--admin-line); border-radius: 5px; padding: 6px 9px; color: var(--admin-muted); background: var(--admin-surface); font-size: 11px; text-align: center; }
.admin-shell .pagination .current { color: #fff; background: var(--admin-ink); }
.unpaid-admin-topbar { align-items: center; }
.unpaid-totals { display: flex; align-items: stretch; gap: 18px; }
.unpaid-total-item { display: grid; gap: 3px; color: var(--admin-muted); font-size: 10px; text-align: right; }
.unpaid-total-item strong { display: block; }
.unpaid-total { color: #b24e48; font-size: 22px; }
.unshipped-total { color: #3b6f91; font-size: 22px; }
.unpaid-panel { overflow: hidden; border: 1px solid var(--admin-line); border-radius: 8px; background: var(--admin-surface); }
.unpaid-panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; border-bottom: 1px solid var(--admin-line); padding: 14px; }
.unpaid-panel-head h2 { margin: 0; font-size: 14px; }
.unpaid-panel-head span { display: block; margin-top: 4px; color: var(--admin-muted); font-size: 10px; }
.unpaid-panel-head .admin-search { width: min(320px, 100%); margin: 0; }
.unpaid-table-head,
.unpaid-row { display: grid; grid-template-columns: minmax(180px, 1fr) 140px 170px; align-items: center; gap: 12px; }
.unpaid-table-head { padding: 9px 14px; color: var(--admin-faint); font-size: 10px; }
.unpaid-table-head span:not(:first-child) { text-align: right; }
.unpaid-row { min-height: 52px; border-top: 1px solid var(--admin-line); padding: 8px 14px; color: var(--admin-muted); font-size: 11px; }
.unpaid-row strong { color: var(--admin-ink); font-size: 13px; }
.unpaid-row b { color: #b24e48; font-size: 12px; text-align: right; }
.unpaid-row .unshipped-row-total { color: #3b6f91; }
.unpaid-row .unshipped-row-total.is-zero { color: #b24e48; }
.admin-shell .admin-blank,
.admin-shell .catalog-empty,
.admin-shell .ip-empty { display: grid; min-height: 220px; place-items: center; align-content: center; gap: 12px; color: var(--admin-muted); font-size: 11px; }

.admin-shell .catalog-actions { display: grid; grid-template-columns: minmax(260px, 1fr) minmax(420px, auto); gap: 10px; }
.admin-shell .catalog-search,
.admin-shell .catalog-create { display: flex; min-width: 0; gap: 7px; }
.admin-shell .catalog-search input { flex: 1; }
.admin-shell .catalog-create > input[type="text"] { width: 170px; background: var(--admin-surface); }
.taxonomy-table-head,
.taxonomy-entry { display: grid; grid-template-columns: minmax(220px, 1fr) 90px minmax(150px, auto); align-items: center; gap: 12px; }
.admin-shell .taxonomy-entry { position: relative; min-height: 56px; border-bottom: 1px solid var(--admin-line); padding: 8px 14px; }
.admin-shell .taxonomy-entry:last-child { border-bottom: 0; }
.admin-shell .taxonomy-cover { width: 36px; height: 36px; grid-column: 1; grid-row: 1; border-radius: 6px; color: var(--admin-muted); background: var(--admin-soft); }
.admin-shell .taxonomy-cover img { object-fit: contain; }
.admin-shell .taxonomy-entry-main { min-width: 0; grid-column: 1; grid-row: 1; padding-left: 48px; }
.admin-shell .taxonomy-entry-main b { overflow: hidden; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .taxonomy-cover-state { color: var(--admin-muted); font-size: 11px; }
.admin-shell .taxonomy-row-actions { min-width: 0; flex-wrap: wrap; }
.admin-shell .taxonomy-row-actions form { display: contents; }
.admin-shell .taxonomy-row-actions .taxonomy-freeze { color: var(--admin-amber); }
.admin-shell .taxonomy-row-actions .taxonomy-unfreeze { color: var(--admin-green); }
.admin-shell .taxonomy-editor { grid-column: 1 / -1; margin: 0 -14px -8px; }
.admin-shell .taxonomy-editor form { display: grid; grid-template-columns: minmax(160px, 1fr) minmax(220px, 1fr) auto; gap: 8px; }

.ip-table-head,
.ip-config-head { display: grid; grid-template-columns: minmax(220px, 1.5fr) minmax(150px, 1fr) 48px 76px 156px; align-items: center; gap: 12px; }
.admin-shell .ip-config { min-width: 0; border-bottom: 1px solid var(--admin-line); padding: 0; }
.admin-shell .ip-config:last-child { border-bottom: 0; }
.admin-shell .ip-config-head { min-height: 62px; padding: 8px 14px; }
.admin-shell .ip-config-head .cover { width: 38px; height: 38px; grid-column: 1; grid-row: 1; border-radius: 6px; }
.admin-shell .ip-config-head .cover img { object-fit: contain; }
.admin-shell .ip-config-name { min-width: 0; grid-column: 1; grid-row: 1; padding-left: 50px; }
.admin-shell .ip-config-name h3 { margin: 0; font-size: 12px; }
.admin-shell .ip-table-id { overflow: hidden; color: var(--admin-muted); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .ip-allocation-limit { font-size: 12px; font-variant-numeric: tabular-nums; }
.admin-shell .ip-profile-editor,
.admin-shell .field-map,
.admin-shell .query-editor { margin: 0; }
.admin-shell .ip-profile-form { display: grid; grid-template-columns: minmax(150px, 1fr) minmax(150px, 1fr) minmax(150px, 1fr) minmax(220px, 1.5fr) auto; gap: 8px; padding: 0; }
.admin-shell .ip-payment-instructions { display: grid; gap: 5px; min-width: 0; color: var(--admin-muted); font-size: 11px; }
.admin-shell .ip-payment-instructions textarea { min-height: 58px; resize: vertical; border: 1px solid var(--admin-line); border-radius: 7px; padding: 8px; font: inherit; }
.admin-shell .ip-payment-preview { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--admin-muted); font-size: 11px; }
.admin-shell .ip-payment-preview img { width: 88px; height: 88px; object-fit: contain; border: 1px solid var(--admin-line); border-radius: 7px; background: #fff; }
.admin-shell .field-map-form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin: 0; padding: 0; background: transparent; }
.admin-shell .field-map-field { display: grid; min-width: 0; gap: 4px; color: var(--admin-muted); font-size: 11px; font-weight: 700; }
.admin-shell .field-map-form > .secondary { align-self: end; min-height: 40px; }

.ip-create-dialog { position: fixed; inset: 0; width: min(760px, calc(100vw - 32px)); max-height: min(760px, calc(100dvh - 32px)); margin: auto; overflow: auto; border: 0; border-radius: 8px; padding: 0; color: var(--admin-ink); background: var(--admin-surface); box-shadow: 0 24px 80px #17212635; }
.ip-create-dialog::backdrop { background: #17212666; }
.ip-create-dialog > header { display: flex; min-height: 54px; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--admin-line); padding: 0 18px; }
.ip-create-dialog > header h2 { margin: 0; font-size: 16px; }
.ip-create-dialog > header button { width: 30px; height: 30px; border: 0; border-radius: 5px; color: var(--admin-muted); background: var(--admin-soft); font-size: 18px; cursor: pointer; }
.ip-create-dialog .ip-create-form { display: grid; margin: 0; }
.ip-create-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; padding: 18px; }
.admin-shell .ip-create-field { display: grid; min-width: 0; gap: 6px; color: var(--admin-muted); font-size: 11px; font-weight: 700; }
.admin-shell .ip-create-field input { width: 100%; min-width: 0; min-height: 40px; border: 1px solid var(--admin-line); border-radius: 6px; padding: 0 10px; color: var(--admin-ink); background: var(--admin-surface); font-size: 12px; }
.ip-create-dialog footer { display: flex; justify-content: flex-end; gap: 7px; border-top: 1px solid var(--admin-line); padding: 11px 18px; }
.query-import-preview { display: grid; gap: 9px; border-top: 1px solid var(--admin-line); padding: 14px 18px; }
.query-import-preview > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.query-import-preview > header b { font-size: 12px; }
.query-import-preview > header span { color: var(--admin-muted); font-size: 11px; }
.query-import-preview > header span.is-error { color: #b24e48; }
.query-import-list { max-height: 460px; overflow: auto; border: 1px solid var(--admin-line); border-radius: 6px; background: var(--admin-surface); }
.query-rule-row { border-bottom: 1px solid var(--admin-line); }
.query-rule-row:last-child { border-bottom: 0; }
.query-rule-summary-row { display: grid; min-height: 58px; grid-template-columns: 60px minmax(170px, .9fr) minmax(240px, 1.8fr) 74px 64px; align-items: center; gap: 12px; padding: 8px 12px; }
.query-rule-row.is-disabled .query-rule-summary-row { background: #fafbfb; }
.query-rule-enabled { display: inline-flex; align-items: center; gap: 6px; color: var(--admin-muted); font-size: 10px; font-weight: 700; cursor: pointer; }
.query-rule-enabled input { margin: 0; }
.query-rule-identity { display: grid; min-width: 0; gap: 2px; }
.query-rule-identity strong,
.query-rule-identity small,
.query-rule-expression { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.query-rule-identity strong { color: var(--admin-ink); font-size: 11px; }
.query-rule-identity small { color: var(--admin-muted); font-size: 9px; }
.query-rule-expression { overflow: visible; margin: 0; color: #53616a; font-size: 10px; line-height: 1.45; text-overflow: clip; white-space: normal; overflow-wrap: anywhere; }
.query-rule-relation { justify-self: start; border-radius: 4px; padding: 4px 6px; color: #486d80; background: #edf4f7; font-size: 9px; font-weight: 700; white-space: nowrap; }
.query-rule-edit { border: 0; padding: 5px 0; color: var(--admin-accent); background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.query-rule-editor { display: grid; gap: 10px; border-top: 1px solid var(--admin-line); padding: 12px 12px 13px 72px; background: #f8fafb; }
.query-rule-editor[hidden] { display: none; }
.query-rule-settings { display: grid; grid-template-columns: minmax(220px, 1fr) 190px 150px; gap: 8px; }
.query-rule-field { display: grid; min-width: 0; gap: 4px; color: var(--admin-muted); font-size: 9px; font-weight: 700; }
.query-rule-field input,
.query-rule-field select,
.query-condition-row select,
.query-condition-row input[type="text"] { width: 100%; min-width: 0; height: 32px; border: 1px solid var(--admin-line); border-radius: 5px; padding: 0 8px; color: var(--admin-ink); background: var(--admin-surface); font-size: 10px; }
.query-condition-list { display: grid; gap: 5px; }
.query-condition-row { display: grid; grid-template-columns: 24px 116px 112px minmax(180px, 1fr) 34px; align-items: center; gap: 6px; }
.query-condition-order { color: var(--admin-faint); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 9px; }
.query-condition-values { min-width: 0; }
.query-condition-values[hidden] { display: none; }
.query-value-picker { position: relative; }
.query-value-picker summary { display: block; overflow: hidden; height: 32px; border: 1px solid var(--admin-line); border-radius: 5px; padding: 8px 26px 0 8px; color: var(--admin-ink); background: var(--admin-surface); font-size: 10px; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; list-style: none; }
.query-value-picker summary::-webkit-details-marker { display: none; }
.query-value-picker summary::after { position: absolute; top: 7px; right: 9px; content: "⌄"; color: var(--admin-muted); }
.query-value-options { position: absolute; z-index: 12; top: calc(100% + 4px); right: 0; left: 0; display: grid; max-height: 176px; overflow: auto; border: 1px solid var(--admin-line); border-radius: 6px; padding: 5px; background: var(--admin-surface); box-shadow: 0 10px 24px #17212624; }
.query-value-options label { display: flex; min-height: 30px; align-items: center; gap: 7px; border-radius: 4px; padding: 4px 6px; color: var(--admin-ink); font-size: 10px; cursor: pointer; }
.query-value-options label:hover, .query-value-options label.is-keyboard-active { background: var(--admin-soft); }
.query-value-options input { margin: 0; }
.query-text-value { min-width: 0; }
.query-condition-remove { height: 32px; border: 0; padding: 0; color: #a24b47; background: transparent; font-size: 9px; cursor: pointer; }
.query-add-condition { justify-self: start; margin-left: 30px; border: 0; padding: 2px 0; color: #357493; background: transparent; font-size: 10px; font-weight: 700; cursor: pointer; }
.query-add-condition::before { content: "+ "; }
.query-add-condition:disabled { color: var(--admin-muted); cursor: default; }
.query-source-warning,
.query-source-note { margin: 0 0 0 30px; color: var(--admin-muted); font-size: 9px; line-height: 1.5; }
.query-source-warning { color: #a56435; }
.query-rule-row.is-unsupported .query-rule-summary-row { background: #fcfaf7; }
.admin-shell .query-editor-form { display: grid; gap: 10px; margin: 0; padding: 0; }
.admin-shell .query-editor-form > footer { display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--admin-line); padding-top: 10px; }
.admin-shell .query-editor-form > footer span { color: var(--admin-muted); font-size: 10px; }
.admin-shell .query-editor-form > footer .secondary { flex: 0 0 auto; }
.admin-shell .query-editor [data-query-editor-target="status"].is-error { color: #b24e48; }

.member-table-head,
.member-row { display: grid; grid-template-columns: minmax(220px, 1fr) 140px minmax(150px, .8fr) 112px; align-items: center; gap: 16px; }
.admin-shell .member-row { min-height: 54px; border-bottom: 1px solid var(--admin-line); padding: 7px 14px; }
.admin-shell .member-row:last-child { border-bottom: 0; }
.admin-shell .member-identity { display: grid; gap: 2px; }
.admin-shell .member-identity b { font-size: 13px; }
.admin-shell .member-row small { color: var(--admin-muted); font-size: 11px; }
.admin-shell .member-permission-form { justify-self: start; }
.admin-shell .member-permission-form .toggle-control { cursor: pointer; }
.admin-shell .member-unsubmitted { min-width: 0; }
.admin-shell .member-unsubmitted-trigger { display: inline-flex; min-width: 112px; flex-direction: column; align-items: flex-start; border: 1px solid var(--admin-line); border-radius: 6px; padding: 5px 8px; color: var(--admin-accent); background: var(--admin-accent-soft); font-size: 11px; text-align: left; cursor: pointer; }
.admin-shell .member-unsubmitted-trigger:hover { border-color: #9eb7eb; background: #e5eeff; }
.admin-shell .member-unsubmitted-trigger b { font-size: 12px; }
.admin-shell .member-unsubmitted-trigger small { color: inherit; font-size: 11px; }
.admin-shell .member-unsubmitted-empty { color: var(--admin-faint); }
.admin-shell .member-unsubmitted-dialog { position: fixed; inset: 0; width: min(680px, calc(100vw - 32px)); max-height: min(620px, calc(100dvh - 32px)); margin: auto; overflow: hidden; border: 0; border-radius: 8px; padding: 0; color: var(--admin-ink); background: var(--admin-surface); box-shadow: 0 24px 80px #17212635; }
.admin-shell .member-unsubmitted-dialog::backdrop { background: #17212666; }
.admin-shell .member-unsubmitted-dialog > header { display: flex; min-height: 56px; align-items: center; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--admin-line); padding: 0 18px; }
.admin-shell .member-unsubmitted-dialog > header h2 { margin: 0 0 3px; font-size: 16px; }
.admin-shell .member-unsubmitted-dialog > header span { color: var(--admin-muted); font-size: 11px; }
.admin-shell .member-unsubmitted-dialog > header button { width: 30px; height: 30px; border: 0; border-radius: 5px; color: var(--admin-muted); background: var(--admin-soft); font-size: 18px; cursor: pointer; }
.admin-shell .member-unsubmitted-list { display: grid; max-height: calc(min(620px, 100dvh - 32px) - 56px); overflow: auto; }
.admin-shell .member-unsubmitted-item { display: grid; grid-template-columns: minmax(0, 1fr) auto auto auto; align-items: center; gap: 12px; border-bottom: 1px solid var(--admin-line); padding: 12px 18px; font-size: 12px; }
.admin-shell .member-unsubmitted-head { color: var(--admin-faint); background: #fafbfb; font-size: 11px; font-weight: 700; }
.admin-shell .member-unsubmitted-item > div { display: grid; min-width: 0; gap: 3px; }
.admin-shell .member-unsubmitted-item small { overflow: hidden; color: var(--admin-muted); text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .member-unsubmitted-item > span { color: var(--admin-muted); white-space: nowrap; }
.admin-shell .member-unsubmitted-item strong { min-width: 72px; color: var(--admin-ink); font-variant-numeric: tabular-nums; text-align: right; }
.admin-shell .member-filters { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.admin-shell .member-filter { display: inline-flex; min-height: 30px; align-items: center; border: 1px solid var(--admin-line); border-radius: 5px; padding: 0 10px; color: var(--admin-muted); background: var(--admin-surface); font-size: 11px; font-weight: 700; }
.admin-shell .member-filter:hover,
.admin-shell .member-filter.is-active { border-color: #aebde3; color: var(--admin-accent); background: var(--admin-accent-soft); }

.admin-shell .group-dialog { width: min(1040px, calc(100vw - 32px)); height: min(800px, calc(100dvh - 32px)); max-height: calc(100dvh - 32px); border-radius: 8px; }
.admin-shell .group-dialog-head { height: 56px; padding: 0 18px; }
.admin-shell .group-dialog-head h2 { font-size: 16px; }
.admin-shell .group-dialog-actions:has(.group-save-error) { flex-wrap: wrap; }
.admin-shell .group-save-error { flex: 1 0 100%; max-height: 100px; overflow-y: auto; margin: 0; color: var(--admin-danger); font-size: 13px; overflow-wrap: anywhere; }
.admin-shell .group-save-error:empty { display: none; }
.admin-shell .group-create-form { display: grid; height: calc(100% - 56px); max-height: none; grid-template-rows: minmax(0, 1fr) auto; overflow: hidden; padding: 0; }
.admin-shell .group-create-workspace { display: grid; min-width: 0; min-height: 0; grid-template-columns: minmax(0, 1fr) 280px; overflow-y: auto; }
.admin-shell .group-create-main { min-width: 0; }
.admin-shell .form-section { padding: 15px 18px; }
.admin-shell .form-section:last-child { border-bottom: 0; }
.admin-shell .form-section h3,
.admin-shell .group-create-assets h3 { margin: 0 0 11px; color: var(--admin-ink); font-size: 12px; font-weight: 800; }
.admin-shell .group-create-form label,
.admin-shell .group-create-form .form-field { color: var(--admin-muted); font-size: 11px; }
.admin-shell .group-create-form input:not([type="checkbox"]):not([type="file"]),
.admin-shell .group-create-form textarea { min-height: 38px; border-radius: 6px; font-size: 12px; }
.admin-shell .form-readonly { display: flex; min-height: 38px; align-items: center; border: 1px solid var(--admin-line); border-radius: 6px; padding: 0 10px; color: var(--admin-ink); background: var(--admin-page); font-size: 12px; font-weight: 500; }
.admin-shell .group-create-form textarea { min-height: 88px; resize: vertical; }
.admin-shell .group-create-form .form-grid.two { gap: 10px; margin: 0; }
.admin-shell .schedule-dates { margin-bottom: 10px !important; }
.admin-shell .schedule-settings { display: grid; grid-template-columns: 132px minmax(120px, 1fr) auto; align-items: end; gap: 10px; }
.admin-shell .create-toggles { display: flex; min-height: 38px; align-items: center; gap: 16px; padding: 0 2px; }
.admin-shell .role-section { padding-bottom: 18px; }
.admin-shell .role-section > label + label { margin-top: 10px; }
.admin-shell .catalog-picker { max-width: 100%; overflow-x: auto; margin-top: 8px; }
.admin-shell .option-price-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; margin-top: 10px; }
.admin-shell .role-pricing-row { display: grid; min-width: 0; grid-template-columns: minmax(0, 1fr) minmax(78px, .6fr) minmax(70px, .5fr); align-items: end; gap: 7px; border-radius: 6px; padding: 8px; background: var(--admin-page); }
.admin-shell .role-pricing-row label { display: grid; min-width: 0; gap: 5px; }
.admin-shell .option-price-grid input { min-height: 34px !important; }
.admin-shell .group-edit-role-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.admin-shell .group-edit-role-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(92px, .55fr) minmax(82px, .5fr); align-items: end; gap: 7px; border-radius: 6px; padding: 8px; background: var(--admin-page); }
.admin-shell .group-edit-role-row label { display: grid; min-width: 0; gap: 5px; }
.admin-shell .group-edit-role-row input { width: 100%; min-width: 0; }
.admin-shell .role-pricing-identity { display: grid; min-width: 0; align-self: stretch; align-content: end; gap: 5px; }
.admin-shell .role-pricing-identity > b { overflow: hidden; color: var(--admin-ink); font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .role-pricing-identity small { color: var(--admin-muted); font-size: 12px; line-height: 1.35; }
.admin-shell .role-pricing-feedback { margin: 9px 0 0; border-radius: 6px; padding: 8px 10px; color: var(--admin-danger); background: #fff0f0; font-size: 12px; font-weight: 700; }
.admin-shell .group-edit-role-empty { margin: 0; color: var(--admin-muted); font-size: 11px; }
.admin-shell .group-create-assets { min-width: 0; border-left: 1px solid var(--admin-line); padding: 15px; background: #f7f9fa; }
.admin-shell .asset-upload { display: grid; gap: 8px; border-top: 1px solid var(--admin-line); padding: 14px 0; }
.admin-shell .asset-upload:first-of-type { border-top: 0; padding-top: 0; }
.admin-shell .asset-upload b { color: var(--admin-ink); font-size: 11px; }
.admin-shell .group-create-assets .file-picker { grid-template-columns: 1fr; gap: 6px; }
.admin-shell .group-create-assets .file-picker-button { width: 100%; justify-content: flex-start; background: var(--admin-surface); }
.admin-shell .group-create-assets .file-picker-name { min-height: 18px; }
.admin-shell .group-cover-preview { width: 100%; max-height: 300px; aspect-ratio: 4 / 3; border: 1px solid var(--admin-line); border-radius: 6px; object-fit: contain; background: var(--admin-surface); }
.admin-shell .ocr-submit { width: 100%; }
.admin-shell .ocr-submit:disabled { border-color: var(--admin-line); color: var(--admin-faint); background: #eef1f2; cursor: default; }
.admin-shell .ocr-feedback { min-width: 0; }
.admin-shell .ocr-status,
.admin-shell .ocr-result { border-radius: 6px; padding: 9px 10px; font-size: 11px; }
.admin-shell .ocr-status { color: var(--admin-accent); background: var(--admin-accent-soft); }
.admin-shell .ocr-result p { margin: 3px 0 0; }
.admin-shell .group-dialog-actions { position: static; flex: 0 0 auto; padding: 10px 18px; background: var(--admin-surface); backdrop-filter: none; }
/* 加载替代按钮出现时，必须压过通用按钮的 display 样式，避免原提交控件同时显示。 */
.admin-shell input[type="submit"][hidden][aria-busy="true"] { display: none !important; }
.admin-loading-button { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.admin-button-spinner { display: inline-block; width: 13px; height: 13px; flex: 0 0 13px; box-sizing: border-box; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: admin-button-spin .7s linear infinite; }
@keyframes admin-button-spin { to { transform: rotate(360deg); } }
.admin-shell [aria-busy="true"] { cursor: wait; }
.admin-shell .group-dialog-actions > * { min-width: 84px; }
.admin-shell .custom-select-trigger,
.admin-shell .file-picker-button { border-color: var(--admin-line); border-radius: 6px; color: var(--admin-ink); background: var(--admin-surface); }
.admin-shell .custom-select-trigger { min-height: 38px; }
.admin-shell .file-picker-name { color: var(--admin-muted); }

.admin-shell .admin-page-actions { display: flex; align-items: center; gap: 8px; }
.admin-shell .pin-schedule-dialog { display: none; grid-template-rows: 56px minmax(0, 1fr) auto auto; }
.admin-shell .pin-schedule-dialog[open] { display: grid; }
.admin-shell .pin-schedule-dialog .group-dialog-head > div { display: grid; gap: 2px; }
.admin-shell .pin-schedule-dialog .group-dialog-head span { color: var(--admin-muted); font-size: 10px; }
.admin-shell .pin-schedule-workspace { display: grid; min-width: 0; min-height: 0; grid-template-columns: minmax(0, 1.25fr) minmax(330px, .75fr); overflow: hidden; }
.admin-shell .pin-schedule-mappings { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; border-right: 1px solid var(--admin-line); padding: 16px 18px; }
.admin-shell .pin-schedule-mappings > header,
.admin-shell .pin-schedule-plans > header,
.admin-shell .pin-schedule-projects > header { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.admin-shell .pin-schedule-mappings > header > div,
.admin-shell .pin-schedule-plans > header > div,
.admin-shell .pin-schedule-projects > header > div { display: grid; min-width: 0; gap: 2px; }
.admin-shell .pin-schedule-mappings h3,
.admin-shell .pin-schedule-plans h3,
.admin-shell .pin-schedule-projects h3 { margin: 0; color: var(--admin-ink); font-size: 12px; }
.admin-shell .pin-schedule-mappings header span,
.admin-shell .pin-schedule-plans header span,
.admin-shell .pin-schedule-projects header span { color: var(--admin-muted); font-size: 10px; }
.admin-shell .pin-schedule-mapping-toolbar { position: relative; z-index: 2; background: var(--admin-surface); }
.admin-shell .pin-schedule-mapping-list { display: grid; min-height: 0; align-content: start; gap: 9px; overflow-y: auto; padding: 12px 2px 0 0; }
.admin-shell .pin-schedule-mapping { display: grid; min-width: 0; grid-template-columns: minmax(150px, .7fr) minmax(220px, 1.3fr); gap: 10px; border: 1px solid var(--admin-line); border-radius: 7px; padding: 10px; background: var(--admin-surface); }
.admin-shell .pin-schedule-mapping > header { display: flex; grid-column: 1 / -1; align-items: center; justify-content: space-between; border-bottom: 1px solid var(--admin-line); padding-bottom: 7px; }
.admin-shell .pin-schedule-mapping > header b { font-size: 11px; }
.admin-shell .pin-schedule-remove { border: 0; padding: 0; color: #a24b47; background: transparent; font-size: 10px; cursor: pointer; }
.admin-shell .pin-schedule-field,
.admin-shell .pin-schedule-plan-name,
.admin-shell .pin-schedule-search { display: grid; min-width: 0; gap: 5px; color: var(--admin-muted); font-size: 10px; font-weight: 700; }
.admin-shell .pin-schedule-picker { position: relative; min-width: 0; }
.admin-shell .pin-schedule-picker input,
.admin-shell .pin-schedule-plan-name input,
.admin-shell .pin-schedule-search input { width: 100%; min-width: 0; height: 36px; border: 1px solid var(--admin-line); border-radius: 6px; padding: 0 9px; color: var(--admin-ink); background: var(--admin-page); font-size: 11px; outline: none; }
.admin-shell .pin-schedule-picker input:focus,
.admin-shell .pin-schedule-plan-name input:focus,
.admin-shell .pin-schedule-search input:focus { border-color: var(--admin-accent); background: var(--admin-surface); box-shadow: 0 0 0 2px #2864dc18; }
.admin-shell .pin-schedule-options { position: absolute; z-index: 8; top: calc(100% + 4px); right: 0; left: 0; max-height: 190px; overflow-y: auto; border: 1px solid var(--admin-line); border-radius: 6px; padding: 4px; background: var(--admin-surface); box-shadow: 0 12px 28px #15232b18; }
.admin-shell .pin-schedule-options.opens-up { top: auto; bottom: calc(100% + 4px); }
.admin-shell .pin-schedule-options[hidden] { display: none; }
.admin-shell .pin-schedule-option { display: block; width: 100%; min-height: 31px; border: 0; border-radius: 4px; padding: 6px 8px; color: var(--admin-ink); background: transparent; font-size: 11px; text-align: left; cursor: pointer; }
.admin-shell .pin-schedule-option:hover,
.admin-shell .pin-schedule-option:focus { background: var(--admin-soft); outline: none; }
.admin-shell .pin-schedule-option.is-custom { color: var(--admin-accent); font-weight: 700; }
.admin-shell .pin-schedule-cn-field { align-content: start; }
.admin-shell .pin-schedule-chips { display: flex; min-height: 28px; flex-wrap: wrap; align-items: center; gap: 4px; }
.admin-shell .pin-schedule-chips i { color: var(--admin-faint); font-size: 10px; font-style: normal; font-weight: 400; }
.admin-shell .pin-schedule-chip { display: inline-flex; min-height: 27px; align-items: center; gap: 5px; border: 1px solid #cbd9f5; border-radius: 14px; padding: 2px 4px 2px 8px; color: #285aa9; background: #f2f6ff; font-size: 10px; }
.admin-shell .pin-schedule-chip b { font-size: 10px; }
.admin-shell .pin-schedule-chip input { width: 45px; min-height: 22px; border: 0; border-radius: 5px; padding: 0 3px; background: #fff; font-size: 10px; text-align: center; }
.admin-shell .pin-schedule-chip button { width: 21px; min-height: 21px; border: 0; border-radius: 50%; padding: 0; color: #5372a5; background: transparent; cursor: pointer; }
.admin-shell .pin-schedule-chip button:hover { background: #dde8fb; }
.admin-shell .pin-schedule-option.is-keyboard-active { background: var(--admin-soft); }
.admin-shell .pin-schedule-side { display: grid; min-width: 0; min-height: 0; grid-template-rows: auto minmax(0, 1fr); overflow: hidden; background: #f8fafb; }
.admin-shell .pin-schedule-plans { border-bottom: 1px solid var(--admin-line); padding: 14px; }
.admin-shell .pin-schedule-plan-list { display: flex; max-height: 92px; flex-wrap: wrap; gap: 5px; overflow-y: auto; margin: 9px 0; }
.admin-shell .pin-schedule-plan-categories { display: grid; gap: 5px; margin-top: 8px; color: var(--admin-muted); font-size: 10px; font-weight: 700; }
.admin-shell .pin-schedule-plan-categories .pin-schedule-chips { min-height: 27px; }
.admin-shell .pin-schedule-plan { display: inline-flex; min-height: 29px; align-items: center; gap: 6px; border: 1px solid var(--admin-line); border-radius: 5px; padding: 5px 8px; color: var(--admin-ink); background: var(--admin-surface); font-size: 10px; cursor: pointer; }
.admin-shell .pin-schedule-plan span { color: var(--admin-faint); font-size: 9px; }
.admin-shell .pin-schedule-plan.is-selected { border-color: #9bb8ee; color: #285aa9; background: #f2f6ff; }
.admin-shell .pin-schedule-plan-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin-top: 7px; }
.admin-shell .pin-schedule-plan-actions .secondary { min-height: 33px; padding: 0 8px; }
.admin-shell .pin-schedule-plan-actions button:disabled { color: var(--admin-faint); background: #eef1f2; cursor: default; }
.admin-shell .pin-schedule-delete-confirmation { margin-top: 8px; padding: 10px; border: 1px solid #efc7c7; border-radius: 6px; background: #fff6f6; }
.admin-shell .pin-schedule-delete-confirmation p { margin: 0; color: #a33636; font-size: 12px; overflow-wrap: anywhere; }
.admin-shell [data-pin-schedule-target="deletePlanButton"] { grid-column: 1 / -1; }
.admin-shell [data-pin-schedule-target="deletePlanButton"]:not(:disabled), .admin-shell [data-pin-schedule-target="confirmDeleteButton"] { color: #a33636; }
.admin-shell .pin-schedule-projects { display: grid; min-height: 0; grid-template-rows: auto auto minmax(0, 1fr); padding: 14px; }
.admin-shell .pin-schedule-search { margin-top: 9px; }
.admin-shell .pin-schedule-project-list { display: grid; align-content: start; gap: 5px; overflow-y: auto; margin-top: 8px; padding-right: 2px; }
.admin-shell .pin-schedule-project { display: grid; width: 100%; min-width: 0; min-height: 46px; grid-template-columns: 20px minmax(0, 1fr); align-items: center; gap: 8px; border: 1px solid var(--admin-line); border-radius: 6px; padding: 6px 8px; color: var(--admin-ink); background: var(--admin-surface); text-align: left; cursor: pointer; }
.admin-shell .pin-schedule-project i { display: grid; width: 17px; height: 17px; place-items: center; border: 1px solid #c8d0d5; border-radius: 4px; color: #fff; background: #fff; font-size: 10px; font-style: normal; }
.admin-shell .pin-schedule-project span { display: grid; min-width: 0; gap: 2px; }
.admin-shell .pin-schedule-project b,
.admin-shell .pin-schedule-project small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.admin-shell .pin-schedule-project b { font-size: 11px; }
.admin-shell .pin-schedule-project small { color: var(--admin-muted); font-size: 9px; }
.admin-shell .pin-schedule-project.is-selected { border-color: #9bb8ee; background: #f7f9ff; }
.admin-shell .pin-schedule-project.is-selected i { border-color: var(--admin-accent); background: var(--admin-accent); }
.admin-shell .pin-schedule-empty { width: 100%; margin: 0; border: 1px dashed var(--admin-line); border-radius: 6px; padding: 12px; color: var(--admin-faint); font-size: 10px; text-align: center; }
.admin-shell .pin-schedule-feedback { margin: 0; border-top: 1px solid #efd2cf; padding: 8px 18px; color: #9a403a; background: #fff6f5; font-size: 11px; }
.admin-shell .pin-schedule-feedback[hidden] { display: none; }
.admin-shell .pin-schedule-actions { grid-row: -1; }

@media (max-width: 1050px) {
  .project-table-head,
  .project-summary { grid-template-columns: minmax(0, 1fr) 56px 72px 56px; gap: 8px; }
  .project-table-head span:nth-child(2),
  .project-summary > .project-start-fact { display: none; }
  .project-table-head span:nth-child(5),
  .project-summary > .project-sync { display: none; }
  .project-table-head span:nth-child(3) { grid-column: 2; }
  .project-table-head span:nth-child(4) { grid-column: 3; }
  .project-table-head span:nth-child(7) { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .project-summary > .project-role-fact { grid-column: 2; grid-row: 1; }
  .project-summary > .status { grid-column: 3; grid-row: 1; justify-self: start; }
  .project-summary > .project-row-actions { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; padding-left: 52px; }
  .admin-shell .price-editor-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell .status-editor-row { grid-template-columns: minmax(150px, 1.2fr) repeat(2, minmax(120px, 1fr)) auto; }
  .admin-shell .field-map-form { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 800px) {
  .admin-shell { display: block; }
  .admin-shell .sidebar { position: sticky; z-index: 10; top: 0; display: grid; width: 100%; height: auto; grid-template-columns: auto minmax(0, 1fr); align-items: center; gap: 12px; border: 0; border-bottom: 1px solid #29343c; padding: 9px 12px; }
  .admin-shell .brand { padding: 0; font-size: 13px; }
  .admin-shell .admin-nav { display: flex; min-width: 0; gap: 2px; overflow-x: auto; margin: 0; scrollbar-width: none; }
  .admin-shell .admin-nav::-webkit-scrollbar { display: none; }
  .admin-shell .admin-nav a { min-height: 32px; flex: 0 0 auto; padding: 8px 10px; font-size: 11px; }
  .admin-shell .admin-main { padding: 18px 14px 36px; }
  .admin-shell .admin-stats { grid-template-columns: 1fr 1fr; }
  .admin-shell .admin-stats > div { min-height: 50px; }
  .admin-shell .admin-stats > div:nth-child(2) { border-right: 0; }
  .admin-shell .admin-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--admin-line); }
  .unpaid-panel-head { align-items: stretch; flex-direction: column; }
  .unpaid-panel-head .admin-search { width: 100%; }
  .unpaid-table-head,
  .unpaid-row { grid-template-columns: minmax(80px, 1fr) 80px 110px; gap: 7px; }
  .unpaid-totals { gap: 10px; }
  .unpaid-total-item { font-size: 9px; }
  .unpaid-total,
  .unshipped-total { font-size: 17px; }
  .project-table-head,
  .project-summary { grid-template-columns: minmax(0, 1fr) 72px 56px; gap: 8px; }
  .project-table-head span:nth-child(2),
  .project-table-head span:nth-child(3),
  .project-table-head span:nth-child(5),
  .project-summary > .project-fact,
  .project-summary > .project-sync { display: none; }
  .project-table-head span:nth-child(4) { grid-column: 2; }
  .project-table-head span:nth-child(7) { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  .project-summary > .status { grid-column: 2; grid-row: 1; }
  .project-summary > .project-row-actions { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; padding-left: 46px; }
  .admin-shell .price-editor-list { grid-template-columns: 1fr; }
  .admin-shell .status-editor-row { grid-template-columns: minmax(0, 1fr) minmax(108px, .8fr) minmax(108px, .8fr); }
  .admin-shell .status-editor-row > .secondary { grid-column: 3; justify-self: end; }
  .admin-shell .catalog-actions { grid-template-columns: 1fr; }
  .admin-shell .field-map-form { grid-template-columns: 1fr 1fr; }
  .ip-table-head,
  .ip-config-head { grid-template-columns: minmax(0, 1fr) 72px 136px; gap: 8px; }
  .ip-table-head span:nth-child(2),
  .ip-table-head span:nth-child(3),
  .ip-config-head > .ip-table-id,
  .ip-config-head > .ip-allocation-limit { display: none; }
  .ip-table-head span:nth-child(4) { grid-column: 2; }
  .ip-table-head span:nth-child(5) { grid-column: 3; text-align: right; }
  .admin-shell .ip-profile-form { grid-template-columns: 1fr; }
  .query-rule-summary-row { grid-template-columns: 54px minmax(140px, .8fr) minmax(180px, 1.2fr) 70px 56px; gap: 8px; }
  .query-rule-editor { padding-left: 12px; }
  .query-condition-row { grid-template-columns: 24px minmax(96px, .7fr) minmax(96px, .7fr) minmax(150px, 1fr) 34px; }
  .query-add-condition,
  .query-source-warning,
  .query-source-note { margin-left: 0; }
  .admin-shell .group-create-workspace { grid-template-columns: minmax(0, 1fr) 230px; }
  .admin-shell .schedule-settings { grid-template-columns: 120px minmax(110px, 1fr); }
  .admin-shell .create-toggles { grid-column: 1 / -1; }
  .admin-shell .option-price-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .admin-shell .group-edit-role-list { grid-template-columns: 1fr; }
  .admin-shell .pin-schedule-workspace { grid-template-columns: minmax(0, 1fr) 300px; }
  .admin-shell .pin-schedule-mapping { grid-template-columns: 1fr; }
  .admin-shell .pin-schedule-mapping > header { grid-column: 1; }
}

@media (max-width: 520px) {
  .admin-shell .admin-page-head h1,
  .admin-shell .ip-admin-topbar h1,
  .admin-shell .catalog-admin-topbar h1 { font-size: 20px; }
  .admin-shell .admin-page-head > div { display: grid; gap: 2px; }
  .admin-shell .admin-stats span { font-size: 11px; }
  .admin-shell .admin-stats strong { font-size: 15px; }
  .admin-shell .project-cover { width: 36px; height: 36px; }
  .admin-shell .project-identity { padding-left: 46px; }
  .project-row-actions button,
  .ip-row-actions button { padding: 0 7px; }
  .admin-shell .catalog-create { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .admin-shell .catalog-create > input[type="text"] { width: 100%; }
  .admin-shell .catalog-create .file-picker { grid-column: 1; }
  .admin-shell .catalog-create .primary { grid-column: 2; grid-row: 1 / 3; }
  .taxonomy-table-head,
  .taxonomy-entry { grid-template-columns: minmax(0, 1fr) 72px; }
  .taxonomy-table-head span:nth-child(2),
  .taxonomy-cover-state { display: none; }
  .taxonomy-table-head span:nth-child(3) { grid-column: 2; text-align: right; }
  .admin-shell .taxonomy-row-actions { grid-column: 1 / -1; grid-row: 2; justify-content: flex-start; padding-left: 48px; }
  .admin-shell .taxonomy-editor form { grid-template-columns: 1fr; }
  .query-rule-summary-row { grid-template-columns: 52px minmax(0, 1fr) 58px; gap: 7px; }
  .query-rule-expression { grid-column: 2 / 4; grid-row: 2; }
  .query-rule-relation { grid-column: 1; grid-row: 2; }
  .query-rule-edit { grid-column: 3; grid-row: 1; }
  .query-rule-settings { grid-template-columns: 1fr; }
  .query-condition-row { grid-template-columns: 20px minmax(0, 1fr) minmax(0, 1fr) 34px; align-items: start; }
  .query-condition-order { padding-top: 10px; }
  .query-condition-values { grid-column: 2 / 5; grid-row: 2; }
  .query-condition-remove { grid-column: 4; grid-row: 1; }
  .member-table-head,
  .member-row { grid-template-columns: minmax(0, 1fr) minmax(92px, .75fr) 94px; gap: 8px; }
  .member-table-head span:nth-child(2),
  .member-row > small { display: none; }
  .member-table-head span:nth-child(3) { grid-column: 2; }
  .member-table-head span:nth-child(4),
  .member-row > .member-permission-form { grid-column: 3; }
  .admin-shell .member-unsubmitted-trigger { min-width: 86px; }
  .admin-shell .member-unsubmitted-item { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 10px; }
  .admin-shell .member-unsubmitted-item > span,
  .admin-shell .member-unsubmitted-item strong { grid-column: 2; }
  .admin-shell .member-unsubmitted-item > span { grid-row: 1; }
  .admin-shell .member-unsubmitted-item strong { grid-row: 2; }
  .ip-create-dialog { width: 100vw; height: 100dvh; max-height: none; margin: 0; border-radius: 0; }
  .ip-create-fields { grid-template-columns: 1fr; }
  .admin-shell .group-dialog { width: 100vw; height: 100dvh; max-height: none; border-radius: 0; }
  .admin-shell .group-create-form { height: calc(100dvh - 56px); max-height: none; }
  .admin-shell .group-create-workspace { display: flex; flex-direction: column; }
  .admin-shell .group-create-main { display: contents; }
  .admin-shell .group-create-assets { order: 2; border-top: 1px solid var(--admin-line); border-left: 0; background: var(--admin-surface); }
  .admin-shell .role-section { order: 3; }
  .admin-shell .schedule-settings { grid-template-columns: 120px minmax(0, 1fr); }
  .admin-shell .create-toggles { gap: 12px; }
  .admin-shell .option-price-grid { grid-template-columns: 1fr; }
  .admin-shell .group-edit-role-list { grid-template-columns: 1fr; }
  .admin-shell .role-pricing-row,
  .admin-shell .group-edit-role-row { grid-template-columns: minmax(0, 1fr) minmax(82px, .5fr); }
  .admin-shell .role-pricing-identity { grid-column: 1 / -1; }
  .admin-shell .admin-page-actions { gap: 5px; }
  .admin-shell .admin-page-actions .primary,
  .admin-shell .admin-page-actions .secondary { padding: 0 9px; }
  .admin-shell .pin-schedule-dialog { grid-template-rows: 56px minmax(0, 1fr) auto auto; }
  .admin-shell .pin-schedule-workspace { display: block; overflow-y: auto; }
  .admin-shell .pin-schedule-mappings { display: block; overflow: visible; border-right: 0; border-bottom: 1px solid var(--admin-line); padding: 14px; }
  .admin-shell .pin-schedule-mapping-toolbar { position: sticky; top: 0; padding: 4px 0 10px; }
  .admin-shell .pin-schedule-mapping-list { overflow: visible; padding-top: 2px; }
  .admin-shell .pin-schedule-side { display: block; overflow: visible; }
  .admin-shell .pin-schedule-projects { min-height: 420px; }
  .admin-shell .pin-schedule-project-list { max-height: 330px; }
  .admin-shell .pin-schedule-plan-actions { grid-template-columns: 1fr; }
}
