:root {
  --bg: #f3f3f3;
  --surface: #fff;
  --surface-soft: #f7f7f7;
  --ink: #242424;
  --muted: #7a7a7a;
  --line: #dcdcdc;
  --line-soft: #ededed;
  --primary-neutral: #3d3d3d;
  --primary-neutral-dark: #262626;
  --primary-neutral-soft: #ececec;
  --cyan: #777;
}

body, .content, .wecom-shell, .wecom-chat-workspace, .wecom-feature-page { background-color:#f4f4f4; }
.sidebar, .topbar, .panel, .ip-panel, .ip-commandbar, .tl-card, .tl-list article, .tl-food-table, .te-header { background:#fff; }
.sidebar { border-right-color:#dedede; }
.sidebar-brand .brand-mark, .brand-mark { background:#303030; box-shadow:none; }
.sidebar-foot { background:transparent; border-color:#ddd; }

.primary-button, .command-button,
.wecom-send-button, .wecom-bind-primary, .wecom-ai-save, .wecom-nutrition-save,
.wecom-sop-save, .wecom-stage-save, .wecom-stage-publish {
  border-color:#343434 !important;
  background:#343434 !important;
  color:#fff !important;
  box-shadow:none !important;
}
.primary-button:hover, .command-button:hover,
.wecom-send-button:hover, .wecom-bind-primary:hover { background:#202020 !important; }
.ghost-button, .table-action, .filter-control, .ip-add-row {
  border-color:#d1d1d1;
  background:transparent;
  color:#444;
}
.ghost-button:hover, .table-action:hover, .ip-add-row:hover { border-color:#777; background:#f1f1f1; color:#222; }

.main-nav button:hover { background:#f0f0f0; color:#222; }
.main-nav button.active { background:#343434 !important; color:#fff !important; }
.main-nav button.active::before { display:none; }
.main-nav button.active .nav-icon { color:#fff; opacity:1; }

button.active,
.ip-section-nav button.active, .tl-tabs button.active, .te-nav button.active,
.wecom-workspace-tabs button.active, .wecom-side-tabs button.active,
.wecom-group-tabs button.active, .wecom-period-tabs button.active,
.wecom-stage-phases button.active, .wecom-glucose-day-picker button.active,
.wecom-time-tabs button.active {
  border-color:#343434 !important;
  background:#343434 !important;
  color:#fff !important;
  box-shadow:none !important;
}
.tl-tabs b { background:rgba(0,0,0,.08); color:inherit; }
button.active b { background:rgba(255,255,255,.18); }

input:focus, select:focus, textarea:focus,
.ip-field input:focus, .ip-field textarea:focus,
.wecom-ai-fields input:focus, .wecom-ai-fields select:focus, .wecom-ai-fields textarea:focus {
  border-color:#666 !important;
  box-shadow:0 0 0 3px rgba(0,0,0,.07) !important;
}
.ip-inline-template { border-color:#ccc; background:transparent; color:#4b4b4b; }
.ip-patient-banner, .tl-hero { border-color:#ddd; background:rgba(255,255,255,.72); }
.ip-avatar, .avatar, .user-menu > div:first-child, .wecom-avatar { background:#e9e9e9; color:#444; }
.ip-panel, .ip-commandbar, .tl-card { box-shadow:0 6px 20px rgba(0,0,0,.035); }
.ip-total-kcal strong, .plan-card .plan-metric, .panel-action, .table-action { color:#3c3c3c; }
.ip-nutrient-bars b, .ip-nutrient-bars b.good, .ip-nutrient-bars b.over { background:#656565; }

.wecom-message.out p { border-color:#3d3d3d; background:#3d3d3d; color:#fff; }
.wecom-switch input:checked + i { background:#3b3b3b !important; }
.wecom-account-status i, .sidebar-foot i { background:#777 !important; box-shadow:none !important; }
.status-pill.low, .review-pill.reviewed, .binding-pill.bound,
.wecom-online, .wecom-status-online { background:#ececec !important; color:#444 !important; }

.login-view { background:#f1f1f1; }
.login-panel { border-color:#ddd; background:rgba(255,255,255,.96); box-shadow:0 22px 60px rgba(0,0,0,.09); }
.login-security i { background:#666; box-shadow:0 0 0 3px #e5e5e5; }
.toast { border-left-color:#777; background:#292929; }

@media (max-width:1100px) {
  .te-shell { min-width:860px; }
  .te-meta { grid-template-columns:1fr; }
  .te-meta label.wide { grid-column:auto; }
}
