:root {
  --bg: var(--u2-bg);
  --bg2: var(--u2-surface);
  --surface: var(--u2-surface);
  --card: var(--u2-surface);
  --border: var(--u2-border);
  --border2: oklch(80% 0.018 285);
  --pri: var(--u2-accent);
  --pri2: var(--u2-accent);
  --pri3: var(--u2-accent);
  --pri-glow: oklch(75% 0.1 294 / 0.22);
  --text: var(--u2-fg);
  --text2: var(--u2-muted);
  --text3: oklch(56% 0.02 285);
  --white: var(--u2-fg);
  --green: var(--u2-success);
  --red: var(--u2-danger);
  --yellow: var(--u2-warning);
  --sidebar-w: 220px;
  --topbar-h: 64px;
  --radius: var(--u2-radius-control);
  --radius-sm: 8px;
  --radius-lg: var(--u2-radius-panel);
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: var(--u2-shadow-dialog);
  --hw-bg: var(--u2-bg);
  --hw-surface: var(--u2-surface);
  --hw-text: var(--u2-fg);
  --hw-sub: var(--u2-muted);
  --hw-border: var(--u2-border);
  --hw-pri: var(--u2-accent);
  --hw-pri2: var(--u2-accent);
  --hw-shadow: none;
  --hw-radius: var(--u2-radius-panel);
  --hw-radius-sm: 10px;
}

body, body.light-mode { background: var(--u2-bg); color: var(--u2-fg); font-family: var(--u2-sans); color-scheme: light; }
body::before { display: none !important; }
.shell-sidebar { background: var(--u2-surface); border-color: var(--u2-border); }
.sidebar-brand { min-height: 64px; border-color: var(--u2-border); }
.sidebar-brand .brand-logo { display: flex; }
.sidebar-brand .brand-name { color: var(--u2-fg); background: none; -webkit-text-fill-color: currentColor; font-size: 16px; letter-spacing: 0; }
.nav-section-title { color: var(--u2-muted); text-transform: none; letter-spacing: 0; font-size: 11px; }
.nav-item { min-height: 44px; color: var(--u2-muted); border: 1px solid transparent; border-radius: var(--u2-radius-control); }
.nav-item:hover { color: var(--u2-fg); background: oklch(94% 0.01 285); }
.nav-item.active { color: var(--u2-accent); background: oklch(94% 0.018 294); border-color: oklch(86% 0.025 294); }
.nav-item.active::before { display: none; }
.sidebar-footer { border-color: var(--u2-border); }
.sidebar-footer a { min-height: 36px; display: flex; align-items: center; color: var(--u2-muted); }

.shell-topbar {
  min-height: var(--topbar-h);
  background: color-mix(in oklch, var(--u2-surface) 94%, transparent);
  border-color: var(--u2-border);
  backdrop-filter: blur(14px);
}
.topbar-left .search-box { max-width: 360px; }
.topbar-left .search-box input { min-height: 42px; padding-left: 36px; border-radius: var(--u2-radius-control); background: var(--u2-surface); border-color: var(--u2-border); color: var(--u2-fg); }
.search-box, .topbar-btn, .user-menu { background: var(--u2-surface) !important; border-color: var(--u2-border) !important; color: var(--u2-muted) !important; }
.topbar-btn, .theme-btn, .user-avatar { box-shadow: none !important; }
#themeBtn, .topbar-btn[title="通知"] { display: none !important; }
.starship-page-ribbon { display: none !important; }
.shell-content { width: 100%; max-width: 1320px !important; padding: 36px 28px 84px !important; background: var(--u2-bg) !important; }
.shell-footer { color: var(--u2-muted); border-color: var(--u2-border); background: var(--u2-bg); }
.shell-footer a { color: var(--u2-muted); }

#app { animation: none; }
.main { max-width: none; }
.stats-row { gap: 0; border: 1px solid var(--u2-border); border-radius: var(--u2-radius-panel); overflow: hidden; background: var(--u2-surface); }
.stat-card { min-height: 84px; margin: 0; border: 0 !important; border-right: 1px solid var(--u2-border) !important; border-radius: 0 !important; background: var(--u2-surface) !important; box-shadow: none !important; transform: none !important; backdrop-filter: none !important; }
.stat-card:last-child { border-right: 0; }
.stat-card:hover { border-color: var(--u2-border); box-shadow: none; transform: none; }
.stat-num { color: var(--u2-fg); font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; }
.stat-num, .num, .structure-title, .brand-name {
  background: none !important;
  color: var(--u2-fg) !important;
  -webkit-background-clip: border-box !important;
  background-clip: border-box !important;
  -webkit-text-fill-color: currentColor !important;
}

