/* ============================================================
 * 三角洲零工平台 — 高级动态城景 · 玻璃拟态主题
 * ============================================================ */

:root {
  color-scheme: dark;
  --primary: #6366f1;
  --primary-2: #22d3ee;
  --primary-hover: #818cf8;
  --text: #e8ecff;
  --muted: rgba(196, 205, 235, .62);
  --glass: rgba(255, 255, 255, .065);
  --glass-hover: rgba(255, 255, 255, .1);
  --border: rgba(255, 255, 255, .13);
  --border-strong: rgba(255, 255, 255, .24);
  --danger: #fb7185;
  --success: #34d399;
  --warning: #fbbf24;
  --radius: 16px;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --shadow-soft: 0 8px 26px rgba(2, 6, 23, .4);
  --inset: inset 0 1px 0 rgba(255, 255, 255, .1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body { min-height: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--text);
  background: #04060f;
  line-height: 1.6;
  overflow-x: hidden;
}

.hidden { display: none !important; }

.view {
  position: relative;
  z-index: 1;
  min-height: 100vh;
}

.muted { color: var(--muted); font-size: 14px; }

::selection { background: rgba(99, 102, 241, .45); color: #fff; }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .14);
  border-radius: 99px;
  border: 2px solid transparent;
  background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .26); background-clip: padding-box; }

/* ============================================================
 * 动态城景背景
 * ============================================================ */
#app-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background: #04060f;
}

.bg-sky {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 45% at 74% 10%, rgba(124, 58, 237, .35), transparent 62%),
    radial-gradient(ellipse 45% 38% at 18% 18%, rgba(34, 211, 238, .16), transparent 60%),
    linear-gradient(180deg, #04060f 0%, #080c22 42%, #171138 74%, #0a0b20 100%);
  background-size: 200% 200%;
  animation: skyShift 26s ease-in-out infinite alternate;
}
@keyframes skyShift {
  0% { background-position: 0% 0%; }
  100% { background-position: 100% 100%; }
}

.bg-glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  mix-blend-mode: screen;
  opacity: .55;
}
.bg-glow-1 {
  width: 560px; height: 560px;
  left: -140px; top: -120px;
  background: radial-gradient(circle, rgba(99, 102, 241, .65), transparent 68%);
  animation: drift1 20s ease-in-out infinite alternate;
}
.bg-glow-2 {
  width: 480px; height: 480px;
  right: -100px; bottom: 18%;
  background: radial-gradient(circle, rgba(34, 211, 238, .38), transparent 68%);
  animation: drift2 24s ease-in-out infinite alternate;
}
@keyframes drift1 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(70px, 50px) scale(1.12); }
}
@keyframes drift2 {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(-60px, -40px) scale(1.15); }
}

.bg-stars { position: absolute; inset: 0; }
.star {
  position: absolute;
  border-radius: 50%;
  background: #fff;
  opacity: .65;
  box-shadow: 0 0 6px rgba(255, 255, 255, .6);
  animation-name: twinkle;
  animation-iteration-count: infinite;
  animation-timing-function: ease-in-out;
}
@keyframes twinkle {
  0%, 100% { opacity: .12; transform: scale(.8); }
  50% { opacity: .85; transform: scale(1.1); }
}

.bg-moon {
  position: absolute;
  top: 8%;
  right: 13%;
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 32%, #ffffff, #c7d2fe 48%, rgba(199, 210, 254, .28) 76%);
  box-shadow: 0 0 60px rgba(199, 210, 254, .5), 0 0 150px rgba(129, 140, 248, .35);
  animation: moonGlow 9s ease-in-out infinite;
}
.bg-moon::after {
  content: "";
  position: absolute;
  inset: -46px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(199, 210, 254, .18), transparent 68%);
}
@keyframes moonGlow {
  0%, 100% { box-shadow: 0 0 60px rgba(199, 210, 254, .45), 0 0 150px rgba(129, 140, 248, .3); }
  50% { box-shadow: 0 0 82px rgba(199, 210, 254, .62), 0 0 190px rgba(129, 140, 248, .45); }
}

