:root {
  --bg: #f0f2f5;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #8a919f;
  --line: #e8eaed;
  --blue: #1677ff;
  --dark: #1f2329;
  --red: #f53f3f;
  --red-dark: #d92d20;
  --green: #00b42a;
  --orange: #ff7d00;
  --gray: #a9aeb8;
  --purple: #722ed1;
  --purple-light: #9254de;
  /* 主题色：科技蓝 */
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-light: #40a9ff;
  --primary-soft: #e8f1ff;
  --cyan: #22d3ee;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
  --sidebar-w: 216px;
  --topbar-h: 56px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial,
    'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

button { font-family: inherit; cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
input, select, textarea { font-family: inherit; }

/* ---------------------------------------------------------------- app bar */
.appbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 56px;
  background: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
  z-index: 50;
}

.appbar .back {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  border: none;
  background: #f2f4f8;
  color: #555;
  font-size: 18px;
  margin-right: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.appbar .back:hover { background: #e8ebf0; }

.appbar-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--dark);
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.appbar-user {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #f2f4f8;
  border-radius: 20px;
  padding: 5px 12px;
  color: #444;
  font-weight: 500;
}

.role-pill {
  font-size: 11px;
  padding: 1px 8px;
  border-radius: 10px;
  color: #fff;
  background: var(--red);
}
.role-pill.super { background: var(--purple); }
.role-pill.user { background: var(--blue); }

/* ---------------------------------------------------------------- layout */
.view {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}

.page-header { margin-bottom: 18px; }
.page-header h1 { font-size: 22px; margin: 0 0 4px; color: var(--dark); }
.page-header p { margin: 0; color: var(--muted); font-size: 13px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 16px;
}

.section-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  margin: 26px 0 12px;
}

.muted { color: var(--muted); }
.center { text-align: center; }
.row { display: flex; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }

/* ---------------------------------------------------------------- buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: none;
  border-radius: 10px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  background: #eef1f6;
  color: #444;
  transition: opacity .15s, background .15s;
}
.btn:hover { opacity: .9; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); opacity: 1; }
.btn-red { background: var(--red); color: #fff; }
.btn-green { background: #07c160; color: #fff; }
.btn-outline { background: #fff; border: 1px solid var(--red); color: var(--red); }
.btn-ghost { background: #eef1f6; color: #555; }
.btn-danger { background: #fdecea; color: var(--red); }
.btn-block { width: 100%; }
.btn-sm { padding: 6px 12px; font-size: 13px; border-radius: 8px; }

/* ---------------------------------------------------------------- forms */
.field { margin-bottom: 16px; }
.field > label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: #555;
  margin-bottom: 6px;
}
.field .hint { display: block; font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.input, .select, .textarea {
  width: 100%;
  background: #f7f8fa;
  border: 1px solid transparent;
  border-radius: 9px;
  padding: 10px 14px;
  font-size: 14px;
  color: var(--text);
  outline: none;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--blue);
  background: #fff;
}
.input::placeholder { color: #b8bcc4; }

.field-grid { display: flex; gap: 14px; flex-wrap: wrap; }
.field-grid > .field { flex: 1; min-width: 140px; }

/* ================================================================
   login / register —— 科技风（深空蓝 + 玻璃拟态 + 网格光效）
   ================================================================ */
.auth-page {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 18px;
  color: #dbe9ff;
  background:
    radial-gradient(1100px 620px at 12% 8%, rgba(22, 119, 255, .32), transparent 62%),
    radial-gradient(900px 560px at 88% 92%, rgba(34, 211, 238, .20), transparent 62%),
    linear-gradient(160deg, #050b18 0%, #071228 48%, #04070f 100%);
}

/* 背景装饰层：网格 / 光晕 / 扫描线 */
.auth-deco { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.auth-deco .grid {
  position: absolute;
  inset: -45% -12% -12%;
  background-image:
    linear-gradient(rgba(64, 169, 255, .10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(64, 169, 255, .10) 1px, transparent 1px);
  background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(circle at 50% 42%, #000 28%, transparent 76%);
  mask-image: radial-gradient(circle at 50% 42%, #000 28%, transparent 76%);
  animation: auth-grid-drift 20s linear infinite;
}
@keyframes auth-grid-drift {
  from { background-position: 0 0, 0 0; }
  to   { background-position: 0 44px, 44px 0; }
}
.auth-deco .orb { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; }
.auth-deco .orb.o1 {
  width: 420px; height: 420px; left: -130px; top: -110px;
  background: radial-gradient(circle, rgba(22, 119, 255, .9), transparent 70%);
  animation: auth-float 15s ease-in-out infinite;
}
.auth-deco .orb.o2 {
  width: 380px; height: 380px; right: -120px; bottom: -130px;
  background: radial-gradient(circle, rgba(34, 211, 238, .72), transparent 70%);
  animation: auth-float 19s ease-in-out infinite reverse;
}
@keyframes auth-float {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  50%      { transform: translate3d(26px, 32px, 0) scale(1.08); }
}
.auth-deco .scan {
  position: absolute;
  left: 0; right: 0; top: -260px; height: 260px;
  background: linear-gradient(180deg, transparent, rgba(64, 169, 255, .08) 55%,
    rgba(34, 211, 238, .16) 80%, transparent);
  border-bottom: 1px solid rgba(34, 211, 238, .22);
  animation: auth-scan 7.5s linear infinite;
}
@keyframes auth-scan {
  0%   { transform: translateY(0); opacity: 0; }
  12%  { opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translateY(calc(100vh + 320px)); opacity: 0; }
}

/* 玻璃拟态面板 */
.auth-box {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 420px;
  padding: 36px 32px 26px;
  border-radius: 16px;
  border: 1px solid rgba(64, 169, 255, .26);
  background: linear-gradient(158deg, rgba(17, 34, 62, .90), rgba(7, 15, 30, .94));
  box-shadow:
    0 0 0 1px rgba(34, 211, 238, .05),
    0 26px 70px rgba(0, 8, 24, .78),
    inset 0 1px 0 rgba(255, 255, 255, .06);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
  animation: auth-rise .5s cubic-bezier(.22, .8, .3, 1) both;
}
@keyframes auth-rise {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to   { opacity: 1; transform: none; }
}
/* 顶部渐变高光条 */
.auth-box::before {
  content: '';
  position: absolute;
  left: 16px; right: 16px; top: -1px; height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--cyan), var(--primary-light), transparent);
  opacity: .9;
}
/* 四角科技感直角 */
.auth-box::after {
  content: '';
  position: absolute;
  inset: 9px;
  pointer-events: none;
  border-radius: 6px;
  opacity: .35;
  background:
    linear-gradient(var(--cyan), var(--cyan)) left top / 14px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) left top / 2px 14px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) right top / 14px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) right top / 2px 14px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) left bottom / 14px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) left bottom / 2px 14px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) right bottom / 14px 2px no-repeat,
    linear-gradient(var(--cyan), var(--cyan)) right bottom / 2px 14px no-repeat;
}

