:root {
  --blue: #409eff;
  --blue-strong: #2f7cff;
  --blue-soft: #ecf5ff;
  --orange: #ff7a1a;
  --text: #303133;
  --muted: #606266;
  --line: #ebeef5;
  --panel: #ffffff;
  --page: #f5f7fa;
  --danger: #f56c6c;
  --success: #67c23a;
  --warning: #e6a23c;
  --shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  background: var(--page);
  font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
  letter-spacing: 0;
  font-size: 14px;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 0;
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.hidden-file {
  display: none;
}

.login-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 420px;
  align-items: center;
  gap: 32px;
  padding: 48px 9vw;
  background:
    radial-gradient(circle at 54% 6%, rgba(255, 255, 255, 0.18) 0 7%, transparent 8%),
    radial-gradient(circle at 92% 52%, rgba(255, 255, 255, 0.12) 0 13%, transparent 14%),
    linear-gradient(135deg, #095dff 0%, #08b8ed 100%);
  overflow: hidden;
}

.login-visual {
  min-height: 520px;
  position: relative;
}

.login-visual::before {
  content: "";
  position: absolute;
  inset: 12% auto auto 8%;
  width: min(38vw, 430px);
  aspect-ratio: 1.15;
  border: 3px solid rgba(159, 225, 255, 0.75);
  transform: skewY(-20deg) rotate(-4deg);
  border-radius: 24px;
}

.login-cube {
  position: absolute;
  left: 12%;
  top: 30%;
  width: min(34vw, 360px);
  height: 240px;
  background: linear-gradient(145deg, rgba(116, 229, 255, 0.95), rgba(53, 124, 255, 0.75));
  clip-path: polygon(50% 0, 100% 22%, 100% 74%, 50% 100%, 0 74%, 0 22%);
  box-shadow: 0 48px 80px rgba(0, 37, 137, 0.3);
}

.login-cube::after {
  content: "5G";
  position: absolute;
  left: 50%;
  top: 38%;
  transform: translate(-50%, -50%);
  color: rgba(255, 255, 255, 0.78);
  font-size: 84px;
  font-weight: 800;
}

.login-card {
  background: rgba(255, 255, 255, 0.98);
  border-radius: 8px;
  padding: 28px 30px;
  box-shadow: 0 22px 58px rgba(0, 36, 118, 0.22);
}

.brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin-bottom: 22px;
}

