/* Keep the original black/gold admin theme. The existing analytics page is
   the sizing reference; its charts, colors and component styles stay intact. */
.admin-shell {
  --admin-layout-panel: linear-gradient(150deg, rgba(17, 25, 22, .98), rgba(9, 14, 12, .98));
  --admin-layout-soft: #0b1110;
  --admin-layout-line: rgba(218, 190, 126, .14);
  --admin-layout-text: #f1efe7;
  --admin-layout-muted: #a0aaa3;
  --admin-layout-accent: #dec476;
  --admin-layout-choice: #d9ba68;
  --admin-layout-choice-text: #17140b;
  --admin-layout-shadow: inset 0 1px rgba(255, 255, 255, .018);
}
html[data-baoku-theme="light"] .admin-shell {
  --admin-layout-panel: #fff;
  --admin-layout-soft: #f8f7f2;
  --admin-layout-line: #e0dfd5;
  --admin-layout-text: #252c26;
  --admin-layout-muted: #626b62;
  --admin-layout-accent: #806018;
  --admin-layout-choice: #f1e8cf;
  --admin-layout-choice-text: #73530e;
  --admin-layout-shadow: none;
}

.admin-shell .admin-main {
  width: min(1180px, calc(100% - 54px));
  min-width: 0;
  margin: 0 auto;
  padding: 40px 0 70px;
}
.admin-shell .admin-main > header { margin-bottom: 26px; }
.admin-shell .admin-page-section { min-width: 0; }
.admin-shell :is(.admin-card, .netdisk-card, .provider-order-panel) {
  min-width: 0;
  padding: 22px;
  border: 1px solid var(--admin-layout-line);
  border-radius: 17px;
  background: var(--admin-layout-panel);
  box-shadow: var(--admin-layout-shadow);
}
.admin-shell .admin-card { margin-bottom: 18px; }
.admin-shell :is(.admin-card-heading, .provider-order-heading) { gap: 14px; }
.admin-shell :is(.admin-card h2, .netdisk-card h3) {
  font-size: 21px;
  line-height: 1.35;
}
.admin-shell .provider-order-heading h2 { font-size: 18px; line-height: 1.35; }
.admin-shell :is(.admin-card-heading p, .provider-order-heading p, .netdisk-title p) {
  color: var(--admin-layout-muted);
  font-size: 13px;
  line-height: 1.65;
}
.admin-shell :is(.admin-card, .netdisk-card) > label { font-size: 13px; }
.admin-shell :is(.admin-card, .netdisk-card) :is(input:not([type="checkbox"]):not([type="radio"]), textarea, select) {
  min-width: 0;
  font-size: 13px;
  line-height: 1.6;
}
.admin-shell :is(.admin-card, .netdisk-card) .form-actions { flex-wrap: wrap; gap: 10px; }
.admin-shell :is(.primary-button, .ghost-button, .danger-button) { border-radius: 9px; }
.admin-shell .cookie-summary-strip { border-radius: 15px; margin-bottom: 18px; }
.admin-shell .cookie-summary-strip small { font-size: 11px; letter-spacing: 0; }
.admin-shell .cookie-summary-strip p { font-size: 10px; line-height: 1.5; }
.admin-shell .cookie-summary-strip article { padding: 17px; }
.admin-shell .cookie-summary-strip strong { font-size: 23px; line-height: 1.3; }
.admin-shell .admin-metric-card { border-radius: 15px; }
.admin-shell .transfer-summary-grid { gap: 12px; }
.admin-shell .transfer-summary-grid .admin-metric-card { min-height: 90px; padding: 17px; }
.admin-shell .transfer-summary-grid .admin-metric-card strong { font-size: 23px; }

/* Reading order and all reorder buttons continue to use the saved provider
   order. Two even tracks avoid the old 3+1 arrangement and empty last row. */
