/* TingDong AI admin V2: keep every surface aligned with the shared light theme. */
body.td-page-admin{
  --td-admin-surface:#fff;
  --td-admin-soft:#f7f9fb;
  --td-admin-border:#dce2e8;
  --td-admin-text:#182235;
  --td-admin-muted:#687588;
  --td-admin-green:#20b278;
  --td-admin-shadow:0 12px 34px rgba(35,48,67,.07);
}
body.td-page-admin :is(.panel,.metric,.order,.contact,.sheet,.finMetric,.finPanel,.finCost,#redeemView .noteBox,#redeemView .toolbar,#redeemView .redeemPlan,#redeemView .codeItem,.adminQuickNav){
  background:var(--td-admin-surface)!important;
  color:var(--td-admin-text)!important;
  border-color:var(--td-admin-border)!important;
  box-shadow:var(--td-admin-shadow)!important;
}
body.td-page-admin :is(.panel,.finPanel){border-radius:20px!important}
body.td-page-admin :is(.metric,.finMetric,.finCost,#redeemView .redeemPlan,#redeemView .codeItem,#redeemView .noteBox,#redeemView .toolbar){border-radius:15px!important}
body.td-page-admin :is(.finCost b,.finTable td,.finTable strong,.finMetricValue,.redeemPlanName,.codeText,.tdDialogTitle){color:var(--td-admin-text)!important}
body.td-page-admin :is(.finCost small,.finPanelSub,.finMetricSub,.codeMeta,.redeemPlanMeta,.noteHint,.tdDialogMsg){color:var(--td-admin-muted)!important}
body.td-page-admin .finTable th,
body.td-page-admin .finTable thead,
body.td-page-admin #redeemView .finTable th{
  background:var(--td-admin-soft)!important;
  color:#5f6d82!important;
  border-color:var(--td-admin-border)!important;
}
body.td-page-admin .finTable td{background:#fff!important;border-color:#e6ebef!important}
body.td-page-admin .finEnv,
body.td-page-admin .adminEnvSwitch{
  display:inline-flex;
  gap:5px;
  padding:4px;
  border:1px solid var(--td-admin-border)!important;
  background:var(--td-admin-soft)!important;
  border-radius:12px!important;
}
body.td-page-admin .finEnv button,
body.td-page-admin .adminEnvSwitch button{
  min-height:36px!important;
  padding:7px 12px!important;
  background:transparent!important;
  color:#667488!important;
  border:0!important;
  box-shadow:none!important;
}
body.td-page-admin .finEnv button.active,
body.td-page-admin .adminEnvSwitch button.active{
  background:#eaf8f1!important;
  color:#167d57!important;
  box-shadow:inset 0 0 0 1px #cbe8da!important;
}
body.td-page-admin .finForm input,
body.td-page-admin .finForm select,
body.td-page-admin #redeemView .noteInput,
body.td-page-admin #redeemView .searchInput{
  background:#fff!important;
  color:var(--td-admin-text)!important;
  border-color:#d4dce5!important;
}
body.td-page-admin .finNotice{
  background:#fffaf0!important;
  border-color:#ead9ac!important;
  color:#755f2a!important;
}
body.td-page-admin .finError,
body.td-page-admin .refundBox{
  background:#fff6f7!important;
  border-color:#efcbd0!important;
  color:#a74753!important;
}
body.td-page-admin .audit{
  background:#f2f8fc!important;
  border-color:#cbdfea!important;
  color:#36586d!important;
}
body.td-page-admin .historyBox{
  background:#f7f9fb!important;
  border-color:var(--td-admin-border)!important;
  color:var(--td-admin-muted)!important;
}
body.td-page-admin #redeemView .generatedBox{
  background:#f1fbf6!important;
  border-color:#c6ead9!important;
  color:#187a54!important;
}
body.td-page-admin #redeemView :is(.copyBtn,.editNoteBtn,.voidBtn,.revokeBtn,.tdAdminDeleteBtn){background:#fff!important}
body.td-page-admin #redeemView .copyBtn{border-color:#c7e7d7!important;color:#167d57!important}
body.td-page-admin #redeemView .editNoteBtn{border-color:var(--td-admin-border)!important;color:#526076!important}
body.td-page-admin :is(.tdAdminDeleteBtn,#redeemView .voidBtn,#redeemView .revokeBtn,.btn.danger){
  background:#fff7f8!important;
  border:1px solid #efcbd0!important;
  color:#b64e5b!important;
}
body.td-page-admin .tdAdminDeleteBtn{border-radius:10px;padding:7px 10px;font-size:12px;font-weight:850;cursor:pointer}
body.td-page-admin .tdAdminDeleteBtn:disabled{opacity:.5;cursor:not-allowed}
body.td-page-admin .sheetHead{background:#fff!important;border-color:var(--td-admin-border)!important}
body.td-page-admin .close{background:#fff!important;color:#405069!important;border-color:var(--td-admin-border)!important}
body.td-page-admin .tdDialogOverlay{background:rgba(41,53,69,.28)!important}
body.td-page-admin .tdDialogBox{
  background:#fff!important;
  color:var(--td-admin-text)!important;
  border-color:var(--td-admin-border)!important;
  box-shadow:0 24px 70px rgba(35,48,67,.18)!important;
}
body.td-page-admin .tdDialogInput,
body.td-page-admin .tdDialogCheck{
  background:#fff!important;
  color:var(--td-admin-text)!important;
  border-color:#d4dce5!important;
}
body.td-page-admin .tdDialogCheck{background:#f8fafc!important}
body.td-page-admin .tdDialogBtn{background:#fff!important;color:#526076!important;border-color:var(--td-admin-border)!important}
body.td-page-admin .tdDialogBtn.primary{background:var(--td-admin-green)!important;color:#fff!important;border-color:transparent!important}
body.td-page-admin .tdDialogBtn.danger{background:#fff1f3!important;color:#b64e5b!important;border-color:#e8b8bf!important}
body.td-page-admin .panelHead{align-items:center!important}
body.td-page-admin .adminPaymentHeadActions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
body.td-page-admin [data-filter="history"]{display:none!important}
@media(max-width:700px){
  body.td-page-admin .panelHead{align-items:flex-start!important;flex-direction:column}
  body.td-page-admin .adminPaymentHeadActions{width:100%;justify-content:space-between}
  body.td-page-admin .adminEnvSwitch{width:100%}
  body.td-page-admin .adminEnvSwitch button{flex:1}
}

body.td-page-admin #financeBadge.profit-positive{background:#eaf8f1!important;color:#167d57!important}
body.td-page-admin #financeBadge.profit-negative{background:#fff0f2!important;color:#b4233c!important;box-shadow:inset 0 0 0 1px #f0c6cd!important}

body.td-page-admin #financeView .finMetricLabel{font-size:13px!important}
