* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  background: linear-gradient(160deg, #0a0f1e 0%, #141b30 30%, #1a2744 60%, #0f1625 100%);
  color: #e0e6f0;
  min-height: 100vh;
}
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font-family: inherit; }

.nav {
  width: 100%; max-width: 1200px; margin: 0 auto; padding: 18px 32px;
  display: flex; justify-content: space-between; align-items: center;
}
.nav-logo { display: flex; align-items: center; gap: 12px; }
.nav-logo img { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; }
.nav-logo span { font-size: 20px; font-weight: 700; color: #f0d78c; letter-spacing: 1px; }
.nav-actions { display: flex; align-items: center; gap: 10px; }
.btn {
  border: 1px solid rgba(240, 215, 140, 0.35); border-radius: 20px;
  padding: 8px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
  background: rgba(255,255,255,0.04); color: #e0e6f0; transition: .18s;
}
.btn:hover { border-color: #f0d78c; transform: translateY(-1px); }
.btn.primary { background: linear-gradient(135deg, #f0d78c, #e8b84b); color: #1a2744; border-color: transparent; }
.btn.danger { background: rgba(245,108,108,.12); border-color: rgba(245,108,108,.4); color: #ff9c9c; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 12px; font-size: 12px; border-radius: 14px; }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.page { box-sizing: border-box; width: min(var(--page-max), calc(100% - var(--page-gutter))); margin: 0 auto; padding: 12px 0 60px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 22px; }
.page-head h1 { font-size: 28px; color: #f0d78c; margin-bottom: 6px; }
.page-head p { color: #8895b5; font-size: 14px; }
.card {
  background: rgba(255,255,255,.035); border: 1px solid rgba(255,255,255,.08);
  border-radius: 16px; padding: 22px; margin-bottom: 18px;
}
.card h2 { font-size: 18px; margin-bottom: 14px; color: #f0d78c; }
.hint { font-size: 12px; color: #8895b5; line-height: 1.6; }
.fixed-value { min-height: 38px; padding: 9px 12px; border-radius: 10px; border: 1px dashed rgba(255,255,255,.14); background: rgba(255,255,255,.04); color: #c8d2e6; font-size: 14px; line-height: 1.5; }
.empty { text-align: center; padding: 60px 20px; color: #8895b5; }
.loading { text-align: center; padding: 40px; color: #8895b5; }
.status { display: inline-block; padding: 3px 10px; border-radius: 12px; font-size: 12px; background: rgba(147,197,253,.15); color: #93c5fd; }
.status.registering { background: rgba(59,130,246,.18); color: #93c5fd; }
.status.running { background: rgba(74,222,128,.15); color: #86efac; }
.status.finished { background: rgba(160,174,192,.15); color: #cbd5e1; }
.status.cancelled, .status.void { background: rgba(248,113,113,.15); color: #fca5a5; }

.tabs, .seg { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.tabs button, .seg button {
  border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.03);
  color: #9aa8c5; padding: 7px 16px; border-radius: 18px; cursor: pointer; font-size: 13px;
}
.tabs button.on, .seg button.on { border-color: #f0d78c; color: #f0d78c; background: rgba(240,215,140,.1); }

.list-row {
  display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: center;
  padding: 16px 18px; border-radius: 12px; border: 1px solid rgba(255,255,255,.07);
  background: rgba(255,255,255,.025); margin-bottom: 10px; cursor: pointer;
}
.list-row:hover { border-color: rgba(240,215,140,.3); }
.list-title { font-size: 16px; font-weight: 600; margin-bottom: 6px; }
.list-meta { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: #8895b5; }
.list-actions { display: flex; gap: 8px; align-items: center; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 22px; }
.form-grid.one { grid-template-columns: 1fr; }
.field { display: flex; flex-direction: column; gap: 7px; }
.field > label { font-size: 13px; color: #c8d2e6; }
.field input, .field select, .field textarea {
  width: 100%; padding: 10px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.12); background: rgba(0,0,0,.22); color: #e0e6f0;
  outline: none; font-size: 14px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: #f0d78c; }
.field textarea { min-height: 90px; resize: vertical; }
.field textarea.large { min-height: 180px; line-height: 1.7; }
.inline { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.inline input { width: 84px; }
.inline input.datetime { width: auto; flex: 1; min-width: 190px; }
.inline .unit { color: #8895b5; font-size: 12px; }
.check-row { display: flex; flex-wrap: wrap; gap: 8px; }
.check-chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 14px; border: 1px solid rgba(255,255,255,.1); font-size: 12px; cursor: pointer; }
.check-chip.on { border-color: #f0d78c; color: #f0d78c; }
.group-row { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; }
.group-row input:first-child { flex: 1; }
.group-row input:nth-child(2) { width: 100px; }
.form-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 8px; text-align: left; border-bottom: 1px solid rgba(255,255,255,.07); vertical-align: top; }
th { color: #8895b5; font-weight: 500; }
tr:hover td { background: rgba(255,255,255,.02); }
.table-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.table-actions button { border: none; background: none; color: #f0d78c; cursor: pointer; font-size: 12px; padding: 0; }
.table-actions button.danger { color: #ff9c9c; }
.table-wrap { overflow-x: auto; }

.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; margin-bottom: 18px; }
.stat { background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.07); border-radius: 12px; padding: 14px; }
.stat .k { font-size: 12px; color: #8895b5; margin-bottom: 6px; }
.stat .v { font-size: 18px; font-weight: 700; color: #f0d78c; }

.info-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px 20px; font-size: 14px; }
.info-grid div span { color: #8895b5; margin-right: 8px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.mine-tip { margin-top: 12px; padding: 12px; border-radius: 10px; background: rgba(240,215,140,.07); color: #d9c07a; font-size: 13px; }

.mask { position: fixed; inset: 0; z-index: 9999; display: none; align-items: center; justify-content: center; background: rgba(0,0,0,.72); padding: 20px; }
.mask.show { display: flex; }
.dialog { position: relative; width: 560px; max-width: 100%; max-height: 86vh; overflow: auto; background: #182238; border: 1px solid rgba(240,215,140,.25); border-radius: 16px; padding: 24px; color: #e0e6f0; }
.dialog h3 { font-size: 18px; color: #f0d78c; margin-bottom: 12px; }
.dialog .dialog-body { line-height: 1.8; font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.dialog .dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
.dialog-close { position: absolute; right: 14px; top: 10px; border: none; background: none; color: #8895b5; font-size: 24px; cursor: pointer; }
.qr { min-height: 300px; display: flex; align-items: center; justify-content: center; }
.qr iframe { width: 300px; height: 300px; border: 0; }
.qr img { width: 260px; height: 260px; background: #fff; border-radius: 10px; padding: 8px; }
.toast { position: fixed; left: 50%; bottom: 40px; transform: translateX(-50%); z-index: 10000; background: rgba(0,0,0,.85); color: #fff; padding: 10px 20px; border-radius: 20px; font-size: 14px; display: none; }

@media (max-width: 720px) {
  .nav { padding: 14px 18px; }
  .page { padding: 8px 0 50px; }
  .page-head { align-items: flex-start; flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .list-row { grid-template-columns: 1fr; }
  .list-actions { justify-content: flex-start; }
}