.admin-shell .provider-order-panel { margin-top: 18px; border-radius: 18px; }
.admin-shell .provider-order-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
}
.admin-shell .provider-order-list li {
  min-width: 0;
  min-height: 70px;
  padding: 12px 14px;
  border-radius: 11px;
}
.admin-shell .provider-order-provider strong { font-size: 13px; }
.admin-shell .provider-order-provider small { margin-top: 4px; font-size: 11px; }
.admin-shell .provider-order-actions { gap: 7px; }
.admin-shell .provider-order-actions button { width: 34px; height: 34px; border-radius: 8px; }
.admin-shell .netdisk-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
  margin: 18px 0;
}
.admin-shell .netdisk-title { min-width: 0; gap: 12px; }
.admin-shell .netdisk-title > div { min-width: 0; }
.admin-shell .netdisk-title p { overflow-wrap: anywhere; }
.admin-shell .netdisk-card .toggle-row { padding: 12px 14px; border-radius: 10px; }
.admin-shell .netdisk-card .toggle-row strong { font-size: 12px; }
.admin-shell .netdisk-card .toggle-row small { font-size: 11px; line-height: 1.55; }

/* Override the original 520px width cap. Both choices fill one fieldset,
   with generous click areas rather than two tiny controls at its left edge. */
.admin-shell .admin-card .cookie-proxy-fieldset {
  min-width: 0;
  padding: 20px;
  border-color: var(--admin-layout-line);
  border-radius: 13px;
}
.admin-shell .cookie-proxy-fieldset legend { font-size: 13px; }
.admin-shell .admin-card .cookie-proxy-mode {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  width: 100%;
  max-width: none;
  padding: 6px;
  border: 1px solid var(--admin-layout-line);
  border-radius: 12px;
  background: var(--admin-layout-soft);
}
.admin-shell .admin-card .cookie-proxy-mode label {
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 5px 10px;
  min-width: 0;
  min-height: 82px;
  margin: 0;
  padding: 16px 20px;
  border-radius: 9px;
  color: var(--admin-layout-text);
  font-size: 13px;
  align-content: center;
}
.admin-shell .admin-card .cookie-proxy-mode label small { font-size: 11px; line-height: 1.6; opacity: .85; }
.admin-shell .admin-card .cookie-proxy-mode label.active {
  color: var(--admin-layout-choice-text);
  background: var(--admin-layout-choice);
  box-shadow: none;
}
.admin-shell .admin-card .cookie-proxy-mode input { width: 16px; height: 16px; }
.admin-shell .admin-card .cookie-proxy-mode label:focus-within {
  outline: 2px solid var(--admin-layout-accent);
  outline-offset: 2px;
}
.admin-shell .cookie-proxy-description { margin-top: 13px; color: var(--admin-layout-muted); font-size: 11px; line-height: 1.7; }
.admin-shell .source-cookie-identity small { font-size: 11px; }
.admin-shell .source-cookie-quota small { font-size: 10px; }

@media (max-width: 820px) {
  .admin-shell .netdisk-grid { grid-template-columns: 1fr; }
  .admin-shell .admin-main { padding-top: 28px; }
}
@media (max-width: 560px) {
  .admin-shell .admin-main { width: calc(100% - 28px); padding: 24px 0 36px; }
  .admin-shell .admin-main > header { margin-bottom: 20px; }
  .admin-shell :is(.admin-card, .netdisk-card, .provider-order-panel) { padding: 17px 15px; border-radius: 15px; }
  .admin-shell .provider-order-list { grid-template-columns: 1fr; gap: 10px; }
  .admin-shell .provider-order-list li { padding: 11px 12px; }
  .admin-shell .cookie-summary-strip article { padding: 11px 9px; }
  .admin-shell .cookie-summary-strip strong { font-size: 18px; }
  .admin-shell .cookie-summary-strip small { font-size: 10px; }
  .admin-shell .cookie-summary-strip p { font-size: 9px; }
  .admin-shell .transfer-summary-grid .admin-metric-card { padding: 13px; }
  .admin-shell .admin-card .cookie-proxy-fieldset { padding: 14px 12px; }
  .admin-shell .admin-card .cookie-proxy-mode { gap: 6px; }
  .admin-shell .admin-card .cookie-proxy-mode label { min-height: 76px; padding: 13px 10px; font-size: 12px; }
  .admin-shell .admin-card .cookie-proxy-mode label small { font-size: 10px; }
  .admin-shell .netdisk-title { grid-template-columns: 36px minmax(0, 1fr); gap: 10px; }
  .admin-shell .netdisk-title > span:first-child { width: 36px; height: 36px; }
  .admin-shell .netdisk-title > .status-badge { grid-column: 2; justify-self: start; }
}
@media (max-width: 380px) {
  .admin-shell .admin-card .cookie-proxy-mode { grid-template-columns: 1fr; }
  .admin-shell .admin-card .cookie-proxy-mode label { min-height: 68px; padding: 12px; }
}