.auth-head { text-align: center; margin-bottom: 24px; }
.auth-head h1 {
  font-size: 21px;
  margin: 0;
  font-weight: 700;
  letter-spacing: 2px;
  color: #eaf4ff;
  text-shadow: 0 0 18px rgba(64, 169, 255, .45);
}
.auth-head p {
  margin: 10px 0 0;
  font-size: 12px;
  letter-spacing: 2px;
  color: rgba(140, 190, 255, .78);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
}
.auth-head p::before { content: '// '; color: var(--cyan); }

/* 六边形徽标 */
.auth-emblem {
  width: 62px; height: 62px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  filter: drop-shadow(0 0 10px rgba(34, 211, 238, .55));
}
.auth-emblem svg { width: 100%; height: 100%; overflow: visible; }
.auth-emblem .hex-out { animation: auth-spin 14s linear infinite; transform-origin: 50% 50%; }
.auth-emblem .core { animation: auth-pulse 2.4s ease-in-out infinite; transform-origin: 50% 50%; }
@keyframes auth-spin { to { transform: rotate(360deg); } }
@keyframes auth-pulse {
  0%, 100% { opacity: .55; transform: scale(.9); }
  50%      { opacity: 1; transform: scale(1.08); }
}

/* 科技风表单 */
.auth-page .field { margin-bottom: 16px; }
.auth-page .field > label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .5px;
  color: rgba(150, 195, 255, .85);
}
.auth-page .input {
  background: rgba(9, 20, 38, .78);
  border: 1px solid rgba(64, 169, 255, .22);
  border-radius: 9px;
  color: #eaf4ff;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.auth-page .input::placeholder { color: rgba(120, 160, 210, .55); }
.auth-page .input:focus {
  background: rgba(11, 26, 48, .92);
  border-color: var(--cyan);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, .16), 0 0 18px rgba(34, 211, 238, .18);
}