.bg-horizon {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 48vh;
  background: radial-gradient(ellipse 70% 100% at 50% 100%, rgba(124, 58, 237, .38), rgba(34, 211, 238, .08) 45%, transparent 72%);
  filter: blur(12px);
}

.bg-city {
  position: absolute;
  left: 0; right: 0;
  display: flex;
  align-items: flex-end;
  gap: 1px;
}
.bg-city-far { bottom: 0; opacity: .62; filter: blur(.8px); }
.bg-city-near { bottom: 0; opacity: .96; }

.building {
  position: relative;
  flex: 0 0 auto;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, rgba(12, 17, 40, .88), rgba(4, 6, 16, .99));
  border-top: 1px solid rgba(148, 163, 255, .22);
  box-shadow: 0 -10px 34px rgba(2, 6, 23, .55);
  opacity: var(--op, 1);
}
.building::before {
  content: "";
  position: absolute;
  inset: 9% 13% 7% 13%;
  background-image:
    radial-gradient(circle, rgba(255, 208, 133, .9) 1px, transparent 1.5px),
    radial-gradient(circle, rgba(125, 211, 252, .55) 1px, transparent 1.5px);
  background-size: 13px 17px, 13px 17px;
  background-position: 0 0, 6px 8px;
  opacity: var(--lit, .4);
  animation: windows 9s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes windows {
  0%, 100% { filter: brightness(.78); }
  50% { filter: brightness(1.3); }
}

.bg-fog {
  position: absolute;
  left: -10%; right: -10%;
  bottom: -8%;
  height: 36vh;
  background: linear-gradient(180deg, transparent, rgba(129, 140, 248, .1) 46%, rgba(6, 8, 22, .85));
  filter: blur(26px);
  animation: fogMove 18s ease-in-out infinite alternate;
}
@keyframes fogMove {
  0% { transform: translateX(-2%); opacity: .7; }
  100% { transform: translateX(2%); opacity: 1; }
}

/* ============================================================
 * 按钮
 * ============================================================ */
.btn {
  position: relative;
  border: 1px solid transparent;
  border-radius: 10px;
  padding: 9px 16px;
  font-size: 14px;
  cursor: pointer;
  font-family: inherit;
  color: var(--text);
  background: var(--glass);
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
}
.btn:active { transform: translateY(1px); }

.btn-primary {
  background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 52%, #22d3ee 100%);
  background-size: 160% 160%;
  color: #fff;
  border-color: rgba(255, 255, 255, .18);
  box-shadow: 0 8px 24px rgba(99, 102, 241, .38), var(--inset);
}
.btn-primary:hover {
  background-position: 100% 50%;
  box-shadow: 0 10px 32px rgba(99, 102, 241, .55), 0 0 22px rgba(34, 211, 238, .35), var(--inset);
  transform: translateY(-1px);
}

.btn-ghost { background: rgba(255, 255, 255, .05); border-color: var(--border); color: var(--text); }
.btn-ghost:hover { background: rgba(255, 255, 255, .1); border-color: var(--border-strong); }

.btn-danger { background: rgba(251, 113, 133, .08); border-color: rgba(251, 113, 133, .45); color: #fda4af; }
.btn-danger:hover { background: rgba(251, 113, 133, .18); }

.btn-warning { background: rgba(251, 191, 36, .08); border-color: rgba(251, 191, 36, .45); color: #fcd34d; }
.btn-warning:hover { background: rgba(251, 191, 36, .18); }

.btn-success { background: rgba(52, 211, 153, .08); border-color: rgba(52, 211, 153, .45); color: #6ee7b7; }
.btn-success:hover { background: rgba(52, 211, 153, .18); }

.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .42; cursor: not-allowed; transform: none; }

/* ============================================================
 * 登录
 * ============================================================ */
.login-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.login-card {
  width: 100%;
  max-width: 420px;
  padding: 36px 34px 30px;
  border-radius: 24px;
  border: 1px solid transparent;
  background:
    linear-gradient(160deg, rgba(16, 21, 45, .74), rgba(8, 11, 28, .68)) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, .38), rgba(99, 102, 241, .16) 45%, rgba(34, 211, 238, .3)) border-box;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .55), var(--inset);
  backdrop-filter: blur(26px) saturate(150%);
  -webkit-backdrop-filter: blur(26px) saturate(150%);
  animation: cardIn .6s cubic-bezier(.2, .8, .2, 1) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(18px) scale(.98); }
  to { opacity: 1; transform: none; }
}