.brand-mark {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: conic-gradient(from 35deg, #0677d8, #0694df, #ffffff 0.28turn, #0677d8 0.34turn);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 50%;
  border: 4px solid #fff;
  border-left-color: transparent;
}

.brand-title {
  color: #0873bd;
  font-size: 30px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
}

.brand-subtitle {
  color: #5398cb;
  font-size: 12px;
  margin-top: 7px;
  text-align: center;
}

.auth-tabs {
  display: flex;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
  color: var(--muted);
}

.auth-tab {
  background: transparent;
  color: var(--muted);
  padding: 4px 0;
  font-weight: 700;
}

.auth-tab.active {
  color: var(--blue-strong);
}

.form-stack {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 6px;
}

.field label {
  color: #455266;
  font-size: 13px;
}

.input,
.select,
.textarea {
  width: 100%;
  height: 40px;
  border: 1px solid #dcdfe6;
  border-radius: 4px;
  padding: 0 15px;
  background: #fff;
  color: var(--text);
  outline: none;
  transition: border-color 0.18s ease, box-shadow 0.18s ease;
}

.textarea {
  min-height: 88px;
  padding: 10px 15px;
  resize: vertical;
}

.input:focus,
.select:focus,
.textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 2px rgba(64, 158, 255, 0.12);
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.link-button {
  background: transparent;
  color: var(--blue-strong);
  padding: 0;
}

.primary-btn,
.outline-btn,
.ghost-btn,
.danger-btn,
.success-btn {
  min-height: 40px;
  border-radius: 4px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 500;
  transition: transform 0.12s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.primary-btn {
  color: #fff;
  background: var(--blue);
  border: 1px solid var(--blue);
}

.primary-btn:hover,
.outline-btn:hover,
.ghost-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 5px 14px rgba(64, 158, 255, 0.16);
}

.outline-btn {
  color: var(--blue-strong);
  background: #fff;
  border: 1px solid var(--blue-strong);
}

.ghost-btn {
  color: #606266;
  background: #fff;
  border: 1px solid var(--line);
}

.danger-btn {
  color: #fff;
  background: var(--danger);
}

.success-btn {
  color: #fff;
  background: var(--success);
}

.full-btn {
  width: 100%;
}

.helper-row {
  color: var(--muted);
  font-size: 13px;
  display: flex;
  justify-content: center;
  gap: 8px;
  padding-top: 8px;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 274px minmax(0, 1fr);
  background: #fff;
}

.sidebar {
  min-height: 100vh;
  border-right: 1px solid var(--line);
  display: grid;
  grid-template-rows: auto 1fr auto;
  background: #fff;
  box-shadow: 2px 0 8px rgba(0, 0, 0, 0.03);
  overflow-x: hidden;
}

.side-brand {
  height: 112px;
  display: grid;
  place-items: center;
  border-bottom: 1px solid var(--line);
}

.side-brand .brand {
  margin: 0;
  gap: 10px;
}

.side-brand .brand-title {
  font-size: 30px;
  letter-spacing: 0;
}

.side-nav {
  padding: 0;
}

.nav-item {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 0 32px;
  color: #4d5968;
  background: #fff;
  border-left: 4px solid transparent;
  width: 100%;
  text-align: left;
  font-size: 20px;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav-item:hover {
  color: var(--blue);
  background: #f4f9ff;
}

.nav-item.active {
  color: var(--blue);
  background: #eaf3ff;
  border-left-color: var(--blue);
}

.side-user {
  border-top: 1px solid var(--line);
  padding: 20px 22px 16px;
  display: grid;
  gap: 10px;
}

.avatar-line {
  display: flex;
  align-items: center;
  gap: 12px;
}

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: linear-gradient(145deg, #178dff, #54b7ff);
  font-weight: 800;
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
  margin-right: 5px;
}

.dot-pink {
  background: #ee3db7;
}

.dot-blue {
  background: #4377ff;
}

.dot-green {
  background: #5dcc52;
}

.side-user-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.main {
  min-width: 0;
  background: var(--page);
}

.topbar {
  min-height: 54px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--line);
}

.notice {
  flex: 1;
  min-width: 260px;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 36px;
  border: 1px solid #f5dab1;
  border-radius: 4px;
  background: #fdf6ec;
  color: #8a5a22;
  overflow: hidden;
  padding: 0 12px;
}

.notice-badge {
  color: #fff;
  background: #ff7519;
  border-radius: 4px;
  padding: 5px 13px;
  font-weight: 700;
  white-space: nowrap;
}

.notice span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tabs {
  min-height: 56px;
  display: flex;
  align-items: stretch;
  gap: 0;
  padding-left: 16px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
}

.tab {
  flex: 0 0 164px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: #fff;
  color: #606266;
  border-bottom: 3px solid transparent;
  border-left: 1px solid transparent;
  border-right: 1px solid transparent;
}

.tab.active {
  background: #ecf5ff;
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.content {
  padding: 26px 28px 42px;
}

.section {
  display: grid;
  gap: 16px;
}

.section h2,
.section h3,
.toolbar h2,
.toolbar h3 {
  margin: 0;
  color: #303133;
  font-weight: 500;
}

.dashboard-hero {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 16px;
}

.income-card {
  min-height: 156px;
  border-radius: 4px;
  padding: 22px 24px;
  color: #fff;
  display: grid;
  align-content: center;
  gap: 18px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, #2f8bff, #5cc7ff);
  box-shadow: var(--shadow);
}

.income-card::before {
  content: "";
  position: absolute;
  right: -34px;
  bottom: -48px;
  width: 150px;
  height: 150px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
}

.income-card::after {
  content: "";
  position: absolute;
  right: 24px;
  top: 28px;
  width: 52px;
  height: 52px;
  border-radius: 14px;
  border: 2px solid rgba(255, 255, 255, 0.24);
  transform: rotate(18deg);
}

.income-card.settled {
  background: linear-gradient(135deg, #ff7a1a, #ffc35b);
}

.income-card.available {
  background: linear-gradient(135deg, #7357ff, #18c2f4);
}

.income-card.history {
  background: linear-gradient(135deg, #18ad7f, #6ad26b);
}

.income-card span {
  position: relative;
  z-index: 1;
  font-size: 16px;
  font-weight: 700;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.16);
}

.income-card strong {
  position: relative;
  z-index: 1;
  font-size: 38px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: 0;
}

.quick-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
}

.shortcut-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(200px, 1fr));
  gap: 16px;
}

.shortcut-card {
  min-height: 96px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow);
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  align-items: center;
  gap: 14px;
  text-align: left;
  color: #303133;
}

.shortcut-card span {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: var(--blue);
  background: #ecf5ff;
}

.shortcut-card b {
  font-size: 18px;
  font-weight: 500;
}

.shortcut-card em {
  color: var(--blue);
  font-size: 20px;
  font-style: normal;
  font-weight: 700;
}

.toolbar,
.subtabs,
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}

.toolbar {
  justify-content: space-between;
}

.subtabs {
  min-height: 56px;
  padding: 0 28px;
  background: #fff;
  border-radius: 4px;
  box-shadow: var(--shadow);
  border: 1px solid #ebeef5;
}

.subtab {
  height: 56px;
  background: transparent;
  color: #606266;
  border-bottom: 4px solid transparent;
  padding: 0 20px;
  font-size: 20px;
}

.subtab.active {
  color: var(--blue);
  border-bottom-color: var(--blue);
}

.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 4px;
  box-shadow: var(--shadow);
  padding: 20px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 16px;
}

.form-grid .wide {
  grid-column: 1 / -1;
}

.upload-box {
  min-height: 150px;
  border: 1px dashed #c0c4cc;
  border-radius: 4px;
  background: #fafafa;
  display: grid;
  place-items: center;
  text-align: center;
  color: #909399;
  padding: 18px;
  transition: border-color 0.18s ease, background 0.18s ease;
}