.auth-page .btn-primary {
  position: relative;
  overflow: hidden;
  margin-top: 6px;
  letter-spacing: 4px;
  background: linear-gradient(135deg, var(--primary), #2f9bff 55%, var(--cyan));
  box-shadow: 0 10px 26px rgba(22, 119, 255, .38), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.auth-page .btn-primary::after {
  content: '';
  position: absolute;
  top: 0; bottom: 0; left: -60%; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .45), transparent);
  transform: skewX(-18deg);
  animation: auth-shine 3.4s ease-in-out infinite;
}
@keyframes auth-shine {
  0%, 55%   { left: -60%; }
  85%, 100% { left: 130%; }
}
.auth-page .btn-primary:hover {
  background: linear-gradient(135deg, #2f9bff, var(--primary), var(--cyan));
  box-shadow: 0 12px 32px rgba(34, 211, 238, .45), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.auth-page .link-row { color: rgba(140, 180, 235, .7); }
.auth-page .link-row a { color: #58c8ff; font-weight: 600; letter-spacing: .5px; }
.auth-page .link-row a:hover { color: #8fe1ff; text-shadow: 0 0 12px rgba(88, 200, 255, .6); }

.auth-page .form-error {
  color: #ff9f9f;
  background: rgba(245, 63, 63, .12);
  border: 1px solid rgba(245, 63, 63, .35);
}
.auth-page .form-success {
  color: #7ce8a8;
  background: rgba(0, 180, 42, .12);
  border: 1px solid rgba(0, 180, 42, .35);
}

/* 底部状态栏 */
.auth-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid rgba(64, 169, 255, .14);
  font-size: 11px;
  letter-spacing: 1.6px;
  color: rgba(130, 175, 230, .65);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, 'Courier New', monospace;
}
.auth-status .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 10px var(--cyan);
  animation: auth-blink 1.8s ease-in-out infinite;
}
@keyframes auth-blink { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }

@media (max-width: 480px) {
  .auth-box { padding: 28px 20px 20px; border-radius: 14px; }
  .auth-head h1 { font-size: 18px; letter-spacing: 1px; }
  .auth-page .btn-primary { letter-spacing: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  .auth-deco .grid, .auth-deco .orb, .auth-deco .scan, .auth-box,
  .auth-emblem .hex-out, .auth-emblem .core,
  .auth-page .btn-primary::after, .auth-status .dot { animation: none !important; }
}

.divider { display: flex; align-items: center; margin: 20px 0; color: #bbb; font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: #e6e6e6; }
.divider span { padding: 0 12px; }

.form-error, .form-success {
  font-size: 13px;
  padding: 10px 14px;
  border-radius: 8px;
  margin-top: 14px;
}
.form-error { color: var(--red); background: #fdf0ef; }
.form-success { color: var(--green); background: #eefaf3; }

.link-row { text-align: center; margin-top: 18px; font-size: 13px; }

/* ---------------------------------------------------------------- tabs */
.tabs {
  display: flex;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.tab {
  flex: 1;
  text-align: center;
  padding: 14px 8px;
  font-size: 14px;
  color: #666;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.tab:hover { background: #fafbfd; }
.tab.active { color: var(--primary); font-weight: 700; }
.tab.active::after {
  content: '';
  position: absolute;
  left: 20%; bottom: 0;
  width: 60%; height: 3px;
  background: var(--primary);
  border-radius: 2px;
}
.tab.aps.active { color: var(--primary); }
.tab.aps.active::after { background: var(--primary); }

/* ---------------------------------------------------------------- profile */
.profile-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: linear-gradient(135deg, var(--red), var(--red-dark));
  border-radius: 16px;
  padding: 22px 24px;
  margin-bottom: 18px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(231, 76, 60, 0.28);
}
.profile-card.super {
  background: linear-gradient(135deg, var(--purple), var(--purple-light));
  box-shadow: 0 6px 20px rgba(142, 68, 173, 0.28);
}
.profile-card.user {
  background: linear-gradient(135deg, var(--dark), var(--blue));
  box-shadow: 0 6px 20px rgba(52, 152, 219, 0.28);
}
.avatar {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.25);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700;
  flex: none;
}
.profile-card .name { font-size: 18px; font-weight: 700; }
.profile-card .role-tag {
  display: inline-block;
  margin-top: 5px;
  font-size: 12px;
  padding: 2px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.2);
}

/* ---------------------------------------------------------------- task cards */
.task-card {
  display: flex;
  background: #fff;
  border-radius: 12px;
  margin-bottom: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
.task-card:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.task-color-bar { width: 5px; flex: none; background: var(--gray); }
.task-color-bar.done { background: var(--green); }
.task-color-bar.pending { background: var(--orange); }
.task-color-bar.unassigned { background: var(--gray); }
.task-content { flex: 1; padding: 14px 16px; min-width: 0; }
.task-header { display: flex; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.task-drawing { font-weight: 700; color: var(--text); }
.task-qty { color: #666; font-size: 13px; }
.task-body { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.task-info { display: flex; flex-direction: column; min-width: 120px; }
.task-label { font-size: 11px; color: var(--muted); }
.task-value { font-size: 13px; color: var(--text); }
.task-value.urgent { color: var(--red); font-weight: 700; }
.task-value.status.done { color: var(--green); }
.task-value.status.pending { color: var(--orange); }
.task-value.status.unassigned { color: var(--gray); }
.task-arrow {
  display: flex; align-items: center;
  padding: 0 16px; color: #ccc; font-size: 24px;
}

/* ---------------------------------------------------------------- lists */
.list-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: #fff;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.list-item .item-main { flex: 1; min-width: 0; }
.item-title-row { display: flex; align-items: center; gap: 10px; margin-bottom: 4px; flex-wrap: wrap; }
.item-title { font-weight: 700; }
.item-sub { display: block; color: #777; font-size: 13px; }
.item-actions { display: flex; gap: 14px; flex: none; align-items: center; }
.act { color: var(--blue); cursor: pointer; font-size: 13px; font-weight: 600; }
.act.danger { color: var(--red); }

.tag {
  font-size: 11px;
  padding: 2px 9px;
  border-radius: 10px;
  background: #eef1f6;
  color: #666;
}
.tag.pri { background: #fef3e2; color: #d97706; }
.tag.purple { background: #f2eafb; color: var(--purple); }

.empty { text-align: center; padding: 48px 0; color: #c3c8d0; }

/* ---------------------------------------------------------------- stats */
.stat-card {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.stat-card:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.stat-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.stat-name { font-weight: 700; }
.stat-rate { font-weight: 700; }
.stat-rate.full { color: var(--green); }
.stat-rate.partial { color: var(--orange); }
.stat-rate.empty { color: var(--gray); }
.bar-bg { height: 9px; background: #f0f0f0; border-radius: 6px; overflow: hidden; }
.bar-fill { height: 100%; background: linear-gradient(90deg, var(--green), #2ecc71); border-radius: 6px; }
.bar-fill.over { background: linear-gradient(90deg, var(--red), var(--red-dark)); }
.stat-nums { display: flex; gap: 18px; margin-top: 9px; color: #666; font-size: 13px; }

.stat-user {
  background: #fff;
  border-radius: 12px;
  padding: 16px 18px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.stat-user-head {
  display: flex; justify-content: space-between;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px; margin-bottom: 10px;
}
.stat-user-head .name { font-weight: 700; }
.stat-month {
  display: flex; justify-content: space-between;
  padding: 8px 0; border-bottom: 1px solid #f8f8f8; font-size: 13px;
}
.stat-month:last-child { border-bottom: none; }

/* ---------------------------------------------------------------- overview */
.overview {
  display: flex;
  background: #fff;
  border-radius: 12px;
  padding: 18px 8px;
  box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.ov-item { flex: 1; text-align: center; border-right: 1px solid var(--line); }
.ov-item:last-child { border-right: none; }
.ov-num { font-size: 24px; font-weight: 700; color: var(--purple); }
.ov-num.danger { color: var(--red); }
.ov-label { font-size: 12px; color: var(--muted); margin-top: 3px; }

/* ---------------------------------------------------------------- images */
.img-preview {
  max-width: 100%;
  border-radius: 10px;
  border: 1px solid #eee;
  margin-top: 8px;
  cursor: zoom-in;
  display: block;
}
.img-empty { color: #c3c8d0; font-size: 13px; }

/* ---------------------------------------------------------------- process rows */
.process-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.process-row .pinput {
  background: #f7f8fa;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
}
.process-row .pinput.name { flex: 2; min-width: 80px; }
.process-row .pinput.hours { flex: 1; min-width: 74px; }
.process-row .select { flex: 1.2; min-width: 84px; padding: 8px 10px; }
.process-row .pdel {
  flex: none; width: 30px; height: 30px; border-radius: 8px;
  background: #fdecea; color: var(--red); border: none; font-size: 13px;
  display: flex; align-items: center; justify-content: center;
}

/* gantt */
.gantt-wrap {
  display: flex;
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.gantt-labels {
  width: 130px; flex: none;
  border-right: 2px solid #eee;
  background: #fafbff;
}
.gantt-corner {
  height: 32px; line-height: 32px; text-align: center;
  font-size: 12px; color: var(--muted);
  border-bottom: 2px solid #eee;
}
.gantt-label {
  height: 48px; line-height: 48px; padding: 0 10px;
  font-size: 12px; border-bottom: 1px solid #f2f2f2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gantt-scroll { flex: 1; overflow-x: auto; }
.gantt-chart { position: relative; }
.gantt-axis { position: relative; height: 32px; border-bottom: 2px solid #eee; }
.axis-tick {
  position: absolute; top: 0; height: 32px; line-height: 32px;
  text-align: center; font-size: 11px; color: var(--muted);
  border-left: 1px solid #f2f2f2;
}
.gantt-track { position: relative; height: 48px; border-bottom: 1px solid #f2f2f2; }
.gantt-bar {
  position: absolute; top: 7px; height: 34px;
  border-radius: 7px; overflow: hidden; cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,.14);
}
.gantt-bar span {
  display: block; padding: 0 6px; line-height: 34px;
  font-size: 11px; color: #fff;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.gantt-hint { display: block; font-size: 12px; color: #bbb; margin-top: 8px; }

/* suggestions */
.sug-list { display: flex; flex-direction: column; gap: 10px; }
.sug {
  display: flex; gap: 10px; align-items: flex-start;
  background: #fff; border-radius: 10px; padding: 13px 16px;
  box-shadow: var(--shadow); border-left: 5px solid var(--gray);
  font-size: 13px; color: #444;
}
.sug.danger { border-left-color: var(--red); background: #fdf5f4; }
.sug.warn { border-left-color: var(--orange); background: #fef9f1; }
.sug.info { border-left-color: var(--blue); }
.sug.success { border-left-color: var(--green); background: #f3fbf6; }
.sug .dot {
  width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none;
  background: var(--gray);
}
.sug.danger .dot { background: var(--red); }
.sug.warn .dot { background: var(--orange); }
.sug.info .dot { background: var(--blue); }
.sug.success .dot { background: var(--green); }

/* load */
.load-item { background: #fff; border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; box-shadow: var(--shadow); }
.load-head { display: flex; justify-content: space-between; margin-bottom: 9px; }
.load-name { font-weight: 600; }
.load-util { font-weight: 700; color: var(--green); }
.load-util.high { color: var(--orange); }
.load-util.over { color: var(--red); }
.load-sub { font-size: 12px; color: var(--muted); display: block; margin-top: 7px; }

.job-item {
  display: flex; align-items: center; gap: 12px;
  background: #fff; border-radius: 12px; padding: 14px 16px;
  margin-bottom: 10px; box-shadow: var(--shadow);
}
.job-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.job-info { flex: 1; min-width: 0; }
.job-name { font-weight: 600; }
.job-meta { display: block; font-size: 12px; color: var(--muted); margin-top: 3px; }
.job-status { font-weight: 700; font-size: 13px; flex: none; }
.job-status.ok { color: var(--green); }
.job-status.late { color: var(--red); }
.job-status.fail { color: var(--gray); }

/* task detail grid */
.info-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}
.info-item { display: flex; flex-direction: column; gap: 2px; }
.info-label { font-size: 12px; color: var(--muted); }
.info-value { font-size: 14px; }
.info-value.urgent { color: var(--red); font-weight: 700; }
.info-value.done { color: var(--green); }

.card-status {
  font-size: 13px; font-weight: 700; padding: 3px 12px; border-radius: 12px;
}
.card-status.done { color: var(--green); background: #eefaf3; }
.card-status.pending { color: var(--orange); background: #fef9f1; }
.card-status.unassigned { color: var(--gray); background: #f2f4f7; }

.status-tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.status-tab {
  padding: 7px 14px; border-radius: 16px; background: #f2f4f7;
  font-size: 13px; color: #666; cursor: pointer; border: 1px solid transparent;
}
.status-tab.active { background: #fff; border-color: var(--blue); color: var(--blue); font-weight: 600; }
.status-tabs.locked .status-tab { opacity: .6; cursor: not-allowed; }

/* mini add */
.mini-add {
  background: #f2f4f7; border: 1px dashed #c8ccd4; color: #667;
  border-radius: 8px; padding: 7px 14px; font-size: 13px;
}

/* action bar */
.action-bar { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }

.admin-links { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 18px 0; }
.admin-link-btn {
  background: #fff; border: none; border-radius: 12px; padding: 18px 16px;
  font-size: 15px; font-weight: 600; color: var(--text);
  box-shadow: var(--shadow); text-align: left;
}
.admin-link-btn:hover { box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.admin-link-btn.aps { color: var(--purple); }

/* toast */
#toast-root { position: fixed; inset: 0; pointer-events: none; z-index: 200; }
.toast {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%);
  background: rgba(30, 34, 42, 0.92); color: #fff;
  padding: 10px 20px; border-radius: 10px; font-size: 14px;
  box-shadow: 0 8px 24px rgba(0,0,0,.25);
  animation: toast-in .18s ease;
  max-width: 80vw;
}
.toast.success { background: rgba(39, 174, 96, 0.95); }
.toast.error { background: rgba(231, 76, 60, 0.96); }
@keyframes toast-in { from { opacity: 0; transform: translate(-50%, -8px); } to { opacity: 1; } }

/* modal */
#modal-root { position: fixed; inset: 0; z-index: 150; display: none; }
#modal-root.open { display: block; }
.modal-mask {
  position: absolute; inset: 0; background: rgba(0,0,0,.42);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal-box {
  width: 100%; max-width: 380px; background: #fff; border-radius: 16px;
  padding: 24px; box-shadow: 0 20px 60px rgba(0,0,0,.3);
  animation: modal-in .16s ease;
}
@keyframes modal-in { from { opacity: 0; transform: scale(.96); } to { opacity: 1; } }
.modal-box h3 { margin: 0 0 12px; font-size: 17px; }
.modal-box .modal-body { color: #555; font-size: 14px; white-space: pre-wrap; line-height: 1.7; }
.modal-actions { display: flex; gap: 10px; margin-top: 22px; }
.modal-actions .btn { flex: 1; }

/* action sheet */
.sheet-item {
  padding: 14px 16px; border-radius: 10px; background: #f7f8fa;
  margin-bottom: 8px; cursor: pointer; text-align: center; font-weight: 500;
}
.sheet-item:hover { background: #eef1f6; }

/* responsive */
@media (max-width: 560px) {
  .view { padding: 72px 12px 40px; }
  .admin-links { grid-template-columns: 1fr; }
  .task-body { gap: 8px 18px; }
}

/* ================================================================
   Alibaba Cloud 控制台布局
   ================================================================ */
.layout { min-height: 100vh; }

/* 左侧竖向导航 */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  z-index: 40;
  transition: width .18s ease, transform .2s ease;
}
.brand {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid var(--line);
  flex: none;
  overflow: hidden;
  white-space: nowrap;
}
.brand-logo {
  width: 28px; height: 28px; border-radius: 7px;
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  box-shadow: 0 3px 10px rgba(22, 119, 255, .35);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 15px; flex: none;
}
.brand-name { font-size: 15px; font-weight: 700; color: #1f2329; letter-spacing: .5px; }

.menu { flex: 1; overflow-y: auto; padding: 8px; }
.menu-group-title {
  font-size: 11px; color: #b6bcc7; padding: 12px 12px 6px; letter-spacing: 1px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  margin: 2px 0;
  border-radius: 6px;
  color: #4b5563;
  font-size: 14px;
  text-decoration: none;
  cursor: pointer;
  border-left: 3px solid transparent;
  transition: background .12s, color .12s;
  white-space: nowrap;
}
.menu-item:hover { background: #f5f7fa; color: #1f2329; }
.menu-item.active {
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
  border-left-color: var(--primary);
}
.menu-item .ico { width: 18px; text-align: center; font-size: 15px; flex: none; }
.menu-item .label { overflow: hidden; text-overflow: ellipsis; }

.sidebar-foot { padding: 10px 16px; border-top: 1px solid var(--line); }
.sidebar-foot .hint { font-size: 11px; color: #c1c7d0; }

/* 主区域 */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  transition: margin-left .18s ease;
}
.topbar {
  position: sticky;
  top: 0;
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 20px;
  z-index: 30;
}
.hamburger {
  width: 34px; height: 34px; border-radius: 6px; border: 1px solid var(--line);
  background: #fff; color: #4b5563; font-size: 15px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.hamburger:hover { background: #f5f7fa; }
.crumb { display: flex; align-items: center; gap: 10px; min-width: 0; }
.crumb-back {
  border: none; background: #f2f4f7; color: #4b5563;
  width: 30px; height: 30px; border-radius: 6px; font-size: 16px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.crumb-back:hover { background: #e8ebf0; }
.crumb-title { font-size: 15px; font-weight: 600; color: #1f2329; } 
.crumb-sub { font-size: 12px; color: var(--muted); }
.top-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.content { }

.sidebar-overlay { display: none; }

/* 折叠（桌面端） */
html.sidebar-collapsed .sidebar { width: 60px; }
html.sidebar-collapsed .main { margin-left: 60px; }
html.sidebar-collapsed .brand-name,
html.sidebar-collapsed .menu-item .label,
html.sidebar-collapsed .menu-group-title,
html.sidebar-collapsed .sidebar-foot { display: none; }
html.sidebar-collapsed .brand { justify-content: center; padding: 0; }
html.sidebar-collapsed .menu-item { justify-content: center; padding: 10px 0; }

@media (max-width: 860px) {
  .sidebar {
    width: 216px;
    transform: translateX(-100%);
    box-shadow: 2px 0 12px rgba(0, 0, 0, .12);
  }
  html.sidebar-open .sidebar { transform: none; }
  html.sidebar-collapsed .sidebar { width: 216px; }
  html.sidebar-collapsed .brand-name,
  html.sidebar-collapsed .menu-item .label,
  html.sidebar-collapsed .menu-group-title,
  html.sidebar-collapsed .sidebar-foot { display: block; }
  html.sidebar-collapsed .menu-item { justify-content: flex-start; padding: 10px 12px; }
  .main, html.sidebar-collapsed .main { margin-left: 0; }
  html.sidebar-open .sidebar-overlay {
    display: block; position: fixed; inset: 0;
    background: rgba(0, 0, 0, .35); z-index: 35;
  }
}

/* 排产结果导出工具条 */
.export-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin: 4px 0 16px;
}
.export-bar .btn { background: #fff; border: 1px solid var(--line); color: #4b5563; }
.export-bar .btn:hover { border-color: var(--primary); color: var(--primary); }

/* 控制台内容标题微调 */
.content .page-header h1 { font-size: 20px; }
.content .section-title { font-size: 15px; }

/* ---------------------------------------------------------------- 工序下发（多工序拆分） */
.process-assign { display: flex; flex-direction: column; gap: 10px; }
.prow {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 14px;
  padding: 12px 14px;
  background: #f7f9fc;
  border: 1px solid var(--line);
  border-radius: 10px;
}
.prow-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; min-width: 0; }
.prow-name { font-weight: 600; color: var(--text); }
.prow-type {
  font-size: 12px; color: var(--muted); background: #eef1f6;
  padding: 2px 8px; border-radius: 8px;
}
.prow-hours { font-size: 12px; color: var(--muted); }
.prow-owner { font-size: 13px; color: var(--primary); font-weight: 600; }
.prow-ops { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.prow-select {
  width: auto;
  min-width: 130px;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 8px;
}



