:root {
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Noto Sans SC", sans-serif;
  color: #1f2a26;
  background: #f4f5f2;
  color-scheme: light;
  --bg: #f4f5f2;
  --sidebar: #15221f;
  --panel: #ffffff;
  --panel-2: #f8faf7;
  --line: #dde4df;
  --muted: #6d7a74;
  --text: #1f2a26;
  --blue: #2f7468;
  --cyan: #4a887d;
  --violet: #736a85;
  --green: #2e8068;
  --orange: #a96f22;
  --red: #b84c57;
  --shadow: 0 12px 30px rgba(28, 45, 39, 0.055);
}

html, body {
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 1.55;
}

body::before, body::after, .orbit { display: none !important; }
* { scrollbar-color: #b8c5bf transparent; }
button, input, select, textarea { font: inherit; }
button, input, select { min-height: 42px; }
button { letter-spacing: 0; }
:focus-visible { outline: 3px solid rgba(47, 116, 104, 0.26); outline-offset: 2px; }

.login-view { background: #f4f5f2; color: var(--text); }
.login-visual {
  background: #15221f;
  color: #eef4f0;
  border: 0;
  box-shadow: none;
}
.login-brand, .mobile-brand { color: #eef4f0; letter-spacing: .13em; }
.brand-mark { background: #eef4f0 !important; color: #21423a !important; box-shadow: none !important; }
.login-copy .kicker { color: #a9c5ba; letter-spacing: .08em; }
.login-copy h1 { color: #f5f8f6; font-size: clamp(38px, 4.6vw, 68px); line-height: 1.12; letter-spacing: -.035em; }
.login-copy p { color: #c0d0c9; font-size: 17px; max-width: 620px; }
.login-points span { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.12); color: #dce7e2; }
.login-panel-wrap { background: #f4f5f2; }
.login-panel {
  color: var(--text);
  background: #ffffff;
  border: 1px solid #dfe5e1;
  border-radius: 14px;
  box-shadow: var(--shadow);
}
.login-panel h2 { color: var(--text); font-size: 30px; letter-spacing: -.025em; }
.login-panel p, .login-panel small { color: var(--muted); }
.login-panel label { color: #3f4c46; }
.login-panel input { background: #f8faf7; color: var(--text); border-color: #d8e0db; }
.health-pill { background: #edf6f1; color: #28705b; border-color: #cfe5da; }

.app-shell { background: var(--bg); }
.sidebar {
  background: #15221f;
  color: #e8efeb;
  border-right: 1px solid rgba(255,255,255,.06);
  box-shadow: none;
}
.sidebar-brand { color: #f4f7f5; }
.sidebar-brand .brand-mark { background: #f0f5f2 !important; color: #21423a !important; }
.sidebar-subtitle, .nav-label { color: #90a69d; }
.nav-item { color: #c8d6d0; border: 1px solid transparent; border-radius: 8px; }
.nav-item:hover { background: rgba(255,255,255,.055); color: #fff; }
.nav-item.active {
  color: #ffffff;
  background: #28433c;
  border-color: rgba(255,255,255,.08);
  box-shadow: none;
}
.nav-item.active::before { background: #7eb4a4; }
.sidebar-footer { border-color: rgba(255,255,255,.08); color: #98aba3; }
.nav-item svg, .nav-item .icon, .nav-item > span:first-child { color: #8eb7aa; }

.main { background: var(--bg); }
.topbar {
  background: rgba(248, 249, 246, .94);
  border-bottom: 1px solid #e0e5e1;
  box-shadow: none;
  backdrop-filter: blur(12px);
}
.top-search { background: #fff; border-color: #dce3de; color: var(--muted); box-shadow: none; }
.top-search input { color: var(--text); background: transparent; }
.topbar button, .icon-button { background: #ffffff; color: #405049; border-color: #dce3de; box-shadow: none; }
.user-badge { background: #e5efea; color: #2f6255; border: 0; }
.top-safe-badge { background: #fff8e9 !important; color: #996522 !important; border-color: #ead8b5 !important; }

.content { color: var(--text); }
.page-head { margin-bottom: 24px; }
.page-head h1 { color: #1d2924; font-size: clamp(28px, 3vw, 36px); line-height: 1.2; letter-spacing: -.035em; }
.page-head p { color: var(--muted); font-size: 15px; }
.kicker { color: #3e776b; letter-spacing: .07em; }
.muted, .hint, .panel-head p, .field-hint { color: var(--muted) !important; }

.primary, button.primary {
  background: #2f7468 !important;
  color: #ffffff !important;
  border: 1px solid #2f7468 !important;
  box-shadow: none !important;
  border-radius: 8px;
}
.primary:hover, button.primary:hover { background: #285f56 !important; border-color: #285f56 !important; transform: none; }
.secondary, button.secondary {
  background: #ffffff !important;
  color: #33443d !important;
  border: 1px solid #d7dfda !important;
  box-shadow: none !important;
  border-radius: 8px;
}
.secondary:hover, button.secondary:hover { background: #f3f6f4 !important; border-color: #c8d3cd !important; transform: none; }
.danger, button.danger { background: #fff7f7 !important; color: #a63f4b !important; border-color: #e9c8cc !important; box-shadow: none !important; }

.metric, .panel, .pipeline, .filter-panel, .table-panel, .source-summary,
.source-offer, .listing-steps, .security-tip, .store-card, .task-card,
.setting-card, .empty, .activity-card, .status-card, .quick-card,
.profit-card, .form-card, .preview-card, .summary-card {
  background: #ffffff !important;
  color: var(--text) !important;
  border: 1px solid var(--line) !important;
  box-shadow: var(--shadow) !important;
  border-radius: 10px !important;
}
.metric::before, .panel::before, .store-card::before, .setting-card::before { display: none !important; }
.metric span, .metric small { color: var(--muted) !important; }
.metric strong { color: #245f53 !important; font-size: clamp(27px, 2.8vw, 38px); letter-spacing: -.04em; }
.panel-head { border-color: var(--line) !important; }
.panel-head h2, .panel-head h3, .card-title, .setting-card h3, .store-card h3 { color: #24312b !important; }
.setting-card h2, .store-card h2 { color: #24312b !important; font-size: 18px !important; }
.setting-card p, .store-card p, .task-card p { font-size: 13px !important; line-height: 1.65 !important; }
.setting-card dl, .store-card dl { font-size: 13px !important; }

.pipeline-step, .step, .stage-card, .quick-action {
  background: #f8faf7 !important;
  border: 1px solid #e1e7e3 !important;
  color: #34433d !important;
  box-shadow: none !important;
}
.pipeline-step.active, .step.active, .stage-card.active {
  background: #edf4f0 !important;
  color: #285e53 !important;
  border-color: #bfd5cc !important;
}
.pipeline-arrow { color: #a7b5ae !important; }

input, select, textarea, .input, .select {
  background: #ffffff !important;
  color: #26322d !important;
  border: 1px solid #d7dfda !important;
  box-shadow: none !important;
  border-radius: 7px !important;
}
input::placeholder, textarea::placeholder { color: #98a39e; }
input:focus, select:focus, textarea:focus { border-color: #6c9b8e !important; box-shadow: 0 0 0 3px rgba(47,116,104,.11) !important; }
label, .field-label { color: #46534d !important; }

.table-panel { overflow: hidden; }
table { background: #ffffff !important; color: var(--text) !important; }
thead, th { background: #f6f8f6 !important; color: #56645d !important; }
th { font-size: 12px; letter-spacing: .035em; }
th, td { border-color: #e5e9e6 !important; }
tbody tr:hover { background: #f8faf8 !important; }
td strong, td b { color: #26332d !important; }
.table-actions button { min-height: 34px; }

.tag, .badge, .status-pill, .chip {
  background: #eef2ef !important;
  color: #52615a !important;
  border: 1px solid #dce4df !important;
  box-shadow: none !important;
}
.tag.green, .badge.green, .status-success, .status-pill.success { background: #edf7f1 !important; color: #28705a !important; border-color: #cce5d8 !important; }
.tag.blue, .badge.blue, .status-info, .status-pill.info { background: #edf4f4 !important; color: #356e68 !important; border-color: #ccdfdd !important; }
.tag.orange, .badge.orange, .status-warning, .status-pill.warning { background: #fff6e8 !important; color: #95601d !important; border-color: #ecd8b6 !important; }
.tag.red, .badge.red, .status-danger, .status-pill.danger { background: #fff1f2 !important; color: #a5414c !important; border-color: #ebcbd0 !important; }

.source-summary, .source-offer { background: #fff !important; }
.offer-meta, .source-meta, .product-meta { color: var(--muted) !important; }
.offer-price, .profit-value, .amount { color: #27695c !important; }
.listing-steps { background: #ffffff !important; }
.listing-step { border-color: #e1e7e3 !important; color: #3b4943 !important; }
.listing-step .number { background: #e4efea !important; color: #2d675b !important; }
.security-tip { background: #f7f9f7 !important; border-left: 3px solid #6b9c8f !important; }

.store-card, .task-card, .setting-card { min-width: 0; }
.store-card .store-icon, .setting-icon { background: #eaf1ed !important; color: #346b5f !important; box-shadow: none !important; }
.store-card p, .task-card p, .setting-card p, .setting-card dt { color: var(--muted) !important; }
.setting-card dd, .store-card dd { color: #2f3c36 !important; overflow-wrap: anywhere; word-break: break-word; }
.progress, .progress-track { background: #e9eeeb !important; }
.progress > span, .progress-fill { background: #4b877a !important; }
.rule-list { gap: 10px !important; }
.rule-item {
  background: #f7f9f7 !important;
  color: #3c4b44 !important;
  border: 1px solid #e0e6e2 !important;
  border-radius: 8px !important;
  font-size: 13px !important;
  box-shadow: none !important;
}
.rule-item span { background: #e1eee8 !important; color: #2f7468 !important; }

.toast, .drawer, .modal, .modal-card, .dialog {
  background: #ffffff !important;
  color: var(--text) !important;
  border-color: #dce3df !important;
  box-shadow: 0 20px 60px rgba(25,40,34,.14) !important;
}
.drawer-backdrop, .modal-backdrop { background: rgba(20,31,27,.42) !important; }
.drawer-head, .modal-head, .drawer-foot, .modal-foot { border-color: #e0e5e2 !important; }
.toast.success { border-left: 4px solid #39836d !important; }
.toast.error { border-left: 4px solid #b84c57 !important; }

a { color: #2f7468; }
hr { border-color: #e0e5e2; }
code { background: #eef2ef; color: #35534a; }

@media (max-width: 900px) {
  .sidebar { box-shadow: 14px 0 34px rgba(18,32,27,.18); }
  .topbar { padding-inline: 16px; }
  .content { padding: 22px 16px 44px; }
  .page-head { gap: 14px; align-items: flex-start; }
  .page-head-actions { width: 100%; flex-wrap: wrap; }
  .metrics, .dashboard-grid, .settings-grid, .store-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
  .table-panel { overflow-x: auto; }
  .login-visual { min-height: 36vh; }
}

@media (max-width: 680px) {
  html, body { font-size: 15px; }
  .content { padding: 18px 12px 36px; }
  .page-head h1 { font-size: 27px; }
  .page-head p { font-size: 14px; }
  .metrics, .dashboard-grid, .settings-grid, .store-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .metric, .panel, .filter-panel, .setting-card, .store-card, .task-card { padding: 16px !important; }
  .setting-card dl, .store-card dl { grid-template-columns: minmax(88px, .7fr) minmax(0, 1.3fr) !important; }
  .setting-card p, .store-card p, .task-card p, .setting-card dl, .store-card dl, .rule-item { font-size: 14px !important; }
  .filter-grid, .form-grid { grid-template-columns: minmax(0, 1fr) !important; }
  .page-head-actions > button { flex: 1 1 auto; }
  .login-panel-wrap { padding: 20px 14px; }
  .login-panel { padding: 24px 20px; }
  .login-copy h1 { font-size: 36px; }
  .login-copy p { font-size: 15px; }
  .top-search { max-width: none; min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
