/* ==========================================================================
   智星自动化 · 基础设计系统
   ========================================================================== */
:root {
  --bg: #05080f;
  --bg-2: #070c16;
  --panel: rgba(14, 22, 37, .82);
  --panel-solid: #0c1422;
  --panel-2: #101a2c;
  --panel-3: #152238;
  --line: rgba(120, 156, 214, .14);
  --line-strong: rgba(120, 156, 214, .26);
  --text: #e9eff9;
  --text-2: #c3d0e3;
  --muted: #8b9bb4;
  --dim: #5f6f88;
  --accent: #2fe0c8;
  --accent-2: #6c7bff;
  --accent-3: #b98cff;
  --gold: #f4b860;
  --ok: #38d39f;
  --danger: #ff6b7a;
  --info: #62b8ff;
  --radius-lg: 18px;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow-1: 0 2px 10px rgba(0, 0, 0, .25);
  --shadow-2: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-glow: 0 0 0 1px rgba(47, 224, 200, .1), 0 20px 60px -20px rgba(47, 224, 200, .25);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  --sidebar-w: 252px;
  --topbar-h: 64px;
  --ease: cubic-bezier(.22, .8, .28, 1);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
h1, h2, h3, h4, h5, p { margin: 0; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
ul { margin: 0; padding: 0; list-style: none; }
img, svg { display: block; }
::selection { background: rgba(47, 224, 200, .28); color: #fff; }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(120, 156, 214, .2);
  border-radius: 8px;
  border: 2px solid transparent;
  background-clip: content-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(120, 156, 214, .35); background-clip: content-box; }

/* 背景层 */
.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(110, 150, 210, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(110, 150, 210, .05) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 90% 70% at 55% 10%, #000 20%, transparent 78%);
  pointer-events: none;
  z-index: 0;
}
.bg-aurora {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(46rem 30rem at 18% -6%, rgba(47, 224, 200, .12), transparent 60%),
    radial-gradient(52rem 34rem at 88% 4%, rgba(108, 123, 255, .16), transparent 62%),
    radial-gradient(40rem 30rem at 60% 100%, rgba(185, 140, 255, .07), transparent 65%);
  pointer-events: none;
  z-index: 0;
}

.ic {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.ic-sm { width: 15px; height: 15px; }

.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }

/* 骨架 */
.skeleton { position: relative; overflow: hidden; background: var(--panel); }
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, .05) 40%, transparent 60%);
  transform: translateX(-100%);
  animation: shimmer 1.8s infinite;
}
.skeleton-block {
  height: 160px;
  margin: 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .03);
  animation: pulse 1.6s infinite;
}
.skeleton-block.tall { height: 320px; }

@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes pulse { 0%, 100% { opacity: .45; } 50% { opacity: .9; } }
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  0% { opacity: 0; transform: translateY(14px) scale(.97); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(40px); }
  to { opacity: 1; transform: translateX(0); }
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes ringPulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 224, 200, .45); }
  70% { box-shadow: 0 0 0 7px rgba(47, 224, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 224, 200, 0); }
}
@keyframes dashFlow { to { stroke-dashoffset: -260; } }

.live-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
  animation: blink 2s infinite;
}

/* 头像 */
.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 600;
  color: hsl(var(--h, 190) 70% 82%);
  background:
    radial-gradient(circle at 30% 25%, hsla(var(--h, 190), 75%, 62%, .55), transparent 70%),
    hsl(var(--h, 190) 45% 22%);
  border: 1px solid hsla(var(--h, 190), 70%, 65%, .35);
  flex: 0 0 auto;
}
.avatar-sm { width: 26px; height: 26px; font-size: 12px; }
.avatar-md { width: 34px; height: 34px; font-size: 14px; }
.avatar-lg { width: 46px; height: 46px; font-size: 17px; }

/* 表单元素基础 */
.input, .select, .textarea {
  width: 100%;
  background: rgba(8, 14, 24, .72);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  color: var(--text);
  outline: none;
  transition: border-color .18s, box-shadow .18s, background .18s;
}
.input::placeholder, .textarea::placeholder { color: var(--dim); }
.input:focus, .select:focus, .textarea:focus {
  border-color: rgba(47, 224, 200, .55);
  box-shadow: 0 0 0 3px rgba(47, 224, 200, .1);
  background: rgba(9, 17, 29, .9);
}
.select {
  appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b9bb4' stroke-width='2' stroke-linecap='round'><path d='M6 9l6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 10px center;
  padding-right: 30px;
  cursor: pointer;
}
.select-sm { padding: 7px 28px 7px 10px; font-size: 12.5px; border-radius: 8px; }
.textarea { resize: vertical; min-height: 68px; }
textarea { font-family: inherit; }

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field-label { font-size: 12.5px; color: var(--muted); letter-spacing: .3px; }
.field.full { grid-column: 1 / -1; }

.check { display: inline-flex; align-items: center; gap: 8px; color: var(--muted); font-size: 12.5px; cursor: pointer; }
.check input { display: none; }
.check i {
  width: 16px; height: 16px; border-radius: 5px;
  border: 1px solid var(--line-strong);
  background: rgba(10, 16, 27, .8);
  position: relative;
  transition: all .18s;
}
.check input:checked + i { background: rgba(47, 224, 200, .18); border-color: var(--accent); }
.check input:checked + i::after {
  content: ""; position: absolute; left: 5px; top: 2px;
  width: 4px; height: 8px; border: solid var(--accent);
  border-width: 0 1.8px 1.8px 0; transform: rotate(42deg);
}
.check-block { margin: 6px 0 2px; }

.form-error { color: var(--danger); font-size: 12.5px; min-height: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
