:root {
  --bg:#f5f6fb; --panel:#fff; --panel-soft:#f8f9fd; --line:#e6e9f2;
  --line-strong:#d5dbea; --text:#263148; --muted:#8792a7;
  --accent:#4b6ff0; --accent-dark:#3658d8; --accent-soft:#edf1ff;
  --radius:10px; --space:22px;
  --shadow:0 12px 32px rgba(38,49,72,.04); --shadow-soft:0 5px 20px rgba(38,49,72,.025);
}
body { background:var(--bg); font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif; }
.icon { width:22px; height:22px; flex:none; vertical-align:middle; }
a:focus-visible,button:focus-visible,select:focus-visible { outline:3px solid #9eaff9; outline-offset:3px; }
button,.button { min-height:40px; padding:9px 17px; box-shadow:none; }
button:hover,.button:hover { box-shadow:0 5px 14px #4b6ff01a; }
input,select,textarea { min-height:40px; }
input:focus,select:focus,textarea:focus { box-shadow:0 0 0 3px #4b6ff01a; }
.sidebar { width:248px; position:fixed; inset:0 auto 0 0; display:flex; flex-direction:column; padding:28px 16px 20px; background:#fff; border-right:1px solid var(--line); z-index:30; overflow:auto; }
.sidebar-brand { display:flex; align-items:center; gap:12px; margin:0 8px 34px; color:var(--text); }
.brand-mark { display:grid; place-items:center; width:46px; height:46px; flex:none; border-radius:15px; background:linear-gradient(140deg,#5d7df9,#315bdc); color:white; font-size:26px; font-weight:750; box-shadow:0 8px 18px #4b6ff030; }
.sidebar-brand strong { font-size:17px; display:block; }
.sidebar-brand small { color:var(--muted); font-size:13px; }
.sidebar-nav { display:flex; flex-direction:column; gap:8px; }
.sidebar-nav a { display:flex; align-items:center; gap:15px; padding:15px 17px; border-radius:13px; color:#7d889e; font-size:15px; font-weight:600; }
.sidebar-nav a:hover { background:#f6f8ff; color:var(--accent); }
.sidebar-nav a.is-active { color:var(--accent); background:var(--accent-soft); }
.sidebar-bottom { margin-top:auto; padding-top:32px; }
.workspace-note { display:flex; align-items:center; gap:12px; padding:15px; background:#f7f8ff; border:1px solid #e5e9ff; border-radius:14px; }
.workspace-note div { min-width:0; }
.workspace-note small { display:block; font-size:11px; color:var(--muted); }
.workspace-note strong { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; font-size:12px; color:#69768f; }
.status-dot { width:7px; height:7px; border-radius:50%; background:var(--accent); flex:none; }
.sidebar-account { display:flex; align-items:center; gap:10px; padding:25px 7px 0; }
.avatar { background:var(--accent-soft); color:var(--accent); border-radius:50%; width:40px; height:40px; display:grid; place-items:center; font-weight:700; font-size:18px; flex:none; }
.sidebar-account strong { display:block; max-width:120px; overflow-wrap:anywhere; }
.sidebar-account a { color:var(--muted); font-size:12px; }
.sidebar-account .logout-link { margin-left:auto; padding:6px; }
.workspace-header { margin-left:248px; min-height:100px; padding:22px 38px; display:flex; align-items:center; gap:18px; border-bottom:1px solid var(--line); background:#fafbfe; }
.header-title span { color:#969fb1; font-size:12px; font-weight:600; letter-spacing:1px; display:block; }
.header-title strong,.header-title h1 { font-size:26px; display:block; margin:3px 0 0; line-height:1.55; }
.factory-switch { margin-left:auto; display:flex; align-items:center; gap:12px; min-width:0; }
.factory-switch label { color:var(--muted); white-space:nowrap; font-size:12px; }
.factory-switch select { width:240px; text-overflow:ellipsis; background:#fff; }
.app-layout .page { margin-left:248px; padding:32px 38px; min-width:0; }
.app-layout .page > section { max-width:none; }
.app-layout .page > .form-page { max-width:1100px; }
.panel,.toolbar,.batch,.module-card,.table-wrap { border-radius:18px; }
.module-head { margin-bottom:24px; }
.module-head h1 { font-size:23px; color:var(--text); }
h2 { color:var(--text); font-size:18px; }
.module-card strong,.sort-link { color:var(--text); }
th { background:#f7f8fc; color:#68758d; }
tbody tr:hover { background:#f8faff; }
.table-wrap { max-width:100%; }
.toolbar { flex-wrap:wrap; }
.filters,.inline-form { grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); min-width:0; width:100%; }
.columns > *, .calendar-layout > * { min-width:0; }
input[type=checkbox],input[type=radio] { min-height:0; }
.stats > div { border-radius:18px; }
.welcome-row { display:flex; align-items:center; justify-content:space-between; gap:20px; margin:5px 0 28px; }
.eyebrow { color:#8b9bbd; font-size:11px; font-weight:750; letter-spacing:2px; margin:0 0 8px; }
.welcome-row h1 { font-size:32px; letter-spacing:-.6px; margin:0; line-height:1.45; }
.welcome-row .muted { margin:10px 0 0; font-size:15px; }
.welcome-row .button { padding:12px 20px; }
.overview-grid,.quick-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:18px; margin-bottom:20px; }
.overview-card { display:flex; align-items:center; gap:18px; padding:28px 22px; border:1px solid var(--line); background:white; border-radius:18px; box-shadow:var(--shadow-soft); }
.stat-icon { width:50px; height:50px; display:grid; place-items:center; border-radius:15px; flex:none; }
.stat-icon .icon { width:25px; height:25px; }
.blue,.quick-icon { color:var(--accent); background:var(--accent-soft); }
.green { color:#24b78c; background:#e8f8f3; }
.orange { color:#f39737; background:#fff5e9; }
.purple { color:#9170e9; background:#f2edff; }
.overview-card strong { display:block; font-size:29px; line-height:1.25; }
.overview-card div > span { color:var(--muted); font-size:13px; }
.quick-card { background:white; border:1px solid var(--line); border-radius:15px; padding:17px 16px; display:flex; align-items:center; gap:12px; color:var(--text); transition:border-color .2s,box-shadow .2s; }
.quick-card:hover { border-color:#b9c8fa; box-shadow:var(--shadow); }
.quick-icon { width:39px; height:39px; border-radius:11px; display:grid; place-items:center; flex:none; }
.quick-card strong { font-size:14px; }.quick-card small { display:block; font-size:11px; color:var(--muted); }
.quick-card > .icon { margin-left:auto; color:#b7c0d3; width:15px; }
.home-details { display:grid; grid-template-columns:minmax(0,1.5fr) minmax(0,1fr); gap:22px; margin-top:26px; }
.home-details .panel { padding:26px; min-height:340px; }
.card-heading { display:flex; align-items:center; justify-content:space-between; gap:15px; margin-bottom:24px; }
.card-heading h2 { margin:2px 0 0; font-size:19px; }
.card-heading a { font-size:12px; color:#8392ae; white-space:nowrap; }
.card-heading .icon,.home-empty a .icon,.summary-footer .icon { width:14px; height:14px; }
.department-row { margin:20px 0; }.department-row > div:first-child { display:flex; justify-content:space-between; margin-bottom:9px; }
.department-row small { color:var(--muted); font-weight:400; }.department-track { height:7px; border-radius:9px; background:#f1f4fc; overflow:hidden; }.department-track span { display:block; height:100%; background:#91a6f7; border-radius:9px; }
.factory-summary h3 { font-size:17px; margin:0 0 20px; overflow-wrap:anywhere; }
.factory-summary dl > div { display:grid; grid-template-columns:100px minmax(0,1fr); gap:8px; margin:18px 0; }.factory-summary dt { color:var(--muted); font-size:13px; }.factory-summary dd { margin:0; overflow-wrap:anywhere; }
.summary-footer { border-top:1px solid var(--line); display:flex; justify-content:space-between; align-items:center; margin-top:24px; padding-top:18px; font-size:12px; }
.home-empty { display:flex; flex-direction:column; align-items:center; justify-content:center; min-height:220px; text-align:center; color:var(--muted); }.home-empty > .icon { width:38px; height:38px; color:#c6cddc; margin-bottom:16px; }.home-empty p { font-size:12px; margin:6px 0 14px; }
.auth-layout .login-panel { border-radius:20px; padding:32px; }.auth-layout .page { padding:24px; }
.menu-toggle,.drawer-close { display:none; }.sidebar-backdrop[hidden] { display:none; }
.skip-link { position:fixed; left:260px; top:-100px; z-index:60; background:white; padding:12px; }.skip-link:focus { top:10px; }
@media(min-width:900px) and (max-width:1200px) {
  .app-layout .page { padding:26px; }.workspace-header { padding:22px 26px; }
  .overview-grid,.quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); }.home-details { grid-template-columns:1fr; }
}
@media(max-width:899px) {
  .sidebar { transform:translateX(-100%); transition:transform .2s; width:248px; }.drawer-open .sidebar { transform:translateX(0); }.drawer-open { overflow:hidden; }
  .sidebar-backdrop { position:fixed; inset:0; background:#19254266; z-index:25; }.drawer-close { display:block; align-self:flex-end; margin:-20px 0 12px; }.menu-toggle { display:inline-flex; padding:8px; }
  .workspace-header { margin-left:0; padding:16px; flex-wrap:wrap; gap:12px; min-height:90px; }.header-title strong,.header-title h1 { font-size:22px; }.header-title span { font-size:10px; }
  .factory-switch { width:100%; }.factory-switch select { flex:1; width:0; }.app-layout .page { margin-left:0; padding:22px 16px; }
  .welcome-row { align-items:flex-start; flex-wrap:wrap; }.welcome-row h1 { font-size:27px; }.welcome-row .muted { font-size:13px; }
  .overview-grid,.quick-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; }.overview-card { padding:18px 12px; gap:10px; }.stat-icon { width:38px; height:38px; }.overview-card strong { font-size:25px; }
  .quick-card { padding:14px 10px; gap:8px; }.quick-card > .icon { display:none; }.home-details { grid-template-columns:1fr; }.home-details .panel { padding:20px; }.skip-link { left:16px; }
}
@media(prefers-reduced-motion:reduce) { *,*::before,*::after { transition:none!important; } }