.upload-box:hover {
  border-color: var(--blue);
  background: #f8fbff;
}

.upload-box img,
.audit-img {
  max-width: 100%;
  max-height: 260px;
  border-radius: 6px;
  border: 1px solid var(--line);
  object-fit: contain;
  background: #fff;
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 40px;
}

.metric {
  min-height: 112px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 10px;
  background: #fff;
  border: 1px solid #edf1f7;
  border-radius: 4px;
  box-shadow: var(--shadow);
}

.metric strong {
  font-size: 28px;
  font-weight: 500;
  color: #000;
}

.metric small {
  color: var(--muted);
}

.money-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(220px, 1fr));
  gap: 12px;
}

.money-card {
  min-height: 152px;
  border-radius: 7px;
  padding: 28px 18px;
  color: #050b18;
  display: grid;
  gap: 14px;
  align-content: center;
  overflow: hidden;
  position: relative;
}

.money-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -30px;
  height: 76px;
  background: rgba(255, 255, 255, 0.25);
  border-radius: 50% 50% 0 0;
}

.money-card.red {
  background: linear-gradient(110deg, #ff405e, #ffd15c);
}

.money-card.blue {
  background: linear-gradient(110deg, #16c0e7, #6158f1);
}

.money-card.purple {
  background: linear-gradient(110deg, #6400f8, #b72ae8);
}

.money-card strong {
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  box-shadow: var(--shadow);
}

table {
  width: 100%;
  min-width: 860px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 14px;
  border-bottom: 1px solid #ebeef5;
  text-align: left;
  vertical-align: top;
  color: #606266;
}

th {
  background: #4b82f0;
  color: #fff;
  font-weight: 700;
  font-size: 15px;
}

th.sortable {
  cursor: pointer;
}

tr:nth-child(even) td {
  background: #fafcff;
}

tbody tr:hover td {
  background: #f5f9ff;
}

.status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  height: 24px;
  border-radius: 12px;
  padding: 0 9px;
  font-size: 13px;
}

.status.pending {
  color: #9a6400;
  background: #fff4d6;
}

.status.approved {
  color: #087f5b;
  background: #dff7ec;
}

.status.rejected {
  color: #b4232a;
  background: #ffe3e5;
}

.status.paid {
  color: #0663b7;
  background: #e1f0ff;
}

.stars {
  color: #ffb020;
  font-weight: 800;
}

.copy-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.poster-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 14px;
}

.poster {
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
  box-shadow: var(--shadow);
}

.poster img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}

.payment-list {
  display: grid;
  gap: 10px;
}

.payment-item {
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 14px 16px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  background: rgba(0, 0, 0, 0.5);
  display: grid;
  place-items: center;
  padding: 24px;
}

.modal {
  width: min(920px, 96vw);
  max-height: 88vh;
  overflow: auto;
  background: #fff;
  border-radius: 4px;
  box-shadow: 0 24px 72px rgba(0, 0, 0, 0.24);
}

.modal-header {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 54px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
}

.modal-header h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 500;
}

.modal-body {
  padding: 22px 26px;
  display: grid;
  gap: 16px;
}

.modal-footer {
  border-top: 1px solid var(--line);
  padding: 14px 22px;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.tree {
  display: grid;
  gap: 10px;
}

.tree-node {
  border-left: 3px solid var(--blue);
  padding-left: 12px;
}

.tree-card {
  background: #f7fbff;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 10px 12px;
}

.empty {
  padding: 40px 20px;
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 80;
  min-width: 220px;
  max-width: 360px;
  background: #122033;
  color: #fff;
  border-radius: 8px;
  padding: 12px 16px;
  box-shadow: var(--shadow);
}

@media (max-width: 1100px) {
  .app-shell {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .side-brand .brand-title,
  .side-brand .brand-subtitle,
  .nav-item span,
  .side-user .avatar-line div:not(.avatar),
  .side-user-grid {
    display: none;
  }

  .nav-item {
    justify-content: center;
    padding: 0;
  }

  .topbar {
    flex-wrap: wrap;
  }

  .summary-grid,
  .money-grid,
  .dashboard-hero,
  .quick-stats {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }

  .shortcut-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .login-page {
    grid-template-columns: 1fr;
    padding: 28px 18px;
  }

  .login-visual {
    display: none;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    min-height: auto;
    grid-template-rows: auto auto;
  }

  .side-brand {
    height: 80px;
  }

  .side-nav {
    display: flex;
    overflow-x: auto;
    padding: 0;
  }

  .nav-item {
    min-width: 92px;
    height: 58px;
  }

  .side-user {
    display: none;
  }

  .tabs {
    overflow-x: auto;
    padding-left: 0;
  }

  .tab {
    flex-basis: 128px;
  }

  .content {
    padding: 16px;
  }

  .form-grid,
  .summary-grid,
  .money-grid,
  .poster-grid,
  .dashboard-hero,
  .quick-stats,
  .shortcut-grid {
    grid-template-columns: 1fr;
  }
}
