:root {
  --bg: #0f1115;
  --card: #191c24;
  --card-2: #21252f;
  --line: #2b303c;
  --text: #eef1f6;
  --muted: #9aa3b2;
  --brand: #ff8c42;
  --brand-2: #ffb26b;
  --ok: #37d67a;
  --danger: #ff5c5c;
  --info: #5b9cff;
  --radius: 16px;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  background: radial-gradient(1200px 600px at 50% -10%, #23262f 0%, var(--bg) 55%);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  min-height: 100vh;
  min-height: 100dvh;
}

.hidden {
  display: none !important;
}

/* ---------- 应用主体（熊猫官方 pure-admin 浅色布局） ---------- */
.pa-app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: #f2f3f5;
  color: #303133;
}

/* 顶部横向导航 */
.pa-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 48px;
  padding: 0 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.08);
  position: sticky;
  top: 0;
  z-index: 20;
}

.pa-header__left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.pa-logo {
  width: 28px;
  height: 28px;
  object-fit: contain;
  border-radius: 6px;
}

.pa-brand {
  font-weight: 700;
  font-size: 18px;
  color: #409eff;
  white-space: nowrap;
}

.pa-menu {
  display: flex;
  align-items: center;
  height: 48px;
  margin-left: 12px;
}

.pa-menu__item {
  position: relative;
  display: flex;
  align-items: center;
  height: 48px;
  padding: 0 18px;
  font-size: 14px;
  color: #303133;
  cursor: pointer;
  white-space: nowrap;
  transition: color 0.15s;
}

.pa-menu__item:hover {
  color: #409eff;
}

.pa-menu__item.is-active {
  color: #409eff;
}

.pa-menu__item.is-active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  background: #409eff;
}

.pa-header__right {
  display: flex;
  align-items: center;
  gap: 6px;
}

.pa-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: none;
  background: transparent;
  color: #606266;
  border-radius: 6px;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.pa-tool-btn:hover {
  background: #f2f3f5;
  color: #409eff;
}

.pa-account {
  font-size: 14px;
  color: #303133;
  padding: 0 6px;
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 标签页 */
.pa-tags {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 16px;
  background: #fff;
  box-shadow: 0 1px 4px rgba(0, 21, 41, 0.04);
}

.pa-tag {
  display: inline-flex;
  align-items: center;
  height: 26px;
  padding: 0 14px;
  font-size: 12px;
  border: 1px solid #e4e7ed;
  border-radius: 3px;
  color: #606266;
  background: #fff;
}

.pa-tag.is-active {
  color: #fff;
  background: #409eff;
  border-color: #409eff;
}

.pa-tag.is-active::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  margin-right: 8px;
}

.pa-main {
  flex: 1;
  padding: 16px;
}

.pa-footer {
  text-align: center;
  color: #909399;
  font-size: 12px;
  padding: 16px;
}

/* ---------- 登录页（熊猫官方模板风格 · 浅色） ---------- */
.pa-login {
  position: relative;
  min-height: 100vh;
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.pa-login__bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  user-select: none;
}

.pa-login__illus {
  position: absolute;
  left: 5%;
  top: 50%;
  transform: translateY(-50%);
  width: min(46vw, 560px);
  z-index: 1;
  pointer-events: none;
}

.pa-login__illus img {
  width: 100%;
  height: auto;
  display: block;
}

.pa-login__panel {
  position: relative;
  z-index: 2;
  width: 500px;
  max-width: 100%;
  display: flex;
  justify-content: center;
  padding: 40px 24px;
}

.pa-login__form {
  width: 360px;
  max-width: 100%;
}

.pa-login__avatar {
  font-size: 56px;
  line-height: 1;
  text-align: center;
}

.pa-login__title {
  margin: 15px 0;
  text-align: center;
  font-size: 30px;
  font-weight: 700;
  color: #999;
}

.pa-form {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.pa-field {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 40px;
  padding: 0 11px;
  background: #fff;
  border-radius: 4px;
  box-shadow: inset 0 0 0 1px #dcdfe6;
  transition: box-shadow 0.15s;
}

.pa-field:focus-within {
  box-shadow: inset 0 0 0 1px #409eff;
}

.pa-field__icon {
  display: flex;
  align-items: center;
  color: #a8abb2;
  flex: 0 0 auto;
}

.pa-field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: none;
  outline: none;
  background: transparent;
  font-size: 14px;
  color: #606266;
}

.pa-field input::placeholder {
  color: #a8abb2;
}

.pa-btn {
  height: 40px;
  border: none;
  border-radius: 4px;
  background: #409eff;
  color: #fff;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 4px;
  cursor: pointer;
  transition: background 0.15s;
}

.pa-btn:hover {
  background: #66b1ff;
}

.pa-btn:active {
  transform: scale(0.99);
}

.pa-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.pa-login__tip {
  margin: 0;
  text-align: center;
  font-size: 12px;
  color: #a8abb2;
}

@media (max-width: 768px) {
  .pa-login {
    justify-content: center;
  }
  .pa-login__illus {
    display: none;
  }
  .pa-login__panel {
    width: 100%;
    padding: 24px;
  }
}

.btn {
  border: none;
  border-radius: 12px;
  font-size: 15px;
  font-weight: 600;
  padding: 13px 16px;
  cursor: pointer;
  transition: transform 0.05s, opacity 0.15s, background 0.15s;
}

.btn:active {
  transform: scale(0.98);
}

.btn.primary {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #241300;
  margin-top: 4px;
}

