body { font-family: 'Microsoft YaHei', sans-serif; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Cards */
body.dark-theme .ant-card { background: #1f1f1f !important; border-color: #333 !important; }
body.dark-theme .ant-card-head { background: #1f1f1f !important; border-color: #333 !important; }
body.dark-theme .ant-card-head-title { color: #ddd !important; }
body.dark-theme .ant-card-body { color: #ccc !important; }

/* Tables */
body.dark-theme .ant-table { background: #1f1f1f !important; }
body.dark-theme .ant-table-thead > tr > th { background: #262626 !important; color: #ccc !important; border-color: #333 !important; }
body.dark-theme .ant-table-tbody > tr > td { border-color: #333 !important; color: #bbb !important; background: #1f1f1f !important; }
body.dark-theme .ant-table-tbody > tr:hover > td { background: #2a2a2a !important; }
body.dark-theme .ant-empty-description { color: #888 !important; }

/* Forms */
body.dark-theme .ant-form-item-label > label { color: #bbb !important; }
body.dark-theme .ant-input, body.dark-theme .ant-input-affix-wrapper { background: #2a2a2a !important; border-color: #444 !important; color: #ddd !important; }
body.dark-theme .ant-input::placeholder { color: #666 !important; }
body.dark-theme .ant-input-password-icon { color: #888 !important; }

/* Select */
body.dark-theme .ant-select-selector { background: #2a2a2a !important; border-color: #444 !important; color: #ddd !important; }
body.dark-theme .ant-select-arrow { color: #888 !important; }
body.dark-theme .ant-select-dropdown { background: #1f1f1f !important; }
body.dark-theme .ant-select-item { color: #ccc !important; }
body.dark-theme .ant-select-item-option-selected { background: #333 !important; }

/* Tags */
body.dark-theme .ant-tag { border-color: #444 !important; color: #ccc !important; background: rgba(255,255,255,0.04) !important; }
body.dark-theme .ant-tag-volcano { color: #ff7a45 !important; background: rgba(255,122,69,0.1) !important; border-color: rgba(255,122,69,0.3) !important; }
body.dark-theme .ant-tag-processing { color: #1677ff !important; background: rgba(22,119,255,0.1) !important; }

/* Page Header */
body.dark-theme .ant-page-header { background: transparent !important; }
body.dark-theme .ant-page-header-heading-title { color: #ddd !important; }
body.dark-theme .ant-page-header-heading-sub-title { color: #999 !important; }
body.dark-theme .ant-page-header-back { color: #ccc !important; }
body.dark-theme .ant-page-header-content { color: #ccc !important; }

/* Pagination */
body.dark-theme .ant-pagination-item { background: #2a2a2a !important; border-color: #444 !important; }
body.dark-theme .ant-pagination-item a { color: #ccc !important; }
body.dark-theme .ant-pagination-item-active { background: #1677ff !important; border-color: #1677ff !important; }
body.dark-theme .ant-pagination-item-active a { color: #fff !important; }
body.dark-theme .ant-pagination-prev .ant-pagination-item-link, body.dark-theme .ant-pagination-next .ant-pagination-item-link { background: #2a2a2a !important; border-color: #444 !important; color: #ccc !important; }
body.dark-theme .ant-pagination-options-quick-jumper input { background: #2a2a2a !important; border-color: #444 !important; color: #ddd !important; }
body.dark-theme .ant-pagination-total-text { color: #999 !important; }

/* Modal */
body.dark-theme .ant-modal-content { background: #1f1f1f !important; }
body.dark-theme .ant-modal-header { background: #1f1f1f !important; border-bottom-color: #333 !important; }
body.dark-theme .ant-modal-footer { border-color: #333 !important; border-top-color: #333 !important; background: #1f1f1f !important; }
body.dark-theme .ant-modal-body { color: #ccc !important; background: #1f1f1f !important; }
body.dark-theme .ant-modal-body .ant-input-password { background: #2a2a2a !important; border-color: #444 !important; }
body.dark-theme .ant-modal-body input { background: #2a2a2a !important; border-color: #444 !important; color: #ddd !important; }
body.dark-theme .ant-modal-title { color: #ddd !important; }
body.dark-theme .ant-modal-close { color: #888 !important; }
body.dark-theme .ant-modal-close:hover { color: #ccc !important; }
body.dark-theme .ant-spin-text { color: #999 !important; }

/* Buttons */
body.dark-theme .ant-btn-default { background: #2a2a2a !important; border-color: #444 !important; color: #ccc !important; }
body.dark-theme .ant-btn-default:hover { color: #6366f1 !important; border-color: #6366f1 !important; background: #2a2a2a !important; }
body.dark-theme .ant-btn-primary { background: #1677ff !important; }
body.dark-theme .ant-btn-danger { background: #ff4d4f !important; }
body.dark-theme .ant-btn-dangerous { color: #ff4d4f !important; border-color: #ff4d4f !important; background: transparent !important; }
body.dark-theme .ant-btn-link { color: #1677ff !important; }
body.dark-theme .ant-btn-link:hover { color: #4096ff !important; }
body.dark-theme .ant-btn-text { color: #ccc !important; }
body.dark-theme .ant-btn-text:hover { background: rgba(255,255,255,0.06) !important; color: #ddd !important; }
body.dark-theme .ant-btn-dangerous.ant-btn-text { color: #ff4d4f !important; }
body.dark-theme .ant-btn-dangerous.ant-btn-text:hover { background: rgba(255,77,79,0.1) !important; }
body.dark-theme .ant-btn[disabled] { color: rgba(255,255,255,0.25) !important; background: #222 !important; border-color: #333 !important; }

/* Radio & InputNumber */
body.dark-theme .ant-radio-inner { background: #2a2a2a !important; border-color: #444 !important; }
body.dark-theme .ant-radio-checked .ant-radio-inner { border-color: #1677ff !important; background: #1677ff !important; }
body.dark-theme .ant-radio-wrapper { color: #ccc !important; }
body.dark-theme .ant-radio-disabled .ant-radio-inner { background: #222 !important; border-color: #333 !important; }
body.dark-theme .ant-input-number { background: #2a2a2a !important; border-color: #444 !important; color: #ddd !important; }
body.dark-theme .ant-input-number-input { color: #ddd !important; background: #2a2a2a !important; }
body.dark-theme .ant-input-number-handler-wrap { background: #333 !important; border-color: #444 !important; }
body.dark-theme .ant-input-number-handler { border-color: #444 !important; }
body.dark-theme .ant-input-number-handler-up-inner, body.dark-theme .ant-input-number-handler-down-inner { color: #999 !important; }
body.dark-theme .ant-input-number:hover { border-color: #6366f1 !important; }

/* Switch Checkbox Badge Divider */
body.dark-theme .ant-switch { background: rgba(255,255,255,0.2) !important; }
body.dark-theme .ant-switch-checked { background: #1677ff !important; }
body.dark-theme .ant-checkbox-wrapper { color: #ccc !important; }
body.dark-theme .ant-badge-count { box-shadow: 0 0 0 1px #1f1f1f !important; }
body.dark-theme .ant-result-title { color: #ddd !important; }
body.dark-theme .ant-result-subtitle { color: #999 !important; }
body.dark-theme .ant-divider { border-color: #333 !important; }
body.dark-theme .ant-alert-info { background: rgba(24,144,255,0.12) !important; border-color: rgba(24,144,255,0.2) !important; }
body.dark-theme .ant-alert-error { background: rgba(255,77,79,0.12) !important; border-color: rgba(255,77,79,0.2) !important; }
body.dark-theme .ant-alert-success { background: rgba(82,196,26,0.12) !important; border-color: rgba(82,196,26,0.2) !important; }
body.dark-theme .ant-alert-warning { background: rgba(250,173,20,0.12) !important; border-color: rgba(250,173,20,0.2) !important; }
body.dark-theme .ant-alert-message { color: #91caff !important; }
body.dark-theme .ant-alert-error .ant-alert-message { color: #ffa39e !important; }
body.dark-theme .ant-alert-icon { color: inherit !important; }
body.dark-theme h1, body.dark-theme h2, body.dark-theme h3, body.dark-theme h4, body.dark-theme h5, body.dark-theme h6 { color: #ddd !important; }
body.dark-theme .ant-statistic-content-value { color: #ddd !important; }

/* Native elements */
body.dark-theme textarea { background: #2a2a2a !important; border-color: #444 !important; color: #ddd !important; }
body.dark-theme h1, body.dark-theme h2, body.dark-theme h3, body.dark-theme h4, body.dark-theme h5, body.dark-theme h6 { color: #ddd !important; }
body.dark-theme .ant-space-item { color: #ccc !important; }

/* File input */
body.dark-theme input[type="file"] { color: #ccc !important; }
body.dark-theme input[type="file"]::file-selector-button { background: #2a2a2a !important; border: 1px solid #444 !important; color: #ccc !important; border-radius: 4px; padding: 4px 12px; cursor: pointer; }
body.dark-theme input[type="file"]::file-selector-button:hover { border-color: #6366f1 !important; color: #6366f1 !important; }

/* Drag & Drop sort items */
body.dark-theme [draggable="true"] { background-color: #1f1f1f !important; border-color: #333 !important; color: #ccc !important; }

/* Login page dark mode */
body.dark-theme .login-right { background: #0d1117 !important; color: #ccc !important; }
body.dark-theme .login-right h2 { color: #ddd !important; }
body.dark-theme .login-right p { color: #888 !important; }
body.dark-theme .login-split { background: #0d1117 !important; }