.login-brand { text-align: center; margin-bottom: 24px; }
.brand-logo {
  width: 60px; height: 60px;
  margin: 0 auto 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(99, 102, 241, .35), rgba(34, 211, 238, .22));
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: 0 0 30px rgba(99, 102, 241, .35), var(--inset);
}
.brand-logo.small { width: 42px; height: 42px; font-size: 21px; margin: 0; border-radius: 13px; }
.login-brand h1 {
  font-size: 23px;
  letter-spacing: .5px;
  background: linear-gradient(120deg, #fff, #c7d2fe 55%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.login-brand p { color: var(--muted); font-size: 13px; letter-spacing: 2px; margin-top: 4px; }

.role-tabs {
  display: flex;
  background: rgba(255, 255, 255, .05);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 24px;
  gap: 2px;
}
.role-tab {
  flex: 1;
  border: none;
  background: transparent;
  padding: 9px 4px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 9px;
  color: var(--muted);
  font-family: inherit;
  white-space: nowrap;
  transition: color .22s ease, background .22s ease, box-shadow .22s ease;
}
.role-tab:hover { color: var(--text); }
.role-tab.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(99, 102, 241, .85), rgba(139, 92, 246, .75));
  box-shadow: 0 6px 18px rgba(99, 102, 241, .35), var(--inset);
}

/* ============================================================
 * 表单
 * ============================================================ */
.field { display: block; margin-bottom: 16px; }
.field span { display: block; font-size: 12px; color: var(--muted); margin-bottom: 7px; letter-spacing: .4px; }

.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 14px;
  font-family: inherit;
  outline: none;
  background: rgba(255, 255, 255, .055);
  color: var(--text);
  transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.field input::placeholder,
.field textarea::placeholder { color: rgba(196, 205, 235, .38); }
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: rgba(129, 140, 248, .8);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .22), 0 0 18px rgba(99, 102, 241, .16);
  background: rgba(255, 255, 255, .08);
}
.field input[readonly] { background: rgba(255, 255, 255, .03); color: var(--muted); cursor: default; }
.field select option { background: #0b1020; color: #e8ecff; }

input[type="date"], input[type="datetime-local"], input[type="time"] { color-scheme: dark; }
input[type="file"] { color: var(--muted); font-size: 13px; }
input[type="file"]::file-selector-button {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .06);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  margin-right: 10px;
  cursor: pointer;
  font-family: inherit;
  transition: background .18s;
}
input[type="file"]::file-selector-button:hover { background: rgba(255, 255, 255, .12); }