.btn.primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn.ghost {
  background: transparent;
  border: 1px solid var(--line);
  color: var(--muted);
}

.btn.small {
  padding: 7px 12px;
  font-size: 13px;
}

.msg {
  margin: 4px 0 0;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.msg.error {
  color: var(--danger);
}
.msg.ok {
  color: var(--ok);
}

/* ---------- 看板（浅色卡片） ---------- */
.pa-dashboard {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.pa-card {
  background: #fff;
  border: 1px solid #e4e7ed;
  border-radius: 4px;
  padding: 20px;
  box-shadow: 0 1px 8px rgba(0, 21, 41, 0.04);
}

.pa-card__title {
  margin: 0 0 16px;
  font-size: 16px;
  font-weight: 600;
  color: #303133;
  display: flex;
  align-items: center;
  gap: 8px;
}

.pa-card__title::before {
  content: "";
  width: 4px;
  height: 15px;
  border-radius: 2px;
  background: #409eff;
}

/* 欢迎 / 余额 */
.pa-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.pa-hero__info {
  min-width: 0;
}

.pa-hero__welcome {
  color: #303133;
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 14px;
}

.pa-hero__label {
  color: #909399;
  font-size: 13px;
  margin-bottom: 6px;
}

.pa-hero__balance {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  color: #e6a23c;
  word-break: break-all;
}

.pa-refresh-btn {
  flex: 0 0 auto;
  height: 34px;
  padding: 0 18px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  color: #606266;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.pa-refresh-btn:hover {
  color: #409eff;
  border-color: #c6e2ff;
  background: #ecf5ff;
}

.pa-refresh-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* 今日订单 */
.orders-wrap {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

.order-card {
  background: #fafafa;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  padding: 14px;
}

.order-head {
  font-weight: 600;
  color: #303133;
  margin-bottom: 12px;
}

.order-items {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.order-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 4px;
  background: #fff;
  border: 1px solid #ebeef5;
  border-radius: 4px;
}

.oi-value {
  font-size: 22px;
  font-weight: 700;
  color: #409eff;
}

.oi-name {
  font-size: 12px;
  color: #909399;
}

/* 今日积分 chips */
.chips-wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #f4f9ff;
  border: 1px solid #d9ecff;
  border-radius: 4px;
  padding: 8px 16px;
}

.chip-name {
  color: #606266;
  font-size: 13px;
}

.chip-value {
  font-size: 18px;
  font-weight: 700;
  color: #67c23a;
}

/* 价格区间 */
.prices-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.price-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  background: #fafafa;
  border: 1px solid #ebeef5;
  border-radius: 4px;
  padding: 12px 14px;
}

.price-label {
  font-size: 13px;
  color: #606266;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.price-range {
  font-size: 15px;
  font-weight: 600;
  color: #409eff;
  white-space: nowrap;
}

/* ---------- 工作室订单（订单详情） ---------- */
.ov-toolbar {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 16px;
}

.ov-label {
  font-size: 14px;
  color: #606266;
}

.pa-select {
  height: 32px;
  min-width: 160px;
  padding: 0 10px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  color: #606266;
  font-size: 14px;
  outline: none;
  cursor: pointer;
  transition: border-color 0.15s;
}

.pa-select:focus {
  border-color: #409eff;
}

.pa-btn-primary {
  height: 32px;
  padding: 0 18px;
  border: none;
  border-radius: 4px;
  background: #409eff;
  color: #fff;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s;
}

.pa-btn-primary:hover {
  background: #66b1ff;
}

.ov-total {
  margin-left: auto;
  font-size: 13px;
  color: #909399;
}

.ov-table-wrap {
  position: relative;
  overflow-x: auto;
  border: 1px solid #ebeef5;
  border-radius: 4px;
}

.pa-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.pa-table thead th {
  background: #fafafa;
  color: #909399;
  font-weight: 500;
  text-align: left;
  padding: 12px 14px;
  border-bottom: 1px solid #ebeef5;
  white-space: nowrap;
}

.pa-table tbody td {
  padding: 12px 14px;
  border-bottom: 1px solid #ebeef5;
  color: #606266;
}

.pa-table tbody tr:last-child td {
  border-bottom: none;
}

.pa-table tbody tr:hover {
  background: #f5f7fa;
}

.pa-table .mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  color: #303133;
}

.pa-table .c-wait {
  color: #e6a23c;
  font-weight: 600;
}

.pa-table .c-ok {
  color: #67c23a;
  font-weight: 600;
}

.pa-table .c-fail {
  color: #f56c6c;
  font-weight: 600;
}

.ov-loading {
  text-align: center;
  color: #909399;
  padding: 24px !important;
}

.ov-empty {
  text-align: center;
  color: #909399;
  font-size: 14px;
  padding: 32px 0;
}

.ov-pager {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-top: 16px;
}

.pager-btn {
  height: 30px;
  padding: 0 14px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  background: #fff;
  color: #606266;
  font-size: 13px;
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}

.pager-btn:hover:not(:disabled) {
  color: #409eff;
  border-color: #c6e2ff;
}

.pager-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.pager-info {
  font-size: 13px;
  color: #606266;
}

/* ---------- 桌面端 ---------- */
@media (min-width: 720px) {
  .orders-wrap {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .prices-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1000px) {
  .prices-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

/* ---------- 移动端（H5） ---------- */
@media (max-width: 719px) {
  .pa-menu {
    display: none;
  }
  .pa-brand {
    font-size: 16px;
  }
  .pa-hero__balance {
    font-size: 32px;
  }
  .order-items {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