.direction-panel, .chart-panel, .performance-panel, .upload-panel, .import-panel, .year-group, .state-demo {
  border: 1px solid var(--u2-border) !important;
  border-radius: var(--u2-radius-panel) !important;
  background: var(--u2-surface) !important;
  box-shadow: none !important;
}
.manual-route-card, .command-module, .task-status-card, .bridge-status-card,
.mission-feed-panel, .manual-content-panel, .bridge-module-panel, .kanban-board-shell, .ai-core-panel {
  border: 1px solid var(--u2-border) !important;
  border-radius: var(--u2-radius-panel) !important;
  background: var(--u2-surface) !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  color: var(--u2-fg) !important;
}
.direction-grid { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.dir-card { background: var(--u2-bg) !important; border: 1px solid var(--u2-border) !important; border-radius: 10px !important; box-shadow: none !important; transform: none !important; backdrop-filter: none !important; color: var(--u2-fg) !important; }
.dir-card::before { display: none !important; }
.dir-card .dir-name, .direction-panel h3, .empty-state h3 { color: var(--u2-fg) !important; }
.dir-card .dir-desc, .direction-panel .subtitle, .stat-label { color: var(--u2-muted) !important; }
.dir-card:hover { border-color: var(--u2-accent); box-shadow: none; transform: none; }

.assignment-list { gap: 0; border: 1px solid var(--u2-border); border-radius: var(--u2-radius-panel); overflow: hidden; background: var(--u2-surface); }
.assignment-card, .submission-card {
  margin: 0 !important;
  padding: 20px !important;
  border: 0 !important;
  border-bottom: 1px solid var(--u2-border) !important;
  border-left: 0 !important;
  border-radius: 0 !important;
  background: var(--u2-surface) !important;
  box-shadow: none !important;
  transform: none !important;
}
.assignment-card:last-child, .submission-card:last-child { border-bottom: 0 !important; }
.assignment-card:hover, .submission-card:hover { background: oklch(98.6% 0.004 285) !important; box-shadow: none !important; }
.assignment-card::before, .assignment-card::after { display: none !important; }
.assignment-card .btn, .submission-card .btn { min-width: 96px; padding: 9px 14px; white-space: nowrap; }
.assign-title, .assignment-card .title, .submission-student { color: var(--u2-fg); }
.assign-meta, .assignment-card .meta, .assignment-card .desc, .submission-time { color: var(--u2-muted); }

.btn, .dir-btn, .sh-btn, button { min-height: 40px; border-radius: var(--u2-radius-control); box-shadow: none !important; }
.btn-pri, .dir-btn, .sh-btn-pri { background: var(--u2-accent) !important; color: white !important; border-color: var(--u2-accent) !important; }
.btn-pri:hover, .dir-btn:hover, .sh-btn-pri:hover { background: var(--u2-accent-hover) !important; transform: none !important; }
.btn-pri::after { display: none !important; }
.btn-out { background: var(--u2-surface); color: var(--u2-fg); border: 1px solid var(--u2-border); }
.btn-out:hover { color: var(--u2-accent); border-color: var(--u2-accent); }
input, textarea, select {
  color: var(--u2-fg) !important;
  background: var(--u2-surface) !important;
  border: 1px solid var(--u2-border) !important;
  border-radius: var(--u2-radius-control) !important;
  box-shadow: none !important;
}
input:focus, textarea:focus, select:focus {
  border-color: var(--u2-accent) !important;
  box-shadow: 0 0 0 3px var(--u2-focus) !important;
}

.data-table th { color: var(--u2-muted); background: oklch(96% 0.006 285); text-transform: none; letter-spacing: 0; border-color: var(--u2-border); }
.data-table td { color: var(--u2-fg); border-color: var(--u2-border); }
.modal-overlay { z-index: var(--u2-z-backdrop); background: oklch(18% 0.02 285 / 0.45); backdrop-filter: none; }
.modal, .modal-box { border: 0; border-radius: var(--u2-radius-panel); background: var(--u2-surface); box-shadow: var(--u2-shadow-dialog); }
.toast { z-index: var(--u2-z-toast); box-shadow: none; }
.kbd-hint { display: none !important; }

@media (max-width: 768px) {
  .shell-main { width: 100%; min-width: 0; }
  .shell-topbar, .shell-content, .shell-footer { min-width: 0; }
  .shell-footer > span { min-width: 0; overflow-wrap: anywhere; }
  .shell-content { padding: 24px 14px 92px !important; }
  .topbar-left .search-box { display: none; }
  .stats-row { display: grid; grid-template-columns: 1fr 1fr; }
  .stat-card { min-width: 0; border-right: 1px solid var(--u2-border); border-bottom: 1px solid var(--u2-border); }
  .stat-card:nth-child(2n) { border-right: 0; }
  .stat-card:nth-last-child(-n + 2) { border-bottom: 0; }
  .assignment-card, .submission-card { padding: 17px 16px !important; }
  .assignment-card .btn, .submission-card .btn { min-width: 82px; padding: 9px 10px; }
  .direction-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .mobile-toggle { display: inline-flex !important; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; }
  .topbar-left .search-box { display: none; }
  .shell-topbar { padding: 0 14px; }
  .topbar-right { margin-left: auto; }
  .user-name { display: none; }
}