.login-error { color: #fda4af; font-size: 13px; min-height: 20px; margin-bottom: 6px; }
.login-options {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 28px;
  margin-top: 16px;
}
.check-label {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  color: var(--muted);
  cursor: pointer;
  user-select: none;
  transition: color .2s;
}
.check-label:hover { color: var(--text); }
.check-label input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: #6366f1;
  cursor: pointer;
}
.sidebar-link {
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-family: inherit;
  padding: 0 6px;
  text-align: left;
  transition: color .2s;
}
.sidebar-link:hover { color: #fda4af; }

/* ============================================================
 * 三端布局
 * ============================================================ */
#admin-view, #supervisor-view, #designer-view { display: flex; }

.sidebar {
  width: 248px;
  min-height: 100vh;
  height: 100vh;
  position: sticky;
  top: 0;
  display: flex;
  flex-direction: column;
  padding: 22px 16px;
  background: rgba(8, 11, 28, .52);
  border-right: 1px solid var(--border);
  box-shadow: 12px 0 40px rgba(0, 0, 0, .28);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
}
.sidebar-brand {
  display: flex; align-items: center; gap: 11px;
  padding: 0 6px 20px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sidebar-brand h2 {
  font-size: 16px;
  letter-spacing: .5px;
  background: linear-gradient(120deg, #fff, #c7d2fe 60%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.sidebar-brand span { font-size: 11px; color: var(--muted); letter-spacing: 1.5px; }

.sidebar-nav { flex: 1; display: flex; flex-direction: column; gap: 5px; padding-top: 18px; }
.nav-item {
  position: relative;
  display: flex; align-items: center; gap: 10px;
  padding: 10px 13px;
  border-radius: 10px;
  color: rgba(226, 232, 240, .78);
  text-decoration: none;
  font-size: 14px;
  border: 1px solid transparent;
  transition: background .2s ease, color .2s ease, transform .2s ease;
}
.nav-item:hover { background: rgba(255, 255, 255, .06); color: #fff; transform: translateX(2px); }
.nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(99, 102, 241, .32), rgba(34, 211, 238, .12));
  border-color: rgba(129, 140, 248, .35);
  box-shadow: 0 6px 20px rgba(99, 102, 241, .18), var(--inset);
}
.nav-item.active::before {
  content: "";
  position: absolute;
  left: -1px; top: 20%;
  width: 3px; height: 60%;
  border-radius: 99px;
  background: linear-gradient(180deg, #818cf8, #22d3ee);
  box-shadow: 0 0 10px rgba(34, 211, 238, .7);
}

.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, .08);
  padding-top: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.user-info { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.user-info strong { font-size: 14px; display: block; }
.user-info small { color: var(--muted); font-size: 11px; letter-spacing: .5px; }
.avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, #6366f1, #8b5cf6 60%, #22d3ee);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: 15px;
  flex-shrink: 0;
  border: 1px solid rgba(255, 255, 255, .22);
  box-shadow: 0 0 18px rgba(99, 102, 241, .45), var(--inset);
}

.main { flex: 1; padding: 30px 36px; min-width: 0; }
.page { display: none; }
.page.active { display: block; animation: pageIn .45s cubic-bezier(.2, .8, .2, 1) both; }
@keyframes pageIn {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
.page-header {
  display: flex; align-items: center; flex-wrap: wrap; gap: 16px;
  margin-bottom: 24px;
}
.page-header h2 {
  font-size: 23px;
  letter-spacing: .5px;
  background: linear-gradient(120deg, #fff, #c7d2fe 65%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.page-header p { flex-basis: 100%; margin-top: -12px; }
.page-header .btn { margin-left: auto; }

/* ============================================================
 * 统计卡片
 * ============================================================ */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; margin-bottom: 24px; }
.stat-card {
  position: relative;
  overflow: hidden;
  padding: 20px 22px;
  border-radius: var(--radius);
  background: var(--glass);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-soft), var(--inset);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  display: flex; flex-direction: column; gap: 6px;
  transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.stat-card::after {
  content: "";
  position: absolute;
  right: -40px; top: -40px;
  width: 120px; height: 120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, .25), transparent 70%);
  z-index: 0;
}
.stat-card > * { position: relative; z-index: 1; }
.stat-card:hover {
  transform: translateY(-4px);
  border-color: rgba(129, 140, 248, .45);
  box-shadow: 0 20px 48px rgba(0, 0, 0, .45), 0 0 26px rgba(99, 102, 241, .18), var(--inset);
}
.stat-label { color: var(--muted); font-size: 12.5px; letter-spacing: .6px; }
.stat-value {
  font-size: 29px;
  font-weight: 700;
  letter-spacing: .5px;
  line-height: 1.25;
  color: #fff;
  background: linear-gradient(120deg, #ffffff, #a5b4fc 60%, #67e8f9);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* ============================================================
 * 卡片 / 表格
 * ============================================================ */
.card {
  position: relative;
  background: var(--glass);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft), var(--inset);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  overflow: hidden;
}
.card-header {
  padding: 16px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: linear-gradient(180deg, rgba(255, 255, 255, .035), transparent);
}
.card-header h3 { font-size: 15px; font-weight: 600; letter-spacing: .5px; }
.card-body { padding: 8px 22px 22px; overflow-x: auto; }

.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th, .table td { text-align: left; padding: 13px 10px; border-bottom: 1px solid rgba(255, 255, 255, .07); }
.table th { color: var(--muted); font-weight: 600; font-size: 12.5px; letter-spacing: .5px; white-space: nowrap; }
.table tbody tr { transition: background .18s ease; }
.table tbody tr:last-child td { border-bottom: none; }
.table tbody tr:hover { background: rgba(255, 255, 255, .045); }
.table .actions { display: flex; gap: 6px; white-space: nowrap; }

.empty { text-align: center; color: var(--muted); padding: 44px 0; font-size: 14px; }

.badge {
  display: inline-block;
  padding: 3px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .3px;
  border: 1px solid transparent;
}
.badge-success { background: rgba(52, 211, 153, .12); color: #6ee7b7; border-color: rgba(52, 211, 153, .35); }
.badge-warning { background: rgba(251, 191, 36, .12); color: #fcd34d; border-color: rgba(251, 191, 36, .38); }
.badge-muted { background: rgba(148, 163, 184, .1); color: #cbd5e1; border-color: rgba(148, 163, 184, .22); }

.customer-cell { display: flex; align-items: center; gap: 10px; min-width: 160px; }
.avatar-img { object-fit: cover; }

.photo-upload { display: flex; align-items: center; gap: 14px; }
.photo-preview {
  width: 64px; height: 64px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, .05);
  box-shadow: var(--inset);
}
.photo-upload input[type="file"] { width: auto; max-width: 240px; padding: 6px 8px; font-size: 12.5px; }

.shot-thumb {
  width: 48px; height: 48px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
  cursor: pointer;
  vertical-align: middle;
  transition: transform .2s ease, box-shadow .2s ease;
}
.shot-thumb:hover { transform: scale(1.08); box-shadow: 0 0 18px rgba(34, 211, 238, .35); }
.table-wrap { overflow-x: auto; }

/* ============================================================
 * 弹窗
 * ============================================================ */
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(2, 4, 12, .62);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.modal {
  width: 100%;
  max-width: 480px;
  border-radius: 20px;
  border: 1px solid transparent;
  background:
    linear-gradient(160deg, rgba(16, 21, 45, .84), rgba(8, 11, 28, .8)) padding-box,
    linear-gradient(135deg, rgba(255, 255, 255, .32), rgba(99, 102, 241, .14) 50%, rgba(34, 211, 238, .24)) border-box;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .6), var(--inset);
  backdrop-filter: blur(28px) saturate(150%);
  -webkit-backdrop-filter: blur(28px) saturate(150%);
  animation: pop .22s cubic-bezier(.2, .8, .2, 1);
}
.modal.modal-wide { max-width: 660px; }
@keyframes pop {
  from { transform: scale(.95) translateY(8px); opacity: 0; }
  to { transform: none; opacity: 1; }
}
.modal-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, .09);
}
.modal-header h3 { font-size: 16px; letter-spacing: .5px; }
.modal-close {
  border: none; background: transparent;
  font-size: 24px; line-height: 1; cursor: pointer;
  color: var(--muted);
  transition: color .18s, transform .18s;
}
.modal-close:hover { color: #fff; transform: rotate(90deg); }
.modal-body { padding: 22px 24px; max-height: 72vh; overflow-y: auto; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 10px; }
.modal-tip { color: var(--muted); font-size: 12px; margin: -4px 0 10px; }

.form-row { display: flex; gap: 12px; }
.form-row .field { flex: 1; min-width: 0; }

/* ============================================================
 * 响应式
 * ============================================================ */
@media (max-width: 820px) {
  #admin-view, #supervisor-view, #designer-view { flex-direction: column; }
  .sidebar {
    width: 100%;
    height: auto;
    min-height: auto;
    position: relative;
    padding: 16px;
  }
  .sidebar-nav { flex-direction: row; overflow-x: auto; padding-top: 12px; padding-bottom: 4px; }
  .nav-item { white-space: nowrap; }
  .nav-item.active::before { display: none; }
  .main { padding: 20px 18px 40px; }
  .page-header .btn { margin-left: 0; width: 100%; }
  .login-card { padding: 28px 22px; }
  .bg-moon { right: 8%; width: 70px; height: 70px; }
}

@media (max-width: 560px) {
  .form-row { flex-direction: column; gap: 0; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .role-tab { font-size: 12px; }
}

/* 尊重系统减少动效设置 */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
