/* Shared UI system for the existing operations screens. */
:root {
  --fuyo-font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  --fuyo-bg: #f8f6f4;
  --fuyo-panel: #fffefc;
  --fuyo-soft: #fcf1f4;
  --fuyo-ink: #493741;
  --fuyo-muted: #7d6974;
  --fuyo-line: #e9dfe3;
  --fuyo-brand: #a84c6e;
  --fuyo-danger: #b13f52;
  --background: 30 22% 97% !important;
  --background-deep: 30 22% 97% !important;
  --foreground: 330 14% 25% !important;
  --card: 40 100% 99% !important;
  --card-foreground: 330 14% 25% !important;
  --popover: 40 100% 99% !important;
  --popover-foreground: 330 14% 25% !important;
  --muted: 335 25% 95% !important;
  --muted-foreground: 330 9% 45% !important;
  --border: 335 19% 89% !important;
  --input: 335 19% 85% !important;
  --header-background: 40 100% 99% !important;
  --sidebar-background: 40 100% 99% !important;
  --sidebar-foreground: 330 14% 25% !important;
  --sidebar-accent: 340 55% 95% !important;
  --menu-background: 40 100% 99% !important;
}
:root.dark {
  --fuyo-bg: #201c20;
  --fuyo-panel: #2b242a;
  --fuyo-soft: #392a34;
  --fuyo-ink: #eee1e8;
  --fuyo-muted: #c2acb8;
  --fuyo-line: #4b3944;
  --fuyo-brand: #e8a3be;
  --fuyo-danger: #ff9ba7;
  --background: 300 7% 12% !important;
  --background-deep: 300 7% 12% !important;
  --foreground: 330 25% 91% !important;
  --card: 310 9% 15% !important;
  --card-foreground: 330 25% 91% !important;
  --popover: 310 9% 15% !important;
  --popover-foreground: 330 25% 91% !important;
  --muted: 320 15% 20% !important;
  --muted-foreground: 330 15% 73% !important;
  --border: 325 14% 26% !important;
  --input: 325 14% 32% !important;
  --header-background: 310 9% 15% !important;
  --sidebar-background: 310 9% 15% !important;
  --sidebar-foreground: 330 25% 91% !important;
  --sidebar-accent: 325 19% 23% !important;
  --menu-background: 310 9% 15% !important;
}
.dark .light {
  --background: 300 7% 12% !important;
  --foreground: 330 25% 91% !important;
  --accent: 320 15% 20% !important;
  --accent-foreground: 330 25% 91% !important;
  --header-background: 310 9% 15% !important;
  --sidebar-background: 310 9% 15% !important;
  --sidebar-foreground: 330 25% 91% !important;
  --menu-background: 310 9% 15% !important;
  --menu-foreground: 330 25% 91% !important;
  --border: 325 14% 26% !important;
  color: var(--fuyo-ink) !important;
}
.dark header.bg-header, .dark .bg-sidebar, .dark .vben-sub-menu, .dark .vben-sub-menu-content, .dark .vben-menu-item { color: var(--fuyo-ink) !important; background: var(--fuyo-panel) !important; }
.dark .vben-menu-item.is-active, .dark .vben-menu-item:hover, .dark .vben-sub-menu-content:hover { background: var(--fuyo-soft) !important; color: var(--fuyo-brand) !important; }
.dark .tabs-chrome__item-main { color: var(--fuyo-ink) !important; }
.dark .tabs-chrome__item.is-active .tabs-chrome__background-content { background: var(--fuyo-soft) !important; }
body { color: var(--fuyo-ink); background: var(--fuyo-bg); }
.frosting-page { padding: 28px !important; max-width: 1800px !important; color: var(--fuyo-ink); font-family: var(--fuyo-font); }
.frosting-page h1 { font-size: 25px !important; color: var(--fuyo-ink); }
.frosting-page p { color: var(--fuyo-muted) !important; font-size: 13px; line-height: 1.7; }
.frosting-page button { min-height: 38px; font-size: 13px; border-color: var(--fuyo-line) !important; background: var(--fuyo-panel) !important; color: var(--fuyo-ink) !important; }
.frosting-page button.primary { color: #fff !important; background: #a94d6f !important; border-color: #a94d6f !important; }
.frosting-page input, .frosting-page textarea, .frosting-page select { background: var(--fuyo-panel) !important; border-color: var(--fuyo-line) !important; }
.frosting-page .frosting-account, .frosting-page .frosting-dialog { border-color: var(--fuyo-line); background: var(--fuyo-panel) !important; border-radius: 12px; }
.frosting-page .balance { color: var(--fuyo-brand) !important; }
.frosting-page .frosting-preview { color: var(--fuyo-ink); background: var(--fuyo-soft); }
.ops-hero .ant-btn-background-ghost { background: var(--fuyo-panel) !important; color: var(--fuyo-ink) !important; border-color: var(--fuyo-line) !important; }
.ops-page, .ops-page h1, .ops-page h2, .ops-page h3,
.ant-table, .ant-form, .ant-btn, .ant-input, .ant-select,
.ant-modal, .ant-drawer, .ant-statistic, .fuyo-native-preview {
  font-family: var(--fuyo-font) !important;
}
.ops-page { width: 100%; min-width: 0; max-width: 1800px; padding: 28px !important; margin: 0 auto; color: var(--fuyo-ink); }
.ops-hero {
  display: flex !important; flex-wrap: wrap; align-items: center !important;
  justify-content: space-between; gap: 16px; padding: 0 0 22px !important;
  margin: 0 !important; background: transparent !important; border: 0 !important;
  border-radius: 0 !important; box-shadow: none !important; color: var(--fuyo-ink) !important;
}
.ops-hero > div:first-child { flex: 1 1 360px; min-width: 0; }
.ops-hero h1 { margin: 0 0 7px !important; color: var(--fuyo-ink) !important; font-size: 25px !important; font-weight: 650 !important; line-height: 1.4 !important; letter-spacing: .3px; }
.ops-hero p { color: var(--fuyo-muted) !important; margin: 0 !important; font-size: 13px !important; line-height: 1.7 !important; max-width: 800px; }
.ops-hero .ant-space { gap: 10px !important; }
.ops-panel, .ops-page > .ant-card {
  color: var(--fuyo-ink) !important; background: var(--fuyo-panel) !important;
  border: 1px solid var(--fuyo-line) !important; border-radius: 12px !important; box-shadow: none !important;
}
.ops-panel .ant-card-head { background: transparent; border-color: var(--fuyo-line); min-height: 54px; }
.ops-panel .ant-card-head-title { color: var(--fuyo-ink); font-size: 16px; font-weight: 600; }
.ops-panel > .ant-card-body { padding: 22px !important; }
.ops-page > .ops-panel.mt-4 { margin-top: 18px !important; }
.ant-statistic-title { color: var(--fuyo-muted) !important; font-size: 13px !important; line-height: 1.6; }
.ant-statistic-content { color: var(--fuyo-ink) !important; font-weight: 600; font-size: 29px !important; font-variant-numeric: tabular-nums; }
.ops-money { color: var(--fuyo-brand) !important; font-weight: 600; font-variant-numeric: tabular-nums; }
.ops-page .text-gray-400, .ops-page .text-gray-500 { color: var(--fuyo-muted) !important; }
.ant-btn { min-height: 36px; height: auto; border-radius: 8px !important; font-size: 13px !important; font-weight: 500; box-shadow: none !important; }
.ant-btn-default { color: var(--fuyo-ink); background: var(--fuyo-panel); border-color: var(--fuyo-line); }
.dark .ant-btn-default, .dark .ant-select-dropdown, .dark .ant-dropdown-menu { color: var(--fuyo-ink) !important; background: var(--fuyo-panel) !important; }
.dark .ant-select-item, .dark .ant-dropdown-menu-item, .dark .ant-modal-confirm-title, .dark .ant-modal-confirm-content { color: var(--fuyo-ink) !important; }
.dark .ant-select-item-option-active, .dark .ant-select-item-option-selected, .dark .ant-dropdown-menu-item-active { background: var(--fuyo-soft) !important; }
.ant-btn-primary { background: #a94d6f !important; border-color: #a94d6f !important; color: #fff !important; }
.ant-btn-primary:hover { background: #933e5e !important; border-color: #933e5e !important; }
.ant-btn-dangerous { color: var(--fuyo-danger) !important; border-color: color-mix(in srgb, var(--fuyo-danger) 35%, var(--fuyo-line)) !important; }
.ant-btn-primary.ant-btn-dangerous { background: #b13f52 !important; border-color: #b13f52 !important; color: #fff !important; }
.ant-btn:disabled { opacity: .55; cursor: not-allowed; }
.ant-btn:focus-visible, .fuyo-advanced-toggle:focus-visible { outline: 2px solid var(--fuyo-brand) !important; outline-offset: 3px; }
.ant-input, .ant-input-affix-wrapper, .ant-input-number, .ant-select:not(.ant-select-customize-input) .ant-select-selector {
  color: var(--fuyo-ink) !important; background: var(--fuyo-panel) !important;
  border-color: var(--fuyo-line) !important; border-radius: 8px !important;
  font-size: 13px !important; min-height: 38px;
}
.ant-input { padding: 8px 11px; }
.ant-input::placeholder, .ant-input-number-input::placeholder, .ant-select-selection-placeholder { color: var(--fuyo-muted) !important; opacity: 1; }
.ant-select-single .ant-select-selector .ant-select-selection-item,
.ant-select-single .ant-select-selector .ant-select-selection-placeholder { line-height: 36px !important; }
.ant-input-number-input { height: 36px !important; }
.ant-input-number-handler-wrap { border-radius: 0 8px 8px 0; }
.ops-filter-form { display: flex; flex-wrap: wrap; gap: 14px 16px; margin-bottom: 22px !important; align-items: flex-end; }
.ops-filter-form > .ant-form-item { margin: 0 !important; }
.ops-filter-form .ant-form-item-row { flex-direction: column; align-items: stretch; }
.ops-filter-form .ant-form-item-label { text-align: left; padding: 0 0 5px; }
.ops-filter-form .ant-form-item-label > label { font-size: 12px; height: auto; color: var(--fuyo-muted) !important; }
.ops-filter-form .ant-form-item-label > label::after { display: none; }
.ops-filter-form .ant-form-item:last-child { align-self: flex-end; }
.resource-table { min-width: 0; }
.resource-table .ant-table { font-size: 13px !important; background: var(--fuyo-panel) !important; color: var(--fuyo-ink) !important; }
.resource-table .ant-table-container { border-radius: 9px !important; border: 1px solid var(--fuyo-line); overflow: hidden; }
.resource-table .ant-table-content { overscroll-behavior-x: contain; scrollbar-color: #c6adb8 transparent; }
.resource-table .ant-table-thead > tr > th {
  padding: 13px 14px !important; color: var(--fuyo-muted) !important; background: var(--fuyo-soft) !important;
  font-weight: 600 !important; font-size: 12px !important; line-height: 1.5; border-bottom: 1px solid var(--fuyo-line) !important;
}
.resource-table .ant-table-tbody > tr > td { padding: 13px 14px !important; border-bottom: 1px solid var(--fuyo-line) !important; line-height: 1.65; }
.resource-table .ant-table-tbody > tr:hover > td { background: var(--fuyo-soft) !important; }
.resource-table .ant-table-cell-fix-right, .resource-table .ant-table-cell-fix-left { background: var(--fuyo-panel) !important; }
.resource-table .ant-table-thead .ant-table-cell-fix-right, .resource-table .ant-table-thead .ant-table-cell-fix-left { background: var(--fuyo-soft) !important; }
.resource-table .ant-btn { min-height: 32px; padding: 3px 10px; margin: 2px 0; font-size: 12px !important; border-radius: 6px !important; }
.resource-table .ant-btn-primary { color: var(--fuyo-brand) !important; border-color: var(--fuyo-line) !important; background: var(--fuyo-panel) !important; }
.resource-table .ant-btn-primary:hover { background: var(--fuyo-soft) !important; }
.resource-table .ant-image-img { max-height: 72px; object-fit: contain; border-radius: 6px; }
.ops-page .ant-table { background: var(--fuyo-panel) !important; color: var(--fuyo-ink) !important; }
.ops-page .ant-table-thead > tr > th { background: var(--fuyo-soft) !important; color: var(--fuyo-ink) !important; border-color: var(--fuyo-line) !important; }
.ops-page .ant-table-tbody > tr > td { background: var(--fuyo-panel) !important; color: var(--fuyo-ink) !important; border-color: var(--fuyo-line) !important; }
.ops-page .ant-table-tbody > tr:hover > td { background: var(--fuyo-soft) !important; }
.ops-page .ant-table .ant-table-measure-row > td { padding: 0 !important; border: 0 !important; height: 0 !important; line-height: 0 !important; font-size: 0 !important; }
.resource-table pre { max-height: 90px; overflow: auto; font: inherit; }
.ant-pagination { color: var(--fuyo-muted); font-size: 12px !important; }
.ant-pagination-item { border-radius: 6px !important; }
.ant-pagination-item-active { border-color: var(--fuyo-brand) !important; }
.ant-pagination-item-active a { color: var(--fuyo-brand) !important; }
.ant-empty { padding: 24px 10px; }
.ant-table-placeholder > td { background: var(--fuyo-panel) !important; }
.ant-empty-description { color: var(--fuyo-ink) !important; font-size: 14px; font-weight: 500; }
.fuyo-empty-help { margin: 9px auto 0; max-width: 520px; font-size: 12px; line-height: 1.7; color: var(--fuyo-muted); font-weight: 400; }
.fuyo-empty-action { display: block; margin: 15px auto 0; padding: 7px 14px; border: 1px solid var(--fuyo-line); border-radius: 7px; background: var(--fuyo-panel); color: var(--fuyo-brand); font-size: 12px; cursor: pointer; }
.ant-drawer-content, .ant-modal-content { background: var(--fuyo-panel) !important; color: var(--fuyo-ink) !important; }
.resource-drawer .ant-drawer-content-wrapper { max-width: calc(100vw - 24px); }
.ant-drawer-header { padding: 19px 24px !important; border-bottom: 1px solid var(--fuyo-line) !important; background: var(--fuyo-panel) !important; }
.ant-drawer-title, .ant-modal-title { color: var(--fuyo-ink) !important; font-size: 17px !important; font-weight: 600 !important; }
.resource-drawer .ant-drawer-body { padding: 22px 26px 0 !important; overscroll-behavior: contain; }
.resource-drawer .ant-form-item { margin-bottom: 20px !important; scroll-margin-top: 18px; }
.resource-drawer .ant-form-item-label { padding-bottom: 7px !important; }
.resource-drawer .ant-form-item-label > label { font-size: 13px; font-weight: 550; color: var(--fuyo-ink) !important; }
.resource-drawer .ant-form-item-explain { font-size: 12px !important; line-height: 1.7 !important; color: var(--fuyo-muted) !important; margin-top: 6px; }
.resource-drawer textarea { line-height: 1.75 !important; min-height: 110px; }
.resource-form-section-title { display: flex; align-items: center; gap: 12px; border: 0 !important; border-left: 3px solid var(--fuyo-brand) !important; border-radius: 5px !important; background: var(--fuyo-soft) !important; color: var(--fuyo-ink) !important; font-size: 14px !important; font-weight: 650; padding: 10px 12px !important; margin: 28px 0 18px !important; }
.resource-form-section-title:first-child { margin-top: 0 !important; }
.resource-drawer-actions {
  display: flex !important; width: 100%; justify-content: flex-end; gap: 12px !important;
  position: sticky; bottom: 0; z-index: 5; padding: 16px 0 20px !important;
  margin: 16px 0 0 !important; border-top: 1px solid var(--fuyo-line); background: var(--fuyo-panel) !important;
}
.resource-drawer-actions::before { content: attr(data-fuyo-status); margin-right: auto; color: var(--fuyo-brand); font-size: 12px; align-self: center; }
.resource-drawer-actions .ant-btn { min-width: 82px; min-height: 40px; }
.fuyo-advanced-toggle { margin-left: auto; padding: 3px 7px; color: var(--fuyo-brand); background: transparent; font-size: 12px; font-weight: 500; border-radius: 5px; border: 0; cursor: pointer; }
.fuyo-advanced-hidden { display: none !important; }
.fuyo-field-error .ant-input, .fuyo-field-error .ant-input-number, .fuyo-field-error .ant-select-selector { border-color: var(--fuyo-danger) !important; }
.fuyo-error-message { margin-top: 6px; color: var(--fuyo-danger); font-size: 12px; line-height: 1.6; }
.ant-message-notice-content, .ant-notification-notice { color: var(--fuyo-ink) !important; background: var(--fuyo-panel) !important; border: 1px solid var(--fuyo-line); border-radius: 10px !important; box-shadow: 0 5px 24px #34232d18 !important; }
.ant-notification-notice-description { color: var(--fuyo-muted) !important; }
.ant-notification-notice-close { color: var(--fuyo-muted) !important; }
.ant-alert-info { color: var(--fuyo-ink) !important; background: var(--fuyo-soft) !important; border: 1px solid var(--fuyo-line) !important; border-radius: 8px !important; }
.ant-tag-green { color: #286748 !important; border-color: #cde1d5 !important; background: #f0f7f2 !important; }
.ant-tag-red { color: #a13a4d !important; border-color: #ecd0d6 !important; background: #fbf0f2 !important; }
.ant-tag-orange, .ant-tag-gold { color: #8b601b !important; border-color: #e8dabb !important; background: #faf6eb !important; }
.dark .ant-tag-green { color: #9bd0ac !important; border-color: #45604e !important; background: #29392e !important; }
.dark .ant-tag-red { color: #edacb8 !important; border-color: #66414b !important; background: #402a32 !important; }
.dark .ant-tag-orange, .dark .ant-tag-gold { color: #e1c488 !important; border-color: #63563b !important; background: #3e3527 !important; }
.fuyo-native-preview { padding: 18px 22px; margin-bottom: 18px; background: var(--fuyo-panel); color: var(--fuyo-ink); border-color: var(--fuyo-line); }
.fuyo-native-preview strong { font-size: 15px; color: var(--fuyo-ink); }
.fuyo-native-preview small, .fuyo-preview-tools label { color: var(--fuyo-muted); }
.fuyo-preview-tools input, .fuyo-preview-tools select { color: var(--fuyo-ink); background: var(--fuyo-panel); border-color: var(--fuyo-line); min-height: 38px; }
.fuyo-preview-tools button { color: var(--fuyo-brand); background: var(--fuyo-soft); border-color: var(--fuyo-line); min-height: 38px; }
.dark .ant-menu-light, .dark .ant-menu-light > .ant-menu, .dark .ant-layout-sider { background: var(--fuyo-panel) !important; }
.dark .ant-menu-item-selected { color: var(--fuyo-brand) !important; background: var(--fuyo-soft) !important; }
@media (max-width: 1100px) { .ops-page { padding: 22px !important; } .ops-hero > div:first-child { flex-basis: 300px; } }
@media (max-width: 767px) {
  .frosting-page { padding: 18px 14px !important; }
  .ops-page { padding: 18px 14px !important; }
  .ops-hero { gap: 14px; padding-bottom: 18px !important; align-items: flex-start !important; }
  .ops-hero h1 { font-size: 22px !important; }
  .ops-hero > div:first-child { flex-basis: 100%; }
  .ops-hero > .ant-space { width: 100%; }
  .ops-hero .ant-btn { min-height: 40px; }
  .ops-panel > .ant-card-body { padding: 16px !important; }
  .ops-filter-form { gap: 12px; }
  .ops-filter-form .ant-form-item { max-width: 100%; }
  .ops-filter-form .ant-form-item-control-input-content > .ant-input-affix-wrapper { width: 100% !important; }
  .resource-mobile-card, .ops-mobile-card { color: var(--fuyo-ink) !important; background: var(--fuyo-panel) !important; border-color: var(--fuyo-line) !important; border-radius: 10px !important; }
  .resource-mobile-actions { padding-top: 12px; }
  .resource-mobile-actions .ant-btn, .ops-mobile-card .ant-btn { min-height: 40px; padding: 6px 13px; }
  .resource-drawer .ant-drawer-content-wrapper { width: 100vw !important; max-width: 100vw; }
  .resource-drawer .ant-drawer-body { padding: 18px 18px 0 !important; }
  .resource-drawer .ant-drawer-header { padding: 17px 18px !important; }
  .resource-drawer-actions { padding-bottom: max(18px, env(safe-area-inset-bottom)) !important; }
  .resource-drawer-actions .ant-btn { min-height: 44px; min-width: 88px; }
  .fuyo-native-preview { padding: 16px; }
  .fuyo-preview-tools { gap: 12px; }
  .fuyo-preview-tools label { max-width: 100%; }
}
